Re: Question on interrupt stats and probe



Ramesh <rramesh1@xxxxxxxxx> wrote in news:0220286e-aa08-400f-bde3-
01755bd0634f@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:

Hi Guys.

I am very to new to kernel dev, have a question on collecting data on
interrupts. If I were to dump a list of all interrupts that get
generated on a linux 2.6 kernel (Lenny test build) running on my
laptop (AMD64 dual core athlon), how can I achieve this? What I have
in mind is to write a module and have stats on all interrupts hitting
the system. (I intend to use sysfs for interfacing, but not sure of
the point in the kernel source, where I can see all the interrutps)
Please advice on the best approach to achieve this.

It's already been done (this sample run below is from an ancient 2.4-
based system but the idea is still the same):

# cat /proc/interrupts
CPU0
0: 821378722 XT-PIC timer
1: 6 XT-PIC keyboard
2: 0 XT-PIC cascade
3: 0 XT-PIC usb-uhci
5: 0 XT-PIC usb-uhci
8: 5 XT-PIC rtc
9: 174 XT-PIC usb-uhci, ehci-hcd
10: 8896981 XT-PIC usb-uhci, eth1
11: 41161125 XT-PIC eth0, eth2
14: 13228862 XT-PIC ide0
15: 1 XT-PIC ide1
NMI: 0
ERR: 852
#


If you want to know how it's done, I would track down the source code
that produces this stuff. In fs/proc/proc_misc.c, look for the string
"interrupts" in quotes and follow the code back from there.

GH
.



Relevant Pages

  • Re: 2.6.12 sound problem
    ... >>of obscure kernel parameters. ... Allocating PCI resources starting at 10000000 ... Using ACPI for IRQ routing ... Using CSCINT to route CSC interrupts to PCI ...
    (Linux-Kernel)
  • Re: [PATCH] Documentation: Make fujitsu/frv/kernel-ABI.txt 80 columns wide
    ... -The internal FRV kernel ABI is not quite the same as the userspace ABI. ... -most of them do not have any scratch registers, thus requiring at least one general purpose ... +single-stepping will blithely go on stepping into things like interrupts. ... -to read and once to write), we don't actually disable interrupts at all if we don't have to. ...
    (Linux-Kernel)
  • How to avoid serial port buffer overruns?
    ... port buffer overruns quite easily if I use a baudrate high enough (I start ... Back when I was using the 2.4 kernel, ... (with disk I/O for example). ... 2/ How can I identify why the serial interrupts are delayed? ...
    (Linux-Kernel)
  • Re: kernel loading question
    ... >> decompress_kernel that decompresses the kernel starting at $0x100000. ... >> If we were loaded high, we first move the code back to $0x1000 before ... > interrupts on the current processor. ... - * Do the decompression, and jump to the new kernel.. ...
    (Linux-Kernel)
  • Kernel support for peer-to-peer protection models...
    ... except for the protection model supported by the hardware. ... of a server process or DLL may be non-addressable by an app process, ... Hardware interrupts are involuntary inter-space calls. ... the kernel and the apps. ...
    (Linux-Kernel)