Linux interrupts per second

mpstat

The mpstat command in a Linux or Unix system gives the processor related statistics. mpstat is a part of the sysstat package for performance monitoring under Linux. The mpstat command gives the CPU utilization report and the hardware and software interrupts per second for each processor. By default, the CPU utilization report is printed. For example,

$ mpstat Linux 3.0.0-14-generic (hostname) Wednesday 20 June 2012 _i686_ (2 CPU) 02:33:15 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 02:33:15 IST all 18.71 0.19 2.12 0.46 0.00 0.08 0.00 0.00 78.43

mpstat prints the kernel name and release, host nodename, date, machine hardware name and the number of CPUs in the system. Then there is a column header and the report output lines. The first two words give the timestamp ( 02:33:15 IST , here). The timestamp in the header is the time at which the command is given. The timestamp in the beginning of each report line tells the time at which that report line was generated. In this case, we have a single report giving the global statistics for all processors since the system startup time. The CPUs have been working at the user level 18.71% time, 0.19% working at user level with nice priority, working 2.12% time at the system (kernel) level, 0.46% time waiting for I/O, 0.00 % time servicing hardware interrupts, 0.08% time servicing software interrupts, 0.00% time was spent waiting while the hypervisor was servicing another virtual processor, 0.00% time was spent to run a virtual processor and, lastly, 78.43% time the processors were idle.

The above report is for the time since the system startup. We can append a time interval in seconds to the mpstat command to print the corresponding report repeatedly every time the given time interval elapsed. And, if we put a count after the time interval the report is printed that many times. For example, to print the CPU utilization every 5 seconds four times, the command is,

$ mpstat 5 4 Linux 2.6.38-8-virtual (hostname) 06/20/2012 _i686_ (1 CPU) 01:23:30 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 01:23:35 PM all 0.10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 99.90 01:23:40 PM all 4.56 0.00 0.56 0.00 0.00 0.00 7.12 0.00 87.76 01:23:45 PM all 0.00 0.00 0.00 0.10 0.00 0.00 0.00 0.00 99.90 01:23:50 PM all 5.32 0.00 0.23 0.00 0.00 0.00 8.49 0.00 85.96 Average: all 2.35 0.00 0.19 0.03 0.00 0.00 3.68 0.00 93.76

The -u specifically asks for the CPU utilization report. It is possible to select a processor using the -P option. The processor numbers start with 0 and using the -P n option, prints the report for the nth processor. And using the -P ALL option, prints the report for all processors. For example,

$ mpstat -u -P ALL 2 3 Linux 3.0.0-14-generic (hostname) Wednesday 20 June 2012 _i686_ (2 CPU) 07:13:20 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 07:13:22 IST all 3.51 0.00 1.50 1.00 0.00 0.00 0.00 0.00 93.98 07:13:22 IST 0 5.03 0.00 1.01 2.01 0.00 0.00 0.00 0.00 91.96 07:13:22 IST 1 2.00 0.00 1.50 0.00 0.00 0.00 0.00 0.00 96.50 07:13:22 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 07:13:24 IST all 4.50 0.00 2.25 0.00 0.00 0.25 0.00 0.00 93.00 07:13:24 IST 0 4.00 0.00 2.00 0.00 0.00 0.50 0.00 0.00 93.50 07:13:24 IST 1 4.52 0.00 2.51 0.00 0.00 0.00 0.00 0.00 92.96 07:13:24 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 07:13:26 IST all 4.75 0.00 1.50 0.00 0.00 0.00 0.00 0.00 93.75 07:13:26 IST 0 4.98 0.00 1.99 0.00 0.00 0.00 0.00 0.00 93.03 07:13:26 IST 1 4.98 0.00 1.49 0.00 0.00 0.00 0.00 0.00 93.53 Average: CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle Average: all 4.25 0.00 1.75 0.33 0.00 0.08 0.00 0.00 93.58 Average: 0 4.67 0.00 1.67 0.67 0.00 0.17 0.00 0.00 92.83 Average: 1 3.83 0.00 1.83 0.00 0.00 0.00 0.00 0.00 94.33

Interrupt Statistics

The -I option followed by one of the keywords, SUM, CPU, SCPU or ALL gives interrupt per second statistics for the CPUs. If the CPU keyword is used, the number of each interrupt received by the CPU(s) is displayed. If the SCPU keyword is used, the number of each software interrupt received by the CPU(s) is displayed. If the SUM keyword is used, a total number of interrupts per second for all processors is reported. And, the use of ALL keyword has the effect of using the SUM, CPU and SCPU keywords together. For example, to find all interrupts for all processors, we can give the command,

$ mpstat -I ALL -u -P ALL Linux 3.0.0-14-generic (hostname) Thursday 21 June 2012 _i686_ (2 CPU) 03:09:44 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 03:09:44 IST all 15.28 0.18 1.98 0.45 0.00 0.07 0.00 0.00 82.04 03:09:44 IST 0 15.29 0.24 2.05 0.64 0.00 0.13 0.00 0.00 81.66 03:09:44 IST 1 15.26 0.13 1.92 0.26 0.00 0.01 0.00 0.00 82.42 03:09:44 IST CPU intr/s 03:09:44 IST all 894.87 03:09:44 IST 0 0.00 03:09:44 IST 1 0.00 03:09:44 IST CPU 0/s 1/s 5/s 7/s 8/s 9/s 12/s 14/s 15/s 18/s 19/s 20/s 21/s 22/s 23/s NMI/s LOC/s SPU/s PMI/s IWI/s RES/s CAL/s TLB/s TRM/s THR/s MCE/s MCP/s ERR/s MIS/s 03:09:44 IST 0 8.96 0.00 0.02 0.00 0.00 0.01 45.31 0.03 0.00 34.29 28.82 0.00 0.00 0.00 10.54 0.00 222.97 0.00 0.00 0.00 86.59 1.17 1.96 0.00 0.00 0.00 0.00 0.00 0.00 03:09:44 IST 1 305.39 0.20 0.00 0.00 0.00 0.00 0.00 2.97 0.00 0.00 0.00 0.00 0.00 0.00 0.07 0.00 54.01 0.00 0.00 0.00 88.74 1.10 1.71 0.00 0.00 0.00 0.00 0.00 0.00 03:09:44 IST CPU HI/s TIMER/s NET_TX/s NET_RX/s BLOCK/s BLOCK_IOPOLL/s TASKLET/s SCHED/s HRTIMER/s RCU/s 03:09:44 IST 0 0.00 459.54 0.00 1.53 3.71 0.00 47.53 10.26 0.07 14.93 03:09:44 IST 1 0.00 59.71 0.00 0.00 1.01 0.00 0.16 5.82 0.07 12.87

