Megatest

monitor.sh at [978de66607]
Login

File tests/fdktestqa/testqa/monitor.sh artifact 7d5c48c8b9 part of check-in 978de66607


#!/bin/bash

function printit() {
  rload=$(ssh xena cat /proc/loadavg|cut -d' ' -f1)  
  lload=$(cat /proc/loadavg |cut -d' ' -f1) 
  numrunning=$(megatest -list-runs % | grep RUNNING | wc -l) 
  numlogs=$(ls logs | wc -l)
  numalive=$(megatest -list-servers |grep alive|wc -l)
  echo "$(date +%s) Numlogs: ${numlogs} NumRunning: ${numrunning} Lload ${lload} Rload: ${rload} NumAlive: ${numalive}"
}

function runforever () {
  while true;do
     printit
     sleep 5
  done
}

runforever