Linux command
nethogs 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Start
sudo nethogs
Example
sudo nethogs [eth0]
Example
sudo nethogs [eth0] [wlan0]
Example
sudo nethogs -d [2]
Tracemode
sudo nethogs -t
说明
nethogs is a network monitoring tool that groups bandwidth usage by process rather than by interface or protocol. It shows which processes are consuming network bandwidth in real-time. Unlike traditional network monitors that show per-interface statistics, nethogs identifies the actual programs responsible for network traffic, making it easier to find bandwidth-hungry applications.
参数
- -d _seconds_
- Delay between refreshes in seconds; default is 1
- -t
- Tracemode; output to stdout continuously
- -v
- View mode; cycle through views (0-2)
- -c _count_
- Number of updates before exiting
- -p
- Promiscuous mode (capture all packets)
- -s
- Sort by sent data
- -a
- Monitor all devices
FAQ
What is the nethogs command used for?
nethogs is a network monitoring tool that groups bandwidth usage by process rather than by interface or protocol. It shows which processes are consuming network bandwidth in real-time. Unlike traditional network monitors that show per-interface statistics, nethogs identifies the actual programs responsible for network traffic, making it easier to find bandwidth-hungry applications.
How do I run a basic nethogs example?
Run `sudo nethogs` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -d _seconds_ do in nethogs?
Delay between refreshes in seconds; default is 1