Ubuntu에서 사용한 메모리를 계산하는 방법은 무엇입니까?

Ubuntu에서 사용한 메모리를 계산하는 방법은 무엇입니까?

방금 새로운 우분투 머신을 시작했습니다. 사용 가능한 메모리는 적당하지만 사용 가능한 메모리는 매우 작습니다.

cat /proc/meminfo |more
MemTotal:        2034484 kB
MemFree:          703496 kB
MemAvailable:    1538076 kB
Buffers:           80332 kB
Cached:           829408 kB

Used_memory를 어떻게 계산해야 하나요? ~에 따르면https://stackoverflow.com/questions/41224738/how-to-calculate-system-memory-usage-from-proc-meminfo-like-htop

Used_mem = Total_mem- Free_mem

이 방정식을 사용하면 아직 아무것도 실행하지 않았음에도 불구하고 기계가 많이 사용되었기 때문에 이것은 나에게 이해가 되지 않습니다. 내 생각엔 아마

Used_mem = Total_mem- Available_mem 

나에게는 더 의미가 있습니다.

내 질문은: 사용된 메모리를 계산하는 방법은 무엇입니까? 아니면 실제로 사용할 수 있는 메모리를 계산하는 방법은 무엇입니까? 위에 표시된 사용 가능한 메모리가 정확하지 않은 것 같습니다.

Used_memory를 계산하기 위해 node_exporter 측정항목을 사용합니다.

답변1

free이 명령 에 대한 매뉴얼 페이지를 확인하십시오 .

free  displays the total amount of free and used physical and swap mem‐
       ory in the system, as well as the buffers and caches used by  the  ker‐
       nel.  The  information  is  gathered by parsing /proc/meminfo. The dis‐
       played columns are:

       total  Total installed memory (MemTotal and SwapTotal in /proc/meminfo)

       used   Used memory (calculated as total - free - buffers - cache)

       free   Unused memory (MemFree and SwapFree in /proc/meminfo)

       etc...

관련 정보