Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rb:checkringospace [13/02/2012 20:51]
andrew
rb:checkringospace [10/10/2013 15:21] (current)
Line 1: Line 1:
-====== Check RINGO Disk Space ======+====== Check Disk Space ======
  
-#​!/​bin/​bash +  ​#​!/​bin/​bash 
-#AJS - 08/12/2010 moved from ops01 and rewritten. +  #AJS - 08/12/2010 moved from ops01 and rewritten. 
- +   
-# Pull the current connections per ringo +  # Pull the current connections per server 
-#ssh -i ~/​.ssh/​id_dsa rng16 +  #ssh -i ~/​.ssh/​id_dsa rng16 
- +   
-LOG=/​var/​www/​html/​cacti/​output/​ringo_diskspace.log +  LOG=/​var/​www/​html/​cacti/​output/​diskspace.log 
- +   
-#delete old log file +  #delete old log file 
-rm ${LOG} +  rm ${LOG} 
- +   
-#rng16 used sdb for some unknown reason... so we cannot loop through rng16 +  #rng16 used sdb for some unknown reason... so we cannot loop through rng16 
-for RNGO in rng01 rng02 rng03 rng14 rng15 +  for RNGO in rng01 rng02 rng03 rng14 rng15 
-do +  do 
-        RNGRES=`ssh -i ~/​.ssh/​id_dsa -b 172.27.206.210 ${RNGO} "df -m | grep /​dev/​sda2"​ | awk '​{print $4}'​` +          RNGRES=`ssh -i ~/​.ssh/​id_dsa -b 172.27.206.210 ${RNGO} "df -m | grep /​dev/​sda2"​ | awk '​{print $4}'​` 
-        echo -n "​${RNGO}:​${RNGRES} " >> ${LOG} +          echo -n "​${RNGO}:​${RNGRES} " >> ${LOG} 
-done +  done 
- +   
-#finish off with rng16 +  #finish off with rng16 
-RNGRES=`ssh -i ~/​.ssh/​id_dsa -b 172.27.206.210 rng16 "df -m | grep /​dev/​sdb1"​ | awk '​{print $4}'​` +  RNGRES=`ssh -i ~/​.ssh/​id_dsa -b 172.27.206.210 rng16 "df -m | grep /​dev/​sdb1"​ | awk '​{print $4}'​` 
-echo -n "​rng16:​${RNGRES} " >> ${LOG} +  echo -n "​rng16:​${RNGRES} " >> ${LOG} 
- +   
-#finish log file with cr +  #finish log file with cr 
-echo ""​ >> ${LOG} +  echo ""​ >> ${LOG} 
- +   
-exit 0+  exit 0
  

rb/checkringospace.txt · Last modified: 10/10/2013 15:21 (external edit)