分類: LINUX
如果你僅僅是想查詢當前服務器的帶寬,nload絕對是個很好用的一個工具,功能雖然很單一,但是很強.雖然不能像iptraf那樣,可針對IP,協議等條件來查詢,可以實時地監控網卡的流量,分輸入流量Incoming 和輸出流量Outgoing兩部分,同時統計當前,平均,最小,最大,總流量的值,並且用動態圖形方式表現出來,讓你一目瞭然.
補充:
nload默認分爲上下兩塊:上半部分是:Incoming也就是進入網卡的流量,下半部分是:Outgoing,也就是從這塊網卡出去的流量,每部分都 有當前流量(Curr),平均流量(Avg),最小流量(Min),最大流量(Max),總和流量(Ttl)這幾個部分,看起來還是蠻直觀的。
另外,你也可以自己定義流量數值顯示的單位 #/usr/local/nload/bin/nload –help
就可以看到具體的相關參數了。
另外,你也可以自己定義流量數值顯示的單位 #/usr/local/nload/bin/nload –help
就可以看到具體的相關參數了。
效果請見文章最後面.
nload官網及下載 http://www.roland-riegel.de/nload/
http://www.roland-riegel.de/nload/nload-0.7.2.tar.gz
nload安裝方法:
- wget http://www.roland-riegel.de/nload/nload-0.7.2.tar.gz
- tar zxvf nload-0.7.2.tar.gz
- cd nload-0.7.2
- ./configure
- make
- make install
這樣就安裝好了,
直接輸入nload回車即可看到動態流量信息,也可以指定網卡,如nload eth1
還可以指定是以K或M來顯示流量,如nload -u M顯示的流量是以MB爲單位的.
執行命令:nload
- Device eth0 [74.125.71.17] (1/4):
- =============================================================
- Incoming:
- Curr: 1.44 MBit/s
- Avg: 1.20 MBit/s
- Min: 0.67 kBit/s
- .... . .. . . Max: 2.20 MBit/s
- ||##################||###############|||######## Ttl: 1.26 GByte
- Outgoing:
- . ################## ########|.######## #######
- # ################## ##################|#######
- # ################## ##########################
- #|################## |##########################
- #################### ###########################
- #################### ###########################
- #################### ########################### Curr: 12.92 MBit/s
- ################################################ Avg: 11.80 MBit/s
- ################################################ Min: 3.25 MBit/s
- ################################################ Max: 15.20 MBit/s
- ################################################ Ttl: 2.81 GByte
我遠程安裝了兩臺服務器,第一臺完全正常,第二臺服務器在執行./configure 編譯的時候,出現了下邊兩個報錯:
1. ./configure時報錯:configure: error: C++ compiler cannot create executables 。
有組件沒有安裝,執行命令:
yum install gcc gcc-c++ gcc-g77
繼續執行./configure ,不料又報一下錯誤
2.configure: error: ncurses library or development files not found. ncurses is required for nload.
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.
用
yum install -y ncurses-devel
即可解決