On Sun, 9 Mar 2003, Cameron Simpson wrote:
> On 20:31 08 Mar 2003, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> | On Sat, 8 Mar 2003 [EMAIL PROTECTED] wrote:
> | > On Fri, 7 Mar 2003, Steve Lee wrote:
> | > > In SecureCRT, (windows people) can send a packet every so many
> | > > hours, to keep it alive, anyone with any ideas on doing this
> | > > is Xwindows ?
> | > while /bin/true;do ping -c 1 REMOTEHOST_IP >/dev/null 2>&1;done &
> | ACTUALLY that should be:
> | while /bin/true;do ping -c 1 REMOTEHOST_IP >/dev/null 2>&1;sleep 5m;done &
>
> Wouldn't a plain
>
> ping -i 300 REMOTEHOST_IP &
>
> do just as well? Ping will happily ping forever, which is what your loop is
> intended to do.
>
The script does two things that "ping -i 300 REMOTEHOST_IP &" doesn't
do. It stops when ping fails, so that you don't keep trying to ping the
other end after you drop the connection. The second thing is that it
only pings every 5 minutes, instead of every second. That cuts down on
a lot of unecessary network trafic.
Mikkel
--
Do not meddle in the affairs of dragons,
for you are crunchy and taste good with ketchup.
--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list