YSQL

run ysql statement.

usage

Usage: orxray ysql "ysql expression" [OPTIONS]

OPTIONS:
    -x, --pid integer                  pid
    -a, --agent integer                agent

GLOBAL OPTIONS:
    --help
    --config                           specify config file, default is ~/.orxray/config.

-x, --pid "pid number"

Specify the pid you want to analyze.

-a, --agent "agent id"

Specify the agent, the default agent is the one you specified in orxray agent set-default xx

example

# orxray ysql "select res_mem from proc" -x 6378

Create YSQL Analyzer

Usage: orxray new-ysql name [file] [OPTIONS]

OPTIONS:
    -c, --command string               ysql string.
    --desc string                      description

GLOBAL OPTIONS:
    --help
    --config                           specify config file, default is ~/.orxray/config.

file

If specify the file, the command will read the file as the ysql statement.

-c, --command "ysql statement"

You can specify ysql statement by -c or –command option.

example

1. create a ysql analyzer use -c option

# orxray new-ysql res_mem -c "select res_mem from proc"

2. create a ysql analyzer use file

# orxray new-ysql res_mem res_mem.ysql