Jump to content

Need 'Ping' Program for Mandrake 9.2


Guest esage
 Share

Recommended Posts

Can anyone suggest a program [preferably a Mnk RPM] to ping my ISP? It has a shut off time of 15 minutes which is driving me crazy! I need one like the one I used to use on windows...but haven't found one for Linux. Thanx much. :wall:

Link to comment
Share on other sites

ping -c 144 -i 600 ipaddress

 

will ping ipaddress 144 times with a 600 second interval between pings, adjust -c and -i values to taste. The current ping will last an entire 24hr period.

You could writes a bash script and either create and icon to execute it daily or schedule a cronjob to do it every day etc..

#!/bin/sh
# ping address every ten minutes for 24hrs
# change address to your isp's
ping -c 144 -i 600 192.168.0.1

Link to comment
Share on other sites

a :woot: to johnnyv

 

So no fancy program needed here... just write your own little script. Now I am curious as to how to finish this and make it work.

 

Is this correct? (forgive my cli ignorance here)

I would type out that script in my favorite text editor and could save it with any name I want. When I want to run it, I would open up a terminal / konsole and type in that name I gave the file. Is that it, or am I missing something (like chmod that file somehow).

Link to comment
Share on other sites

This is my first crontab-stuff..so can anyone verify it...

if you would like to ping every 15 minute....:

 

make a textfile..let's call it... cronFile and type:

#ping ISP

*/15 * * * * ping <address> > /dev/null 2>&1

 

save it and do

 

crontab cronFile

 

and hope this works...I alwas ask myself what the 2>&1 means..anyone?

maybe you have to specify at the top of the file:

SHELL=/bin/bash

Will it always be executed or only when logged in..how do you specify that it has to run always..(if you're logged in or not) do it as root?

 

you have to run cron ofcourse....if you only run this thing(but it is more organised with cron ...), you could also make a script that does this at startup (my shell-syntax is probably wrong):

 

 

#!/bin/bash

while true

do

ping <address>

sleep 15 m

done

 

But the above ping command is maybe better...:) It are other ways...

Edited by Michel
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...