Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use iftop command to monitor network bandwidth in linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to use the iftop command to monitor network bandwidth in linux. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

Iftop is a network monitoring tool that provides real-time bandwidth monitoring. Iftop measures the total amount of data going in and out of each socket connection, that is, the bandwidth used by capturing packets received or sent through a network adapter and then combining the data.

Install on Debian/Ubuntu

Iftop exists in the default repository of Debian/Ubuntu and can be installed using the following command:

$sudo apt-get install iftop is installed on RHEL/Centos using yum

To install iftop on CentOS or RHEL, we need to enable the EPEL repository. To enable the warehouse, run the following command on the terminal:

RHEL/CentOS 7:

$rpm-Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-10.noarch.rpm

RHEL/CentOS 6 (64 bit):

$rpm-Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

RHEL/CentOS 6 (32 bit):

$rpm-Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

After the EPEL repository installation is complete, we can install iftop with the following command:

$yum install iftop

This will install iftop on your system. We will now use it to monitor our network.

Use iftop

You can open a terminal window and enter the following command to use iftop:

$iftop

Network monitoring

Now you will see the network activity taking place on the computer. You can also use:

$iftop-n

This displays the network information on the screen, but with-n, the name associated with the IP address is not displayed, only the IP address is displayed. This option saves some bandwidth in parsing IP addresses to names.

We can also see all the commands that iftop can use. After running iftop, press h on the keyboard to see all the commands available to iftop.

Network monitoring

To monitor a specific network interface, we can add the interface name after the iftop:

This is the end of the iftop-I enp0s3 article on "how to use iftop commands to monitor network bandwidth in linux". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report