Module: check_mk
Branch: master
Commit: ac1ad16efa704ffced9cbb63adb2b76e6a9450bc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ac1ad16efa704f…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri May 8 13:26:07 2015 +0200
#2266: Fix: windows agent: fixed invalid agent output if system memory exceeds 2TB RAM
---
.werks/2266 | 11 +++++++++++
ChangeLog | 1 +
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent.cc | 16 ++++++++--------
agents/windows/check_mk_agent.exe | Bin 181760 -> 182272 bytes
agents/windows/check_mk_agent.msi | Bin 730112 -> 730624 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 181760 -> 182272 bytes
agents/windows/install_agent-64.exe | Bin 177884 -> 177884 bytes
agents/windows/install_agent.exe | Bin 158917 -> 158985 bytes
9 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/.werks/2266 b/.werks/2266
new file mode 100644
index 0000000..e48b112
--- /dev/null
+++ b/.werks/2266
@@ -0,0 +1,11 @@
+Title: windows agent: fixed invalid agent output if system memory exceeds 2TB RAM
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1431084054
+
+The section <tt>mem</tt> section reported invalid (negative) values if the
+windows host had equal or more than 2TB RAM.
diff --git a/ChangeLog b/ChangeLog
index cd75f38..290653d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -357,6 +357,7 @@
* 1244 FIX: windows_tasks: Fixed handling of tasks manually stopped by admin...
* 1245 FIX: printer_output: Now correctly detect a bin with unknown as name
* 2265 FIX: db2_version: improved check output when version information is
missing...
+ * 2266 FIX: windows agent: fixed invalid agent output if system memory exceeds 2TB
RAM...
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request,
added mailto link for error report...
diff --git a/agents/windows/build_version b/agents/windows/build_version
index b4f334f..aaacbe6 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-141
+142
diff --git a/agents/windows/check_mk_agent.cc b/agents/windows/check_mk_agent.cc
index 80de70d..103945f 100755
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -2540,14 +2540,14 @@ void section_mem(SOCKET &out)
statex.dwLength = sizeof (statex);
GlobalMemoryStatusEx (&statex);
- output(out, "MemTotal: %11d kB\n", statex.ullTotalPhys / 1024);
- output(out, "MemFree: %11d kB\n", 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);
- output(out, "VirtualFree: %11d kB\n", statex.ullAvailVirtual / 1024);
+ output(out, "MemTotal: %s kB\n", llu_to_string(statex.ullTotalPhys
/ 1024));
+ output(out, "MemFree: %s kB\n", llu_to_string(statex.ullAvailPhys
/ 1024));
+ output(out, "SwapTotal: %s kB\n", llu_to_string((statex.ullTotalPageFile
- statex.ullTotalPhys) / 1024));
+ output(out, "SwapFree: %s kB\n", llu_to_string((statex.ullAvailPageFile
- statex.ullAvailPhys) / 1024));
+ output(out, "PageTotal: %s kB\n", llu_to_string(statex.ullTotalPageFile
/ 1024));
+ output(out, "PageFree: %s kB\n", llu_to_string(statex.ullAvailPageFile
/ 1024));
+ output(out, "VirtualTotal: %s kB\n", llu_to_string(statex.ullTotalVirtual /
1024));
+ output(out, "VirtualFree: %s kB\n", llu_to_string(statex.ullAvailVirtual /
1024));
}
// .-----------------------------------------------------------------------.
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index 30aecce..dd7be26 100755
Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe
differ
diff --git a/agents/windows/check_mk_agent.msi b/agents/windows/check_mk_agent.msi
index b789847..c516b52 100755
Binary files a/agents/windows/check_mk_agent.msi and b/agents/windows/check_mk_agent.msi
differ
diff --git a/agents/windows/check_mk_agent.unversioned.exe
b/agents/windows/check_mk_agent.unversioned.exe
index 6b2b57e..91d5c9d 100755
Binary files a/agents/windows/check_mk_agent.unversioned.exe and
b/agents/windows/check_mk_agent.unversioned.exe differ
diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe
index de21efe..8ea1c38 100755
Binary files a/agents/windows/install_agent-64.exe and
b/agents/windows/install_agent-64.exe differ
diff --git a/agents/windows/install_agent.exe b/agents/windows/install_agent.exe
index 8e55954..ea42ae2 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