LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /sys/class/net/ Is this is the correct place for eth info (http://www.linuxquestions.org/questions/linux-newbie-8/sys-class-net-is-this-is-the-correct-place-for-eth-info-874599/)

tank junior 04-12-2011 12:31 PM

/sys/class/net/ Is this is the correct place for eth info
 
Hi,

Using a python script, I am gathering various info about all the ethernet adapters installed. For this I am parsing all the directories(each directory represent a ethernet adapter) inside
"/sys/class/net/" directory.
Is this is the correct place and de-facto standard for listing ethernet adapters?
I am concerned about modern distros as well as a bit older ones for the presence of this directory.

Cheers

Prashant

business_kid 04-14-2011 02:58 AM

If you go back far enough, /sys didn't exist. In this box /sys/class/net has symlinks to lo & eth0, and eth0 is /sys/class/devices/pci/numbers/eth0.

This stuff is device and driver relevant; In terms of configuration, the job is imposing.


All times are GMT -5. The time now is 09:20 AM.