长按或截图扫码

获取1V1专业服务

Linux system cpu, memory overload checking

Products

Virtual Machines

High load troubleshooting for cpu and memory in Linux system

Note: The configuration and instructions involved in this article have been tested on CentOS 6.5 64-bit operating system. Configuration of operating systems of other types and versions may be different. For details, please refer to the official documentation of the corresponding operating system.

**You can view the usage of the CPU, memory and other resources from the process perspective through top. **

Instructions for use:

top

Echo description:

The third line on the default interface will display the current overall usage of the CPU resources, and at the bottom will display the resource usage of each process.

You can directly enter the uppercase/lowercase P in the interface to arrange the monitoring results in reverse order according to the CPU utilization, so as to locate the process that occupies a high CPU usage in the system. Finally, according to the system log and relevant log of the program itself, the corresponding process is further investigated and analyzed to determine the cause of its high CPU usage.

**Use top to kill CPU-intensive processes directly. **

As mentioned earlier, you can use the top command to view load issues of the system and locate processes that are consuming more CPU resources. You can quickly terminate corresponding abnormal process directly in the top running interface. Description is as follows:

  1. To kill a process, press the lowercase k key.
  1. Enter the PID of the process to be killed (first column of top output).

Low CPU utilization but high load

Problem Description:

There is no business program running in the Linux system. Through the top observation, the CPU is very idle, but the load average is very high, roughly as shown in the figure below.

Treatment method:

Load average is an evaluation of the CPU load. The higher the value, the longer the task queue and the more tasks waiting to be executed. When this happens, it may be caused by a zombie process. You can use the command ps -axjf to check whether there is a D-state process. D state refers to an uninterruptible sleep state. Processes in this state cannot be killed and you cannot exit them by yourselves. It can only be solved by restoring the resources they depend on or restarting the system.

If your problem cannot be solved, please submit a ticket to us.

2022-02-25 22:40:35
Feedback

开始与售前顾问沟通

可直接拨打电话 400-098-8505转1

我们的产品专家为您找到最合适的产品/解决⽅案

在线咨询 5*8⼩时

1v1线上咨询获取售前专业咨询

点击咨询
企微服务助手

专业产品顾问,随时随地沟通

×
app-logo

添加企业微信

获取1V1专业服务

立即添加
扫一扫

添加企业微信,获取1V1专业服务