Question on interrupt stats and probe - Linux

This is a discussion on Question on interrupt stats and probe - Linux ; 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 ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Question on interrupt stats and probe

  1. Question on interrupt stats and probe

    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.

    Thanks
    Ramesh

  2. Re: Question on interrupt stats and probe

    Ramesh wrote in news:0220286e-aa08-400f-bde3-
    01755bd0634f@e25g2000prg.googlegroups.com:

    > 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

  3. Re: Question on interrupt stats and probe

    On Jan 11, 1:40 pm, Gil Hamilton wrote:
    > Ramesh wrote in news:0220286e-aa08-400f-bde3-
    > 01755bd06...@e25g2000prg.googlegroups.com:
    >
    > > 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


    Thanks a bunch.

+ Reply to Thread