Hi
Wishing to all.
I am very new joined in an organization as a unix system administrator.
I need a help in preparing a script for a report.
i have a file contains all of the linux/ubuntu servers line by line around 140 servers.
vi servers.txt
nh01
nh02
nh03
bh01
bh04
-
-
:wq
Now, my script should provide the output like below...
Server ping_status ssh_status Kernal uptime login_users
nh01 pingable ssh able 2.6.18-371.4.1.el5 24 days 30
nh02 pingable not able - - -
please help me for the above script.
i can able to write a separate scripts for pinging or not, ssh or not, but not able to take the output in a above format.
and also, if a server is not able to ssh ..then my script gets struck there itself...its not moving further....
Thanks
Kumaraswasmy