#!/bin/sh ## Need to Loop the following commands per node. ## # CLUSTERS=`cat /etc/hosts | grep node | grep -v \# | awk '{print $2}'` CLUSTERS=`qhost | grep lx24-x86 | grep -v qrsh | cut -f1 -d" "` #LIST="/root/.ssh/* /etc/users.local " for NODE in $CLUSTERS; do DOWN=`ping $NODE -q -c1 -w1 | grep "100% packet loss"` if [ "$DOWN" = "" ]; then load=`ssh $NODE /usr/bin/uptime | cut -f2 -dl` echo "$NODE: l$load" else echo $NODE: [DOWN] fi done