Module: check_mk
Branch: master
Commit: 44e966935ee10a4ab740269769b33c75d5ba0fcf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=44e966935ee10a…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue May 8 14:28:45 2018 +0200
6001 FIX ps.include: Checks crashed if parameters 'Levels on CPU utilization of a
single process' or 'Enable per-process details in long-output' are used
Change-Id: I0235b4645073f406d9d0db1830b3bfdece508eff
---
.werks/6001 | 10 ++++++++++
checks/ps.include | 6 +++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/.werks/6001 b/.werks/6001
new file mode 100644
index 0000000..f0b584c
--- /dev/null
+++ b/.werks/6001
@@ -0,0 +1,10 @@
+Title: ps.include: Checks crashed if parameters 'Levels on CPU utilization of a
single process' or 'Enable per-process details in long-output' are used
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1525782403
+Class: fix
+
+
diff --git a/checks/ps.include b/checks/ps.include
index b30ca7d..4a5f40c 100644
--- a/checks/ps.include
+++ b/checks/ps.include
@@ -414,9 +414,9 @@ def check_ps_common(item, params, parsed, cpu_cores = 1, info_name =
"processes"
kernel_perc = kernel_per_sec / 100000.0 / cpu_cores
percent_cpu += user_perc + kernel_perc
handle_count += handle_c
- process.append([("cpu usage (user space)",
(user_perc, "%")),
- ("cpu usage (kernel space)",
(kernel_perc, "%")),
- ("pid", (pid, ""))])
+ process.append(("cpu usage (user space)", (user_perc,
"%")))
+ process.append(("cpu usage (kernel space)",
(kernel_perc, "%")))
+ process.append(("pid", (pid, "")))
else:
# process_info[3] contains the used CPU time and possibly,
separated by /, also
# the total elapsed time since the birth of the process.