Link to home
Start Free TrialLog in
Avatar of rammaghenthar
rammaghenthar

asked on

need the script to test the ping response for 30 solaris servers and need to redirect the output to a file.

We would need the script to test the ping response for 30 solaris servers and need to redirect the output to a file. The working shell is Ksh.
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Assuming that you have a list of servernames in a file servers.lst, one servername per line:

while read server
 do
   ping -c1 -w1 $server >> pingresults.txt
 done < servers.lst

wmp

ASKER CERTIFIED SOLUTION
Avatar of xterm
xterm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of madunix
madunix

or fping -c 10 <dest1> <dest2> ... <destN>
smokeping is a good option to automate the task (outputs tp database and displays graph from there)