Originally posted by: misteraix
Hi
I need a script to be put in cron and this script should run everyday morning at 06:00 AM.
I have a filed named "network_hosts" and the below are the contents of the file
root@[/] #cat network_hosts
frssit02.standardchartered.co.in
frssit01.standardchartered.co.in
cbspssit.standardchartered.co.in
cbspsuat.standardchartered.co.in
cbsappfs1.standardchartered.co.in
cbsappfs2.standardchartered.co.in
cbdodbfs2.standardchartered.co.in
All the servers are live except cbdodbfs2.standardchartered.co.in as we have shutdown this lpar.
The script should ping all the servers at 06:00 AM in the morning.
Once the script has been run at 06:00 AM it should send me an email to me mentioning which servers are live and which one are dead.
It would be better if the email I get looks like the below :
frssit02.standardchartered.co.in - this server is alive
frssit01.standardchartered.co.in - this server is alive
cbspssit.standardchartered.co.in - this server is alive
cbspsuat.standardchartered.co.in - this server is alive
cbsappfs1.standardchartered.co.in - this server is alive
cbsappfs2.standardchartered.co.in - this server is alive
cbdodbfs2.standardchartered.co.in - this server is not alive, please contact the unix support team
Please assist me with a script which will ping and then email me.
#AIX-Forum