To view available memory in MB over SSH to your virtual private server or dedicated server, use the following command:
free-m
You’ll get something like:
total used free shared buffers cached
Mem: 512 77 434 0 0 0
-/+ buffers/cache: 77 434
Swap: 0 0 0
To monitor the memory in real time on 1 second for 60 seconds use:
vmstat 1 60
The result should be similar to:
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 0 0 444848 0 0 0 0 0 1 0 5 0 0 100 0 0
0 0 0 444836 0 0 0 0 0 0 0 8370 0 0 100 0 0
0 0 0 444836 0 0 0 0 0 0 0 8094 0 0 100 0 0
0 0 0 444836 0 0 0 0 0 0 0 7753 0 0 100 0 0
0 0 0 444836 0 0 0 0 0 0 0 9175 0 0 100 0 0
To keep track to more information about the server processes use the command:
top