Iftop-网络流量实时监控工具

iftop介绍

Iftop 主要用来显示本机网络流量情况及各相互通信的流量集合,如单独同那台机器间的流量大小,非常适合于代理服务器和iptables服务器使用。

iftop安装

1、安装依赖

  1. yum install libpcap-devel ncurses-devel

2、开始安装

  1. wget http://www.ex-parrot.com/pdw/iftop/download/iftop-0.17.tar.gz
  2. tar xzf iftop-0.17.tar.gz
  3. cd iftop-0.17
  4. ./configure
  5. make && make install

如何使用

直接执行iftop即可运行查看流量情况。
执行iftop -h得到帮助信息

  1. [root@www ~]#iftop -h
  2. iftop: display bandwidth usage on an interface by host
  3.  
  4. Synopsis: iftop -h | [-npbBP] [-i interface] [-f filter coolcode] [-N net/mask]
  5.  
  6.    -h                  display this message
  7.    -n                  don't do hostname lookups
  8.    -N                  don't convert port numbers to services
  9.    -p                  run in promiscuous mode (show traffic between other
  10.                        hosts on the same network segment)
  11.    -b                  don't display a bar graph of traffic
  12.    -B                  Display bandwidth in bytes
  13.    -i interface        listen on named interface
  14.    -f filter coolcode      use filter coolcode to select packets to count
  15.                        (default: none, but only IP packets are counted)
  16.    -F net/mask         show traffic flows in/out of network
  17.    -P                  show ports as well as hosts
  18.    -m limit            sets the upper limit for the bandwidth scale
  19.    -c config file      specifies an alternative configuration file

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

标签:监控 发布于:2019-11-24 00:32:34