hardirqs(8) System Manager's Manual hardirqs(8)

# [NAME](#NAME)

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

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#DESCRIPTION)

This summarizes the time spent servicing hard IRQs (hard interrupts), and can show this time as either totals or histogram distributions. A system-wide summary of this time is shown by the %irq column of [mpstat(1)](/man/enterprise-packages/bcc/mpstat.1), and event counts (but not times) are shown by /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. An older version of this tool is available in tools/old, and uses kprobes instead of tracepoints.

Since this uses BPF, only the root user can use this tool.

# [REQUIREMENTS](#REQUIREMENTS)

CONFIG\_BPF and bcc.

# [OPTIONS](#OPTIONS)

[-h](#h)

Print usage message.

[-T](#T)

Include timestamps on output.

[-N](#N)

Output in nanoseconds.

[-C](#C)

Count events only.

[-d](#d)

Show IRQ time distribution as histograms.

[-c CPU](#c)

Trace on this CPU only.

# [EXAMPLES](#EXAMPLES)

[Sum hard IRQ event time until Ctrl-C:](#Sum)

\# **hardirqs**

[Show hard IRQ event time as histograms:](#Show)

\# **hardirqs -d**

[Print 1 second summaries, 10 times:](#Print)

\# **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:](#Sum~2)

\# **hardirqs -c 1**

# [FIELDS](#FIELDS)

[HARDIRQ](#HARDIRQ)

The irq action name for this hard IRQ.

[TOTAL\_usecs](#TOTAL_usecs)

Total time spent in this hard IRQ in microseconds.

[TOTAL\_nsecs](#TOTAL_nsecs)

Total time spent in this hard IRQ in nanoseconds.

[usecs](#usecs)

Range of microseconds for this bucket.

[nsecs](#nsecs)

Range of nanoseconds for this bucket.

[count](#count)

Number of hard IRQs in this time range.

[distribution](#distribution)

ASCII representation of the distribution (the count column).

# [OVERHEAD](#OVERHEAD)

This traces kernel functions and maintains in-kernel counts, which are asynchronously copied to user-space. While the rate of interrupts be very high (&gt;1M/sec), this is a relatively efficient way to trace these events, and so the overhead is expected to be small for normal workloads, but could become noticeable for heavy workloads. Measure in a test environment before use.

# [SOURCE](#SOURCE)

This is from bcc.

https://github.com/iovisor/bcc

Also look in the bcc distribution for a companion \_examples.txt file containing example usage, output, and commentary for this tool.

# [OS](#OS)

Linux

# [STABILITY](#STABILITY)

Unstable - in development.

# [AUTHOR](#AUTHOR)

Brendan Gregg, Hengqi Chen, Rocky Xing

# [SEE ALSO](#SEE_ALSO)

[softirqs(8)](/man/enterprise-packages/bcc/softirqs.8)

2015-10-20 USER COMMANDS

---

Document: hardirqs(8) from bcc 0.37.0-r3 (Chainguard OS)
Source: https://github.com/iovisor/bcc
