CentOS如何安裝iftop來查看網路流量

來源:互聯網
上載者:User

   之前有寫過,但一些沒有組件的無法安裝,這裡寫下安裝組件的

  安裝所需組件

  yum list | grep libp

  yum install libp*

  wget ftp://ftp.lmd.ens.fr/pub/devil/devel/sources/1.2/libpcap-0.9.8.tar.gz

  安裝iftop

  wget http://www.ex-parrot.com/~pdw/iftop/download/iftop-0.17.tar.gz

  tar zxvf iftop-0.17.tar.gz

  cd iftop-0.17

  ./configure

  make

  make install

  安裝完後使用命令

  iftop -i eth0 -n 查看eth0的流量

  退出按q

  卸載:make clean iftop-0.17

  Linux下監控網卡流量的軟體iftop

  官網上說使用iftop需要libpcap和libcurses這兩個包。

  用命令尋找了一下

  # rpm -qa | grep libpcap

  libpcap-0.9.4-8.1

  只找到了這個,缺少libpcap-devel-0.9.4就繼續安裝了。

  出錯了:configure: error: can’t find pcap.h You’re not going to get very far without libpcap.

  我用的是Redhat EL5.3系統,從安裝盤裡找了libpcap的rpm包,安裝後再編譯,安裝成功。

  # rpm -ivh libpcap-devel-0.9.4-14.el5.i386.rpm

  Libcurses這個包沒裝過,因為安裝時也沒出錯,所以暫時就沒裝!

  安裝iftop:

  # wget http://www.ex-parrot.com/%7Epdw/iftop/download/iftop-0.17.tar.gz

  # tar zxvf iftop-0.17.tar.gz

  # cd iftop-0.17

  # ./configure –prefix=/usr/local/iftop && make && make install

  # /usr/local/iftop/sbin/iftop //預設監測eth0網卡流量

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.