Thursday, June 25, 2009

Check your memory usage in Linux

I have always loved keeping an eye on how much RAM my system is using. On Linux systems, there is a great tool for doing this. While it doesn't by itself provide real time usage, it does give you a snapshot of your current usage. Run this command:
free -m
The -m option formats all the numbers to megabytes so they are more human readable. This will give you a printout of your total, used and available system memory and swap memory.

Both my Ubuntu and CentOS servers are running on old systems that have only 512MB of RAM. When I ran this command on each of them, neither system was using any of its available swap space; they were both able to run without using all of their system memory.

No comments:

Post a Comment