iftop這個小工具是Linux和unix下的top命令升級版,功能相對較強,界面易懂。今天安裝了CentOS6.5的最新版,裝個小工具檢查下系統運行性能。
官網:http://www.ex-parrot.com/~pdw/iftop/
但現在進入到iftop的官網查看還是跟以前的介紹一樣 目前最穩定的版本還是0.17幫 注:
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這個工具)
當然在安裝前需要幾個依賴包的支持,flex byacc ncurses ncurses-devel libpcap
上面兩個安裝包有版本要求需要是libpcap-0.9.4-14.el5.x86_64.rpm 0.9.4版本的libpcap包 當然如果你是x86的系統需要安裝i386的rpm包
關於如何下載到這個rpm包 你可以用Google搜索引擎 去找到相應的源下載地址。
我貼上一個 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
安裝libpcap
首先查看是否已經有高版本的libpcap
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
