linux ping
-
Linux Ping (ICMP) check bash Shell ScriptingLinux/Shell Script 2019. 4. 17. 09:49
리눅스의 bash셀을 이용한 ping check 스크립트 - pinglist.txt : ping check iplist - pingcheck.sh : ping shell script pinglist.txt 127.0.0.1 # Loopback (Test) 192.168.x.77 # 정상응답 서버 (Green) 192.168.x.78 # Shutdown 된 서버 (Red) pingcheck.sh #!/bin/bash for i in `cat pinglist.txt`; do ping -c1 $i > /dev/null 2>&1 if [ $? -eq 0 ];then echo $i 'ping check ok' else echo $i 'ping check fail' fi done pingcheck.sh 127.0...