How can i ping every X minutes to Y automatically?

How can i ping every X minutes to Y automatically?

Post by razoo » Sun, 25 Feb 2001 20:34:59



I lose my connection to my isp every 5 minutes orso.
So pingning every X minutes mybe helps.

tiao

 
 
 

How can i ping every X minutes to Y automatically?

Post by Dean Thompso » Sun, 25 Feb 2001 21:38:37


Hi Razoon,

Quote:> I lose my connection to my isp every 5 minutes orso.
> So pingning every X minutes mybe helps.

You may want to create a cron job which looks something like this:

*/10 * * * * /bin/ping www.abc.com > /dev/null 2>&1
*/10 * * * * /bin/ping www.cnn.com > /dev/null 2>&1
*/10 * * * * /bin/ping www.redhat.com > /dev/null 2>&1

See ya

Dean Thompson

--
+______________________________+____________________________________________+

|   Bach. Computing (Hons)     | ICQ     - 45191180                         |
|   PhD Student                | Office  - <Off-Campus>                     |
|   School Comp.Sci & Soft.Eng | Phone   - +61 3 9903 2787 (Gen. Office)    |
|   MONASH (Caulfield Campus)  | Fax     - +61 3 9903 1077                  |
|   Melbourne, Australia       |                                            |
+------------------------------+--------------------------------------------+

 
 
 

How can i ping every X minutes to Y automatically?

Post by j.. » Sat, 24 Feb 2001 04:56:26



> Hi Razoon,

> > I lose my connection to my isp every 5 minutes orso.
> > So pingning every X minutes mybe helps.

> You may want to create a cron job which looks something like this:

> */10 * * * * /bin/ping www.abc.com > /dev/null 2>&1
> */10 * * * * /bin/ping www.cnn.com > /dev/null 2>&1
> */10 * * * * /bin/ping www.redhat.com > /dev/null 2>&1

You may also find you need to use something other then ping, the ISP might look
for it.....might try wget on the same site in cron as well....but make sure you
use the right options or it might try to dl the entire internet :P
 
 
 

How can i ping every X minutes to Y automatically?

Post by Ernst Sexaue » Tue, 27 Feb 2001 18:25:14


Dean Thompson schrieb:

Quote:> Hi Razoon,

> > I lose my connection to my isp every 5 minutes orso.
> > So pingning every X minutes mybe helps.

> You may want to create a cron job which looks something like this:

> */10 * * * * /bin/ping www.abc.com > /dev/null 2>&1
> */10 * * * * /bin/ping www.cnn.com > /dev/null 2>&1
> */10 * * * * /bin/ping www.redhat.com > /dev/null 2>&1

Yould use ping -c 5 ... to limit the number of pings. Otherwise ping will run
forever and cron will generate one ping on top of the others each 10 minutes...

You could also use ping -i 600. This issue on ping each 600 seconds

regards E.R. Sexauer

> See ya

> Dean Thompson

> --
> +______________________________+____________________________________________+

> |   Bach. Computing (Hons)     | ICQ     - 45191180                         |
> |   PhD Student                | Office  - <Off-Campus>                     |
> |   School Comp.Sci & Soft.Eng | Phone   - +61 3 9903 2787 (Gen. Office)    |
> |   MONASH (Caulfield Campus)  | Fax     - +61 3 9903 1077                  |
> |   Melbourne, Australia       |                                            |
> +------------------------------+--------------------------------------------+

 
 
 

How can i ping every X minutes to Y automatically?

Post by Bernd Eckenfel » Tue, 27 Feb 2001 19:15:52



> Yould use ping -c 5 ... to limit the number of pings. Otherwise ping will run
> forever and cron will generate one ping on top of the others each 10 minutes...

It is better to use fping, it can ping multiple hosts in a concurrent way and
it's output is better suited for analysing.

Gruss
Bernd

 
 
 

1. Script to PING every 5 minutes


: I have used UNIX before, but not in a few years, I'm relearning it, used DOS
: OS/2, but I'm coming back to UNIX!!! Anyway bare with me here......

: Is there a way to write a script that would ping a server every 5 minutes
: or so?

Use ping -i 300 <host>. Welcome back to Unix!

--
Tse, Fu-wing

W3: http://www.ee.cuhk.hk/~fwtse/

2. gave up on 3c905, 3c503 problems now

3. Canned "ping"

4. help with ftp user umask configure

5. There's a sucker born every minute (sound hardware)...

6. Book on Programming

7. Every minute there is a message line in /var/adm/messages file, please help

8. xdm setup question

9. telnet server send packet every 15 minutes

10. Constant disk writing every minutes for idle machine -- bothered me since 2.6

11. PPP connection dropping every 20 minutes

12. Q: Netscape not checking mail every x minutes

13. Run Job every Ten Minutes