iftop這個小工具是Linux和unix下的top命令升級版,功能相對較強,界面易懂。今天安裝了CentOS6.5的最新版,裝個小工具檢查下系統運行性能。php
官網:http://www.ex-parrot.com/~pdw/iftop/html
但如今進入到iftop的官網查看仍是跟之前的介紹同樣 目前最穩定的版本仍是0.17幫 注:linux
Download The latest stable version of iftop is 0.17. Older and newer (pre-release) version are available from the downloads directory. I am always keen to hear of any problems with the latest pre-release versions (that's what they're there for) so please do try them. N.B. these are versioned as pre-releases, so 0.17 is the final release, and comes after 0.17pre* Download: iftop-0.17.tar.gz or iftop-1.0pre3.tar.gz. If you wish to be notified of new releases of iftop then please subscribe to the Freshmeat project, or the mailing list. If you're using Freshmeat, please consider adding a rating or comment to the project.
因此選擇0,。17版本 安裝方式固然有兩種 源碼和rpm包。(Centos 的yum源裏默認沒有iftop這個工具)ide
固然在安裝前須要幾個依賴包的支持,flex byacc ncurses ncurses-devel libpcap 工具
上面兩個安裝包有版本要求須要是libpcap-0.9.4-14.el5.x86_64.rpm 0.9.4版本的libpcap包 固然若是你是x86的系統須要安裝i386的rpm包 性能
關於如何下載到這個rpm包 你能夠用Google搜索引擎 去找到相應的源下載地址。flex
我貼上一個 i386的下載地址列表 http://rpm.pbone.net/index.php3/stat/4/idpl/15976291/dir/scientific_linux_5/com/libpcap-0.9.4-15.el5.i386.rpm.html搜索引擎
安裝libpcapspa
首先查看是否已經有高版本的libpcap.net
rpm -qa | grep libpcap
若是有能夠運行 rpm -ef libpcap
再次確認rpm -qa | grep libpcap
沒有就能夠安裝了
rpm -ivh libpcap-0.9.4-15.el5.i386.rpm
安裝完成後就能夠安裝iftop了
若是有rpm版的直接運行
rpm -ivh iftop-0.17-1.el5.rf.i386.rpm
安裝成功後就能夠運行 iftop命令了
若是是源碼包
tar zxvf iftop-0.17.tar.gz
cd iftop-0.17
./configure
make && make install