Re: Question on interrupt stats and probe
- From: Gil Hamilton <gil_hamilton@xxxxxxxxxxx>
- Date: Fri, 11 Jan 2008 22:40:54 +0100 (CET)
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
.
- Follow-Ups:
- Re: Question on interrupt stats and probe
- From: Ramesh
- Re: Question on interrupt stats and probe
- References:
- Question on interrupt stats and probe
- From: Ramesh
- Question on interrupt stats and probe
- Prev by Date: Re: Mapping Kernel memory to user space
- Next by Date: Re: serial port does not work on PC104
- Previous by thread: Question on interrupt stats and probe
- Next by thread: Re: Question on interrupt stats and probe
- Index(es):
Relevant Pages
|