Module: check_mk
Branch: master
Commit: 1dd5cdf43ef20485210230ed76a70f99d232825e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1dd5cdf43ef204…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Thu Jan 31 10:14:32 2019 +0100
7137 FIX mem.win: Titles of rule are more consistent
Some of the titles and rules still referred to the commit charge as 'page file'.
CMK-1543
Change-Id: I8acbccfb7f639b8888240dd02935f697a1ffa803
---
.werks/7137 | 10 ++++++++++
checkman/mem.win | 18 +++++++++++-------
checks/mem | 2 +-
.../wato/check_parameters/memory_pagefile_win.py | 6 +++---
.../checks/generictests/datasets/mem_win_regression.py | 4 ++--
5 files changed, 27 insertions(+), 13 deletions(-)
diff --git a/.werks/7137 b/.werks/7137
new file mode 100644
index 0000000..54aae5e
--- /dev/null
+++ b/.werks/7137
@@ -0,0 +1,10 @@
+Title: mem.win: Titles of rule are more consistent
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1548925887
+Class: fix
+
+Some of the titles and rules still referred to the commit charge as 'page file'.
diff --git a/checkman/mem.win b/checkman/mem.win
index 79c86cf..a4338cc 100644
--- a/checkman/mem.win
+++ b/checkman/mem.win
@@ -1,4 +1,4 @@
-title: Usage of main memory and page file
+title: Memory Usage
agents: windows
catalog: os/kernel
license: GPL
@@ -6,29 +6,33 @@ distribution: check_mk
description:
This check measures the current usage of physical RAM and
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,
+ time or it may hold data in the pagefile even if 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
+ total (RAM + page file) is really required, ignoring overlap and caches.
+ Commit Charge minus used RAM 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).
+ may lead to offsets (to the point where Commit Charge - RAM can be negative).
+ The page file metric is determined using the fields 'ullTotalPageFile'
+ (current committed memory limit for the system or the current
+ process, whichever is smaller) and 'ullAvailPageFile' (maximum
+ amount of memory the current process can commit) of the MEMORYSTATUSEX
+ structure as returned by the windows API function 'GlobalMemoryStatusEx'.
item:
{None}
diff --git a/checks/mem b/checks/mem
index 62b9032..df0a9db 100644
--- a/checks/mem
+++ b/checks/mem
@@ -551,7 +551,7 @@ def check_mem_windows(_no_item, params, info):
return warn, crit
for title, prefix, paramname in [("Memory usage", "Mem",
"memory"),
- ("Commit Charge", "Page",
"pagefile")]:
+ ("Commit charge", "Page",
"pagefile")]:
total_kb = meminfo.get("%sTotal" % prefix)
free_kb = meminfo.get("%sFree" % prefix)
diff --git a/cmk/gui/plugins/wato/check_parameters/memory_pagefile_win.py
b/cmk/gui/plugins/wato/check_parameters/memory_pagefile_win.py
index 5b5d042..87731f0 100644
--- a/cmk/gui/plugins/wato/check_parameters/memory_pagefile_win.py
+++ b/cmk/gui/plugins/wato/check_parameters/memory_pagefile_win.py
@@ -75,18 +75,18 @@ register_check_parameters(
(
"pagefile",
Alternative(
- title=_("Pagefile Levels"),
+ title=_("Commit charge Levels"),
style="dropdown",
elements=[
Tuple(
- title=_("Pagefile usage in percent"),
+ title=_("Commit charge in percent (relative to commit
limit)"),
elements=[
Percentage(title=_("Warning at")),
Percentage(title=_("Critical at")),
]),
Transform(
Tuple(
- title=_("Absolute free pagefile"),
+ title=_("Absolute commitable memory"),
elements=[
Filesize(title=_("Warning if less than")),
Filesize(title=_("Critical if less than")),
diff --git a/tests/unit/checks/generictests/datasets/mem_win_regression.py
b/tests/unit/checks/generictests/datasets/mem_win_regression.py
index 86d1460..c29e002 100644
--- a/tests/unit/checks/generictests/datasets/mem_win_regression.py
+++ b/tests/unit/checks/generictests/datasets/mem_win_regression.py
@@ -25,7 +25,7 @@ checks = {
('memory', 16369.96875, 26213.990625, 29490.739453125, 0,
32767.48828125),
('mem_total', 32767.48828125, None, None, None, None),
]),
- (0, 'Commit Charge: 20.1% (19.04 GB/94.50 GB)', [
+ (0, 'Commit charge: 20.1% (19.04 GB/94.50 GB)', [
('pagefile', 19491.90625, 77413.990625, 87090.739453125, 0,
96767.48828125),
('pagefile_total', 96767.48828125, None, None, None, None),
]),
@@ -35,7 +35,7 @@ checks = {
('memory', 16369.96875, 26214.48828125, 29490.48828125, 0,
32767.48828125),
('mem_total', 32767.48828125, None, None, None, None),
]),
- (2, 'Commit Charge: 20.1% (19.04 GB/94.50 GB)', [
+ (2, 'Commit charge: 20.1% (19.04 GB/94.50 GB)', [
('pagefile', 19491.90625, 77275.48828125, 19353.48828125, 0,
96767.48828125),
('pagefile_total', 96767.48828125, None, None, None, None),
]),