iftop

14 年 ago jony iftop已关闭评论

懒人安装法:

先安装epel-release

yum install epel-release
然后在安装iftop
yum install iftop
如果yum install epel-release安装不了,可以

CentOS/RHEL 5 :

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm

CentOS/RHEL 6 :

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

CentOS/RHEL 7 :

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
 
然后再安装iftop.
 
 
yum install iotop
 
 
源码安装法:

下载源码:

http://www.ex-parrot.com/~pdw/iftop/

安装这些依赖包:

yum install make apr* autoconf automake gcc gcc-c++ zlib-devel openssl openssl-devel pcre-devel gd  kernel keyutils  patch  perl kernel-headers compat* mpfr cpp glibc libgomp libstdc++-devel ppl cloog-ppl keyutils-libs-devel libcom_err-devel libsepol-devel libselinux-devel krb5-devel zlib-devel libXpm* freetype libjpeg* libpng* php-common php-gd ncurses* libtool* libxml2 libxml2-devel patch -y

当源码安装时,提供示如下错误:

checking for a curses library containing mvchgat... none found configure: error: Curses! Foiled again!   (Can't find a curses library supporting mvchgat.)   Consider installing ncurses.

运行安装:

yum install ncurse*

#./configure

#make

#make install

安装完成后,再重新编译

make

make install

完成

直接运行:iftop

测试

checking where to find pcap.h... no idea
configure: error: can't find pcap.h
You're not going to get very far without libpcap.

#yum install libpcap-devel

 查看进程占用带宽情况 - Nethogs

Nethogs 是一个终端下的网络流量监控工具可以直观的显示每个进程占用的带宽。

下载:http://sourceforge.net/projects/nethogs/files/nethogs/0.8/nethogs-0.8.0.tar.gz/download

  1. [root@localhost ~]#yum  -y install libpcap-devel  ncurses-devel
  2. [root@localhost ~]# tar zxvf nethogs-0.8.0.tar.gz
  3. [root@localhost ~]# cd nethogs
  4. [root@localhost nethogs]# make && make install
  5. [root@localhost nethogs]# nethogs eth0

网络流量监控 - IPtraf

IPtraf 是一个运行在 Linux 下的简单的网络状况分析工具。

[root@localhost ~]# yum -y install iptraf 
https://mp.weixin.qq.com/s/MxVKCI_9OeAKdq1S5pH4BA