工作,学习,生活,这里将会有一些记录. 备用域名:http://meisw.wdlinux.cn 注册 | 登陆

iftop 流量监测

iftop

iftop 官方网站:
http://www.ex-parrot.com/~pdw/iftop/

安装iftop,,必须先安装libpcap
http://www.tcpdump.org/release/

wget http://www.tcpdump.org/release/libpcap-0.9.8.tar.gz
tar -zxvf libpcap-0.9.8.tar.gz

cd libpcap-0.9.8
./configure
make;make install

pcap安装完成,再来安装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


[root@localhost libpcap-1.0.0]# make
gcc -O2 -fPIC -I.  -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./pcap-linux.c
gcc -O2 -fPIC -I.  -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./pcap-usb-linux.c
gcc -O2 -fPIC -I.  -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./fad-getad.c
In file included from ./fad-getad.c:67:
/usr/include/linux/if_packet.h:52: error: expected specifier-qualifier-list before '__u32'
make: *** [fad-getad.o] Error 1

A:

#include <linux/types.h>
加入到
/usr/include/linux/if_packet.h
的最顶端.

« 上一篇 | 下一篇 »

Trackbacks

点击获得Trackback地址,Encode: UTF-8

发表评论

评论内容 (必填):