• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 368
  • Last Modified:

how to find RAM in linux

Hi All,

I need your help in understanding the o/p of free command in GNU LINUX.
I  see:

$ free
             total       used       free     shared    buffers     cached
Mem:     264136128   82048904  182087224          0    2876996   69028660
-/+ buffers/cache:   10143248  253992880
Swap:     20482864          0   20482864


Does this mean my box has 264,136,128 ~ 264GB RAM?

Please answer.
0
jayatallen
Asked:
jayatallen
  • 6
  • 3
  • 3
  • +1
2 Solutions
 
wesly_chenCommented:
264,136,128 ~ 264MB RAM?
Type
free -m
(as MB)
0
 
wesly_chenCommented:
Actually,
264136128/1024/1024 =~ 252MB
0
 
veedarCommented:
In case you were not aware to see all your memory info run the command:  cat /proc/meminfo
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jayatallenAuthor Commented:
Hi chen,

# free -m
             total       used       free     shared    buffers     cached
Mem:        257945      80818     177127          0       2809      68113
-/+ buffers/cache:       9895     248049
Swap:        20002          0      20002

Hi Veedar:
cat /proc/meminfo

MemTotal:     264136128 kB
MemFree:      181383608 kB
Buffers:       2877160 kB
Cached:       69747824 kB
SwapCached:          0 kB
Active:       55930696 kB
Inactive:     23521664 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:     264136128 kB
LowFree:      181383608 kB
SwapTotal:    20482864 kB
SwapFree:     20482864 kB
Dirty:            1376 kB
Writeback:           0 kB
AnonPages:     6828632 kB
Mapped:        4693260 kB
Slab:          3090324 kB
PageTables:     100020 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:  152550928 kB
Committed_AS: 27332892 kB
VmallocTotal: 34359738367 kB
VmallocUsed:     12700 kB
VmallocChunk: 34359725643 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
Hugepagesize:     2048 kB



i also googled for conversion from kb to gb and found its 251GB.
http://www.unitconversion.org/data-storage/kilobytes-to-gigabytes-conversion.html

Actually i never heard of 250 GB RAM.thats why i am confused.

thank you
0
 
wesly_chenCommented:
It indeed is 257945 (MB) =~ 251GB
It could be 8GB x 30 + 11GB or virtual machine and the server assign 251GB for this VM.

Could provide the output of the following command?
(as root)
# dmesg |grep -i mem
# uname -a
# dmidecode
0
 
jayatallenAuthor Commented:
Thank you for reply Chen.
I dont have access to this machine as root. I ran your given command:
ibanker@devash-ibcmmu01# dmesg |grep -i mem
Bootmem setup node 0 0000000000000000-0000001080000000
Bootmem setup node 1 0000001080000000-0000002080000000
Bootmem setup node 2 0000002080000000-0000003080000000
Bootmem setup node 3 0000003080000000-000000407ffff000
Your BIOS doesn't leave a aperture memory hole
Memory: 264132436k/270532604k available (2573k kernel code, 4299808k reserved, 1305k data, 212k init)
Freeing initrd memory: 3477k freed
  MEM window: cb400000-cb5fffff
  MEM window: disabled.
  MEM window: cb700000-cbbfffff
  MEM window: cb600000-cb6fffff
  MEM window: da000000-ddffffff
  MEM window: d6000000-d9ffffff
  MEM window: d2000000-d5ffffff
  MEM window: d1f00000-d1ffffff
  MEM window: cc000000-cfffffff
  MEM window: disabled.
