linux check network usage

How to Check Network Usage on Linux?


GNU/Linux system administrator involved into a huge number of tasks. The most significant of these include checking the OS’s network usage. GNU/Linux has many tools that allow you to monitor and analyze the network of both the desktop PC and the corporate server.

Such tools are presented with a graphical interface or functioning only through the command line (sometimes developers combine this). In each of these cases, there are advantages and disadvantages. The most important, but conditional difference: graphical utilities of the YaST or KDE System Guard type are usually distinguished by ease of use and simplicity, while console utilities are distinguished by their flexibility and informativeness, but are slightly more difficult to use.

Most often it is the server that has to be administered, and it usually has a console only, even without a window manager. By the way, working in the console, you can better understand how the specified tool works, even if it has a window version.

This article shares the list of the most common and useful console utilities for network monitoring.

iptraf

This program is especially popular with GNU/Linux administrators, as its capabilities in network analysis are simply amazing. It can be used only in console interactive mode, which allows you to see quite clearly and in detail what is happening with network packets.

The program is in the software store of most distributions.

To install it, run the following command in the console:

Debian-based sudo apt install iptraf
“Red Hat”-based sudo yum install iptraf
Arch-based sudo pacman -S iptraf-ng

To run the utility, execute the iptraf command (or iptraf-ng, if it is an Arch-like distribution) with superuser privileges, after which the main program window will appear.

linux check network usage

A list of available tools for complete network monitoring is provided.

Note! At the bottom of the program window, additional information about the selected tool, as well as keyboard navigation tips are displayed.

For example, to review network connections and traffic, select “IP Traffic monitor” and select the desired network interface.

linux see network usage

After a while, the screen will display the IP addresses that interact with this network card, as well as the information about the transmitted packages, their direction and volume, expressed in bytes.

linux show network usage

iftop

This program has a simpler look. It shows less information than iptraf, but it is also useful and informative with the features that it provides when checking network usage on Linux.

To install it, use one of the following commands:

Debian-based sudo apt install iftop
“Red Hat”-based sudo yum install iftop
Arch-based sudo pacman -S iftop

The program is started by the iftop with root privileges, after which the listening will have the default network interface. You can manually change the listening object using the -i flag, specifying the name of the network interface after it.

show network usage linux

Details of each connection are shown here, but the utility does not identify the object that creates the packages.

get network usage linux

Detailed information about the program can be found through the man iftop command.

nload

An extremely simple console tool that shows the transmission speed of packages in streaming mode, including the current, average, minimum, maximum, as well as the total amount of transmitted and received information.

It can be installed by one of the commands:

Debian-based sudo apt install nload
“Red Hat”-based sudo yum install nload
Arch-based sudo pacman -S nload

To run it, you need to use the nload command.

The first block displays information about the incoming connection, and the second — about the outgoing connection.

check bandwidth usage linux

nethogs

Unlike other network tools, nethogs shows the identifier of the process (PID) involved in sending or receiving network packages, and the user on whose behalf it was launched.

The installation of the utility can be done using one of these commands:

Debian-based sudo apt install nethogs
“Red Hat”-based sudo yum install nethogs
Arch-based sudo pacman -S nethogs

It is launched with the command by the name of the package.

show network usage on linux

bmon

This program displays detailed statistics for all network interfaces, including a pseudo graphic representation of data.

It can be installed from the software store of most distributions:

Debian-based sudo apt install bmon
“Red Hat”-based sudo yum install bmon
Arch-based sudo pacman -S bmon

The program starts by the name of the package.

check show network usage linux

To display help, press ?. To close the program, press q.

vnstat

This utility has features that will be useful in special cases. This is a daemon that collects network operation data into a log. After that, you can do a load analysis for the specified period.

First you need to install the utility from the standard repository:

Debian-based sudo apt install vnstat
“Red Hat”-based sudo yum install vnstat
Arch-based sudo pacman -S vnstat

Then you need to start the daemon:

sudo systemctl start vnstat

Now you can check its work status:

systemctl status vnstat

check network utilization linux

The program will collect data for some time. Viewing statistics is available by the vnstat command.

monitor bandwidth usage linux

Also, statistics can be monitored in streaming mode using the -l flag.

How to Check Network Usage on Linux? bwm-ng

Another small program that displays network load in streaming mode. It works with all available network interfaces.

To install it, use one of the commands:

Debian-based sudo apt install bwm-ng
“Red Hat”-based sudo yum install bwm-ng
Arch-based sudo pacman -S bwm-ng

It starts by the name of the package.

How to Check Network Usage Linux?

The program is quite functional (more on this you can find in man bwm-ng). One of the most convenient features is an ability to export information to a file of various types, including csv and html, for its further analysis.

You may also like:

How to Use ntpdate to Sync Time in Linux? Ntpdate is a console utility that can be used as an NTP client in various Linux distros to synchronize the local time of a host with the global time o...
Complete Arch Linux Install Guide Among the wide variety of GNU/Linux distributions, there is one that combines almost all advantages and disadvantages of these systems (of course, the...
Using Chown and Chmod Commands on Linux Managing access to files in GNU/Linux distributions is a basic procedure in the administration process. The chown and chmod commands are closely relat...
Configuring SSH Key-Based Authentication on Linux The Internet is full of manuals on how to configure the SSH key-based authentication on a Linux server. Every time we have to do this, we were searchi...
How to Reset Root Password in MySQL and MariaDB? In older versions of MySQL, if you forgot or lost the root password for MySQL, you could view the current password in the my.cnf file. In modern versi...

Add Your Comment