飞塔防火墙如何查看流量_教你如何使用网络流量查看工具-iptraf-ng

本文介绍了如何利用iptraf-ng工具监控Linux服务器的网络流量。通过命令行选项,如`-g`显示所有网卡流量,`-deth0`针对特定网卡进行详细统计,`-seth0`统计端口流量,`-ieth0`查看TCP和UDP连接。此工具对于网络性能分析非常有用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

本文教你如何使用网络流量查看工具-iptraf-ng 。

iptraf-ng 可以方便查看当前服务器网络状况:CentOS 7.0,采用了衍生版本iptraf-ng 。

iptraf-ng -husage: iptraf-ng [options]   or: iptraf-ng [options] -B [-i  | -d  | -s  | -z  | -l  | -g]    -h, --help            show this help message    -i             start the IP traffic monitor (use '-i all' for all interfaces)    -d             start the detailed statistics facility on an interface    -s             start the TCP and UDP monitor on an interface    -z             shows the packet size counts on an interface    -l             start the LAN station monitor (use '-l all' for all LAN interfaces)    -g                    start the general interface statistics    -B                    run in background (use only with one of the above parameters    -f                    clear all locks and counters    -t                 run only for the specified  number of minutes    -L           specifies an alternate log file

简要步骤:

“iptraf -g” 显示每一个网卡上的流量:

147345e7fa381c6c833fa20f2c01c958.png

“iptraf -d eth0” 显示指定网卡上的流量统计,总体流量、流入量、流出量、以及按协议分类的流量统计:

f7a3c2649471d28815c1313f8895293b.png

“iptraf -s eth0” 统计各port的流量:

762eb90f731954d3222001bc4c95acd8.png

“iptraf -i eth0” 查看远程主机端口:

e5a92a80a17d9ddd79069b0138f71b16.png

“iptraf -i eth0” 的输出分为两个窗口,上面是TCP socket pairs,下面是UDP。我们根据端口号 使用 lsof 可以找到对应的进程号。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值