如何知道一台Linux服务器使用的是千兆网卡还是万兆网卡

如何知道一台Linux服务器使用的是千兆网卡还是万兆网卡

 

本文由CSDN-蚍蜉撼青松【主页:http://blog.csdn.net/howeverpf】整理编辑,转载请注明出处!

 

一、 系统信息

 

$ cat /sys/class/net/eth0/speed
1000

二、 ethtool  

 

$ sudo ethtool eth0 |grep Speed
        Speed: 1000Mb/s

 

三、 lspci

 

$ sudo lspci |grep Network
09:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
09:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)

 

四、 hwconfig

$sudo hwconfig |grep Network
Network:        eth0 (bonding): 29:31:52:a8:e9:a6
Network:        slave0 (igb): Intel 82580 Gigabit Network Connection, 28:31:52:a8:e1:d6, 1000Mb/s 
Network:        slave1 (igb): Intel 82580 Gigabit Network Connection, 28:31:52:a8:e1:d6, 1000Mb/s 

五、 dmesg

 

$dmesg|grep `netstat -rn|awk '$2=="0.0.0.0"{print $8}'`|grep Mbps
[   63.837741] eth0: link status definitely up for interface slave1, 1000 Mbps full duplex.
[3685724.742527] eth0: link status definitely up for interface slave1, 1000 Mbps full duplex.
[3685726.860104] eth0: link status definitely up for interface slave1, 1000 Mbps full duplex.

 

 

 

------本文由CSDN-蚍蜉撼青松【主页:http://blog.csdn.net/howeverpf】整理编辑,转载请注明出处!------

你可能感兴趣的:(系统使用与技巧)