Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *cat $PATHNAME/NodeList.csv | while read output
- do
- STATUS=`ssh -q $output 'df -P -H' |tail -n +2 | awk '{print $5 " " $1}'`
- if [ $? -eq 0 ]; then
- ALERT=40
- echo $output
- usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 )
- partition=$(echo $output | awk '{ print $2 }' )
- elif [ $usep -ge $ALERT ]; then
- echo "Running out of space "$partition ($usep%)" on ${output} as on $(date)"
- else
- echo "Disk Usage for $partition is $usep% which is below Threshold...!!!"
- fi
- else
- echo "$output is Not Reachable"
- fi
- done > $PATHNAME/ReportPing.csv*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement