Tuesday 30 October 2012

Finding RAM Size in Linux

Problem: Finding RAM size in Red Hat Linux
Solution: 
Top command gives you the RAM size
 
[root@dragon~]# top
top - 00:03:46 up 15:52,  1 user,  load average: 0.00, 0.00, 0.00
Tasks:  96 total,   2 running,  94 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.3%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4044540k total,   688452k used,  3356088k free,   137140k buffers
Swap:  2064376k total,        0k used,  2064376k free,   380340k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 8289 root      15   0 12740 1068  808 R  0.3  0.0   0:00.03 top
    1 root      15   0 10348  684  572 S  0.0  0.0   0:00.97 init

Check in the meminfo file.
[root@dragon~]#  cat /proc/meminfo
MemTotal:      4044540 kB
MemFree:       3356088 kB
Buffers:        137140 kB
Cached:         380348 kB
SwapCached:          0 kB
Active:         308108 kB
Inactive:       312956 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:      4044540 kB
LowFree:       3356088 kB
SwapTotal:     2064376 kB
SwapFree:      2064376 kB
Dirty:              28 kB
Writeback:           0 kB

 

No comments:

Post a Comment