summaryrefslogtreecommitdiffstats
path: root/abs/mv-core/hobbitmon/hobbit-mem-myth.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2008-11-09 02:33:48 (GMT)
committerJames Meyer <james.meyer@operamail.com>2008-11-09 02:33:48 (GMT)
commit7cd3835eeb8d64936731b10395836be332705fb8 (patch)
treeaab766a765784c2e5d71c0f4f902e35e08b4c51f /abs/mv-core/hobbitmon/hobbit-mem-myth.sh
parent1ba69cc033dfbd0a6c4c29c6d877c7e753f96e8e (diff)
downloadlinhes_pkgbuild-7cd3835eeb8d64936731b10395836be332705fb8.zip
linhes_pkgbuild-7cd3835eeb8d64936731b10395836be332705fb8.tar.gz
linhes_pkgbuild-7cd3835eeb8d64936731b10395836be332705fb8.tar.bz2
hobbit server
Diffstat (limited to 'abs/mv-core/hobbitmon/hobbit-mem-myth.sh')
-rwxr-xr-xabs/mv-core/hobbitmon/hobbit-mem-myth.sh52
1 files changed, 52 insertions, 0 deletions
diff --git a/abs/mv-core/hobbitmon/hobbit-mem-myth.sh b/abs/mv-core/hobbitmon/hobbit-mem-myth.sh
new file mode 100755
index 0000000..642672f
--- /dev/null
+++ b/abs/mv-core/hobbitmon/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
+
+
+
+