Monday, April 23, 2012

HowTo: Check Ram Size From Redhat Linux Desktop System

How do I check the ram size from my Redhat Linux desktop system using command line and GUI tools?

You can use any one of the following command line tools to view the ram size under Redhat Enterprise Linux desktop system. 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:
(Note: Above output is taken from RHEL 5 server running on an enterprise grade hardware. Your Redhat Linux based desktop system may provide slightly different output).

No comments:

Post a Comment