[wplug-bsd] test if a host is alive
Brandon Kuczenski
brandon at 301south.net
Sat Sep 25 20:46:28 EDT 2004
On Sat, 25 Sep 2004, Tom Rhodes wrote:
> > anyone recommend a way to do that? My first thought is ping, but I would
> > like a command that just returns "true" if contact was successful after a
> > fixed period of time and "false" if not -- maybe ping can do that, but I
> > didn't see it in the options.
>
...
>
> But set ping to only do a single request, peraps "ping -c 1 ADDR";
> and this works fine in sh(1).
>
Thanks; that works. Specifically, 'ping -c 1 -t <a number> ADDR' works;
otherwise, it will wait forever.
-Brandon
More information about the wplug-bsd
mailing list