From: Marek Becka Date: Tue, 9 Jun 2015 21:13:29 +0000 (-0400) Subject: vmem plugin: fix types for nr_dirtied and nr_written X-Git-Tag: collectd-5.5.1~116^2~8 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=39f51b526f3801ff1dd212ae431f0b22193ddb06;p=collectd.git vmem plugin: fix types for nr_dirtied and nr_written --- diff --git a/src/vmem.c b/src/vmem.c index 56997bf1..b8febcec 100644 --- a/src/vmem.c +++ b/src/vmem.c @@ -150,8 +150,16 @@ static int vmem_read (void) if (strncmp ("nr_", key, strlen ("nr_")) == 0) { char *inst = key + strlen ("nr_"); - value_t value = { .gauge = gauge }; - submit_one (NULL, "vmpage_number", inst, value); + if (strcmp(inst, "dirtied") == 0 || strcmp(inst, "written") == 0) + { + value_t value = { .derive = counter }; + submit_one (NULL, "vmpage_action", inst, value); + } + else + { + value_t value = { .gauge = gauge }; + submit_one (NULL, "vmpage_number", inst, value); + } } /*