nethogs 命令详解

| 选择喜欢的代码风格  

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

nethogs 命令安装:


-bash/zsh: nethogs command not found

# Windows (WSL2)
sudo apt-get update sudo apt-get install nethogs

# Debian
apt-get install nethogs

# Ubuntu
apt-get install nethogs

# Alpine
apk add nethogs

# Arch Linux
pacman -S nethogs

# Kali Linux
apt-get install nethogs

# Fedora
dnf install nethogs

# OS X
brew install nethogs

# Raspbian
apt-get install nethogs

# Dockerfile
dockerfile.run/nethogs

# Docker
docker run cmd.cat/nethogs nethogs

nethogs 命令补充说明:


NetHogs 类似于 Linux top 命令,是一个开源命令行程序,用于监控 Linux 中的网络流量。可以知道系统中的具体哪个应用程序,占用了带宽。Nethogs 可以按 PID 找出占用带宽的应用,Nethogs 按进程分组带宽,而不是按协议或子网细分流量。

nethogs 命令语法:


nethogs [-d] [-h] [-p] [-t] [-V] [device(s)]

nethogs 命令选项:


-d
delay for refresh rate.

-h
display available commands usage.

-p
sniff in promiscious mode (not recommended).

-t
tracemode.

-V
prints Version info.

device(s) to monitor. By default eth0 is being used.

----------------------
Interactive Control
m
cycle between display modes (kb/s, kb, b, mb)

r
sort by 'received'

s
sort by 'sent'

q
quit

nethogs 命令实例:


以 root 身份启动 nethogs(默认为 eth0 ):

sudo nethogs

nethogs 监控特定设备的带宽:

sudo nethogs device

nethogs 监控多个设备上的带宽:

sudo nethogs device1 device2

nethogs 指定刷新率:

sudo nethogs -t seconds

nethogs 命令扩展阅读:




nethogs 命令评论