Linux下的iftop命令介绍

本文主要介绍 Linux 操作系统中 iftop 命令的相关内容。

1 概述

Linux 操作系统中的 iftop 命令来自 iftop 软件包,iftop 软件包的描述如下:

Command line tool that displays bandwidth usage on an interface

iftop 手册(man iftop 命令)中的介绍信息如下:

iftop - display bandwidth usage on an interface by host.

iftop  listens  to network traffic on a named interface, or on the first interface it can find which looks like an external interface if none is specified, and displays a table of current bandwidth usage by pairs of hosts.  iftop must be run with sufficient permissions to monitor all network traffic on the interface; see pcap(3) for more information, but on most systems this means that it must be run as root.

总结上述介绍信息,可知:iftop 用于显示网口上的带宽流量信息。

2 命令用法

本章介绍 iftop 命令的常见用法。

2.1 显示ip信息代替主机名

iftop -n

2.1 显示指定ip的流量信息

首先,运行 iftop -n 命令,显示的示例结果如下:

上面的结果默认显示了所有 ip 的流量信息。

现在想只显示 ip 地址“192.168.110.7”的流量信息,操作步骤如下。

1. 在上面的显示结果界面中,输入 l,此时屏幕中会出现“Screen filter”待输入状态,如下图所示:

2. 输入指定的 ip 地址信息(本例中为 192.168.110.7),输入的内容会填充到“Screen filter”,如下图所示:

3. 按下 Enter 键确认。

完成上述操作后,即可只监控指定 ip 地址的流量信息,如下图所示:

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

liitdar

赠人玫瑰,手有余香,君与吾共勉

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值