linux下監(jiān)控帶寬資源方法
2016-04-22 07:35:50
16023
查看網(wǎng)卡信息---型號,監(jiān)控網(wǎng)絡(luò)實時帶寬 1.查看網(wǎng)卡詳細信息
1)dmesg | grep -i eth
2) ethtool eth1 Settings for eth1:
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: 32
Transceiver: internal Auto-negotiation: on
Supports Wake-on: pumbg Wake-on: d
Current message level: 0x00000007 (7) Link detected: yes
2.查看網(wǎng)絡(luò)實時帶寬
在linux的proc文件系統(tǒng)中,通過查看/proc/net/dev文件 可以得到每個網(wǎng)絡(luò)接口的吞吐量,但是無法獲得實時帶寬
最近發(fā)現(xiàn)了一種基于ncurses庫的小程序bmon,可以獲得實時帶寬
Example:
執(zhí)行 bmon -o ascii -p eth1