HowTo: Check Ram Size From Redhat Linux Desktop System

by on February 1, 2011 · 6 comments· LAST UPDATED December 27, 2013

in , ,

How do I check the ram size from my Redhat Linux desktop system using command line and GUI tools? How do I find out memory size on Red Hat Enterprise Linux server?

You can use any one of the following command line tools to view the ram size under Red hat Enterprise Linux desktop or server based system:
Tutorial details
DifficultyEasy (rss)
Root privilegesNo
Requirementsfree+Terminal
Estimated completion time5m

  1. /proc/meminfo file -
  2. free command -
  3. top command -
  4. vmstat command -
  5. dmidecode command -
  6. Gnonome System Monitor gui tool -

Examples

Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following commands:
$ cat /proc/meminfo
Sample outputs:

MemTotal:        8189496 kB
MemFree:         5032056 kB
Buffers:          163628 kB
Cached:          1634124 kB
SwapCached:            0 kB
Active:          1981312 kB
Inactive:        1024508 kB
Active(anon):    1210676 kB
Inactive(anon):    11488 kB
Active(file):     770636 kB
Inactive(file):  1013020 kB
Unevictable:        2388 kB
Mlocked:            2388 kB
HighTotal:       7400016 kB
HighFree:        4520172 kB
LowTotal:         789480 kB
LowFree:          511884 kB
SwapTotal:      15998968 kB
SwapFree:       15998968 kB
Dirty:               236 kB
Writeback:             0 kB
AnonPages:       1210488 kB
Mapped:           170524 kB
Shmem:             12424 kB
Slab:              65648 kB
SReclaimable:      46280 kB
SUnreclaim:        19368 kB
KernelStack:        3960 kB
PageTables:        10276 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    20093716 kB
Committed_AS:    2906208 kB
VmallocTotal:     122880 kB
VmallocUsed:       72700 kB
VmallocChunk:      23036 kB
HardwareCorrupted:     0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       59384 kB
DirectMap2M:      851968 kB

Redhat Linux: free command

To display amount of free and used memory (including total in the system), enter:
$ free -m
$ free -g
$ free -k

Sample outputs:

             total       used       free     shared    buffers     cached
Mem:       8189496    3163044    5026452          0     163856    1637368
-/+ buffers/cache:    1361820    6827676
Swap:     15998968          0   15998968

Redhat Linux: top command

The top command can also display total and used memory:
$ top
Sample outputs:

Fig.01: Display Linux RAM Size with the top commad

Fig.01: Display Linux RAM Size with the top commad

Redhat Linux: System Information GUI Tool

The System Monitor Gnome application enables you to display basic system information and monitor system processes, usage of system resources, and file systems. You can start System Monitor by clicking on System menu > Choose Administration > System Monitor:
Sample outputs:

Fig.02: Linux view installed memory with the System Monitor application

Fig.02: Linux view installed memory with the System Monitor application

Other commands

The vmstat command can display memory statistics including additional information about processes, paging, block IO, traps, and cpu activity. Type the following command:
$ vmstat
$ vmstat -s

You can also use the dmidecode command for dumping a computer's DMI (some say SMBIOS) table which can provide details about installed RAM and its speed:
# dmidecode --type memory
Sample outputs:

# dmidecode 2.10
SMBIOS 2.5 present.
Handle 0x0016, DMI type 16, 15 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 64 GB
	Error Information Handle: Not Provided
	Number Of Devices: 8
Handle 0x0017, DMI type 17, 27 bytes
Memory Device
	Array Handle: 0x0016
	Error Information Handle: No Error
	Total Width: 72 bits
	Data Width: 64 bits
	Size: 2048 MB
	Form Factor: DIMM
	Set: 1
	Locator: DIMM1A
	Bank Locator: Bank1
	Type: DDR2
	Type Detail: Synchronous
	Speed: 667 MHz
	Manufacturer: 0000
	Serial Number: 00000000
	Asset Tag: Not Specified
	Part Number:
Handle 0x0018, DMI type 17, 27 bytes
Memory Device
	Array Handle: 0x0016
	Error Information Handle: No Error
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: DIMM
	Set: 1
	Locator: DIMM1B
	Bank Locator: Bank1
	Type: DDR2
	Type Detail: Synchronous
	Speed: 667 MHz
	Manufacturer:
	Serial Number:
	Asset Tag: Not Specified
	Part Number:
Handle 0x0019, DMI type 17, 27 bytes
Memory Device
	Array Handle: 0x0016
	Error Information Handle: No Error
	Total Width: 72 bits
	Data Width: 64 bits
	Size: 2048 MB
	Form Factor: DIMM
	Set: 1
	Locator: DIMM2A
	Bank Locator: Bank2
	Type: DDR2
	Type Detail: Synchronous
	Speed: 667 MHz
	Manufacturer: 0000
	Serial Number: 00000000
	Asset Tag: Not Specified
	Part Number:
