softirqs(8)
๐ฆ NAME ๐ฆ
okay so softirqs is the tool that measures soft IRQ (soft interrupt) event time ๐ง It uses Linux eBPF/bcc, so it's giving low-level, and I'm obsessed ๐
๐ SYNOPSIS ๐
softirqs [-h] [-T] [-N] [-C] [-d] [-c CPU] [interval] [count]
โจ DESCRIPTION โจ
bestie, this one summarizes the time spent servicing soft IRQs (soft interrupts) ๐ซถ You can see that time as plain totals or as histogram distributions, your choice ๐ A system-wide version of this time lives in the %soft column of mpstat(1), and soft IRQ event counts (but not times) are chilling in /proc/softirqs ๐ธ
This tool uses the irq:softirq_enter and irq:softirq_exit kernel tracepoints, which is a stable tracing mechanism, so no notes ๐ BPF programs can attach to tracepoints from Linux 4.7 only, so keep that in mind ๐ An older version is in tools/old, and it's kprobes-based instead of tracepoint-based. Very retro ๐ผ
Since this uses BPF, only the root user can use this tool ๐ Sorry not sorry, that's the rule.
๐ REQUIREMENTS ๐
You need CONFIG_BPF and bcc. No way around it ๐
๐ OPTIONS ๐
-hโ pulls up the usage message ๐-Tโ slaps timestamps onto the output โฐ-Nโ outputs in nanoseconds ๐ฌ-Cโ shows the number of soft irq events ๐ข-dโ shows the IRQ time distribution as histograms ๐-c CPUโ traces on this CPU only, the one you pick ๐ฏ
๐ EXAMPLES ๐
Sum the soft IRQ event time until you hit Ctrl-C:
# softirqs
Show the number of soft irq events:
# softirqs -C
Show soft IRQ event time as histograms:
# softirqs -d
Print 1 second summaries, 10 times:
# softirqs 1 10
1 second summaries, printed in nanoseconds, with timestamps:
# softirqs -NT 1
Sum soft IRQ event time on CPU 1 until Ctrl-C:
# softirqs -c 1
๐ FIELDS ๐
SOFTIRQโ the kernel function name doing the soft IRQ action ๐ ๏ธTOTAL_usecsโ total time spent in this soft IRQ function, in microseconds โฑ๏ธTOTAL_nsecsโ total time spent in this soft IRQ function, in nanoseconds โฑ๏ธusecsโ the microsecond range for this bucket ๐nsecsโ the nanosecond range for this bucket ๐countโ how many soft IRQs landed in this time range ๐งฎdistributionโ an ASCII picture of the distribution (the count column) ๐
๐ฅ OVERHEAD ๐ฅ
okay real talk, this traces kernel functions and keeps in-kernel counts, which get asynchronously copied to user-space. If the interrupt rate is very high (>1M/sec), it's still a relatively efficient way to trace these events, so overhead should be small for normal workloads ๐ฅน It could get noticeable for heavy workloads though. Measure in a test environment before use ๐งช
๐ธ SOURCE ๐ธ
This is from bcc, obviously ๐
https://github.com/iovisor/bcc
Also look in the bcc distribution for a companion _examples.txt file with example usage, output, and commentary for this tool ๐
๐ง OS ๐ง
Linux ๐ง
๐งช STABILITY ๐งช
Unstable, still in development ๐ง
๐ซถ AUTHORS ๐ซถ
Brendan Gregg, Sasha Goldshtein, Rocky Xing ๐
๐ฆ SEE ALSO ๐ฆ
hardirqs(8) ๐
bye bestie ๐ this was softirqs(8) from the USER COMMANDS section, dated 2015-10-20 ๐ slay forever โจ
๐ฆ where this page comes from
- centos-stream 10: bcc-tools 0.36.1-1.el10 ยท Apache-2.0
- centos-stream 9: bcc-tools 0.36.1-1.el9 ยท ASL 2.0
- fedora 43: bcc-tools 0.35.0-2.fc43 ยท Apache-2.0
- fedora 44: bcc-tools 0.35.0-5.fc44 ยท Apache-2.0
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms