Some Linux network tools you may not know

Source: Internet
Author: User

Some Linux network tools you may not know

If you want to monitor the network on your system, it is very practical to use the command line tool. For Linux users, there are many ready-made tools available, such as nethogs, ntopng, nload, iftop, iptraf, bmon, slurm, tcptrack, cbm, netwatch, collectl, trafshow, cacti, etherape, ipband, jnettop, netspeed, and speedometer.

Since there are many Linux experts and developers in the world, there are obviously other network monitoring tools, but in this tutorial, I don't plan to include them all.

The tools listed above all have their own uniqueness, but in the final analysis, they all do the work of monitoring network traffic, just through a variety of methods. For example, nethogs can be used to show the bandwidth usage of each process, in case you want to know which application is consuming your entire network resources; iftop can be used to display the bandwidth usage of each socket connection, while tools such as nload can help you get information about the entire bandwidth.

1) nethogs

Nethogs is a free tool. It is very convenient to find the PID (Note: process identifier, process ID) that causes network traffic problems. It groups bandwidth by process, rather than dividing traffic by protocol or subnet as most tools do. It has rich functions and supports both IPv4 and IPv6. In my opinion, if you want to determine on your Linux host which program is consuming all your bandwidth, it is the best program to do this.

A Linux user can use nethogs to display the TCP download and upload rates of each process. The nethogs eth0 command can be used to monitor a specified device, the above eth0 is the name of the device you want to obtain information about. You can also get the transmission rate information about the data being transmitted.

For me, nethogs is very easy to use, maybe because I like it so much that I always use it in my Ubuntu 12.04 LTS machine to monitor my network bandwidth.

For example, to use the hybrid mode for sniffing, you can use option-p as shown in the following command:

  1. nethogs -p wlan0

If you want to learn more about nethogs and explore it in depth, please read the entire tutorial on this network bandwidth monitoring tool without hesitation.

NetHogs -- real-time network bandwidth usage statistics by process in Linux

2) nload

Nload is a console application that can be used to monitor network traffic and bandwidth usage in real time. It also provides two easy-to-understand charts to visualize traffic. This wonderful network monitoring tool can also switch the monitored devices during the monitoring process, which can be done by pressing the left and right arrows.

As you can see above, the charts provided by nload are very easy to understand. Nload provides useful information, such as the total amount of transmitted data and the minimum/maximum network rate.

What's cool is that you only need to directly run the nload tool. This command is very short and easy to remember:

  1. nload

I am confident that our detailed tutorial on how to use nload will help new Linux users, and even help those who are looking for nload information.

(LCTT: For nload update information, refer :)

3) slurm

Slurm is another Linux network load monitoring tool. It displays the results in a good ASCII diagram. It also supports many buttons for interaction. For example, c is used to switch to the classic mode, s switches to the graph sharding mode, r is used to redraw the screen, and L is used to enable TX/RX lights (Note: TX, send traffic; RX, receive traffic ), m is used to switch between the Classic Graph splitting mode and the big image mode, and q exits slurm.

There are many other keys available in the network load monitoring tool slurm, and you can easily learn them using the following commands in the man manual.

  1. man slurm

Slurm can be found in official Ubuntu and Debian software repositories. Therefore, users who use these release versions can easily download it using the apt-get installation command as shown below:

  1. sudo apt-get install slurm

We have introduced slurm usage in a tutorial. Don't forget to share this knowledge with other Linux users.

Install SLURM cluster resource manager on Ubuntu

Install and configure SLURM in VMware + Ubuntu

4) iftop

Iftop is a useful tool when you want to display the bandwidth usage of each host connected to the network card. According to man's manual, iftop monitors network traffic on a specified interface or the first interface it can find (if there are no special circumstances, it should be an external interface, A table is displayed to show the current bandwidth usage between hosts.

By using the following command in a virtual terminal, Ubuntu and Debian users can easily install iftop on their machines:

  1. sudo apt-get install iftop

On your machine, you can use the following command to install iftop through yum:

  1. yum -y install iftop

For more information about nload, see: https://linux.cn/article-1843-1.html)

5) collectl

Collectl can be used to collect data describing the current system status. It supports the following two modes:

  • Record Mode
  • Playback Mode

Record mode allows you to read data from a running system, and then display the data either in the terminal or into one or more files or one socket.

Playback Mode

According to man's manual, in this mode, data is read from one or more data files generated in record mode.

Ubuntu and Debian users can use their default Package Manager on their machines to install colletcl. The following command will do this for them:

  1. sudo apt-get install collectl

You can also use the following command to install collectl, because for these release versions (Note: yum is used as the release version of the Package Manager ), collectl is also included in their official software Repository:

  1. yum install collectl

(LCTT: For more information about collectl, refer :)

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • 3
  • 4
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.