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
的最顶端.