Check Disk Space

#AJS - 08/12/2010 moved from ops01 and rewritten.

# Pull the current connections per server
#ssh -i ~/.ssh/id_dsa rng16


#delete old log file
rm ${LOG}

#rng16 used sdb for some unknown reason... so we cannot loop through rng16
for RNGO in rng01 rng02 rng03 rng14 rng15
        RNGRES=`ssh -i ~/.ssh/id_dsa -b ${RNGO} "df -m | grep /dev/sda2" | awk '{print $4}'`
        echo -n "${RNGO}:${RNGRES} " >> ${LOG}

#finish off with rng16
RNGRES=`ssh -i ~/.ssh/id_dsa -b rng16 "df -m | grep /dev/sdb1" | awk '{print $4}'`
echo -n "rng16:${RNGRES} " >> ${LOG}

#finish log file with cr
echo "" >> ${LOG}

exit 0

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