/proc? If making the tool requires you to put a huge database of all the motherboards in existence and their RAM types on a website somewhere, I can understand why it doesn't exist...
On I wrote Memory scanner for Linux, on the subject of Rants and Linux.
Unfortunately it really is that hard. I suspect that Crucial would be willing to work with someone who wanted to produce a Linux version of their Windows code though (so long as it ended up redirecting you to Crucial's website :)).
On my Ubuntu system there is a command line utility called lshw that is installed by default and reports information about hardware. Included in its output is much information about memory (current capacity, maximum capacity, number of used/unused memory banks, etc). If I were you, I'd take a look at its source code to see how it obtains this information. Good luck with it.
Jonathon: that would be a great idea, except mine says this:
*-memory
description: System memory
physical id: 0
size: 894MB
and that's it for memory. So...perhaps the information's not available on all machines :(
Either:
1. Buy brand hardware, crucial and kingston can get you the right memory without a problem
2. Check the output of dmidecode, it looks something like:
Handle 0x1100, DMI type 17, 27 bytes.
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 1024 MB
Form Factor: DIMM
Set: None
Locator: DIMM_1
Bank Locator: Not Specified
Type: DDR
Type Detail: Synchronous
Speed: 533 MHz (1.9 ns)
Manufacturer: 2CFFFFFFFFFFFFFF
Serial Number: 7540A144
Asset Tag: Not Specified
Part Number: 16HTF12864AY-53EB1
Voila!
There is a tool it is free and available and precompiled for use on "the ultimate boot cd" also on the Linux "Gentoo based System Rescue CD" the tool is called "aida" and I think maybe available on Knoppix also.
This basically tells you pretty much everything that the bios can tell you about the stuff on and plugged into your mother board. As a side note it doesn't always get the sound card name correct but I think that is about the only thing it gets wrong.
Ahaha, dmidecode. Nice. I shall take a glance at that.
I'm so glad I'm not the only one who has this problem. It has always confused me. Let me know when you finish writing the program ;)
Grr! The Crucial website doesn't work properly in the Firefox I have here when you try and buy stuff.
Ah, hm. It now says "Crucial.com is undergoing scheduled system maintenance. The website is currently down for scheduled maintenance. Please check back soon."
So it may not be Firefox :)
Thanks to Jonathon for posting that info about the 'lshw' command! I did not know of its existance and it now solved my issues. THANKS!
great, with ubuntu
sudo lshw
or
sudo dmidecode
are perfect, thank you guys :-)
Thanks for the info! For what it's worth, dmidecode works great with Redhat Enterprise Linux 3 (RHEL3), too.
Thanks for the dmidecode info. I was trying to figure out how many RAM banks i had in a co-located rack server that i absolutely could not shut down.
Thanks Bastien Nocera - dmidecode was exactly what I needed :)
Works great on CENTOS 4.3
Just what I was looking for....
Worked on CentOS, Ubuntu, and Mandrake
[...] I'm pondering adding more RAM to my workstation. 128Mb is enough for most of my work, but OpenOffice swaps a lot. I couldn't remember what RAM is currently in it (one stick or two?) so I was very happy to find dmidecode in the comments on as days pass by, by Stuart Langridge: Memory scanner for Linux. dmidecode says I have a free slot and another 512Mb stick is surprisingly cheap. Actually, whole Ubuntu-ready-to-use computers are surprisingly cheap, according to lkcl. I hope they don't contain toxic e-waste. I must be getting old. [Antti-Juhani Kaijanaho] [...]
[...] Thanks to MJ Ray and Stuart Langridge, hopefully this will save me getting the screwdriver out in future! [...]
Thanks a lot! dmidecode is just perfect on CentOS 5 on my laptop! I upgraded my Dell Inspiron 500m from 512 to 1024 Mb, but there's errors on one of the blocks, so now I again run on 512. :-(
Well, what I was actually searching for was a tool that could scan the RAM-block - and possible map out bad-blocks like on harddisks - if there's any such thing possible.
But then I instead - at last - got another problem solved instead - with dmidecode: What is the max amount of RAM, my laptop can handle? Some say 1GB, some 2GB - even Dell's own homepage conflicts on this issue (and with the manual)! Thanks again! Just added "dmidecode" to my "Special Linux Commands" doc. :-)
lshw and dmidecode to odd things on older boards, like list a 32MB pc100 as:
Installed Size: 16 MB (Double-bank Connection)
and also list it 2 times, and a 128MB as:
Installed Size: 64 MB (Double-bank Connection)
but does not list it 2 times.
and Jon, as for remapping like HDD's, no such thing, but memtest86 can help you verify that the ram is indeed the issue. Supposedly DDR3 will support something similar to this, as does ECC ram.
Works for opensuse 10.3 . Using "dmidecode --type memory" limits the output. Not entirely sure it tells me exactly what I should order however...
You guys rule. That `sudo dmidecode' command in my Ubuntu Linux box did the trick.. I now know much more about my hardware than I ever cared or wanted to. Good stuff. :)
How do you get to the command line to type "sudo dmidecode" or sudo lshw? I'm new to Ubuntu.
Bill: in the Applications menu, go to Accessories, then Terminal.
"Crucial.com is undergoing scheduled system maintenance"? Clear your cookies. Oops, now it's not. Apparently if you visit crucial too many times they send you away. Or, their maintenance cookie is very flawed.
Found this out after using Google Chrome's incognito mode and noticing that crucial.com now loaded, whereas it wouldn't in normal browsing mode. Cleared my cookies, and it now works! Have done this twice now with success.
Wow, that's exactly what I was going to suggest, as I read the first 2 paragraphs :-)
I recently needed to get more ram for a server at home so I did the requisite "open up case, find motherboard model no" stuff, went to the taiwanese site (asus) and got the manual, found the type of ram, then went to crucial.com to find out they had a nice scanner for it already! I was on linux though, but it was a good find, nonetheless.