LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   script to get HWaddr of all nodes on a cluster? (https://www.linuxquestions.org/questions/linux-software-2/script-to-get-hwaddr-of-all-nodes-on-a-cluster-754064/)

usagi32 09-10-2009 12:58 AM

script to get HWaddr of all nodes on a cluster?
 
Hi,

I need to create a list of all the hostnames and their HWaddr (hardware addresses [also called MAC address]) for all the nodes on my Linux cluster.

I know that all the hostnames can be found in /etc/hosts, but there doesn't seem to be a list of HWaddr numbers.

I guess one can write a script to ssh into all the hostnames found in /etc/hosts and execute the command

/sbin/ifconfig | grep 'HWaddr'

on each node and concatenate this into a single text file. My Linux skills are not good enough to do this though.

Does anyone know if there is a list of HWaddr numbers in a system directory, or alternatively, does someone know how to write a script to generate the HWaddr lists?

Thanks,
Bryan

colucix 09-10-2009 02:32 AM

This is a duplicate of http://www.linuxquestions.org/questi...luster-754062/. Please, follow discussion there. This one reported for closure.


All times are GMT -5. The time now is 12:35 AM.