Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-12-2011, 01:31 PM   #1
tank junior
Registered: Apr 2010
Posts: 42

Rep: Reputation: 0
/sys/class/net/ Is this is the correct place for eth info


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.


Old 04-14-2011, 03:58 AM   #2
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,896

Rep: Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] <sys/time.h> gettimeofday conflict with Eth socket sendto legendbb Programming 10 06-15-2012 04:30 AM
New to forums. Hello! (Hope this is correct place) larryewilliamson Member Intro 2 02-25-2011 11:10 AM
/sys/class/hwmon Question Aztral Linux - General 1 08-11-2009 03:00 PM
Giving user access to files in /sys/class/ subdirectory and /dev/video0 DiBosco Programming 1 12-01-2008 04:11 AM
eth card need help and info isalt Linux - Hardware 2 01-30-2003 08:27 AM > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration