您的位置:首页 > 运维架构 > Linux

安装Linux流量监控工具 - iftop

2016-11-25 22:04 447 查看

一、什么是iftop?

 iftop是类似于top的实时流量监控工具.

二、iftop作用是什么呢?

iftop可以用来监控实时流量、反向解析IP、显示端口信息等操作。

三、iftop在哪里下载?

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

四、安装iftop依赖包。

<第1种>1.[root@localhost ~]# yum install libpcap
libpcap-devel ncurses ncurses-devel -y

2.将下载的工具减压并安装(我是将下载的gz包通过xtp上传工具放到了/usr/local/src下)

root@localhost

src]# tar -zxvf iftop-1.0pre4.tar.gz

[root@localhost

src]# cd /iftop-1.0pre4/

[root@localhost iftop-1.0pre4]]# ./configure --prefix=/usr/local/application/iftop

。。。

[root@localhost
iftop-1.0pre4]# make && make install

。。。

3.安装完成后需要配置环境变量和man手册
(1)[root@localhost iftop-1.0pre4]# vim /etc/profile.d/iftop.sh

export PATH=$PATH:/usr/local/application/iftop/sbin

(2)[root@localhost
iftop-1.0pre4]# source /etc/profile.d/iftop.sh

(3) [root@localhost iftop-1.0pre4]# vim /etc/man.config

MANPATH /usr/local/application/iftop/share/man

4.到这一步就安装完成了 测试的话直接输入iftop就行

<第2种>

直接省略上面的步骤

https://www.vpser.net/manage/centos-rhel-linux-third-party-source-epel.html 这个教程安装好EPEL

然后 yum install iftop

Debian系统 运行:apt-get install iftop

安装完毕!!!

常见问题:

1、make: yacc: Command not found

make: *** [grammar.c] Error 127

解决方法:apt-get install byacc   /   yum install byacc

2、configure: error: Curses! Foiled again!

(Can't find a curses library supporting mvchgat.)

Consider installing ncurses.

解决方法:apt-get install libncurses5-dev  /    yum  install ncurses-devel
3.使用vim出现这个问题

解决方法:yum install vim*

将这个三个一并安装就行了 欧耶。。。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux 监控工具 iftop