Rootop 服务器运维与web架构

nethogs查看进程网络流量统计

centos安装:
1、安装epel源
2、yum install nethogs

ubuntu安装:
apt install nethogs

root@venus:~# nethogs -h
usage: nethogs [-V] [-h] [-b] [-d seconds] [-v mode] [-c count] [-t] [-p] [-s] [device [device [device …]]]
-V : prints version.
-h : prints this help.
-b : bughunt mode – implies tracemode.
-d : # 动态刷新时间间隔,默认1秒
-v : view mode (0 = KB/s, 1 = total KB, 2 = total B, 3 = total MB). default is 0.
-c : number of updates. default is 0 (unlimited).
-t : tracemode.
-p : sniff in promiscious mode (not recommended).
-s : sort output by sent column.
-a : monitor all devices, even loopback/stopped ones.
device : device(s) to monitor. default is all interfaces up and running excluding loopback

When nethogs is running, press:
q: quit # 退出
s: sort by SENT traffic # 按照发送流量排序
r: sort by RECEIVE traffic # 按照接受流量排序
m: switch between total (KB, B, MB) and KB/s mode # 切换总量(KB,B,MB) / 每秒KB速率

原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/4159.html

作者:Venus

服务器运维与性能优化

评论已关闭。