irq plugin: Fixed some issues, renamed RRD-files.
I've looked into your plugin in more detail just now and fixed the
following issues:
- Moved the RRD-files into a subdirectory called `irq'. That's how it's
going to be done in the next major version.
- Renamed the DS to `value' and set the maximum value to 65535. I'm not
sure if this maximum value is big enough..?
- Don't use `LOG_EMERG' when config-problems are found. Rather, print to
`STDERR' since it's still available during configuration.
- Use `strsplit' when parsing `/proc/interrupts'. This makes much of the
pointer-arithmetic obsolete and the code much more readable.
- The device names are not used in the filename, though I'm not certain
if that's the way to go here.. On my workstation there is a line like
this:
193: 28492 IO-APIC-level uhci_hcd, uhci_hcd, uhci_hcd, ehci_hcd
Apparently the interrupt is shared among several USB-controllers. My
problem here is, that as soon as one device is deactivated or the
order changes, so does the filename. Besides, a filename along the
lines of `irq-193-uhci_hcd-ehci_hcd.rrd' would be nice.
On another machine I have this line:
217:
50173955 0 IO-APIC-level 3ware Storage Controller
Where one device somehow manages to write a _description_ in there.
This makes detection of such shared interrupts as above tricky.
If anyone has a good idea how to use the last part of the lines for a
filename, please let me know.