How can a computer/OS tell what kind of RAM is in the machine?

80

20

How can Mac OS X tell what kind of RAM is in the machine? For example I was working on one that had DDR3 RAM @ 1600MHz and I thought it wasn't possible to know the RAM without physically opening the case and looking at it.How can this be done on other systems?

Celeritas

Posted 2013-03-27T18:55:25.523

Reputation: 7 487

6Note: I've removed the comments as they weren't going anywhere. You can use [chat] for discussing. – slhck – 2013-03-28T14:32:43.703

@Celeritas: I've rolled back your latest edit. Asking why a developer/manufacturer chose to add or omit a feature from their product is not constructive. – Karan – 2013-03-29T06:09:06.320

@Karan I was wondering if the Mac hardware or OS is somehow different than the hardware Windows runs on that makes it easier to determine the type of RAM. It seems like a useful feature to be built into the OS so that people know what kind of RAM to get if they want to upgrade. You can edit the question to reflect what I just told you but reword it so it fits better. – Celeritas – 2013-03-29T07:24:37.947

1Since you've already asked whether it's possible to do it on Windows and have received answers telling you how, it's clear there's no fundamental hardware difference that prevents Windows from displaying the info if it wants (SPD data as you've seen below is stored on the RAM module, and is accessible to any OS/app that cares to read it). Beyond this there's no point really in discussing why exactly MS choose not to do so, even if it's useful for end users. – Karan – 2013-03-29T07:54:38.797

i2c bus is a standard that any OS can interface with. The SPD presents itself as a 128-byte, 256-byte or 512-byte EEPROM. The OS just needs to collect these bytes, which obey another standard called JEDEC, from the EEPROM using i2c and then use that data to figure out what kind of memory it is talking about. It's very OS agnostic. – LawrenceC – 2013-04-09T23:29:24.863

Answers

147

RAM sticks have a small chip on them called the Serial Presence Detect, which contains information such as capacity, preferred timings, manufacturer, and even a serial number.

SPD information is accessible by OSes using the i2c bus (which also includes things like temperature sensors). I think you can directly read the SPDs from Linux using various i2c utilities.

This image from the Wikipedia article has a good picture of it: e

LawrenceC

Posted 2013-03-27T18:55:25.523

Reputation: 63 487

2In Linux, dmidecode --type memory lets you see some of the information. Apparently it can output a manufacturer and serial number, but at least on my system those are reported as simply ManufacturerN and SerNumN with N being what appears to be the slot number. – a CVn – 2013-03-27T20:22:36.523

2I thought dmidecode parsed something that the BIOS puts together on boot. The BIOS should read the SPD and report accordingly - buggy BIOSes are nothing new though. – LawrenceC – 2013-03-27T20:30:43.663

I'll admit I don't know exactly where dmidecode gets its information from, but it does let you view at least some of it. – a CVn – 2013-03-27T20:40:36.367

1+1 for the only answer that mentions SPD – Jonathon Reinhart – 2013-03-28T07:17:19.577

In linux lshw can give you a lot of information, including those of RAM. – Shahbaz – 2013-03-28T17:09:04.233

1It seems to me that there used to be a time when RAM sticks didn't have SPD chips... At least I clearly remember reviewing price lists for RAM where items were clearly marked as SPD and non-SPD (it was approximately at a time of introducing DIMM standard) – Mikhail – 2013-03-29T06:04:24.167

1

@Mikhail yes, SIMMs had 4 pins for "presense detect" - these were pulled high or low to provide an identifier indicating size and speed. http://ohlandl.ipv7.net/config/mempresence.html

– ali1234 – 2013-03-31T03:52:44.500

47

On Windows:

wmic memoryChip get /?

Will give you various RAM information you can ask for right from the command prompt.

For example,

wmic memorychip get serialnumber

Gives you the serial number. You can also use Speed, Model sometimes, Manufacturer and more.

WMI is the Windows method of querying SMBIOS data. Apple, Linux, Windows and anyone else who wants to run on most hardware made needs to support SMBIOS at some level, for different reasons.

You can use SMBIOS (e.g. through WMI or WMIC in Windows) to also gather hard drive information, network information (is it a 10/100 or 10/100/1000 card?).

To take it one step further, every manufacturer has a code for MAC addresses on NICs. RAM also has a manufacturers code. So all you have to do to get their code, for example my 2 x2GB in this laptop are 830B, is build a database for the manufacturers (830B might be one brand and then resold too!) and also what models mean what. That is how CPUz works I believe—basic queries and a really complete and current database.

Austin T French

Posted 2013-03-27T18:55:25.523

Reputation: 9 766

3

Note that WMI is able to query DMI/SMBus information but is not the Windows implementation thereof. Additionally, dmidecode which purely queries and decodes DMI information is available as a Windows port too.

– syneticon-dj – 2013-03-28T08:20:10.920

@syneticon-dj I am not sure you added anything here and your point is unclear. WMI is Windows Management Instrumentation, among its capabilties and duties is reading SMBUS. But if your point was all anorks are bnorks but not all bnorks are anorks... then yes, exactly...? – Austin T French – 2013-03-28T11:22:22.550

My point is that your wording is inaccurate to the point where it gets easy to misunderstand. WMI can interface with SMBIOS but it is not in any respect its implementation (which resides on the hardware / BIOS side and not within the OS). – syneticon-dj – 2013-03-28T11:42:14.737

It does say: "WMI is Windows implementation of SMBus standard for reading devices." And it is Windows way of reading / querying and knowing what is inside... But WMI also does a lot more. – Austin T French – 2013-03-28T11:49:34.290

"This is so wrong on so many levels". +1 for mentioning the Windows way of querying the data though. – syneticon-dj – 2013-03-28T12:01:39.670

2@syneticon-dj - make an edit if it's wrong. – Enigma – 2013-03-28T19:03:27.857

Good and nice answer,+1 – SpringLearner – 2014-05-23T03:02:38.237

18

The memory speed and type is negotiated with the bios and can be read by the operating system.

There is a very good website giving you a deeper level of understanding about these things at http://www.computermemoryupgrade.net/index1.html

But you can easily figure out which types and speed you have without opening the cover via:

Apple -> About This Mac -> More Info -> System Report

Open Hardware -> Memory

You should see each stick of RAM including Size, Type and Speed (and for fun, Status to make sure it's ok)

System Report with Memory

jnovack

Posted 2013-03-27T18:55:25.523

Reputation: 1 266

13

On many Linux distributions (e.g. Debian), you can use the lshw hardware lister

sudo lshw |grep DDR
         description: SODIMM DDR3 Synchronous 1067 MHz (0.9 ns)
         description: SODIMM DDR3 Synchronous 1067 MHz (0.9 ns)

I guess that RAM, like all other hardware, reports its description and capabilities to the OS. If Linux can do it, I see no reason why OSX can't.

If your distribution doesn't have lshw installed, you can install it using your package manager, e.g.

aptitude install lshw

or download it from the project website.

terdon

Posted 2013-03-27T18:55:25.523

Reputation: 45 216

FYI, lshw is not available on OS X: – slhck – 2013-03-27T19:51:46.093

@b.long kneejerk reaction because the question is tagged win/osx but not Linux? – Dan is Fiddling by Firelight – 2013-03-27T19:54:09.557

Indeed, sorry about that - I didn't read the entire question (or title apparently). I thought it was asking about any OS – blong – 2013-03-27T19:57:27.210

@slhck My bad, I just did a quick google search for OSX lshw and saw this post on the apple website and I assumed it existed for OSX without actually reading the post in question. (blush). Anyway, my point here was that if Linux can see the RAM type why shouldn't OSX?

– terdon – 2013-03-27T19:58:59.343

9

On Mac OS X run from terminal:

$ system_profiler SPMemoryDataType

Borys Borysenko

Posted 2013-03-27T18:55:25.523

Reputation: 91

4

The RAM stick stores its timing, speed, and type on a little chip on the stick. How does your computer know how fast to run the RAM without corrupting its data? Same chip. Apple simply chooses to display this data as well.

MarcusJ

Posted 2013-03-27T18:55:25.523

Reputation: 1 947

3

It's called SPD -- Serial Presence Detect.

– David Schwartz – 2013-03-27T19:14:49.287

The first sentence doesn't make much sense. – a CVn – 2013-03-27T20:24:06.700

2What about it doesn't make sense? Makes sense to me, and that's the first complaint I've gotten. – MarcusJ – 2013-03-28T05:40:00.177

2

To complement ultrasawblade's answer, on Linux, to decode the SPD data, you can use the decode-dimms perl script from the i2c-tools:

sudo modprobe -a i2c-i801 eeprom
decode-dimms

Or for the HTML fancy formatted one:

decode-dimms -f | w3m -T text/html

(w3m being a text based browser/pager). Or of course:

decode-dimms -f > dimms.html
xdg-open dimms.html

sch

Posted 2013-03-27T18:55:25.523

Reputation: 287

1

Speccy is a Windows software that will tell you many many things about your computer including RAM type/size/total slots/available slots.

Jesse Toxik

Posted 2013-03-27T18:55:25.523

Reputation: 21

2

I used to use CPU-Z to get such info on Windows machines - it gives you very detailed info on CPU, RAM & even more. It's small & neat & being updated regularly.

– Mikhail – 2013-03-29T06:22:11.953