From 01b3ebf7284ea66d4096194fe4ebbf8d4f0d93d5 Mon Sep 17 00:00:00 2001 From: Yohsuke Ooi <001@3hands.net> Date: Tue, 3 Mar 2015 21:33:48 +0900 Subject: [PATCH] [Patch]: fix the calculation of the swap area is wrong In the current calculation, the memory in use would also be included in the swap --- src/plugins/memory/MemoryMuninNodePlugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/memory/MemoryMuninNodePlugin.cpp b/src/plugins/memory/MemoryMuninNodePlugin.cpp index d853e35..7dee8a8 100644 --- a/src/plugins/memory/MemoryMuninNodePlugin.cpp +++ b/src/plugins/memory/MemoryMuninNodePlugin.cpp @@ -63,6 +63,6 @@ int MemoryMuninNodePlugin::GetValues(char *buffer, int len) "swap.value %llu\n" "free.value %llu\n" //"committed.value %u\n" - ".\n", mem.ullTotalPhys-mem.ullAvailPhys, mem.ullTotalPageFile-mem.ullAvailPageFile, mem.ullAvailPhys); + ".\n", mem.ullTotalPhys-mem.ullAvailPhys, (mem.ullTotalPageFile-mem.ullAvailPageFile-mem.ullTotalPhys+mem.ullAvailPhys), mem.ullAvailPhys); return 0; }