Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Need a unix script to ping servers
Name: Kasser Ayubi Date: May 28, 2003 at 02:28:47 Pacific OS: sun solaris, win 2000 CPU/Ram: loads
Comment:
HI there, if anyone can help me it will be much appreciated. I need to make a bourne shell script which will ping a total of 30 servers to make sure they are alive and then print the records onto a file or screen. i was thinking of putting the names of the servers in a text file and then do a for while loop but im young at unix scripting and need some help or a script would be perfect, the flashier the better. please mail me on kasser.ayubi@steria.co.uk
Name: David Perry Date: May 28, 2003 at 04:38:19 Pacific
Reply:
Homework ?
PING=`which ping` for hostname in `cat hostlist` ; do $PING $hostname if [ $? -eq 0 ] ; then echo "$hostname reachable" else echo "$hostname unreachable" fi done
Take this idea and make it platform independent. You want to assign to PING, a command that will try a fixed number of times then return an result code. For example on HP-UX ping hostname -n 1 >/dev/null 2>&1
0
Response Number 2
Name: Kasser Ayubi Date: May 28, 2003 at 04:54:40 Pacific
Reply:
thanks for that reply, very helpfull, anyother replies are appreciated
Summary: Please help if you can. I need a shell-script to search each log file and save the output to a text file with these columns: JOB # REQUEST START DATE & TIME ...
Summary: this inquirery is to find out how to write a unix script for ftp from Lucent CMS Manpower Planning Report off the ACD into A TELECENTER SYSTEM or TCS application software Server file on a network whic...
Summary: hi, I need to use a unix script to accept information from users through a html form and send it to an email address. I dont want to use perl. I tired the option but i dont know how to use it pr...