YSQL

Introduce

The following subcommands are used to execute YSQL scripts.

Usage

Usage: orxray ysql [OPTIONS] [YSQL file]

OPTIONS:
    -x, --pid integer                  Target process ID.  Specify the process ID to be analyzed by the YSQL.
    -a, --agent integer                Agent id. Specify the agent to run the ylang script.
    -e string                          YSQL statement.

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

[YSQL file]

Specify the YSQL script file to run.

-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

-e "YSQL statement"

Specify the YSQL statement to run.

Example

1. Run YSQL statement

orxray ysql "select res_mem from proc" -x 6378

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