author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Wed, 28 Feb 2007 07:53:33 +0000 (08:53 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Wed, 28 Feb 2007 07:53:33 +0000 (08:53 +0100) | ||
commit | 6517e56f02007d10a46a33916c1f94b3e88a159c | |
tree | 8eb317d911a74842a6970b258f60a51d0d27e446 | tree | snapshot |
parent | f21bcfdca1cf55f420ac31ea933a93277a4f0458 | commit | diff |
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.
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.
src/collectd.pod | diff | blob | history | |
src/irq.c | diff | blob | history |