Autorun

Introduce

The auto-run feature allows you to set up automatic running tasks that will run analysis tasks on a specified machine at regular intervals.

Usage

Usage: orxray autorun command [OPTIONS]

COMMAND:
    create
    list
    modify
    delete

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

Create autorun tasks

This command creates a new autorun task.

Usage: orxray autorun create [OPTIONS]

OPTIONS:
    --target-type string               Specify the type of the autorun, it must be app, pid or pgid.
    --period integer                   The running period of the task.
    --stack string                     Specify the application you want to analyze, can add multiple times.
    --pid integer                      Pid of the application you want to analyze.
    --pgid integer                     Pgid of the applications you want to analyze.
    --agent, -a integer                The agent you want run on. 
    --tool string                      The tool name you want to run.


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

--target-type "type"

The type of autorun task, which can be app, pid or pgid.

--period "time"

Running period, specifying how often to run the automatic task, in seconds.

--stack "application"

When target type is app, this parameter specifies the application to be analyzed, and can be specified multiple times.

--pid 'pid'

When target type is pid, this parameter specifies the program pid to be analyzed.

--pgid 'pgid'

When target type is pgid, this parameter specifies the pgid of the program to be analyzed.

--agent 'agent id'

Specify on which agent you want to run the automatic task. If not specified then it runs on all agents.

--tool 'tool name'

Specifies the analysis tool that the autorun task runs.

Examples

$ orxray autorun create --target-type app --stacks nginx --period 60 --tool c-on-cpu --agent 54
ID: 10075

List autorun

Lists all autorun tasks.

Usage: orxray autorun list

OPTIONS:

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

Examples

$ orxray autorun list
ID      TARGET TYPE     PERIOD  STACKS          PID     PGID    TOOL ID CREATE TIME             MODIFY TIME
10      app             300     *                               10      2022-04-01 22:49:26     2022-04-01 22:58:00
11      app             300     openresty                       11      2022-04-01 22:49:26     2022-04-01 22:58:00
                                openresty-edge
9       app             86400   openresty                       13      2022-04-01 22:20:58     2022-04-01 22:58:00
                                openresty-edge

Modify autorun

modify autorun task.

Usage: orxray autorun modify ID

OPTIONS:
    --target-type string               Specify the type of the autorun, it must be app, pid or pgid.
    --period integer                   The running period of the task.
    --stack string                     Specify the application you want to analyze, can add multiple times.
    --pid integer                      PID of the application you want to analyze.
    --pgid integer                     PGID of the applications you want to analyze.
    --agent, -a integer                The agent you want run on. 
    --all-agents                       The autorun task will be run on all agents.
    --tool string                      The tool name you want to run.

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

ID

The ID of the autorun task to be modified.

--target-type "type"

The type of action run, which can be app, pid or pgid.

--period "time"

Running period, specifying how often to run the automatic task, in seconds.

--stack "application"

When target type is app, this parameter specifies the application to be analyzed, and can be specified multiple times.

--pid 'pid'

When target type is pid, this parameter specifies the program pid to be analyzed.

--pgid 'pgid'

When target type is pgid, this parameter specifies the pgid of the program to be analyzed.

--agent 'agent id'

Specify on which agent you want to run the automatic task.

--all-agents

Run the automatic task on all agents.

--tool 'tool name'

Specifies the analysis tool that the autorun task runs.

Examples

$ orxray autorun modify 1 --target-type app --stacks nginx --period 60 --tool c-on-cpu --agent 54
OK

Delete autorun

Usage: orxray autorun delete ID

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

ID

Set the ID of the autorun task you want to delete.

示例

$ orxray autorun delete 1
OK