Module: check_mk
Branch: master
Commit: 7fe5e9b501527ed7e825d0b21d34e8a4947274ce
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7fe5e9b501527e…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Apr 11 13:47:56 2014 +0200
Revert "FIX windows agent: no longer reports negative SWAP values"
This reverts commit 9934dbcadcf6616f1240e5b6eca82464ae4e9992.
---
.werks/830 | 9 ---------
ChangeLog | 1 -
agents/windows/Makefile | 6 +++---
agents/windows/check_mk_agent-64.exe | Bin 205312 -> 0 bytes
agents/windows/check_mk_agent.cc | 9 ++-------
agents/windows/check_mk_agent.exe | Bin 180224 -> 175104 bytes
agents/windows/crash.exe | Bin 94971 -> 20024 bytes
agents/windows/install_agent-64.exe | Bin 158266 -> 0 bytes
agents/windows/install_agent.exe | Bin 149511 -> 151408 bytes
agents/windows/nowin.exe | Bin 102109 -> 22511 bytes
10 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/.werks/830 b/.werks/830
deleted file mode 100644
index a250471..0000000
--- a/.werks/830
+++ /dev/null
@@ -1,9 +0,0 @@
-Title: windows agent: no longer reports negative SWAP values
-Level: 1
-Component: checks
-Version: 1.2.5i3
-Date: 1397137476
-Class: fix
-
-SWAP values are calculated with the help of the pagefiles size.
-The function to determine the systems maximum/available pagefile size was incorrect.
diff --git a/ChangeLog b/ChangeLog
index fa1b298..b9b0279 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,7 +35,6 @@
* 0605 FIX: enterasys_cpu_util enterasys_lsnat: syntax fixes
* 0889 FIX: logwatch: fix case where rule wouldn't be applied...
* 0882 FIX: check_bi_local.py: fix crash in case of non-ascii characters...
- * 0830 FIX: windows agent: no longer reports negative SWAP values...
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled
by filter)
diff --git a/agents/windows/Makefile b/agents/windows/Makefile
index 0e55071..a88ec5a 100755
--- a/agents/windows/Makefile
+++ b/agents/windows/Makefile
@@ -27,7 +27,7 @@ VERSION = 1.2.5i3
WINDRES = i586-mingw32msvc-windres
ifeq ($(shell uname),Linux)
- CXX = echo -e "\n\nWARNING: MinGW under Linux is broken! Use at your own
risk!\n\n" ; i686-w64-mingw32-g++
+ CXX = echo -e "\n\nWARNING: MinGW under Linux is broken! Use at your own
risk!\n\n" ; i586-mingw32msvc-g++
CXX_64 = x86_64-w64-mingw32-g++
WINDRES_64 = x86_64-w64-mingw32-windres
else
@@ -56,10 +56,10 @@ install_agent-64.exe: check_mk_agent-64.exe crash.exe nowin.exe
chmod +x install_agent-64.exe
check_mk_agent.exe: check_mk_agent.cc Makefile check_mk_agent.res
- $(CXX) -s -O2 -Wall -Werror -o $@ $< -static -lpsapi -lwsock32 check_mk_agent.res
+ $(CXX) -s -O2 -Wall -Werror -o $@ $< -static -lwsock32 check_mk_agent.res
check_mk_agent-64.exe: check_mk_agent.cc Makefile check_mk_agent-64.res
- $(CXX_64) -s -O2 -Wall -Werror -o $@ $< -static -lpsapi -lwsock32
check_mk_agent-64.res
+ $(CXX_64) -s -O2 -Wall -Werror -o $@ $< -static -lwsock32 check_mk_agent-64.res
check_mk_agent.res: check_mk_agent.rc
$(WINDRES) $< -O coff -o $@
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
deleted file mode 100755
index 6eba2e0..0000000
Binary files a/agents/windows/check_mk_agent-64.exe and /dev/null differ
diff --git a/agents/windows/check_mk_agent.cc b/agents/windows/check_mk_agent.cc
index 4d8260d..204b993 100755
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -51,7 +51,6 @@
#include <winsock2.h>
#include <windows.h>
#include <winbase.h>
-#include <psapi.h>
#include <winreg.h> // performance counters from registry
#include <tlhelp32.h> // list of processes
#include <stdarg.h>
@@ -2247,14 +2246,10 @@ void section_mem(SOCKET &out)
statex.dwLength = sizeof (statex);
GlobalMemoryStatusEx (&statex);
- PERFORMANCE_INFORMATION pi;
- pi.cb = sizeof(pi);
- GetPerformanceInfo(&pi, sizeof(pi));
-
output(out, "MemTotal: %11d kB\n", statex.ullTotalPhys / 1024);
output(out, "MemFree: %11d kB\n", statex.ullAvailPhys / 1024);
- output(out, "SwapTotal: %11d kB\n", ((pi.CommitLimit * pi.PageSize) -
statex.ullTotalPhys) / 1024);
- output(out, "SwapFree: %11d kB\n", (((pi.CommitLimit - pi.CommitTotal)
* pi.PageSize)- statex.ullAvailPhys) / 1024);
+ output(out, "SwapTotal: %11d kB\n", (statex.ullTotalPageFile -
statex.ullTotalPhys) / 1024);
+ output(out, "SwapFree: %11d kB\n", (statex.ullAvailPageFile -
statex.ullAvailPhys) / 1024);
output(out, "PageTotal: %11d kB\n", statex.ullTotalPageFile / 1024);
output(out, "PageFree: %11d kB\n", statex.ullAvailPageFile / 1024);
output(out, "VirtualTotal: %11d kB\n", statex.ullTotalVirtual / 1024);
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index 714e2ce..b5cc3f8 100755
Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe
differ
diff --git a/agents/windows/crash.exe b/agents/windows/crash.exe
index 38d3f0a..952e63a 100755
Binary files a/agents/windows/crash.exe and b/agents/windows/crash.exe differ
diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe
deleted file mode 100755
index c9b6d19..0000000
Binary files a/agents/windows/install_agent-64.exe and /dev/null differ
diff --git a/agents/windows/install_agent.exe b/agents/windows/install_agent.exe
index ed4953c..6dda9ec 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ
diff --git a/agents/windows/nowin.exe b/agents/windows/nowin.exe
index 26a3d55..492340b 100755
Binary files a/agents/windows/nowin.exe and b/agents/windows/nowin.exe differ