SupaRice Posted October 9, 2008 Share Posted October 9, 2008 So, I'm setting up cricket (basically like MRTG) for some simple network performance trending. I've used it before, but a long time ago. And I've lost a script that a friend wrote for me to measure latency. I basically need to be able to do this: latency.sh www.google.com And get output that looks like this: 45.23 48.94 56.7 0 Which would be minimum, average, maximum round trip times, followed by % of packet loss. I'm able to do this, but don't know how to write a script that will clean up the output: #ping -l 10 -c 10 -n -q 172.20.227.1 PING 172.20.227.1 (172.20.227.1) 56(84) bytes of data. --- 172.20.227.1 ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 2.299/2.362/2.451/0.065 ms, pipe 10 Can anyone help me? I'm sure this is a pretty easy thing to do, but I can't figure it out. I've been working on it for a while and looking at scripting guides, but nada... Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.