Linux free -m
The most common way you'll see on the web to check for free memory in Linux is by using the free command.Using the free -m command to check your Linux memory usage, displays the values as MB instead of KB.
root@server [~]# free -m total used free shared buffers cached Mem: 1024 1022 1 0 0 822 -/+ buffers/cache: 200 823 Swap: 0 0 0
Most people will run this command and panic thinking they only have 1 MB of free memory on the server:
The free column beside -/+ buffers/cache with 823 MB is the actual free memory available to Linux.
1024 MB is the total system memory available, which would be physical RAM.
1 MB and 823 MB both show free because an application has access to both for memory storage.
1 MB free plus the 822 MB cached gives the 823 MB of memory actually free to use if needed.
No comments:
Post a Comment