From: Jakub Jankowski Date: Thu, 15 Oct 2015 23:30:33 +0000 (+0000) Subject: vmem plugin: Fix pgsteal for newer Linux kernels. X-Git-Tag: collectd-5.5.1~31^2~12 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=232a9073693ec24d25e3c8caa348af051495a3fa;p=collectd.git vmem plugin: Fix pgsteal for newer Linux kernels. Fixes: #1307 --- diff --git a/src/vmem.c b/src/vmem.c index b8febcec..b1c02a67 100644 --- a/src/vmem.c +++ b/src/vmem.c @@ -222,6 +222,19 @@ static int vmem_read (void) value_t value = { .derive = counter }; submit_one (inst, "vmpage_action", "refill", value); } + else if (strncmp ("pgsteal_kswapd_", key, strlen ("pgsteal_kswapd_")) == 0) + { + char *inst = key + strlen ("pgsteal_kswapd_"); + value_t value = { .derive = counter }; + submit_one (inst, "vmpage_action", "steal_kswapd", value); + } + else if (strncmp ("pgsteal_direct_", key, strlen ("pgsteal_direct_")) == 0) + { + char *inst = key + strlen ("pgsteal_direct_"); + value_t value = { .derive = counter }; + submit_one (inst, "vmpage_action", "steal_direct", value); + } + /* For backwards compatibility (somewhen before 4.2.3) */ else if (strncmp ("pgsteal_", key, strlen ("pgsteal_")) == 0) { char *inst = key + strlen ("pgsteal_");