Guest esage Posted November 19, 2003 Report Share Posted November 19, 2003 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. Quote Link to comment Share on other sites More sharing options...
tyme Posted November 19, 2003 Report Share Posted November 19, 2003 open up a terminal/console and type in: ping <ipaddress> or ping <hostname> i.e.: ping comcast.net Quote Link to comment Share on other sites More sharing options...
Ronin Posted November 19, 2003 Report Share Posted November 19, 2003 Cant help with the ping program but how about setting your email client to check mail every 5 minutes? That should keep the connection active enough. Quote Link to comment Share on other sites More sharing options...
johnnyv Posted November 20, 2003 Report Share Posted November 20, 2003 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 Quote Link to comment Share on other sites More sharing options...
scoopy Posted November 20, 2003 Report Share Posted November 20, 2003 a 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). Quote Link to comment Share on other sites More sharing options...
sarah31 Posted November 20, 2003 Report Share Posted November 20, 2003 chmod u+x (or maybe just +x) <scriptname> to execute (in a terminal): ./<scriptname> Quote Link to comment Share on other sites More sharing options...
scoopy Posted November 20, 2003 Report Share Posted November 20, 2003 k, sarah31 deserves a too thanks, Quote Link to comment Share on other sites More sharing options...
Guest esage Posted November 21, 2003 Report Share Posted November 21, 2003 Mucho thanks to everybody!! problem solved! :D Quote Link to comment Share on other sites More sharing options...
Michel Posted November 21, 2003 Report Share Posted November 21, 2003 (edited) 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 November 21, 2003 by Michel Quote Link to comment Share on other sites More sharing options...
Qchem Posted November 24, 2003 Report Share Posted November 24, 2003 >I alwas ask myself what the 2>&1 means..anyone? This redirects the standard error (2) to the same output as standard output (1), the & simply means that any errors will be appended to the file instead of overwriting it. Quote Link to comment Share on other sites More sharing options...
Michel Posted November 26, 2003 Report Share Posted November 26, 2003 thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.