Module: check_mk
Branch: master
Commit: deb769c4683245dbf0167ad56ab70af58ba05fe2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=deb769c4683245…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Wed Dec 9 09:56:12 2015 +0100
#2868 FIX cpu_util.include: fixed crash on some systems if per-core statistics were
enabled
The per-core statistics previously depended on a specific number of performance measures
per core.
---
.werks/2868 | 10 ++++++++++
ChangeLog | 1 +
checks/cpu_util.include | 3 ++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/2868 b/.werks/2868
new file mode 100644
index 0000000..1035be0
--- /dev/null
+++ b/.werks/2868
@@ -0,0 +1,10 @@
+Title: cpu_util.include: fixed crash on some systems if per-core statistics were enabled
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1449651270
+
+The per-core statistics previously depended on a specific number of performance measures
per core.
diff --git a/ChangeLog b/ChangeLog
index efcbdfb..149ff5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -147,6 +147,7 @@
* 2808 FIX: db2_connections: added missing connections performance data
* 2861 FIX: hivemanager_devices: Fixed configuration of states to treat as WARN
* 1312 FIX: carel_uniflair_cooling: Check is now disabled...
+ * 2868 FIX: cpu_util.include: fixed crash on some systems if per-core statistics were
enabled...
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/cpu_util.include b/checks/cpu_util.include
index a3c1ab0..e0e6278 100644
--- a/checks/cpu_util.include
+++ b/checks/cpu_util.include
@@ -210,8 +210,9 @@ def check_cpu_util_unix(values, params, cores = None):
("core_util_graph" in params or \
"core_util_time" in params):
ctr = 0
+ cores_padded = [line + [0] * (11 - len(line)) for line in cores]
for core, user, nice, system, idle, iowait,\
- irq, softirq, steal, guest, guest_nice in cores:
+ irq, softirq, steal, guest, guest_nice in cores_padded:
total = user + nice + system + iowait + irq + softirq + steal + guest +
guest_nice