====== Real-time Linux Analysis tool ======
The **rtla** – Real-time Linux Analysis toolset analyzes real-time properties of the Linux kernel.
The tools has several modes. The default **top** mode displays periodic summary from a tracer. The **hist** mode displays histogram at the end of operation. Automatic mode (--auto) stops when the threshold is reached.
===== Commands =====
The tool offers several commands:
* [[https://docs.kernel.org/tools/rtla/rtla-timerlat.html|rtla timerlat]] measures IRQ and kernel thread timer latency with [[https://docs.kernel.org/trace/timerlat-tracer.html|timerlat tracer]]. Modes: [[https://docs.kernel.org/tools/rtla/rtla-timerlat-top.html|top]], [[https://docs.kernel.org/tools/rtla/rtla-timerlat-hist.html|hist]].
* [[https://docs.kernel.org/tools/rtla/rtla-osnoise.html|rtla osnoise]] provides information about operating system noise measured with [[https://docs.kernel.org/trace/osnoise-tracer.html|osnoise tracer]]. It dispatches kernel threads per CPU to measure various sources of interference during execution, such as preemption, softirq, and IRQs. Modes: [[https://docs.kernel.org/tools/rtla/rtla-osnoise-top.html|top]], [[https://docs.kernel.org/tools/rtla/rtla-osnoise-hist.html|hist]].
* [[https://docs.kernel.org/tools/rtla/rtla-hwnoise.html|rtla hwnoise]] detects and quantifies hardware-related noise with [[https://docs.kernel.org/trace/osnoise-tracer.html|osnoise tracer]]. By disabling interrupts and scheduling of threads, only non-maskable interrupts and hardware-related noise are analyzed.
Each of these commands has various options for configuration, such as setting tracer periods, runtimes, thresholds, scheduling parameters, trace events and triggers, and more. These commands offer different ways to analyze and understand the real-time properties and noise sources in the Linux operating system.
===== Events =====
Arguments to enable common events for automatic and trace options:
''
-e sched:sched_switch -e sched:sched_wakeup -e sched:sched_migrate_task -e irq -e irq_vectors -e timer -e workqueue
''
To see all enabled events, run:
''
grep 1 /sys/kernel/debug/tracing/instances/ /sys/kernel/debug/tracing/events/ -R --include enable
''
===== More Information =====
[[realtime:documentation:howto:tools:start|RT tools and utilities]]\\
[[https://bristot.me/linux-scheduling-latency-debug-and-analysis/|Linux scheduling latency debug and analysis with RTLA]]\\
[[https://www.youtube.com/watch?v=oLTRVcJ7_as|🎥 rtla timerlat: Debugging Real-time Linux Scheduling Latency, video]]\\
[[https://elixir.bootlin.com/linux/latest/source/tools/tracing/rtla|user mode source]]\\
[[https://elixir.bootlin.com/linux/latest/source/kernel/trace/trace_osnoise.c|trace_osnoise.c - kernel mode source]]