log - Ping different IP addresses and save only ping statistics - Ask Ubuntu
i want ping ip addresses , save statistics , ip address - 0% packet loss
$ ping -s 100 -c 5 -i 1 8.8.8.8 ping 8.8.8.8 (8.8.8.8) 100(128) bytes of data. 72 bytes 8.8.8.8: icmp_seq=1 ttl=48 (truncated) 72 bytes 8.8.8.8: icmp_seq=2 ttl=48 (truncated) 72 bytes 8.8.8.8: icmp_seq=3 ttl=48 (truncated) 72 bytes 8.8.8.8: icmp_seq=4 ttl=48 (truncated) 72 bytes 8.8.8.8: icmp_seq=5 ttl=48 (truncated) --- 8.8.8.8 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4006ms rtt min/avg/max/mdev = 50.869/51.435/51.602/0.348 ms
can write log ip address - 0% packet loss?
you run ping command, , pipe grep 'packet loss'|cut -f 6
should give "0%" part.
i have not tested , i'm not going further details since not strictly ubuntu related. however, commands have provided should on right track.
always remember man <command>
if doesn't work - give explanation on how use properly.
you may want check out smokeping
. package monitors latency addresses , gives stats , graph on web interface. know it's not asking for, still alternate solution bigger problem.
Comments
Post a Comment