Home  >  Article  >  Computer Tutorials  >  How to check server bandwidth and network usage in Linux system?

How to check server bandwidth and network usage in Linux system?

WBOY
WBOYforward
2024-03-06 17:52:021051browse

How to check server bandwidth and network usage in Linux system?

To view the bandwidth and network usage of your Linux server, you can use the following commands and tools:

  1. ifconfig command: The ifconfig command is used to display and configure network interface information, including bandwidth and network usage.

Use the following command to view information about all network interfaces:

ifconfig

This command will display detailed information for each network interface, including the number of packets received and sent, and network usage.

  1. ip command: The ip command is a more powerful alternative for displaying and configuring information such as network interfaces and routing tables.

Use the following command to view information about all network interfaces:

ip -s link

This command will display statistics for each network interface, including the number of packets received and sent, and network usage.

  1. nload command: nload is a command line-based tool for real-time monitoring of network traffic and bandwidth usage.

First, make sure nload is installed. nload can be installed using the following command:

sudo apt install nload    # Debian/Ubuntusudo yum install nload    # CentOS/RHEL

Then, run the following command to start nload:

nload

nload will display real-time network traffic information, including the amount of data received and sent, bandwidth utilization, etc.

  1. vnstat command: vnstat is a command line tool for monitoring network traffic and can provide detailed network usage statistics.

First, make sure vnstat is installed. vnstat can be installed using the following command:

sudo apt install vnstat    # Debian/Ubuntusudo yum install vnstat    # CentOS/RHEL

Then, use the following command to set up vnstat to monitor a network interface, such as eth0:

sudo vnstat -u -i eth0

Next, use the following command to view network usage statistics:

vnstat

vnstat will display daily, monthly and yearly received and sent data volume, bandwidth utilization and other details.

By using commands and tools such as ifconfig, ip, nload, and vnstat, you can easily check the bandwidth and network usage of your Linux server. Choose the right tool to monitor and analyze network traffic based on your needs.

The above is the detailed content of How to check server bandwidth and network usage in Linux system?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:mryunwei.com. If there is any infringement, please contact admin@php.cn delete