A server, one of the most important resources is memory, memory enough, is directly related to system performance is the key.
This article describes how to view the memory usage of Linux servers.
1. Free command
Free-m
[Email protected] ~]# free-m
Total used free shared buffers Cached
mem:1526 182 1344 0 16 99
-/+ buffers/cache:65 1460
swap:3071 0 3071
It clearly shows how much memory is in total, how much has been used, and how much is left.
A server, one of the most important resources is memory, memory enough, is directly related to system performance is the key.
This article describes how to view the memory usage of Linux servers.
1. Free command
Free-m
[Email protected] ~]# free-m
Total used free shared buffers Cached
mem:1526 182 1344 0 16 99
-/+ buffers/cache:65 1460
swap:3071 0 3071
It clearly shows how much memory is in total, how much has been used, and how much is left.
2. Top command
There are two lines in the display result in the top command:
mem:1563088k Total, 186784k used, 1376304k free, 17444k buffers
swap:3145720k Total, 0k used, 3145720k free, 101980k cached
This also very clear, just say that it is displayed in the Unit K.
3. Vmstat command
[Email protected] ~]# Vmstat
procs-----------Memory-------------Swap-------io------System-------CPU-----
R b swpd free buff cache si so bi bo in CS us sy ID WA St
0 0 0 1376320 17452 101980 0 0 1 1 4 5 0 0 100 0 0
Also directly on the result, not explained.
View memory usage of Linux servers