Skip to content
This repository
Browse code

Merge pull request #897 from ctweney/clc-1538-qa

CLC-1538 (QA) Add monitor script to source control
  • Loading branch information...
commit 03f3995c0c0bcd464810514cb24d1e2d3cd53731 2 parents 2014ece + afb5fc3
Christian Vuerings authored March 28, 2013

Showing 1 changed file with 15 additions and 0 deletions. Show diff stats Hide diff stats

  1. 15  script/monitor.sh
15  script/monitor.sh
... ...
@@ -0,0 +1,15 @@
  1
+#!/bin/bash
  2
+
  3
+DELAY=$1
  4
+if [ -z "$1" ]; then
  5
+  DELAY=30
  6
+fi
  7
+
  8
+while true; do
  9
+  STATS=`(sleep 1 ; echo "stats"; sleep 1; echo "quit") | telnet $HOSTNAME 11211`
  10
+  echo "==========================================="
  11
+  echo `date`
  12
+  jmap -heap `jps -mlv|grep jruby|head -1|awk '{print $1}'`
  13
+  echo $STATS | awk -F"STAT" '{for(i=2;i<NF;++i)print $i}'
  14
+  sleep $DELAY
  15
+done

0 notes on commit 03f3995

Please sign in to comment.
Something went wrong with that request. Please try again.