iftop

iftop

一款实时流量监控工具

补充说明

iftop命令 是一款实时流量监控工具,监控TCP/IP连接等,缺点就是无报表功能。必须以root身份才能运行。

语法

iftop(选项)

选项

iftop: display bandwidth usage on an interface by host

Synopsis: iftop -h | [-npblNBP] [-i interface] [-f filter code]
    [-F net/mask] [-G net6/mask6]

   -h                  display this message
   -n                  don't do hostname lookups
   -N                  don't convert port numbers to services
   -p                  run in promiscuous mode (show traffic between other
                       hosts on the same network segment)
   -b                  don't display a bar graph of traffic
   -B                  Display bandwidth in bytes
   -i interface        listen on named interface
   -f filter code      use filter code to select packets to count
                      (default: none, but only IP packets are counted)
   -F net/mask         show traffic flows in/out of IPv4 network
   -G net6/mask6       show traffic flows in/out of IPv6 network
   -l                  display and count link-local IPv6 traffic (default: off)
   -P                  show ports as well as hosts
   -m limit            sets the upper limit for the bandwidth scale
   -c config file      specifies an alternative configuration file
   -t                  use text interface without ncurses

   Sorting orders:
   -o 2s                Sort by first column (2s traffic average)
   -o 10s               Sort by second column (10s traffic average) [default]
   -o 40s               Sort by third column (40s traffic average)
   -o source            Sort by source address
   -o destination       Sort by destination address

   The following options are only available in combination with -t
   -s num              print one single text output afer num seconds, then quit
   -L num              number of lines to print

界面说明

第一行为带宽,这里为1Mbit,不是字节哦.
连接列表,最后三列分别是2秒,10秒和40秒的平均流量
=> 代表发送
<= 代表接收
最后三行表示发送,接收和全部的流量,
第二列为你运行iftop到目前流量,第三列为高峰值,第四列为平均值。

实例

iftop           # 默认是监控第一块网卡的流量
iftop -i eth1   # 监控eth1
iftop -n        # 直接显示IP, 不进行DNS反解析
iftop -N        # 直接显示连接埠编号, 不显示服务名称
iftop -F 192.168.1.0/24 or 192.168.1.0/255.255.255.0  # 显示某个网段进出封包流量

若文章对你有帮助,可以点赞或打赏支持我们。发布者:Aurora,转载请注明出处:http://61.174.243.28:13541/AY-knowledg-hub/iftop/

(0)
AuroraAurora站点维系者
上一篇 2023年 12月 19日 下午3:26
下一篇 2023年 12月 19日 下午3:26

相关推荐

  • chown

    文章目录chown补充说明语法选项参数实例 chown 用来变更文件或目录的拥有者或所属群组 补充说明 chown命令 改变某个文件或目录的所有者和所属的组,该命令可以向某个用户授…

    入门教程 2023年 12月 7日
  • ed

    文章目录ed补充说明语法选项参数 ed 单行纯文本编辑器 补充说明 ed命令 是单行纯文本编辑器,它有命令模式(command mode)和输入模式(input mode)两种工作…

    入门教程 2023年 12月 14日
  • vi

    文章目录vi补充说明语法选项参数知识扩展 vi 功能强大的纯文本编辑器 补充说明 vi命令 是UNIX操作系统和类UNIX操作系统中最通用的全屏幕纯文本编辑器。Linux中的vi编…

    入门教程 2024年 3月 11日
  • ag

    文章目录ag补充说明语法选项实例 ag ack 的升级版,C语言编写,更快更人性化 补充说明 摘自 https://github.com/ggreer/the_silver_sea…

    入门教程 2023年 12月 6日
  • disown

    文章目录disown概要主要用途选项参数返回值例子注意参考链接 disown 从当前的shell中移除作业。 概要 disown [-h] [-ar] [jobspec … |…

    入门教程 2023年 12月 7日
  • cp

    文章目录cp补充说明语法选项参数实例 cp 将源文件或目录复制到目标文件或目录中 补充说明 cp命令 用来将一个或多个源文件或者目录复制到指定的目的文件或目录。它可以将单个源文件复…

    入门教程 2023年 12月 7日
  • sftp-server

    文章目录sftp-server补充说明语法 sftp-server sftp协议的服务器端程序 补充说明 sftp-server命令 是一个“sftp”协议的服务器端程序,它使用加…

    入门教程 2024年 3月 4日
  • Java 条件语句 – if…else

    Java 中的条件语句允许程序根据条件的不同执行不同的代码块。 一个 if 语句包含一个布尔表达式和一条或多条语句。 文章目录语法Test.java 文件代码:if…e…

    入门教程 2023年 3月 4日
  • tput

    文章目录tput补充说明什么是 terminfo 数据库?实例 tput 通过terminfo数据库对终端会话进行初始化和操作 补充说明 tput命令 将通过 terminfo 数…

    入门教程 2024年 3月 11日
  • syslog

    文章目录syslog补充说明使用方法 syslog 系统默认的日志守护进程 补充说明 syslog 是Linux系统默认的日志守护进程。默认的syslog配置文件是/etc/sys…

    入门教程 2024年 3月 11日

发表回复

登录后才能评论
Translate »