xref: /linux/Documentation/tools/rtla/common_options.txt (revision aad1530ff6cedb2f6fb02f17950bda0bfef68db2)
196b546c2SGopi Krishna Menon**-c**, **--cpus** *cpu-list*
296b546c2SGopi Krishna Menon
396b546c2SGopi Krishna Menon        Set the osnoise tracer to run the sample threads in the cpu-list.
496b546c2SGopi Krishna Menon
596b546c2SGopi Krishna Menon**-H**, **--house-keeping** *cpu-list*
696b546c2SGopi Krishna Menon
796b546c2SGopi Krishna Menon        Run rtla control threads only on the given cpu-list.
896b546c2SGopi Krishna Menon
996b546c2SGopi Krishna Menon**-d**, **--duration** *time[s|m|h|d]*
1096b546c2SGopi Krishna Menon
1196b546c2SGopi Krishna Menon        Set the duration of the session.
1296b546c2SGopi Krishna Menon
1396b546c2SGopi Krishna Menon**-D**, **--debug**
1496b546c2SGopi Krishna Menon
1596b546c2SGopi Krishna Menon        Print debug info.
1696b546c2SGopi Krishna Menon
1796b546c2SGopi Krishna Menon**-e**, **--event** *sys:event*
1896b546c2SGopi Krishna Menon
1996b546c2SGopi Krishna Menon        Enable an event in the trace (**-t**) session. The argument can be a specific event, e.g., **-e** *sched:sched_switch*, or all events of a system group, e.g., **-e** *sched*. Multiple **-e** are allowed. It is only active when **-t** or **-a** are set.
2096b546c2SGopi Krishna Menon
2196b546c2SGopi Krishna Menon**--filter** *<filter>*
2296b546c2SGopi Krishna Menon
2396b546c2SGopi Krishna Menon        Filter the previous **-e** *sys:event* event with *<filter>*. For further information about event filtering see https://www.kernel.org/doc/html/latest/trace/events.html#event-filtering.
2496b546c2SGopi Krishna Menon
2596b546c2SGopi Krishna Menon**--trigger** *<trigger>*
2696b546c2SGopi Krishna Menon        Enable a trace event trigger to the previous **-e** *sys:event*.
2796b546c2SGopi Krishna Menon        If the *hist:* trigger is activated, the output histogram will be automatically saved to a file named *system_event_hist.txt*.
2896b546c2SGopi Krishna Menon        For example, the command:
2996b546c2SGopi Krishna Menon
3096b546c2SGopi Krishna Menon        rtla <command> <mode> -t -e osnoise:irq_noise --trigger="hist:key=desc,duration/1000:sort=desc,duration/1000:vals=hitcount"
3196b546c2SGopi Krishna Menon
3296b546c2SGopi Krishna Menon        Will automatically save the content of the histogram associated to *osnoise:irq_noise* event in *osnoise_irq_noise_hist.txt*.
3396b546c2SGopi Krishna Menon
3496b546c2SGopi Krishna Menon        For further information about event trigger see https://www.kernel.org/doc/html/latest/trace/events.html#event-triggers.
3596b546c2SGopi Krishna Menon
3696b546c2SGopi Krishna Menon**-P**, **--priority** *o:prio|r:prio|f:prio|d:runtime:period*
3796b546c2SGopi Krishna Menon
3896b546c2SGopi Krishna Menon        Set scheduling parameters to the osnoise tracer threads, the format to set the priority are:
3996b546c2SGopi Krishna Menon
4096b546c2SGopi Krishna Menon        - *o:prio* - use SCHED_OTHER with *prio*;
4196b546c2SGopi Krishna Menon        - *r:prio* - use SCHED_RR with *prio*;
4296b546c2SGopi Krishna Menon        - *f:prio* - use SCHED_FIFO with *prio*;
4396b546c2SGopi Krishna Menon        - *d:runtime[us|ms|s]:period[us|ms|s]* - use SCHED_DEADLINE with *runtime* and *period* in nanoseconds.
4496b546c2SGopi Krishna Menon
4596b546c2SGopi Krishna Menon**-C**, **--cgroup**\[*=cgroup*]
4696b546c2SGopi Krishna Menon
4796b546c2SGopi Krishna Menon        Set a *cgroup* to the tracer's threads. If the **-C** option is passed without arguments, the tracer's thread will inherit **rtla**'s *cgroup*. Otherwise, the threads will be placed on the *cgroup* passed to the option.
4896b546c2SGopi Krishna Menon
4996b546c2SGopi Krishna Menon**--warm-up** *s*
5096b546c2SGopi Krishna Menon
5196b546c2SGopi Krishna Menon        After starting the workload, let it run for *s* seconds before starting collecting the data, allowing the system to warm-up. Statistical data generated during warm-up is discarded.
5296b546c2SGopi Krishna Menon
5396b546c2SGopi Krishna Menon**--trace-buffer-size** *kB*
5496b546c2SGopi Krishna Menon        Set the per-cpu trace buffer size in kB for the tracing output.
5596b546c2SGopi Krishna Menon
5696b546c2SGopi Krishna Menon**--on-threshold** *action*
5796b546c2SGopi Krishna Menon
5896b546c2SGopi Krishna Menon        Defines an action to be executed when tracing is stopped on a latency threshold
5996b546c2SGopi Krishna Menon        specified by |threshold|.
6096b546c2SGopi Krishna Menon
6196b546c2SGopi Krishna Menon        Multiple --on-threshold actions may be specified, and they will be executed in
6296b546c2SGopi Krishna Menon        the order they are provided. If any action fails, subsequent actions in the list
6396b546c2SGopi Krishna Menon        will not be executed.
6496b546c2SGopi Krishna Menon
6596b546c2SGopi Krishna Menon        Supported actions are:
6696b546c2SGopi Krishna Menon
6796b546c2SGopi Krishna Menon        - *trace[,file=<filename>]*
6896b546c2SGopi Krishna Menon
6996b546c2SGopi Krishna Menon          Saves trace output, optionally taking a filename. Alternative to -t/--trace.
70*aad1530fSTomas Glozar          Note that unlike -t/--trace, specifying this multiple times will result in
7196b546c2SGopi Krishna Menon          the trace being saved multiple times.
7296b546c2SGopi Krishna Menon
7396b546c2SGopi Krishna Menon        - *signal,num=<sig>,pid=<pid>*
7496b546c2SGopi Krishna Menon
7596b546c2SGopi Krishna Menon          Sends signal to process. "parent" might be specified in place of pid to target
7696b546c2SGopi Krishna Menon          the parent process of rtla.
7796b546c2SGopi Krishna Menon
7896b546c2SGopi Krishna Menon        - *shell,command=<command>*
7996b546c2SGopi Krishna Menon
8096b546c2SGopi Krishna Menon          Execute shell command.
8196b546c2SGopi Krishna Menon
8296b546c2SGopi Krishna Menon        - *continue*
8396b546c2SGopi Krishna Menon
8496b546c2SGopi Krishna Menon          Continue tracing after actions are executed instead of stopping.
8596b546c2SGopi Krishna Menon
8696b546c2SGopi Krishna Menon        Example:
8796b546c2SGopi Krishna Menon
8896b546c2SGopi Krishna Menon        $ rtla |tool| |thresharg| 20 --on-threshold trace
8996b546c2SGopi Krishna Menon        --on-threshold shell,command="grep ipi_send |tracer|\_trace.txt"
9096b546c2SGopi Krishna Menon        --on-threshold signal,num=2,pid=parent
9196b546c2SGopi Krishna Menon
9296b546c2SGopi Krishna Menon        This will save a trace with the default filename "|tracer|\_trace.txt", print its
9396b546c2SGopi Krishna Menon        lines that contain the text "ipi_send" on standard output, and send signal 2
9496b546c2SGopi Krishna Menon        (SIGINT) to the parent process.
9596b546c2SGopi Krishna Menon
9696b546c2SGopi Krishna Menon        Performance Considerations:
9796b546c2SGopi Krishna Menon
9896b546c2SGopi Krishna Menon        |actionsperf|
9996b546c2SGopi Krishna Menon
10096b546c2SGopi Krishna Menon**--on-end** *action*
10196b546c2SGopi Krishna Menon
10296b546c2SGopi Krishna Menon        Defines an action to be executed at the end of tracing.
10396b546c2SGopi Krishna Menon
10496b546c2SGopi Krishna Menon        Multiple --on-end actions can be specified, and they will be executed in the order
10596b546c2SGopi Krishna Menon        they are provided. If any action fails, subsequent actions in the list will not be
10696b546c2SGopi Krishna Menon        executed.
10796b546c2SGopi Krishna Menon
10896b546c2SGopi Krishna Menon        See the documentation for **--on-threshold** for the list of supported actions, with
10996b546c2SGopi Krishna Menon        the exception that *continue* has no effect.
11096b546c2SGopi Krishna Menon
11196b546c2SGopi Krishna Menon        Example:
11296b546c2SGopi Krishna Menon
11396b546c2SGopi Krishna Menon        $ rtla |tool| -d 5s --on-end trace
11496b546c2SGopi Krishna Menon
11596b546c2SGopi Krishna Menon        This runs rtla with the default options, and saves trace output at the end.
11696b546c2SGopi Krishna Menon
11796b546c2SGopi Krishna Menon**-h**, **--help**
11896b546c2SGopi Krishna Menon
11996b546c2SGopi Krishna Menon        Print help menu.
120