Handle 0x001A, DMI type 17, 27 bytes
Memory Device
	Array Handle: 0x0016
	Error Information Handle: No Error
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: DIMM
	Set: 1
	Locator: DIMM2B
	Bank Locator: Bank2
	Type: DDR2
	Type Detail: Synchronous
	Speed: 667 MHz
	Manufacturer:
	Serial Number:
	Asset Tag: Not Specified
	Part Number:
Handle 0x001B, DMI type 17, 27 bytes
Memory Device
	Array Handle: 0x0016
	Error Information Handle: No Error
	Total Width: 72 bits
	Data Width: 64 bits
	Size: 2048 MB
	Form Factor: DIMM
	Set: 1
	Locator: DIMM3A
	Bank Locator: Bank3
	Type: DDR2
	Type Detail: Synchronous
	Speed: 667 MHz
	Manufacturer: 0000
	Serial Number: 00000000
	Asset Tag: Not Specified
	Part Number:
Handle 0x001C, DMI type 17, 27 bytes
Memory Device
	Array Handle: 0x0016
	Error Information Handle: No Error
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: DIMM
	Set: 1
	Locator: DIMM3B
	Bank Locator: Bank3
	Type: DDR2
	Type Detail: Synchronous
	Speed: 667 MHz
	Manufacturer:
	Serial Number:
	Asset Tag: Not Specified
	Part Number:
Handle 0x001D, DMI type 17, 27 bytes
Memory Device
	Array Handle: 0x0016
	Error Information Handle: No Error
	Total Width: 72 bits
	Data Width: 64 bits
	Size: 2048 MB
	Form Factor: DIMM
	Set: 1
	Locator: DIMM4A
	Bank Locator: Bank4
	Type: DDR2
	Type Detail: Synchronous
	Speed: 667 MHz
	Manufacturer: 0000
	Serial Number: 00000000
	Asset Tag: Not Specified
	Part Number:
Handle 0x001E, DMI type 17, 27 bytes
Memory Device
	Array Handle: 0x0016
	Error Information Handle: No Error
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: DIMM
	Set: 1
	Locator: DIMM4B
	Bank Locator: Bank4
	Type: DDR2
	Type Detail: Synchronous
	Speed: 667 MHz
	Manufacturer:
	Serial Number:
	Asset Tag: Not Specified
	Part Number:

Please note that the above output is taken from RHEL 5.x server running on an enterprise grade hardware. Your Red hat Linux based desktop system may provide slightly different output.

Related media

This tutorial is also available in a quick video format:



Video 01: 5 Linux Commands: To See Amount Of Free and Used Memory

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 6 comments… read them below or add one }

1 anonymous February 6, 2011 at 2:57 am

type “cat /proc/meminfo”

While your at it use a command shell.
Change directory to /proc
cd /proc
then do “ls enter”
All the items in proc can be viewed via, “cat /proc/itemtobeviewed.” Example
as root type cat /proc meminfo
Here is mine:
[~]#cat /proc/meminfo
MemTotal: 3920008 kB
MemFree: 837724 kB
Buffers: 316512 kB
Cached: 1924256 kB
SwapCached: 16 kB
Active: 1416360 kB
Inactive: 1248556 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 3920008 kB
LowFree: 837724 kB
SwapTotal: 97570252 kB
SwapFree: 97570052 kB
Dirty: 120 kB
Writeback: 0 kB
AnonPages: 424064 kB
Mapped: 91552 kB
Slab: 315384 kB
PageTables: 24588 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 99530256 kB
Committed_AS: 1275920 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 312212 kB
VmallocChunk: 34359425991 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB

Reply

2 saaa February 7, 2011 at 2:18 pm

To Above: Why `cd` to /proc if you are going to type a full path. `cat /proc/ITEM`

if you `cd` you can just `cat meminfo`…

Reply

3 papa February 10, 2011 at 7:19 pm

Ctrl+Alt+F2 : To chek the RAM Size

Reply

4 Tommy October 11, 2011 at 11:52 pm

DO NOT EXECUTE “Ctrl+Alt+F2 : To chek the RAM Size” because it will dump you in to another screen and you may not be able to get back from it…and you will lose all unsaved work!

Reply

5 nixCraft October 12, 2011 at 2:17 am

Press CTRL+ALT+F6 or CTRL+ALT+F7 or CTRL+ALT+F8 to get back to your session. However, a better option is to ppen a command-line terminal (select Applications > Accessories > Terminal), and then type the above commands:

free -m

Reply

6 arun August 31, 2012 at 6:28 am

during the installation of linux how to know the RAM size with out physically opening the RAM

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: