Bay Cao và Bay Xa – Fly High and Fly Far

August 18, 2009

All about Linux’s Memory

Filed under: Other — doqkhanh @ 1:56 PM

1. Basic command to monitor memory in linux

All you need stored in this file – EVERYTHING:
# cat /proc/meminfo

Easier way to view memory usage :

Show cpu, memory, up time and process status
# top

Easy command to see free memory
# free -m
# free -k

2. Advance

In a server with lager memory installed, disk cached memory may make you comfused.
To see memory in cached, use this command
# cat /proc/meminfo | grep Cached

To count real memory in used by every process, try count in top command’s result
# ps aux | awk ‘{sum +=$4}; END {print sum}’

Hope this is helpful !

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.