Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to price some new RAM for our in-house VMware testing server. (It's a consumer box we use for testing our software on and running business VMs). I've forgotten what kind of RAM it has and I'd rather not reboot the machine and fire up memtest86+ just to get the specs of the RAM. Is there any way I can know what kind of RAM to buy without shutting down linux and kicking everyone off? E.G. is the information somewhere in /proc?

share|improve this question
up vote 16 down vote accepted

You could try running (as root) dmidecode -t memory. I believe that's what lshw uses (as described in the other Answer), but it provides information in another form, and lshw isn't available on every linux distro. Also, in my case, dmidecode produces the Asset number, useful for plugging into Dell's support web site.

share|improve this answer
Are you sure it's not available everywhere? Which have you found lacking? – Tshepang Feb 3 '11 at 18:24
RHEL5, what I run on all our servers and workstations. It might be in some 3rd party repo but I don't really need it if I have dmidecode. – jsbillings Feb 3 '11 at 18:33
I think dmidecode is the way to go. Also see this answer for a little more info. – belacqua Feb 4 '11 at 6:07
dmidecode has served me well multiple times for memory querying – BozoJoe Feb 4 '11 at 7:49
This worked great, thanks! – Josh Feb 4 '11 at 12:49

Here's what lshw -c memory (as root) gives me:

       description: BIOS
       vendor: Acer
       physical id: 0
       version: V1.41 (01/07/08)
       size: 113KiB
       capacity: 960KiB
       capabilities: isa pci pcmcia pnp upgrade shadowing escd cdboot acpi usb agp biosbootspecification
       description: L1 cache
       physical id: 5
       slot: L1 Cache
       size: 64KiB
       capacity: 64KiB
       capabilities: asynchronous internal write-back
       description: L2 cache
       physical id: 6
       slot: L2 Cache
       size: 4MiB
       capacity: 4MiB
       capabilities: burst internal write-back
       description: System Memory
       physical id: 16
       slot: System board or motherboard
       size: 4GiB
          description: SODIMM DDR2 Synchronous 667 MHz (1.5 ns)
          product: SODIMM000
          vendor: Mfg 0
          physical id: 0
          serial: 1234-B0
          slot: M1
          size: 2GiB
          width: 64 bits
          clock: 667MHz (1.5ns)
          description: SODIMM DDR2 Synchronous 667 MHz (1.5 ns)
          product: SODIMM001
          vendor: Mfg 1
          physical id: 1
          serial: 1234-B1
          slot: M2
          size: 2GiB
          width: 64 bits
          clock: 667MHz (1.5ns)

What you are looking for is "System Memory".

share|improve this answer
This was extremely handy to know, thanks! Both of your answers worked, and since I could only accept one I accepted jsbillings' and upvoted yours. – Josh Feb 4 '11 at 12:52
@josh If what the guy says is true, that lshw isn't available everywhere, then surely his answer is superior. – Tshepang Feb 4 '11 at 13:47
That's what I was thinking, but it's difficult when both answers were correct AFAICT! Also, he has less rep, so he could use the extra +5 more, that's how I see it anyway... :-) – Josh Feb 4 '11 at 14:01
Do dmidecode and lshw work with embedded ARM devices? – abc May 17 '12 at 19:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.