How to check traffic in centos?
How to view traffic in centos:
1. Installation of the traffic monitoring tool iftop
tool.
yum install iftop -y
After executing the above command, it will be downloaded automatically.
2. Execute
iftop
on the command line will display all the entries and exits of this machine. flow.
The left side represents the local gateway, the right side represents the interactive IP, and the 3 columns on the far right represent the recent traffic usage
3. Further analysis is required Which network card is the traffic relationship.
ifconfig
Shows how much traffic is received and sent.
This step can find out which network card it is
4. According to the above interface, you can only see those IPs that have traffic interaction with this machine; Execute
iftop -i ensxxx -n -P
to see which port of ensxxx
this network card is using traffic.
#5. In the previous step, you can find the process based on the port. Execute
top
to see which process uses the most cpu and mem.
Combined with the above network card port, analyze and judge together to check which specific process.
#6. You can also download nload to query the incoming and outgoing traffic of the current server.
yum install -y nload
After the download is completed, execute
nload
as shown below. The incoming and outgoing data per second is very clear, and combined with the above analysis, the traffic consumption of the server can be determined.
Recommended tutorial: "centos tutorial"
The above is the detailed content of How to check traffic on centos?. For more information, please follow other related articles on the PHP Chinese website!