We could have given the command, mpstat -A instead as -A option is a shorthand for -I ALL -u -P ALL . The data for the reports is taken from files in the /proc filesystem. The CPU utilization and the interrupt summary comes from /proc/stat . The interrupts per second for each CPU is based on /proc/interrupts . The first column in /proc/interrupts gives the IRQ number. The same is reported as column heading in the interrupts per second report. Similarly, the report on software interrupts is based on /proc/softirqs .

Читайте также:  Calculate linux установить windows

Источник

High Interrupts per second Troubleshooting

This document (7002721) is provided subject to the disclaimer at the end of this document.

Environment

Situation

A high number of interrupts per second are observed.

#==[ Command ]======================================#
# /usr/bin/vmstat 1 4 vvvvv
procs ————memory———- —swap— ——io—- -system— ——cpu——
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 1 373704 7156 1296 4144 47 78 139 92 2450 574 9 27 64 0 0
24 16 376664 6924 1360 3152 532 3104 552 3356 18101 33269 3 97 0 0 0
15 15 386388 6788 1356 5260 5872 10212 8656 10284 17623 39149 2 96 0 1 0
10 10 389896 6720 1232 3244 2384 3584 2532 3640 18893 17113 11 89 0 0 0
^^^^^

Resolution

If your system experiences more than 10,000 interrupts per second you should account for them. Generally speaking a high number of interrupts per second indicates a problem with hardware. It could indicate a software bug in the case of software interrupts. If your system is performing as expected, then you don’t really need to worry about high interrupts. Look at the procinfo command output to narrow down where the high interrupts are coming from.

NOTE: The procinfo package is not installed by default on SLES 15. Install it before running a supportconfig.

#==[ Command ]======================================#
# /usr/bin/procinfo
Linux 2.6.16.60-0.21-default (geeko@buildhost) (gcc 4.1.2 20070115) #1 1CPU [sles10sp2]

Memory: Total Used Free Shared Buffers
Mem: 776380 282212 494168 0 3060
Swap: 1164672 127300 1037372

Bootup: Fri Feb 20 10:01:32 2009 Load average: 358.38 684.55 657.44 1/922 26155

user : 0:19:02.40 8.3% page in : 4329495 disk 1: 345167r 57598w
nice : 0:00:05.10 0.0% page out: 1834648 disk 2: 97r 362w
system: 0:30:36.43 13.4% page act: 397986
IOwait: 0:00:13.29 0.1% page dea: 1242187
hw irq: 0:00:08.72 0.1% page flt: 7741915
sw irq: 0:32:47.66 14.3% swap in : 715353
idle : 2:16:20.71 59.5% swap out: 409390
uptime: 3:49:08.45 context : 12105392

Читайте также:  What is kernel devel linux

irq 0: 3288376 timer irq 8: 2 rtc
irq 1: 7108 i8042 irq 9: 0 acpi
irq 3: 1 irq 12: 3749 i8042
irq 4: 1 irq 15: 128222 ide1
irq 6: 4 irq169: 343932 ioc0
irq 7: 0 parport0 irq177: 28216486 eth0
^^^^^^^^^^^^^^^^^^^^^^

From this example, irq177 (eth0) is generating the most interrupts. You might consider replacing the network card. You might also consider updating the network kernel driver.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented «AS IS» WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7002721
  • Creation Date: 20-Feb-2009
  • Modified Date:26-Aug-2021
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server

    For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

    Источник

    ACPI 30k+ interrupts per second

    My computer is currently doing something like 30k+ interrupts per second. This causes battery issues as well as the CPU being always stuck at the highest speed, making it very hot (overheating.. 75C at IDLE) Powertop info:

    99.4% (32052.4) [acpi] 0.3% (115.9) [iwlagn]

    Just to clarify this started suddenly a couple of days ago. It didn’t have this issue before (though I had a tonne of headaches with Linux on my computer in general..)

    3 Answers 3

    The reason apparently lies with the BIOS. Something has changed the BIOS. which caused this problem. Fixed via a reflash of the latest BIOS image from the Lenovo’s support site under Windows.

    I noticed when Windows had the same issue of interrupts taking a lot of CPU, which happened to originate from ACPI.sys

    The only thing I installed prior to this happening was the fglrx 11.7 update. IDK if this had anything to do with it, but it’s the only thing that I’ve installed.

    Try unloading the ibm_acpi module (Source)

    You could try Linux boot params acpi=noirq , sometimes I find I have the same problem I don’t know why, when I added this params, no more acpi interrupts.

    You must log in to answer this question.

    Linked

    Hot Network Questions

    Subscribe to RSS

    To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

    Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.7.14.43533

    Ubuntu and the circle of friends logo are trade marks of Canonical Limited and are used under licence.

    By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

    Источник

Оцените статью
Adblock
detector