# 系統CPU Load Average

## &#x20;使用top、htop、uptime 都能顯示過去 **1、5、15 分鐘**的系統負載情形

這組數值可以判斷系統的繁忙狀況，數值越大表示系統越忙；數值越小表示系統越閒，Load Average 的數字代表有多少個 process 在等待 CPU 及 DISK I／O 等資源運算

以**單核cpu**的情形來看，Load Average 為 1.1 時表示系統超載 10%，如果是 0.7，表示系統並未超載，只用了 70%，通常管理人員會以0.7作為界線，若長期大於此值，就要注意系統程序的運作，避免當機

當然，多核心的機器，就要有不同計算方法，現在的 CPU 都已經是多核心。例如系統內 CPU 是四核心，那麼 Load Average 到達 4 才是全部cpu 100% 負載。以上面的算法，以一台有單夥四核心處理器的伺服器，低於4x0.7=2.8是ok的，在 Load Average 長期超過 3 時，就需檢查那裡出現問題。

### 看懂top的訊息

使用top，按下數字鍵1與m鍵，可以看到cpu與記憶體的變化

[![asciicast](https://asciinema.org/a/cZ8ibBjcN0Bwx37OoEYZ4P4se.svg)](https://asciinema.org/a/cZ8ibBjcN0Bwx37OoEYZ4P4se)

使用更好的htop

sudo apt install htop


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kawsing.gitbook.io/opensystem/andoid-shou-ji/untitled-4/xi-tong-cpu-load-average.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
