Module: check_mk
Branch: master
Commit: 7e4f9e4393781c2c60eb1cd5b39bd1f5c4c6be63
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7e4f9e4393781c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jun 29 16:00:04 2015 +0200
#2383 FIX FreeBSD Agent: Fixed handling <<<ps>>> section when jailed
---
.werks/2383 | 10 ++++++++++
ChangeLog | 1 +
agents/check_mk_agent.freebsd | 4 ++--
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/2383 b/.werks/2383
new file mode 100644
index 0000000..4413ff7
--- /dev/null
+++ b/.werks/2383
@@ -0,0 +1,10 @@
+Title: FreeBSD Agent: Fixed handling <<<ps>>> section when jailed
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1435585221
+
+
diff --git a/ChangeLog b/ChangeLog
index f35a39c..075c1f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@
* 2381 FIX: emc_datadomain_fans: Made check more robust against broken SNMP output
* 2366 FIX: carel_sensors: fix crash in case of missing temperature sensor
* 2382 FIX: mssql_backup: Formating age output more human friendly
+ * 2383 FIX: FreeBSD Agent: Fixed handling <<<ps>>> section when
jailed
Multisite:
* 2314 FIX: Availability: fixed exception when grouping by host or service group
diff --git a/agents/check_mk_agent.freebsd b/agents/check_mk_agent.freebsd
index 1e95e91..24f90b8 100755
--- a/agents/check_mk_agent.freebsd
+++ b/agents/check_mk_agent.freebsd
@@ -167,8 +167,8 @@ mount -p -t ufs
# processes including username, without kernel processes
echo '<<<ps>>>'
COLUMNS=10000
-if [ is_jailed = 0 ]; then
- ps ax -o state,user,vsz,rss,pcpu,command | sed -e 1d -e '/\([^ ]*J\) */d' -e
's/*\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) */(\2,\3,\4,\5) /'
+if [ "$is_jailed" = "0" ]; then
+ ps ax -o state,user,vsz,rss,pcpu,command | sed -e 1d -e '/\([^ ]*J\) */d' -e
's/ *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) */(\2,\3,\4,\5) /'
else
ps ax -o user,vsz,rss,pcpu,command | sed -e 1d -e 's/ *\([^ ]*\) *\([^ ]*\) *\([^
]*\) *\([^ ]*\) */(\1,\2,\3,\4) /'
fi