1. 程式人生 > >檢視linux伺服器網絡卡頻寬

檢視linux伺服器網絡卡頻寬

   centos/redhat伺服器的的網路配置主要在  /etc/sysconfig/network-scripts/ifcfg-xxx

 至於是  ifcfg-xxx是那個需要檢視系統安裝時的配置,如果未知,可以執行ifconfig,檢視inet ip為你已知的節點的ip前的埠名稱,

xxx01:~ # ifconfig
eth0      Link encap:Ethernet  HWaddr 52:54:00:87:DB:AE
          inet addr:172.27.129.217  Bcast:172.27.143.255  Mask:255.255.240.0
          inet6 addr: fe80::5054:ff:fe87:dbae/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:117789846 errors:0 dropped:109125 overruns:0 frame:0
          TX packets:63451802 errors:0 dropped:0 overruns:0 carrier:0
          collisions:282650359 txqueuelen:1000
          RX bytes:71185182214 (67887.4 Mb)  TX bytes:33331745785 (31787.6 Mb)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:24576327 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24576327 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:14827347085 (14140.4 Mb)  TX bytes:14827347085 (14140.4 Mb)

eth0為例,檢視該網絡卡裝置的頻寬  ethtool eth0

xxx01:~ # ethtool eth0
Settings for eth0:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	Supported pause frame use: No
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	Advertised pause frame use: Symmetric
	Advertised auto-negotiation: Yes
	Link partner advertised link modes:  10baseT/Half 10baseT/Full
	                                     100baseT/Half 100baseT/Full
	Link partner advertised pause frame use: Symmetric
	Link partner advertised auto-negotiation: No
	Speed: 100Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 32
	Transceiver: internal
	Auto-negotiation: on
	Supports Wake-on: pumbg
	Wake-on: d
	Current message level: 0x00000007 (7)
			       drv probe link
	Link detected: yes

檢視關鍵字speed:得知該伺服器的網口頻寬是100Mb/s