변군이글루

[스크립트] 리눅스에서 ping 테스트시 시작 표시하기(ping 정상 Bell 울림)_Ver3 본문

문___스크립트

[스크립트] 리눅스에서 ping 테스트시 시작 표시하기(ping 정상 Bell 울림)_Ver3

변군 변군이글루 2013.09.10 22:57

리눅스에서 ping 테스트시 시작 표시하기

(ping 정상 Bell 울림)_Ver3

 

[root@lamp ~]# cat /bin/tping

#!/bin/bash

 

echo $1

a=0

 

#domain lookup

#dig $1 +noall +answer | grep -v "global options" | grep -v "DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6"

#echo " "

 

#ping TEST( Count | TIME(HH:MM:SS) | PING Field )

/bin/ping $1 |

 

                     while read ping;

                     do

                                echo "[$a] | $(date +"%H:%M:%S") | $ping `echo -e "\a"`"

                                a=$(($a+1))      

                     done

[root@lamp ~]#

[root@lamp ~]#

[root@lamp ~]# tping google.com

google.com

[0] | 22:52:28 | PING google.com (121.78.71.106) 56(84) bytes of data.

[1] | 22:52:28 | 64 bytes from 121.78.71.106: icmp_seq=1 ttl=58 time=84.0 ms

[2] | 22:52:29 | 64 bytes from 121.78.71.106: icmp_seq=2 ttl=58 time=82.3 ms

[3] | 22:52:30 | 64 bytes from 121.78.71.106: icmp_seq=3 ttl=58 time=81.2 ms

[4] | 22:52:31 | 64 bytes from 121.78.71.106: icmp_seq=4 ttl=58 time=82.8 ms

[5] | 22:52:32 | 64 bytes from 121.78.71.106: icmp_seq=5 ttl=58 time=83.1 ms

 

 

 

0 Comments
댓글쓰기 폼
Prev 1 2 3 4 5 6 7 8 9 Next