(转)itop更方便的了解Linux下中断情况
http://blog.yufeng.info/archives/1062
在作网络程序的时候, 经常需要了解interrupts和软中断的平衡情况, 需要知道每秒有多少中断发生,发生在哪个cpu上.
Linux下中断来源可以从 /proc/interrupts 中了解到:
$ cat /proc/interrupts
CPU0 CPU1
0: 247701 250313 IO-APIC-edge timer
1: 501 567 IO-APIC-edge i8042
3: 1 1 IO-APIC-edge
8: 1 0 IO-APIC-edge rtc0
9: 256 240 IO-APIC-fasteoi acpi
12: 1134 1149 IO-APIC-edge i8042
16: 629 554 IO-APIC-fasteoi nvidia
17: 21313 20869 IO-APIC-fasteoi firewire_ohci, eth1
18: 0 0 IO-APIC-fasteoi mmc0
19: 51822 50079 IO-APIC-fasteoi ata_piix, ata_piix
20: 5605 5255 IO-APIC-fasteoi ehci_hcd:usb2, uhci_hcd:usb3, uhci_hcd:usb6
21: 0 0 IO-APIC-fasteoi uhci_hcd:usb4, uhci_hcd:usb7
22: 33 33 IO-APIC-fasteoi ehci_hcd:usb1, uhci_hcd:usb5, uhci_hcd:usb8
45: 337 247 PCI-MSI-edge eth0
46: 441 447 PCI-MSI-edge hda_intel
NMI: 0 0 Non-maskable interrupts
LOC: 169176 174899 Local timer interrupts
SPU: 0 0 Spurious interrupts
PMI: 0 0 Performance monitoring interrupts
PND: 0 0 Performance pending work
RES: 42289 40236 Rescheduling interrupts
CAL: 154 1076 Function call interrupts
TLB: 5838 5365 TLB shootdowns
TRM: 0