Linux centos view process network traffic status, network traffic (using nethogs, nload)

NetHogs and nload are all third-party practical gadgets. CentOS 7 and above can be installed directly by yum, or you can find the source code to install.

1. Nethogs instructions and examples

  •  Instructions for use (basically use the default values ​​for parameters, the advantage of this tool is that you can clearly see which process occupies more network traffic)
用法:nethogs[-v][-h][-b][-d秒][-v模式][-c计数][-t][-p][-s][设备[设备…]]
 
-V:打印版本。
 
-H:打印这个帮助。
 
-B:BugHunt模式-表示跟踪模式。
 
-D:更新刷新率的延迟(秒)。默认值为1。
 
-V:查看模式(0=kb/s,1=total kb,2=total b,3=total mb)。默认值为0。
 
-C:更新次数。默认值为0(无限制)。
 
-TraceMod。
 
-P:在混乱模式下嗅探(不推荐)。
 
-S:按发送列对输出进行排序。
 
-A:监控所有设备,甚至是回送/停止的设备。
 
设备:要监视的设备。默认值是除环回之外的所有已启动和正在运行的接口
 
NetHogs运行时,按:
q:退出
S:按发送流量排序
R:按接收流量排序
M:在总计(kb、b、m b)和kb/s模式之间切换
  • Usage example

[root@ald8 ~]# nethogs

[root @ ald8 ~] # nethogs eth0 eth1 // If there are multiple network cards to be viewed at the same time, the network card names can be written in sequence

 [root @ ald8 ~] # nethogs eth1 // Specify to view a certain network card

 

2. nload instructions and examples

 Instructions for use (very suitable for viewing the status of the overall network traffic, the parameters are mainly graphic display functions, personally feel not intuitive enough so it is not practical, just look at the numbers)
 

命令行语法:
nload[选项][设备]
nload——帮助-h
 
选项:
-时间段设置平均时间窗口的长度(以秒为单位)
计算。
默认值为300。
-i max_scaling指定图形的100%标记,单位为kbit/s,表示
传入带宽使用。如果最大缩放比例为0或
给出了开关-M。
默认值为10240。
-M一次显示多个设备;没有流量图。
 
-o max_缩放与-i相同,但对于指示传出带宽的图表
用法。
默认值为10240。
-t interval确定显示器的刷新间隔(毫秒)。
 
默认值为500。
-U H B K M G设置用于显示交通号码的单位类型。
H B K M G H:自动,B:位/秒,K:k bit/s,M:m bit/s等。
h:auto,b:byte/s,k:k byte/s,m:m byte/s等。
 
默认值为h。
-U H B K M G与-U相同,但数据总量(不含“/S”)。
H B K M G默认为H。
设备要使用的网络设备。
默认为使用所有自动检测的设备。
 
--帮助
-h打印此帮助。
 
示例:nload-t 200-i 1024-o 128-u m
上述选项也可以在运行时通过按“F2”键进行更改。
  • Usage example

[root @ ald8 ~] # nload // Just input this command directly

Published 69 original articles · Like 72 · Visit 240,000+

Guess you like

Origin blog.csdn.net/londa/article/details/103414237