여러 대 서버를 ping 체크할 수 있는 스크립트 #!/bin/sh ping_node=( 192.168.0.61 192.168.0.62 192.168.0.63 192.168.0.64 ) for list in ${ping_node[@]} do ping -c 1 -W 1 "$list" > /dev/null if [ $? -eq 0 ]; then echo "node $list is up" sleep 0.5 else echo "node $list is down" fi done [root@localhost]# ./ping.sh 192.168.0.61 is up 192.168.0.62 is up 192.168.0.63 is up 192.168.0.64 is up