HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: NIC speed and mode of communication
Operating System - Linux
1829149
Members
2319
Online
109986
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2010 06:59 AM
02-23-2010 06:59 AM
Can anyone tell me how to calculate the ethernet card speed and mode of communication(Full Duplex/Half Duplex) and collision rate if I am not the root user. I know about ethtool and mii-tool but they can't run as a normal user.
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2010 08:13 AM
02-23-2010 08:13 AM
Re: NIC speed and mode of communication
Shalom,
Always helps to know the distribution of Linux.
You need to look into a tool called sudo, which will let you authorize these two tools for non-root users.
Here you go:
[root@prottervm ~]# mii-tool eth0
eth0: negotiated 100baseTx-FD, link ok
[root@prottervm ~]# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Current message level: 0x00000007 (7)
Link detected: yes
SEP
Always helps to know the distribution of Linux.
You need to look into a tool called sudo, which will let you authorize these two tools for non-root users.
Here you go:
[root@prottervm ~]# mii-tool eth0
eth0: negotiated 100baseTx-FD, link ok
[root@prottervm ~]# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Current message level: 0x00000007 (7)
Link detected: yes
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2010 08:27 AM
02-23-2010 08:27 AM
Solution
You can get the number of collisions by reading the appropriate sysfs file for your NIC. For example, eth0:
cat /sys/class/net/eth0/statistics/collisions
If your system uses a 2.4.xx or older kernel, the /sys virtual filesystem does not exist in it. In that case, you can run the ifconfig command with no options as a regular user, specifying an absolute path:
/sbin/ifconfig eth0
As far as I know, there is no way to get the speed/duplex information without root privileges.
However, if the number of collisions is exactly 0 and the system has been running for a while, the system is either in a _very_ low-traffic network or has been configured for full duplex. (Full duplex = the "transmit" and "receive" wires are completely independent, so the collision detection is switched off.)
MK
cat /sys/class/net/eth0/statistics/collisions
If your system uses a 2.4.xx or older kernel, the /sys virtual filesystem does not exist in it. In that case, you can run the ifconfig command with no options as a regular user, specifying an absolute path:
/sbin/ifconfig eth0
As far as I know, there is no way to get the speed/duplex information without root privileges.
However, if the number of collisions is exactly 0 and the system has been running for a while, the system is either in a _very_ low-traffic network or has been configured for full duplex. (Full duplex = the "transmit" and "receive" wires are completely independent, so the collision detection is switched off.)
MK
MK
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP