Watch Live Interrupts
To see the interrupts occurring on your system, run the command:
# watch -n1 "cat /proc/interrupts"
CPU0 CPU1
0: 330 0 IO-APIC-edge timer
1: 11336 0 IO-APIC-edge i8042
4: 2 0 IO-APIC-edge
6: 3 0 IO-APIC-edge floppy
...
NMI: 0 0 Non-maskable interrupts
LOC: 5806923 6239132 Local timer interrupts
...
The watch command executes another command periodically, in this case "cat /proc/interrups". The -n1 option tells watch to execute the command every second.










This week 5 lucky Members will receive a copy of The Official Ubuntu Server Book by Benjamin Mako Hill and Linux Journal's very own Kyle Rankin. No entry necessary. Check back here early next week to find out who the lucky Online Members are.




Comments
Should have at least defined
Should have at least defined each definition of all the interrupts and what they correlate to. There's no interrupts man page either. Which means it's slightly useless for the average user. Maybe I'm look in the wrong place for a man page, I don't know.
"-d" option.
Try -d option of watch command for fancy output with highlights.
e.g.
# watch -d -n1 "cat /proc/interrupts"
saves a lot of time..
this command will save a lot of time while we have to run a single command many times.
Thanks.
cool command
I didn't know about the 'watch' command. Sure beats doing a loop with sleep :).
Thanks for the tip!
Post new comment