Analyzer
usage
Usage: orxray analyzer command [OPTIONS]
COMMAND:
create
run
list
search
GLOBAL OPTIONS:
--help
--config specify config file, default is ~/.orxray/config.
Create Analyzer
Usage: orxray analyzer create name [OPTIONS]
OPTIONS:
--desc description.
--ysql ysql.
--ylang ylang.
--ylua ylua.
--opslang opslang.
GLOBAL OPTIONS:
--help
--config specify config file, default is ~/.orxray/config.
--desc "description"
description of this analyzer
--ysql 'ysql code'
specify ysql code of this analyzer
--ylang 'ylang code'
specify ylang code of this analyzer
--ylua 'ylua code'
specify ylua code of this analyzer
--opslang 'opslang code'
specify opslang code of this analyzer
example
# orxray analyzer create cli-test --ysql 'select res_mem from proc'
ID: 10075
Run analyzer by given tool name
Usage: orxray analyzer run tool [OPTIONS]
OPTIONS:
-a, --agent integer agent id, please use agent default command to set default agent.
-x, --pid integer pid.
-c, --exe string command.
GLOBAL OPTIONS:
--help
--config specify config file, default is ~/.orxray/config.
example
1. run analyzer by command
# orxray analyzer run c-on-cpu -c "/bin/ls"
job id is 4386874
info: start to run job(4386874) on the console side
info: job directory: 2021-07-01/07/job-4386874
info: analyzing the specified exe: /bin/ls
info: job runtime: stap
info: agent: start to run the tool: c-on-cpu
info: agent: c-on-cpu.ljbc hit the cache
info: agent: start to collect process build info
info: agent: build info hit the cache
info: agent: orxray_count_on_cpu_frames_XXXXXXX.ko hit the cache
info: agent: orxray_c_on_cpu_XXXXXXX.ko hit the cache
info: agent: start to run the tool
info: agent: running tool c-on-cpu ...
info: agent: got 1 samples in 1.032385 second
info: agent: sample-frames: 1000, total-frames: 4, total-time: 15
info: agent: running tool c-on-cpu ...
info: agent: running tool c-on-cpu ...
info: waiting for the agent's response [1]
{"status":"finished","sample_count":0}
2. run analyzer by pid
# orxray analyzer run c-on-cpu -x 413
job id is 4386875
info: start to run job(4386874) on the console side
info: job directory: 2021-07-01/07/job-4386875
info: analyzing the specified exe: /usr/local/nginx/sbin/nginx
info: job runtime: stap
info: agent: start to run the tool: c-on-cpu
info: agent: c-on-cpu.ljbc hit the cache
info: agent: start to collect process build info
info: agent: build info hit the cache
info: agent: orxray_count_on_cpu_frames_XXXXXXX.ko hit the cache
info: agent: orxray_c_on_cpu_XXXXXXX.ko hit the cache
info: agent: start to run the tool
info: agent: running tool c-on-cpu ...
info: agent: got 1 samples in 1.032385 second
info: agent: sample-frames: 1000, total-frames: 4, total-time: 15
info: agent: running tool c-on-cpu ...
info: agent: running tool c-on-cpu ...
info: waiting for the agent's response [1]
{"status":"finished","sample_count":0}
List all analyzers
Usage: orxray analyzer list
OPTIONS:
-s, --page-size integer page size, 10(default).
GLOBAL OPTIONS:
--help
--config specify config file, default is ~/.orxray/config.
-s, --page-size integer
Specify the size of list returned.
example
# orxray analyzer list
ID NAME DESCRIPTION
1 count-on-cpu-frames count on cpu frames
2 count-off-cpu-frames count off cpu frames
3 lj-c-on-cpu C-land CPU Flame Graph
7 c-on-cpu C-land CPU Flame Graph
8 c-off-cpu C-land off-CPU Flame Graph
9 kernel-on-cpu kernel-land on-CPU Flame Graph
11 resty-memory Application-Level Memory Usage Breakdown
12 count-lj-newgco-frames count LuaJIT new GC objects frames
14 glibc-chunks Distributions of Memory Chunk Sizes in Glibc Allocator
15 lj-gco-stat Statistics for LuaJIT GC Objects
Search analyzer
Usage: orxray tool search WORD [OPTIONS]
OPTIONS:
-s, --page-size integer page size, 10(default).
GLOBAL OPTIONS:
--help
--config specify config file, default is ~/.orxray/config.
-s, --page-size integer
Specify the size of list returned.
example
# orxray analyzer search cpu
count-on-cpu-frames
count-off-cpu-frames
lj-c-on-cpu
lj-lua-on-cpu
lj-c-off-cpu
lj-lua-off-cpu
c-on-cpu
c-off-cpu
kernel-on-cpu
count-lj-c-on-cpu