-   Linux - Newbie (
-   -   Pinging All the Nodes Connected to the Server (

Hi_This_is_Dev 05-15-2009 09:13 AM

Pinging All the Nodes Connected to the Server
Hi All,

I want to write a ShellScript file which runs on the Server and does the followings:

1) Get info, IP or Machine Name mainly, of all the nodes connected to the server.

2) Ping each of them one by one.

So, the main problem which I am having is how to get this info as to how many IPs are present there so that they can be pinged?

I have this Pseudo Code for it:

Store the IPs in a Variable or Array List

(Loop through the Array List)

For in ( Machine )

Ping -c 3 Machine's IP >> /tmp/NetWorkReport.txt


Any creative ideas?

mac178 05-15-2009 10:43 AM

I am not a big expert, but did you had a look at nmap?
I think the nmap -sP <ip address rang> do just what you need.

All times are GMT -5. The time now is 09:45 PM.