On Wed, 7 Nov 2007, Anna Edwards wrote:

> i need a program that pings several servers (decided by a main server) 
> and records ping times to send to the home server. can someone help me 
> with it?

If you have a web server on the "main server" and can receive email on the 
home server, you could do something like this in a bash script:

wget http://main.server/ping_list.txt
for server in $(cat ping_list.txt); do echo $server >> ping_out.txt ; ping -c 5 $server | tail -1 >> ping_out.txt ; done
mail pingtimes at home.server < ping_out.txt

Possibly better to use scp for file transfers instead of wget and mail, 
but I don't know the trick to doing scp without interaction for the 
authentication.  There is a way to set up some kind of "keygen" thing -- 
someone else will have to say.

If you do this using scp, you'll have to have a way to take the incoming 
data file and append it to previous files, or maybe just give it a 
different name based on the time.

Mike