diff options
author | James Meyer <james.meyer@operamail.com> | 2008-11-09 02:35:27 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2008-11-09 02:35:27 (GMT) |
commit | abc83d46637ebc63479ec745f05ae392f404f04e (patch) | |
tree | 49bab12f11126552a0dcaaeea5c36acf5697fa00 /abs/mv-core/hobbit-client/client/ext | |
parent | d250b09f45562edf2be94fa330e312dccc0832d8 (diff) | |
download | linhes_pkgbuild-abc83d46637ebc63479ec745f05ae392f404f04e.zip linhes_pkgbuild-abc83d46637ebc63479ec745f05ae392f404f04e.tar.gz linhes_pkgbuild-abc83d46637ebc63479ec745f05ae392f404f04e.tar.bz2 |
hobbit client
Diffstat (limited to 'abs/mv-core/hobbit-client/client/ext')
-rwxr-xr-x | abs/mv-core/hobbit-client/client/ext/hobbit-mem-myth.sh | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/abs/mv-core/hobbit-client/client/ext/hobbit-mem-myth.sh b/abs/mv-core/hobbit-client/client/ext/hobbit-mem-myth.sh new file mode 100755 index 0000000..642672f --- /dev/null +++ b/abs/mv-core/hobbit-client/client/ext/hobbit-mem-myth.sh @@ -0,0 +1,52 @@ +#!/bin/bash +MBEPID=`ps -ef|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|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 + + + + |