[ltp] OT: how to time a ping command?
André Wyrwa
linux-thinkpad@linux-thinkpad.org
Mon, 20 Sep 2004 02:20:12 +0200
Hei,
> from ping.1:
>
> -w deadline
> Specify a timeout, in seconds, before ping exits regardless of
> how many packets have been sent or received. In this case ping
> does not stop after count packet are sent, it waits either for
> deadline expire or until count probes are answered or for some
> error notification from network.
Funny, that's exactly what i'm looking for, but my ping.1 doesn't
include this and neither does my ping.
Can you post your --version output please? Mine is from GNU inetutils
1.4.2 .
> ping -c 1 somehost > ping_output &
> sleep 1
> kill %1
> grep -q 'some_expr' ping_output && ip_up
Ahh...didn't know about the %1 thing, thx. I'll take that as a fallback
if i can't get my ping to support the -w option. ;-)
André.