YSQL

Introduction

The following subcommands are used to execute YSQL scripts.

Back to TOC

Usage

Usage: orxray ysql [OPTIONS] [YSQL file]

OPTIONS:
    -p, --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.
    -t integer                         Sample time in seconds.
    --no-need-unwind                   The script no need unwind data.

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

[YSQL file]

Specify the YSQL script file to run.

-p, --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.

Back to TOC

Example

Run YSQL statement

orxray ysql -e "select res_mem from proc" -p 6378

Create a YSQL analyzer use -c option

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

Create a YSQL analyzer use file

orxray new-ysql res_mem res_mem.ysql

Back to TOC