How do I check resource usage on CentOS?

To view the resource usage in a CentOS system, you can use the following command:

  1. Check the CPU usage status.
top

Pressing the “1” key will display the usage of each CPU core.

  1. Check the memory usage.
free -h

This command will display information such as total memory, used memory, and free memory in the system.

  1. Check disk usage.
df -h

This command will display the usage information of each disk partition in the system, including total capacity, used capacity, available capacity, and more.

  1. Check the network usage.
iftop

This command can display real-time network traffic.

  1. Check the usage of processes.
top

This command will display the usage status of all processes in the system, including CPU usage, memory usage, and more.

The above command needs to be executed in the command line terminal. If certain tools are not installed, you can use the following command to install them.

sudo yum install -y <工具名称>

Please note that executing the above command may require root access.

bannerAds