Module: check_mk
Branch: master
Commit: 7b365f6579fb82cfca731cabaa406d5be0fa16bc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7b365f6579fb82…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Wed May 16 15:59:20 2012 +0200
HP-UX rename statgrab 2nd time. do not query disks with statgrab
---
agents/hpux/hpux_statgrab | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/agents/hpux/hpux_statgrab b/agents/hpux/hpux_statgrab
new file mode 100644
index 0000000..7e02b1b
--- /dev/null
+++ b/agents/hpux/hpux_statgrab
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# this is for users who compiled statgrab on hp-ux.
+# note you'll need a 0.18+ version, from their github page at
+#
https://github.com/i-scream/libstatgrab
+# flags used for compiling - disable documentation, examples and set*id
+
+
+if which statgrab > /dev/null ; then
+ # You need statgrab to be installed. You'll find it
+ # here:
http://www.i-scream.org/libstatgrab/
+ if statgrab const. cpu. general. load. mem. net. page. proc. swap. user. >
/tmp/statgrab.$$ 2>/dev/null
+ then
+ for s in proc cpu net load page
+ do
+ echo "<<<statgrab_$s>>>"
+ cat /tmp/statgrab.$$ | grep "^$s\." | cut -d. -f2-99 | sed 's/
*= */ /'
+ done
+
+ echo '<<<statgrab_mem>>>'
+ cat /tmp/statgrab.$$ | egrep "^(swap|mem)\." | sed 's/ *= */
/'
+
+ fi
+ [ -f /tmp/statgrab.$$ ] && rm -f /tmp/statgrab.$$
+fi