Nethogs is a special network monitoring tool that, unlike other tools that segment traffic by protocol or subnet, classifies bandwidth usage by process. This unique method accurately determines which process is consuming network resources. If you're experiencing slow network speeds, Nethogs can help you get to the root of the problem.
Before starting the installation, make sure to pre-set a few steps to ensure success. First, make sure your Debian 12 system is up to date. Update the system by running commands in the terminal.
sudo apt update sudo apt upgrade
These commands will update your package list and upgrade all installed packages to the latest version.
Step 2. Install Nethogs on Debian 12.
After completing the pre-installation steps, we can now proceed to install Nethogs on Debian 12. The installation process involves a series of commands executed in the terminal.
sudo apt install nethogs
This command will download and install Nethogs and any necessary dependencies from the Debian repository.
Step 3. Use Nethogs.
After installing Nethogs, you can start monitoring your network traffic. To start Nethogs, just type nethogs
:
sudo nethogs
This command will display a real-time table of current network traffic, grouped by process. This table shows the total send and receive traffic for each running process, allowing you to see at a glance which processes are consuming your network resources.
Understanding the output of Nethogs is critical to effective network monitoring. The table contains several columns, including the process ID, the user running the process, the network device being used, the amount of data sent and received, and the total amount of data used.
Nethogs provides a variety of advanced features for more detailed network monitoring. For example, you can filter traffic by process by appending the process ID to the nethogs
command:
sudo nethogs -p
You can also set the refresh interval (in seconds) using the -d
option:
sudo nethogs -d 5
Nethogs also allows you to display traffic in different units (KB, MB, GB) using the -u
option:
sudo nethogs -u KB
Thank you for using this tutorial to install the latest version of Nethogs network monitoring tool on Debian 12 Bookworm. For more help or useful information, we recommend you check out the Nethogs official website.
The above is the detailed content of How to install nethogs 12 on Debian. For more information, please follow other related articles on the PHP Chinese website!