Module: check_mk
Branch: master
Commit: 6c95fff0e57fe0a6ac29a5c3d6b5d3fe4dcd1e95
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6c95fff0e57fe0…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Tue Feb 2 15:24:55 2016 +0100
#3065 FIX mem.win: renamed "Pagefile" to "Commit Charge" to clarify
what the number actually expresses
Please see the manpage for a short explanation on what the numbers actually express.
---
.werks/3065 | 9 +++++++++
ChangeLog | 1 +
checkman/mem.win | 29 ++++++++++++++++++++++++++---
checks/mem | 8 ++++----
web/plugins/metrics/check_mk.py | 6 ++++++
5 files changed, 46 insertions(+), 7 deletions(-)
diff --git a/.werks/3065 b/.werks/3065
new file mode 100644
index 0000000..ba99164
--- /dev/null
+++ b/.werks/3065
@@ -0,0 +1,9 @@
+Title: mem.win: renamed "Pagefile" to "Commit Charge" to clarify what
the number actually expresses
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1454422778
+Class: fix
+
+Please see the manpage for a short explanation on what the numbers actually express.
diff --git a/ChangeLog b/ChangeLog
index a3adce9..7173abf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -240,6 +240,7 @@
* 3063 FIX: mcaffee_av_client: plugin didn't work with 32-bit av software
installed on 64-bit system
* 3064 FIX: netscaler_health: no longer discovers non-running fans (i.e. in virtual
appliances)
* 2987 FIX: esx_vsphere_counters: Improved accuracy of all counter values...
+ * 3065 FIX: mem.win: renamed "Pagefile" to "Commit Charge" to
clarify what the number actually expresses...
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checkman/mem.win b/checkman/mem.win
index 296e52c..f57edd1 100644
--- a/checkman/mem.win
+++ b/checkman/mem.win
@@ -5,7 +5,30 @@ license: GPL
distribution: check_mk
description:
This check measures the current usage of physical RAM and
- of the Windows page file.
+ of the commit charge.
+ The "commit charge" was previously confusingly named "pagefile".
+ Please note that Microsoft themselves use this naming in
+ some applications.
+
+ Due to how windows optimizes memory management, physical memory
+ is in practice almost always fully utilized. The Memory usage this
+ check displays says how much memory is actually required by processes,
+ in contrast to caches that could be freed if the need arises.
+
+ In the same vein windows may hold data in ram and pagefile at the same
+ time or it may hold data in the pagefile even when there is ram available,
+ when it determines this may improve performance.
+ As a result, the real pagefile usage is not only hard to
+ determine, it's also utterly useless when we want to determine
+ resource usage on the system.
+
+ The commit charge instead tells us how much of the memory used in
+ total (RAM + swap) is really required, ignoring overlap and caches.
+ Commit Charge minus Memory Usage is approximately the amount
+ of the pagefile used for "relevant" data, but further optimizations
+ may lead to offsets (to the point where Commit Charge - Memory Usage
+ can be negative).
+
item:
{None}
@@ -32,7 +55,7 @@ examples:
perfdata:
Two variables: {memory}: the current memory usage in MB, {pagefile}: the
- current page file usage in MB.
+ current commit charge in MB.
[parameters]
parameters (dict): This check uses a dictionary as parameter. The following
@@ -42,7 +65,7 @@ parameters (dict): This check uses a dictionary as parameter. The
following
(e.g. {80.0}) are interpreted as percentages of {used} space. Integer values
(e.g. {2048}) are interpreted as MB of {free} space.
- {"pagefile"} Warning and critical levels for page file usage. The same
+ {"pagefile"} Warning and critical levels for commit charge. The same
rules apply as for {memory}.
{"average"} This optional parameters sets a value in minutes for averaging.
diff --git a/checks/mem b/checks/mem
index cb35047..6cdb238 100644
--- a/checks/mem
+++ b/checks/mem
@@ -439,9 +439,9 @@ def check_mem_windows(item, params, info):
MB = 1024.0 * 1024
now = time.time()
- for title, what, paramname in [
- ( "Memory", "Mem", "memory" ),
- ( "Page file", "Page", "pagefile" )]:
+ for title, what, paramname in [
+ ("Memory usage", "Mem", "memory"),
+ ("Commit Charge", "Page", "pagefile")]:
total_kb = meminfo[what + "Total"]
free_kb = meminfo[what + "Free"]
used_kb = total_kb - free_kb
@@ -449,7 +449,7 @@ def check_mem_windows(item, params, info):
free_mb = free_kb / 1024.0
perc = 100.0 * used_kb / total_kb
- infotext = "%s usage: %.1f%% (%.1f/%.1f GB)" % \
+ infotext = "%s: %.1f%% (%.1f/%.1f GB)" % \
(title, perc, used_kb / MB, total_kb / MB)
if type(params[paramname]) == tuple:
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index 813ec4c..e7a4694 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -469,6 +469,12 @@ metric_info["mem_used"] = {
"unit" : "bytes",
}
+metric_info["pagefile_used"] = {
+ "color": "#408f20",
+ "title" : _("Commit Charge"),
+ "unit" : "bytes",
+}
+
metric_info["mem_used_percent"] = {
"color": "#80ff40",
"title" : _("RAM used"),