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
-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 类似于 Linux top 命令,是一个开源命令行程序,用于监控 Linux 中的网络流量。可以知道系统中的具体哪个应用程序,占用了带宽。Nethogs 可以按 PID 找出占用带宽的应用,Nethogs 按进程分组带宽,而不是按协议或子网细分流量。
nethogs [-d] [-h] [-p] [-t] [-V] [device(s)]
-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
以 root 身份启动 nethogs(默认为 eth0 ):
sudo nethogs
nethogs 监控特定设备的带宽:
sudo nethogs device
nethogs 监控多个设备上的带宽:
sudo nethogs device1 device2
nethogs 指定刷新率:
sudo nethogs -t seconds