function::kernel_int - Linux
Overview
kernel_int graphically represents Linux kernel interrupt processing, providing detailed information on interrupt latency, throughput, and the associated processes, CPUs, and devices.
Syntax
kernel_int [-h] [-d D] [-c C] [-p P] [-x X] [-n file] [-m file] [--save-file file] [--save] [--status] [--show-count]
Options/Flags
- -h, –help: Display help information.
- -d, –duration D: Duration of the trace (in seconds), default: 60.
- -c, –cpu C: Comma-separated list of CPUs to record, default: all.
- -p, –process P: Comma-separated list of processes to record, default: all.
- -x, –exclude X: Comma-separated list of processes to exclude from recording, default: none.
- -n, –name file: Specify a file containing the CPU names, optional.
- -m, –mask file: Specify a file containing the interrupt bitmask, optional.
- –save-file file: Save the trace to a file.
- –save: Save the trace to a file based on the current time.
- –status: Show the current status of the trace.
- –show-count: Show the interrupt count.
Examples
- Track interrupt activity on CPUs 0 and 1 for 120 seconds:
kernel_int -d 120 -c 0,1
- Exclude interruptions from processes "kernel" and "kworker":
kernel_int -x kernel,kworker
- Save the trace to a file named "my_trace.txt":
kernel_int --save-file my_trace.txt
Common Issues
- Ensure you have root privileges to run the command.
- If the output is truncated or contains errors, increase the duration using the
-d
option.
Integration
- Pipe the trace output to other tools, such as
grep
orawk
, to filter and analyze the data. - Use in conjunction with
perf record
to collect performance data for specific kernel functions.
Related Commands
perf
: Performance monitoring tool.dtrace
: Dynamic tracing framework.- Perf Data Exploration and Visualization (PDEV): Tool for visualizing performance data collected by perf.