RE: bash script that pings is not working



Hi Steve

Thanks for the better script.

Actually, ping does work when it involves a firewall, surprisingly. It's
working great now and all timeouts have ceased.

I had already made the setting in putty, but I'm doing the ping script for
all the other applications.

Thanks for the script help!

Anne

-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-bounces@xxxxxxxxxx]
On Behalf Of Steve Phillips
Sent: Thursday, December 13, 2007 12:20 AM
To: General Red Hat Linux discussion list
Subject: Re: bash script that pings is not working

Anne Moore wrote:
HI All, can anyone help with this bash script?
#!/bin/bash

while [ 1 ]
do
ping some.ip.com
sleep 60
done

# end of script

It's not really working like I need it to be. I'm trying to add this
to everyone's logon profile and run it without the console ICMP
replies showing up while each person is connected (to keep their
connections alive). Then, once they log off, it closes the script.

Any scripting experts out there that can tweak this? Thank you so much
for your time. -Anne

Also, if you are talking about firewall timeouts then this wont actually
help as the timeouts tend to be flow based, not source/dest ip based.

If they use something like putty, then you can enable tcp keepalives which
will probably do what you are after.

Anyway, to answer your query.

#!/bin/bash
#

while true; do
ping -c1 some.ip.address > /dev/null 2>&1
sleep 60
done


--
Steve
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: [SLE] emailing myself when a ping command fails via crontab????
    ... but I have a perl script to monitor a webserver. ... First the script tries to ping it's DNS servers, ...
    (SuSE)
  • RE: ICMP (Ping)
    ... script to locate vulnerabilities(example point and case: ... Is it good to allow UDP ping packets? ... Guys again, I am not saying that you disable pings and walk away, job ... 300K and you guys are right, it port scans like a freaking demon. ...
    (Security-Basics)
  • Re: How to run script (sleep360) without delaying bootup
    ... I don't think they would mind Now the script you sent this morning which I don't have in front of me I would think could do the job. ... Maybe you could ping then see if there a command to dealy the time servers and then let them run. ... Pinging a server on the Internet isn't really the problem, ...
    (Fedora)
  • Trouble with Net::Ping
    ... And now here is what I get using ping manually: ... Approximate round trip times in milli-seconds: ... The manual execution of ping happened just before and just after my ... they are clearly accessable when manually invoking ping, the script ...
    (comp.lang.perl.misc)
  • RE: Tools for pen test,
    ... You can use something like fping, but if your heart is set on a script, then ... The problem is that tools like PING ... I was wondering has anyone in here had a shell script that can execute tools ... Need to secure your web apps NOW? ...
    (Pen-Test)