summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d4f3036)
raw | patch | inline | side by side (parent: d4f3036)
author | Marek Becka <marek.becka@superhosting.cz> | |
Tue, 9 Jun 2015 21:13:29 +0000 (17:13 -0400) | ||
committer | Florian Forster <octo@collectd.org> | |
Wed, 10 Jun 2015 08:15:28 +0000 (09:15 +0100) |
src/vmem.c | patch | blob | history |
diff --git a/src/vmem.c b/src/vmem.c
index 56997bf14f54f0a812a3cdb7c5cc17b4b867b517..b8febcecf748de0ec86030639a990f2eb0edb521 100644 (file)
--- a/src/vmem.c
+++ b/src/vmem.c
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);
+ }
}
/*