LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 0
/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
 
Old 04-14-2011, 02:58 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

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


Reply



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 03:30 AM
New to forums. Hello! (Hope this is correct place) larryewilliamson LinuxQuestions.org Member Intro 2 02-25-2011 10:10 AM
/sys/class/hwmon Question Aztral Linux - General 1 08-11-2009 02:00 PM
Giving user access to files in /sys/class/ subdirectory and /dev/video0 DiBosco Programming 1 12-01-2008 03:11 AM
eth card need help and info isalt Linux - Hardware 2 01-30-2003 07:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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