Here are few ways to get memory information in Linux based system:

1. /proc/meminfo file stores statistics about memory usage on the Linux based system:

$ cat /proc/meminfo

Output:

[was85@mdm114116 server1]$ cat /proc/meminfo
MemTotal:        3140828 kB
MemFree:          145064 kB
Buffers:            3932 kB
Cached:           363588 kB
SwapCached:        77504 kB
Active:          2145512 kB
Inactive:         626968 kB

$ egrep –color ‘Mem|Cache|Swap’ /proc/meminfo

Sample output:

meminfo1

2. Use free command to view concise memory status information:

$ free -m (megabyte unit)
Sample output:

mem2

Refresh memory stat every 2 seconds:

$ free -ms2 (-s update every [delay] seconds)

Sample output:

mem3

$ free -tm (-t for total RAM and swp)

mem4

 

3. Dynamic resource usage view: ‘top’ command

Sample output:

mem5

User specific process resource usage stat:

$ top -U oracle

mem6

Advertisements