projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'github/pr/1931'
[collectd.git]
/
src
/
irq.c
diff --git
a/src/irq.c
b/src/irq.c
index
1168b97
..
cb444a4
100644
(file)
--- a/
src/irq.c
+++ b/
src/irq.c
@@
-22,9
+22,9
@@
**/
#include "collectd.h"
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "common.h"
#include "plugin.h"
-#include "configfile.h"
#include "utils_ignorelist.h"
#if !KERNEL_LINUX
#include "utils_ignorelist.h"
#if !KERNEL_LINUX
@@
-72,15
+72,12
@@
static int irq_config (const char *key, const char *value)
static void irq_submit (const char *irq_name, derive_t value)
{
static void irq_submit (const char *irq_name, derive_t value)
{
- value_t values[1];
value_list_t vl = VALUE_LIST_INIT;
if (ignorelist_match (ignorelist, irq_name) != 0)
return;
value_list_t vl = VALUE_LIST_INIT;
if (ignorelist_match (ignorelist, irq_name) != 0)
return;
- values[0].derive = value;
-
- vl.values = values;
+ vl.values = &(value_t) { .derive = value };
vl.values_len = 1;
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "irq", sizeof (vl.plugin));
vl.values_len = 1;
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "irq", sizeof (vl.plugin));
@@
-120,6
+117,7
@@
static int irq_read (void)
} else {
ERROR ("irq plugin: unable to get CPU count from first line "
"of /proc/interrupts");
} else {
ERROR ("irq plugin: unable to get CPU count from first line "
"of /proc/interrupts");
+ fclose (fh);
return (-1);
}
return (-1);
}
@@
-155,6
+153,10
@@
static int irq_read (void)
if (irq_name[irq_name_len - 1] != ':')
continue;
if (irq_name[irq_name_len - 1] != ':')
continue;
+ /* Is it the the ARM fast interrupt (FIQ)? */
+ if (irq_name_len == 4 && (strncmp(irq_name, "FIQ:", 4) == 0))
+ continue;
+
irq_name[irq_name_len - 1] = 0;
irq_name_len--;
irq_name[irq_name_len - 1] = 0;
irq_name_len--;