Total HugeTLB memory allocated, 0
Non-volatile memory driver v1.2
Freeing unused kernel memory: 212k freed
ehci_hcd 0000:00:02.1: irq 233, io mem 0xcb3d0000
ohci_hcd 0000:00:02.0: irq 50, io mem 0xcb3e0000
eth0: Broadcom NetXtreme II BCM5706 1000Base-T (A2) PCI-X 64-bit 100MHz found at mem ce000000, IRQ 130, node addr 18a90557b5ac
eth1: Broadcom NetXtreme II BCM5706 1000Base-T (A2) PCI-X 64-bit 100MHz found at mem cc000000, IRQ 138, node addr 18a90557b5ae
eth2: Broadcom NetXtreme II BCM5709 1000Base-T (C0) PCI Express found at mem d4000000, IRQ 122, node addr 1cc1de0906bc
eth3: Broadcom NetXtreme II BCM5709 1000Base-T (C0) PCI Express found at mem d2000000, IRQ 146, node addr 1cc1de0906be
eth4: Broadcom NetXtreme II BCM5709 1000Base-T (C0) PCI Express found at mem d8000000, IRQ 146, node addr 1cc1de095698
eth5: Broadcom NetXtreme II BCM5709 1000Base-T (C0) PCI Express found at mem d6000000, IRQ 154, node addr 1cc1de09569a
eth6: Broadcom NetXtreme II BCM5709 1000Base-T (C0) PCI Express found at mem dc000000, IRQ 154, node addr 1cc1de09c660
eth7: Broadcom NetXtreme II BCM5709 1000Base-T (C0) PCI Express found at mem da000000, IRQ 114, node addr 1cc1de09c662
ipmi_si: Trying PCI-specified kcs state machine at mem address 0xcb4f0000, slave address 0x0, irq 162
ibanker@devash-ibcmmu01# dmidecode
bash: dmidecode: command not found
ibanker@devash-ibcmmu01# uname -a
Linux devash-ibcmmu01 2.6.18-194.3.1.el5 #1 SMP Sun May 2 04:17:42 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux


thank you
0
 
wesly_chenCommented:
> Memory: 264132436k/270532604k available (2573k kernel code, 4299808k reserved, 1305k data, 212k init)
From dmesg (boot up message) did show your system have 251GB memory.
What type of memory need to read from hardware.

Please install dmidecode
(as root)
# yum install dmidecode
or
$ sudo yum install dmidecode
(if you have sudo privilege, then type your password)
0
 
wesly_chenCommented:
There are a couple of server can have max 256GB memory nowadays.
If you have "dmidecode", then you can easy to get mmeory type and memory device information.
For example

# dmidecode -t 16
Physical Memory Array
        Location: System Board Or Motherboard
        Use: System Memory
        Error Correction Type: Single-bit ECC
        Maximum Capacity: 4 GB      <===== Each DIMM is 4GB
        Error Information Handle: Not Provided
        Number Of Devices: 2            <===== 2 DIMM

# dmidecode -t 17
Handle 0x0023, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x0022
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: 4006 MB
        Form Factor: DIMM
        Set: None
        Locator: J8J1
        Bank Locator: CHAN A DIMM 1
        Type: DDR2
        Type Detail: Synchronous
        Speed: 533 MHz (1.9 ns)
        Manufacturer: 0x7F98000000000000
        Serial Number: 0x813625B6
        Asset Tag: Unknown
        Part Number: 0x393930353332312D3030312E4130334C4600

Memory Device
        Array Handle: 0x0022
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: 4096 MB
        Form Factor: DIMM
        Set: None
        Locator: J9J1
        Bank Locator: CHAN B DIMM 1
        Type: DDR2
        Type Detail: Synchronous
        Speed: 533 MHz (1.9 ns)
        Manufacturer: 0x7F98000000000000
        Serial Number: 0x82363EB6
        Asset Tag: Unknown
        Part Number: 0x393930353332312D3030312E4130334C4600

0
 
veedarCommented:
Here's another one that will show your memory:   lshw -c memory
0
 
wesly_chenCommented:
lshw is good command.
Unfortunately, RedHat doesn't have this package (Ubuntu has it).
0
 
MultipathCommented:
If you type the following you will see the amount in the system.

cat /proc/meminfo

To get processor use the following.

cat /proc/cpuinfo
0
 
MultipathCommented:
Here is my output on a machine with 4 gigs

colo:~# cat /proc/meminfo
MemTotal:      3962704 kB
MemFree:         31128 kB
Buffers:         10468 kB
Cached:        3320720 kB
SwapCached:          0 kB
Active:        1280104 kB
Inactive:      2441480 kB
SwapTotal:     3903672 kB
SwapFree:      3902792 kB
Dirty:           28956 kB
Writeback:           0 kB
AnonPages:      390580 kB
Mapped:         120700 kB
Slab:            82564 kB
SReclaimable:    71168 kB
SUnreclaim:      11396 kB
PageTables:       8420 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
WritebackTmp:        0 kB
CommitLimit:   5885024 kB
Committed_AS:   780656 kB
VmallocTotal: 34359738367 kB
VmallocUsed:    283412 kB
VmallocChunk: 34359453827 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
HugePages_Surp:      0
Hugepagesize:     2048 kB
colo:~#
0
 
veedarCommented:
If you want lshw is easy enough to install on a RedHat box:   yum install lshw
0
 
jayatallenAuthor Commented:
Thank you guys for your help and commands...atleast now i know server can have 256 GB RAM :)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now