GXF Command Line Interface#

The GXF command line interface (CLI) can be invoked by gxf_cli command with the following options:

gxf_cli –help
gxf_cli --version
gxf_cli [-s SERVER] [-t TRANSPORT] command [args]
Where
  • -h/--help brings up the help options and exit

  • -v/--version prints the version and exits.

Optional arguments:

  • -s/--server: specify the server address, bed default it is ‘localhost:8000’, which is the default address used by the http server in the GXF graph.

  • -t/--transport: specify the transport type, by default it is ‘http’, can also be set to ‘grpc’ if the GXF graph enables GRPC server

The sections below provide details about the command options that can be used with the gxf_cli.

stat#

This command is used to continuous monitor the statistic information from a running gxe process.

Command syntax

gxf_cli stat [-h] [-u UID] target

The target can be one of the follows:

  • entity - Monitor the entity statistics

  • codelet - Monitor the codelet statistics

  • event - Monitor the scheduling event statistics

  • term - Monitor the scheduling term statistics

Optional arguments:

  • -u/--uid: only monitor data on an entity or component with specified uid

  • -h/--help - Print help and exit.

config#

This command is used to set the parameter of a specific component in a running graph

Command syntax

gxf_cli config [-h] cid key value
  • cid: cid is the uid of the target component, can be replaced by “entity_name/component_name” if the names are available

  • key: the parameter name

  • value: the value to be set, in JSON format

Optional arguments:

  • -h/--help - Print help and exit.

dump#

This command is used to dump the entities in the current running graph in parsable YAML format.

command syntax

gxf_cli dump [-h] [-u UID]

Optional arguments:

  • -u/--uid: only dump the data on the entity with specified uid

  • -h/--help - Print help and exit.

Sample content dumped from a running graph:

---
name: rx
id: 8
components:
  - name: signal
    id: 9
    type: nvidia::gxf::DoubleBufferReceiver
    parameters:
      capacity: 1
      policy: 2
  - name: nvidia::gxf::MessageAvailableSchedulingTerm_rx
    id: 10
    type: nvidia::gxf::MessageAvailableSchedulingTerm
    parameters:
      receiver: rx/signal
      min_size: 1
  - name: ping_rx
    id: 11
    type: nvidia::gxf::test::PingRx
    parameters:
      signal: rx/signal
  - name: step_count_rx
    id: 12
    type: nvidia::gxf::test::StepCount
    parameters:
      use_assert: false
      expected_start_count: 1
      expected_count: 100