Permalink
Browse files

CLC-1538 Add monitor script to source control

  • Loading branch information...
1 parent ed93914 commit 9ee8558bce428b9c32d157a755c34aca7eb4166b Chris Tweney committed Mar 28, 2013
Showing with 15 additions and 0 deletions.
  1. +15 −0 script/monitor.sh
View
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+DELAY=$1
+if [ -z "$1" ]; then
+ DELAY=30
+fi
+
+while true; do
+ STATS=`(sleep 1 ; echo "stats"; sleep 1; echo "quit") | telnet $HOSTNAME 11211`
+ echo "==========================================="
+ echo `date`
+ jmap -heap `jps -mlv|grep jruby|head -1|awk '{print $1}'`
+ echo $STATS | awk -F"STAT" '{for(i=2;i<NF;++i)print $i}'
+ sleep $DELAY
+done

0 comments on commit 9ee8558

Please sign in to comment.