diff options
author | James Meyer <james.meyer@operamail.com> | 2011-12-07 19:45:02 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2011-12-07 19:45:02 (GMT) |
commit | 582455878ef98dfadc0618309686c85b135f7a23 (patch) | |
tree | a87b677b96c168524576cf32870487758d0b43ba /abs/core/xymon/hobbit-mem-myth.sh | |
parent | 65b2738ba8a6b80a17c5a2953a29be935b15d18c (diff) | |
download | linhes_pkgbuild-582455878ef98dfadc0618309686c85b135f7a23.zip linhes_pkgbuild-582455878ef98dfadc0618309686c85b135f7a23.tar.gz linhes_pkgbuild-582455878ef98dfadc0618309686c85b135f7a23.tar.bz2 |
xymon: first build, includes both server and client builds.
xymon is a system used to monitor various things about each host.
Possible to replace rrdtool and monitorx
Diffstat (limited to 'abs/core/xymon/hobbit-mem-myth.sh')
-rw-r--r-- | abs/core/xymon/hobbit-mem-myth.sh | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/abs/core/xymon/hobbit-mem-myth.sh b/abs/core/xymon/hobbit-mem-myth.sh new file mode 100644 index 0000000..663e2e3 --- /dev/null +++ b/abs/core/xymon/hobbit-mem-myth.sh @@ -0,0 +1,52 @@ +#!/bin/bash +MBEPID=`ps -fU mythtv |grep mythbackend |grep -v runsv|grep -v grep|grep -v logger|awk '{print $2 }'` +MFEPID=`ps -ef|grep mythfrontend |grep -v runsv|grep -v grep|grep -v logger|grep -v mythfrontend-start|awk '{print $2 }'` + + + +COLOR=green # By default, everything is OK + + # Do whatever you need to test for something +if [ ! x$MBEPID = x ] +then +VmSize=`cat /proc/$MBEPID/status|grep -i vmsize|awk '{print $2 }'` +VmPeak=`cat /proc/$MBEPID/status|grep -i vmpeak|awk '{print $2 }'` +VmRSS=`cat /proc/$MBEPID/status|grep -i vmrss |awk '{print $2 }'` +MSGMBE=" + VmSize:$VmSize + VmPeak:$VmPeak + VmRSS:$VmRSS + " +# echo $MSGMBE + # Tell Hobbit about it + $BB $BBDISP "data $MACHINE.memmbe $COLOR `date` + + ${MSGMBE} + + " +fi + + + +if [ ! x$MFEPID = x ] +then +VmSize=`cat /proc/$MFEPID/status|grep -i vmsize|awk '{print $2 }'` +VmPeak=`cat /proc/$MFEPID/status|grep -i vmpeak|awk '{print $2 }'` +VmRSS=`cat /proc/$MFEPID/status|grep -i vmrss |awk '{print $2 }'` +MSGMBE=" + VmSize:$VmSize + VmPeak:$VmPeak + VmRSS:$VmRSS + " +# echo $MSGMBE + # Tell Hobbit about it + $BB $BBDISP "data $MACHINE.memmfe $COLOR `date` + + ${MSGMBE} + + " +fi + + + + |