tags:

views:

39

answers:

1

Hi,

How can I use the sysfs to detect if my hardware module(e.g. MSR) execute an event or an interrupt?

+1  A: 

Your question is a bit vague.
For an interrupt, you can look at the output of cat /proc/interrupts and see if the interrupt count for your driver is increasing.

sysfs is here to show you attribute of your device or driver. If you want to trace the execution of driver code, look at the source code. There might be debug printk, that are only enabled if you load your driver with some command line parameter. For instance :

rmmod mymodule
modprobe mymodule debug=1

Debug message usually appear on the console, and you can also see them with the dmesg comand

shodanex