Module: check_mk
Branch: master
Commit: 9e030c77ea60fe9f69c4149facbf0c0de2f46573
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9e030c77ea60fe…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Feb 27 12:16:16 2011 +0100
HP-UX agent: fix output for df on long mount points
---
ChangeLog | 2 ++
agents/check_mk_agent.hpux | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dde512b..decec2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,8 @@
magic number.
* FIX: scan function avoids hr_cpu and ucd_cpu_utilization
at the same time
+ * FIX: HP-UX agent: fix output of df for long mount points
+ (thanks to Claas Rockmann-Buchterkirche)
1.1.9i9:
diff --git a/agents/check_mk_agent.hpux b/agents/check_mk_agent.hpux
index 89905d9..405face 100755
--- a/agents/check_mk_agent.hpux
+++ b/agents/check_mk_agent.hpux
@@ -51,7 +51,7 @@ echo AgentDirectory: $MK_CONFDIR
# modern systems with vxfs only here. The filesystem type is currently
# not used by the check anyway.
echo '<<<df>>>'
-df -Pkl | sed -e 's/ / vxfs /' -e 1d
+df -kP -F vxfs | sed 's/ / - /' | awk '/^(.*-.*)$/ { print $0 } /^([^-]+)$/ {
printf $0 }' | grep -v ^/proc | grep -v ^Filesystem | grep -v :
# Process table: HP-UX does not provide a resident size of processes.
# We send a 0 here for RSZ.