Megatest

Artifact [7d5c48c8b9]
Login

Artifact 7d5c48c8b982fd2da0402bc7dbfed3f8b29d30a4:


#!/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