Module: check_mk
Branch: master
Commit: 2aa577ad81dee29c9d07e20b399290c1bce9ed6d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2aa577ad81dee2…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Aug 23 18:40:47 2014 +0200
db2_mem: avoid duplicate section headers in agent plugin
---
agents/plugins/db2_mem | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/agents/plugins/db2_mem b/agents/plugins/db2_mem
index bf3ae5a..c328dd6 100755
--- a/agents/plugins/db2_mem
+++ b/agents/plugins/db2_mem
@@ -25,9 +25,10 @@
INSTANCES=$(ps -ef | grep db2sysc | awk '{print $1}' | sort -u | grep -v root)
-for INSTANCE in $INSTANCES; do
+if [ "$INSTANCES" ] ; then
echo "<<<db2_mem>>>"
- echo "Instance $INSTANCE"
- su - $INSTANCE -c "db2pd -dbptnmem " | egrep '(Memory Limit|HWM
usage)'
-done
-
+ for INSTANCE in $INSTANCES; do
+ echo "Instance $INSTANCE"
+ su - $INSTANCE -c "db2pd -dbptnmem " | egrep '(Memory Limit|HWM
usage)'
+ done
+fi