檢視linux系統下網絡卡是否連線網線的狀態

2021-05-23 07:06:56 字數 1964 閱讀 8266

網上找到的資料,對我現在非常有用,現轉到這裡做備忘

一、通過mii-tool指令

[root@linuxzgf ~]# mii-tool 

//mii-tool主要是用於配置網絡卡工作模式的指令,同時也可以進行查詢、監控等工作!

二、ethtool

[root@linuxzgf ~]# ethtool eth0

settings for eth0:

supported ports: [ tp ]

supported link modes:   10baset/half 10baset/full

100baset/half 100baset/full

1000baset/full

supports auto-negotiation: yes

advertised link modes:  10baset/half 10baset/full

100baset/half 100baset/full

1000baset/full

advertised auto-negotiation: yes

speed: 100mb/s

duplex: full

port: twisted pair

phyad: 0

transceiver: internal

auto-negotiation: on

supports wake-on: umbg

wake-on: g

current message level: 0x00000007 (7)

link detected: yes

從上面 link detected 可以看出eth0 處於連線狀態  

三.[root@linuxzgf ~]# /etc/init.d/network status

配置裝置:

lo eth0 eth0.10 eth0.2 eth0.3 eth0.4 eth0.5 eth0.7 eth0.8 eth1

當前的活躍裝置:

lo eth0 eth0.10

[四、ifconfig -a

[root@linuxzgf ~]# ifconfig -a

eth0      link encap:ethernet  hwaddr 00:e0:81:80:d8:96 

inet6 addr: fe80::2e0:81ff:fe80:d896/64 scope:link

up broadcast running multicast  mtu:1500  metric:1

rx packets:626032 errors:0 dropped:0 overruns:0 frame:0

tx packets:415035 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:100

rx bytes:123631002 (117.9 mib)  tx bytes:297575498 (283.7 mib)

base address:0x2000 memory:df300000-df320000

eth1      link encap:ethernet  hwaddr 00:e0:81:80:d8:97 

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)

base address:0x2020 memory:df320000-df340000

五、lspci也可以看到網絡卡的資訊

檢視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下網絡卡相關檢視設定

查整機硬體資訊命令 dmesg 檢視網絡卡裝置相關 dmesg grep eth 檢視網絡卡eth0資訊 dmesg grep eth0 使用ethtool命令檢視指定網絡卡資訊 ethtool eth0 使用 mii tool命令檢視指定網絡卡情況 mii tool v eth1 為了使用lspc...

linux檢視網絡卡是否打滿

1 檢視linux系統有幾塊網絡卡 ifconfig a 或者使用如下命令 cat proc net dev lspci grep i eth 2 檢視網絡卡的寬頻 ethtool命令用於獲取乙太網卡的配置資訊,或者修改這些配置 這個命令比較複雜,功能特別多回頭寫乙個命令解釋 ethtool eth...