projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1219a1
)
Bug#1059 : Remove any white spaces in ethstats stat names (affects VMXNet3 interface)
author
Thomas Guthmann
<tguthmann@iseek.com.au>
Wed, 8 Jun 2016 03:03:47 +0000
(13:03 +1000)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 10 Jun 2016 07:44:36 +0000
(09:44 +0200)
src/ethstat.c
patch
|
blob
|
history
diff --git
a/src/ethstat.c
b/src/ethstat.c
index
dec14f3
..
a30a5d1
100644
(file)
--- a/
src/ethstat.c
+++ b/
src/ethstat.c
@@
-312,9
+312,13
@@
static int ethstat_read_interface (char *device)
for (i = 0; i < n_stats; i++)
{
- c
onst c
har *stat_name;
+ char *stat_name;
stat_name = (void *) &strings->data[i * ETH_GSTRING_LEN];
+ /* Remove leading spaces in key name */
+ while (isspace ((int) *stat_name))
+ stat_name++;
+
DEBUG("ethstat plugin: device = \"%s\": %s = %"PRIu64,
device, stat_name, (uint64_t) stats->data[i]);
ethstat_submit_value (device,