How to Check Memory Size and Usage

There are many command line tools to view the ram (memory) size under Redhat Enterprise Linux desktop system. Commands are as follows ----

 

[ root @ leolinux ~ ]#    cat   /proc/meminfo

MemTotal:        3955392 kB
MemFree:          543456 kB
Buffers:          677848 kB
Cached:          1407992 kB
SwapCached:            0 kB
Active:          1206172 kB
Inactive:        1949996 kB
Active(anon):     703924 kB
Inactive(anon):   567216 kB
Active(file):     502248 kB
Inactive(file):  1382780 kB
Unevictable:        3496 kB
Mlocked:            3496 kB

 

[ root @ leolinux ~ ]#   free  -m

                     total        used       free     shared    buffers     cached

Mem:          3862       3345        516          0        662       1382
-/+ buffers/cache:       1301       2561
Swap:         3999          0       3999

 

[ root @ leolinux ~ ]#   vmstat    -s

3955392 K     total memory
3501284 K     used memory
1292576 K     active memory
1953324 K     inactive memory
454108 K       free memory
679056 K       buffer memory
1422136 K     swap cache
4095996 K     total swap
20 K used      swap
4095976 K     free swap
188549           non-nice user cpu ticks
1329                nice user cpu ticks

 

[ root @ leolinux ~ ]#   dmidecode     - - type    memory

# dmidecode 2.11

SMBIOS 2.6 present.
 
     Handle 0x001D, DMI type 16, 15 bytes
     Physical Memory Array
     Location: System Board Or Motherboard
     Use: System Memory
     Error Correction Type: None
     Maximum Capacity: 16 GB
     Error Information Handle: Not Provided
     Number Of Devices: 2
 
Handle 0x001E, DMI type 17, 28 bytes
Memory Device
    Array Handle: 0x001D
    Error Information Handle: 0x0000
    Total Width: Unknown
    Data Width: Unknown
    Size: No Module Installed
    Form Factor: DIMM
    Set: None
    Locator: DIMM_A
    Bank Locator: BANK 0
    Type: Unknown
    Type Detail: None
    Speed: Unknown
    Manufacturer: Not Specified
    Serial Number: Not Specified
    Asset Tag: Not Specified
    Part Number: Not Specified
    Rank: Unknown
 
Handle 0x001F, DMI type 17, 28 bytes
Memory Device
    Array Handle: 0x001D
    Error Information Handle: 0x0000
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 4096 MB
    Form Factor: SODIMM
    Set: None
    Locator: DIMM_B
    Bank Locator: BANK 2
    Type: DDR3
    Type Detail: Synchronous
    Speed: 1333 MHz
    Manufacturer: 80CE
    Serial Number: 66200683
    Asset Tag: 02111000     
    Part Number: M471B5273CH0-CH9  
    Rank: Unknown

 

[ root @ leolinux ~ ]#  top 

top - 18:12:48 up  8:46,  2 users,  load average: 1.24, 0.68, 0.55

Tasks:   202 total,   1 running,   201 sleeping,   0 stopped,   0 zombie
Cpu(s):  8.2%us,  2.8%sy,   0.0%ni,  88.1%id,  0.3%wa,  0.4%hi,  0.3%si,  0.0%st
Mem:   3955392k total,   3536744k used,   418648k free,   674140k buffers
Swap:  4095996k total,       20k used,  4095976k free,  1481980k cached
 
  PID USER      PR  NI    VIRT   RES   SHR S %CPU %MEM    TIME+  COMMAND                                                                                  
 4019 leoxian   20   0   1294m 116m  11m S 18.6  3.0   4:28.04 chrome                                                                                   
   948  root        20   0   160m      23m  11m S  6.0  0.6   5:26.55 Xorg                                                                                     
 3673 leoxian   20   0  1896m  123m  27m S  5.3  3.2   7:22.60 gnome-shell                                                                              
 3848 leoxian   20   0   934m   125m  40m S  4.0  3.2  10:20.52 chrome      

cheer!!!