hardirqs(8)

πŸ“¦ version 0.36.1, in alpine 3.24, nixpkgs unstable, opensuse-leap 16.0

πŸŽ€ hardirqs(8) πŸŽ€

okay bestie, this is the manual page for hardirqs, the tool that tells you how much time your computer spends handling hard IRQs (hard interrupts) πŸ’… it's a hardirqs(8) situation, so buckle up ✨


✨ NAME ✨

hardirqs - Measure hard IRQ (hard interrupt) event time. Uses Linux eBPF/bcc. πŸ’–

🧠 SYNOPSIS 🧠

hardirqs [-h] [-T] [-N] [-C] [-d] [interval] [outputs]

πŸ’« DESCRIPTION πŸ’«

okay so this one summarizes the time spent servicing hard IRQs (hard interrupts), and it can show that time as either totals or histogram distributions πŸ“Š the whole-system version of this time shows up in the %irq column of mpstat(1), and event counts (but not times) live in /proc/interrupts πŸ¦‹

this tool uses the irq:irq_handler_entry and irq:irq_handler_exit kernel tracepoints, which is a stable tracing mechanism 🫢 BPF programs can attach to tracepoints from Linux 4.7 only, so keep that in mind. an older version of this tool is available in tools/old, and it uses kprobes instead of tracepoints 🌸

since this uses BPF, only the root user can use this tool πŸ™ˆ no root, no hardirqs, sorry bestie

πŸ“‹ REQUIREMENTS πŸ“‹

CONFIG_BPF and bcc πŸ”₯

πŸŽ€ OPTIONS πŸŽ€

  • -h β€” prints the usage message πŸ’…
  • -T β€” includes timestamps on the output ⏰
  • -N β€” outputs in nanoseconds πŸ”¬
  • -C β€” counts events only, no times πŸ”’
  • -d β€” shows the IRQ time distribution as histograms πŸ“Š
  • -c CPU β€” traces on this CPU only 🎯

🧚 EXAMPLES 🧚

okay here are the vibes, ranked by how iconic they are πŸ‘‘

Sum hard IRQ event time until Ctrl-C:

# hardirqs

Show hard IRQ event time as histograms:

# hardirqs -d

Print 1 second summaries, 10 times:

# hardirqs 1 10

1 second summaries, printed in nanoseconds, with timestamps:

# hardirqs -NT 1

Sum hard IRQ event time on CPU 1 until Ctrl-C:

# hardirqs -c 1

πŸ“ FIELDS πŸ“

  • HARDIRQ β€” the irq action name for this hard IRQ 🏷️
  • TOTAL_usecs β€” total time spent in this hard IRQ, in microseconds ⏱️
  • TOTAL_nsecs β€” total time spent in this hard IRQ, in nanoseconds ⏱️
  • usecs β€” range of microseconds for this bucket πŸ“
  • nsecs β€” range of nanoseconds for this bucket πŸ“
  • count β€” number of hard IRQs in this time range πŸ”’
  • distribution β€” ASCII representation of the distribution (the count column) πŸ“Š

πŸ”₯ OVERHEAD πŸ”₯

⚠️ heads up bestie: this traces kernel functions and keeps in-kernel counts, which are asynchronously copied to user-space πŸ₯Ί if the rate of interrupts is very high (>1M/sec), it's still a relatively efficient way to trace these events, so the overhead should be small for normal workloads, but it could get noticeable for heavy workloads. measure in a test environment before use πŸ§ͺ

🌈 SOURCE 🌈

this is from bcc 🫢

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 - in development. πŸ™ˆ

πŸ‘©β€πŸ’» AUTHOR πŸ‘©β€πŸ’»

Brendan Gregg, Hengqi Chen, Rocky Xing πŸ’œ

πŸ‘€ SEE ALSO πŸ‘€

softirqs(8) πŸ¦‹


bestie, that's the whole page πŸ’– it's from the USER COMMANDS section, dated 2015-10-20, and the manual page is hardirqs(8) ✨ go forth and measure those interrupts, you literally got this πŸ’…πŸŽ€