Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

CLC-1538 Add monitor script to source control #896

Merged
merged 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 28, 2013
  1. @ctweney
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 0 deletions.
  1. +15 −0 script/monitor.sh
View
15 script/monitor.sh
@@ -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
Something went wrong with that request. Please try again.