Free RAM Slots? (Dmidecode lies!)


Results 1 to 3 of 3

Thread: Free RAM Slots? (Dmidecode lies!)

  1. #1
    Join Date
    Aug 2006
    Location
    München
    Posts
    9

    Free RAM Slots? (Dmidecode lies!)

    Hello All,

    I am currently trying to script a distribution independent way of determining the number of used and free RAM slots in server/desktop systems. I have been using dmidecode as this appears to be in most distributions that I have come across, however I noticed a problem recently. When I swapped out two 2GB modules of RAM for four x 1GB RAM modules I tested that all modules were being recognised using dmidecode. The problem is that dmidecode still showed 4 x 2GB of ram instead of 2 x 2GB and 4 x 1GB. This of course means I need to find an alternative way of getting the RAM slot usage from linux machines - that doesn't suffer from this problem.

    I'm hoping there is something I have missed about dmidecode or that there is a better option such as probing /proc or /sys but any suggestions are welcome. Please note that I would ideally like this to be distribution independent so things such as hwinfo (from SuSE) are not as desirable.

    Cheers,

  2. #2
    Join Date
    Jul 2002
    Location
    Vladivostok, Russia
    Posts
    9,053
    From the homepage....
    Beware that DMI data have proven to be too unreliable to be blindly trusted. Dmidecode does not scan your hardware, it only reports what the BIOS told it to.
    http://www.nongnu.org/dmidecode/
    "I was pulled over for speeding today. The officer said, "Don't you know
    the speed limit is 55 miles an hour?" And I said, "Yes, but I wasn't going
    to be out that long."

    How To Ask Questions The Smart Way
    COME VISIT ME IN RUSSIA NOW!!

  3. #3
    Join Date
    Sep 2002
    Location
    Harlow, UK
    Posts
    1,788
    lshw will do it for you. See Linux Format

    [EDIT]
    Remember Google is your friend
    Last edited by deathadder; 01-14-2009 at 07:16 AM.
    If you have to ask why you want to install Linux, then perhaps you shouldn't.
    -- Michael D. Watts (Gone but never forgotten)

    Linux is not Windows | Posting Guidelines

    Code Monkey (YouTube)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •