Skip to content

April 22, 2009

How To Check The Memory Usage Stats On Ubuntu Server Via Command Line

Following are some methods to check the memory usage in Ubuntu. More details about these tools can be found from the man pages.

free

free command displays amount of total, free and used RAM in the system, as well as shoing information on shared memory, buffers, cached memory and swap space used by the Linux kernel.

vmstat

vmstat reports report virtual memory statistics, which has information about processes, swap, free, buffer and cache memory, paging space, disk IO activity, traps, interrupts, context switches and CPU activity. With vmstat command, administrators can has instantaneous reports on memory usage.

top

top command displays dynamic real-time view of the running tasks managed by kernel and system information in Linux system. The memory usage stats by top command include real-time live total, used and free physical memory and swap memory with their buffers and cached memory size respectively.

ps

ps command reports a snapshot on information of the current active processes. Advantage of ps command is that system admins will be able to see where the memory is used. ps will show the percentage of memory resource that is used by each process or task running in the system. With this command, top memory hogging processes can be identified.

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments

Content and site protected by Cloudsafe365