1、檢視linux系統有幾塊網絡卡
一般系統預設都有4個,無所謂了管它幾個呢~
[root@db25440 ~]# ifconfig -a
eth0 link encap:ethernet hwaddr d4:be:d9:aa:30:18
inet addr:10.255.254.40 bcast:10.255.255.255 mask:255.255.240.0
inet6 addr: fe80::d6be:d9ff:feaa:3018/64 scope:link
up broadcast running multicast mtu:1500 metric:1
rx packets:4861130549 errors:0 dropped:0 overruns:0 frame:0
tx packets:5490188631 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
rx bytes:1745950525499 (1.5 tib) tx bytes:2873870867512 (2.6 tib)
eth1 link encap:ethernet hwaddr d4:be:d9:aa:30:1a
broadcast multicast mtu:1500 metric:1
rx packets:0 errors:0 dropped:0 overruns:0 frame:0
tx packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
rx bytes:0 (0.0 b) tx bytes:0 (0.0 b)
eth2 link encap:ethernet hwaddr d4:be:d9:aa:30:1c
broadcast multicast mtu:1500 metric:1
rx packets:0 errors:0 dropped:0 overruns:0 frame:0
tx packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
rx bytes:0 (0.0 b) tx bytes:0 (0.0 b)
eth3 link encap:ethernet hwaddr d4:be:d9:aa:30:1e
broadcast multicast mtu:1500 metric:1
rx packets:0 errors:0 dropped:0 overruns:0 frame:0
tx packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
rx bytes:0 (0.0 b) tx bytes:0 (0.0 b)
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:9040433 errors:0 dropped:0 overruns:0 frame:0
tx packets:9040433 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
rx bytes:15560955892 (14.4 gib) tx bytes:15560955892 (14.4 gib)
[root@db25440 ~]#
另外可以使用下面兩種方式確定
cat /proc/net/dev
lspci | grep -i eth
2、確定網絡卡的頻寬
ethtool命令用於獲取乙太網卡的配置資訊,或者修改這些配置(這個命令比較複雜,功能特別多回頭寫乙個命令解釋)
[root@db25440 ~]# ethtool eth0
settings for eth0:
supported ports: [ tp ]
supported link modes: 10baset/half 10baset/full
100baset/half 100baset/full
1000baset/full
supported pause frame use: no
supports auto-negotiation: yes
advertised link modes: 10baset/half 10baset/full
100baset/half 100baset/full
1000baset/full
advertised pause frame use: no
advertised auto-negotiation: yes //自動協商開啟 對應關閉配置為:no
speed: 1000mb/s //速度 1000mb
duplex: full //全雙工 對應配置還有half
port: twisted pair
phyad: 1
transceiver: internal
auto-negotiation: on
mdi-x: unknown
supports wake-on: g
wake-on: d
link detected: yes //eth0已經啟用
[root@db25440 ~]#
先不用關注每一項的具體含義,先看advertised link modes、auto-negotiation、duplex。首先連線模式、自動協商是否開啟(在這裡是開啟的)、全雙工
3、確定目前連線狀態和速率
root@db25440 ~]# dstat
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read writ| recv send| in out | int csw
2 0 98 0 0 0|6740b 1257k| 0 0 | 0 60b|1012 2297
0 0 100 0 0 0| 0 0 | 17k 17k| 0 0 | 373 170
0 0 100 0 0 0| 0 0 | 25k 25k| 0 0 | 400 196
0 0 100 0 0 0| 0 0 | 20k 20k| 0 0 | 363 176 ^c
[root@db25440 ~]#
對比就知道網絡卡是否打滿
linux檢視網絡卡是否打滿
1 檢視linux系統有幾塊網絡卡 ifconfig a 或者使用如下命令 cat proc net dev lspci grep i eth 2 檢視網絡卡的寬頻 ethtool命令用於獲取乙太網卡的配置資訊,或者修改這些配置 這個命令比較複雜,功能特別多回頭寫乙個命令解釋 ethtool eth...
檢視Linux下網絡卡狀態或 是否連線
分類 1 通過mii tool指令 root localhost root mii tool eth0 negotiated 100basetx fd,link ok eth1 no link 或 root localhost root mii tool v eth0 negotiated 100b...
檢視linux系統下網絡卡是否連線網線的狀態
網上找到的資料,對我現在非常有用,現轉到這裡做備忘 一 通過mii tool指令 root linuxzgf mii tool mii tool主要是用於配置網絡卡工作模式的指令,同時也可以進行查詢 監控等工作!二 ethtool root linuxzgf ethtool eth0 setting...