Apr 22

While I have a good monitoring system setup, some of my nodes can’t be monitored and require manual checkups. To speed things up, I use a little bash script to log into each host and check a few things out. This snippit below walks through each host in my host file and prints out file systems that are at greater then 90% utilization.

for i in `cat /etc/hosts | grep -v localhost | awk {‘print $3′}`; do
echo $i;
ssh $i “df -k | sed 1d | awk ‘\$5>90 {print}’”;
done

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.