LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-13-2008, 06:33 PM   #1
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 482

Rep: Reputation: 31
Question Getting report of total memory installed


I have a little script which registers all my dynamic IP's along with some stats of each install.

The memory is annoying me.

Code:
export TotalMem=`free -b | grep Mem | awk {'print $2'}`
if [ "$TotalMem" == "" ] ; then
  export TotalMem=`cat /proc/meminfo | grep MemTotal | awk {'print $2'}`
fi
These commands report total memory linux sees. Not how much is installed. So I have three computers with 1G of ram. However they report anywhere between 1009.12 MBytes to 1012.60 MBytes

Is there anywhere to get a break down of the missing 12-15MB? Or get total memory installed?

Don't really care where it goes (bios, video, etc) just to get and nice consistent reporting system.

I'm also looking for something that would work on most to all distributions, even other unix based systems if possible (for vmware installed machines).
 
Old 05-14-2008, 11:19 AM   #2
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
I read somewhere but can not find it now that the memory is different between all brands and will not read at what it is rated. In other words if you replace the memory with the same rated amount it will read different than what you have now.
 
Old 05-14-2008, 11:54 AM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,247
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
To see the physical makeup of your system you can use lshw or dmidecode


Code:
it-etch:/etc# lshw -C memory
  *-firmware
       description: BIOS
       vendor: Dell Inc.
       physical id: 0
       version: 1.1.2 (12/04/2006)
       size: 64KB
       capacity: 448KB
       capabilities: pci pnp apm upgrade shadowing cdboot bootselect edd int13floppytoshiba int5printscreen int9keyboard int14serial int17printer acpi usb ls120boot biosbootspecification netboot
  *-cache:0
       description: L1 cache
       physical id: 700
       size: 16KB
       capacity: 16KB
       capabilities: internal write-back data
  *-cache:1
       description: L2 cache
       physical id: 701
       size: 2MB
       capacity: 2MB
       capabilities: internal varies unified
  *-memory
       description: System Memory
       physical id: 1000
       slot: System board or motherboard
       size: 1GB
       capacity: 2GB
     *-bank:0
          description: DIMM DDR Synchronous 533 MHz (1.9 ns)
          product: KHU006-QIA
          vendor: 7F98000000000000
          physical id: 0
          serial: A036F583
          slot: DIMM_1
          size: 1GB
          width: 64 bits
          clock: 533MHz (1.9ns)
     *-bank:1
          description: DIMM DDR Synchronous 533 MHz (1.9 ns) [empty]
          vendor: FFFFFFFFFFFFFFFF
          physical id: 1
          serial: FFFFFFFF
          slot: DIMM_3
          width: 64 bits
          clock: 533MHz (1.9ns)
it-etch:/etc#


Code:
it-etch:/etc# dmidecode -t memory
# dmidecode 2.8
SMBIOS 2.3 present.

Handle 0x1000, DMI type 16, 15 bytes
Physical Memory Array
        Location: System Board Or Motherboard
        Use: System Memory
        Error Correction Type: Single-bit ECC
        Maximum Capacity: 2 GB
        Error Information Handle: Not Provided
        Number Of Devices: 2

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: 7F98000000000000
        Serial Number: A036F583
        Asset Tag: 040703
        Part Number: KHU006-QIA

Handle 0x1101, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: 64 bits
        Data Width: 64 bits
        Size: No Module Installed
        Form Factor: DIMM
        Set: None
        Locator: DIMM_3
        Bank Locator: Not Specified
        Type: DDR
        Type Detail: Synchronous
        Speed: 533 MHz (1.9 ns)
        Manufacturer: FFFFFFFFFFFFFFFF
        Serial Number: FFFFFFFF
        Asset Tag: FFFFFF
        Part Number:
If the PC is sharing System memory for Video or other tasks I don't know how to show that.. I don't have any systems that even do that to my knowledge.. that is more common with systems that have integrated video.

Last edited by farslayer; 05-14-2008 at 11:57 AM.
 
Old 05-19-2008, 12:30 PM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Both of those look like they provide actual installed physical RAM.

My additional Q is: How can I find out how much of my RAM has been appropriated by my on-board video chip?

BTW, I ran:
Code:
for X in memory mem video bios; 
do echo -e "\n$X"; 
man -k $X  | grep [138]\); 
done  | less -S
& other than lspnp, which isn't available from my repos, I don't see anything that will provide this info.
 
Old 05-19-2008, 12:43 PM   #5
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
archtoad6 do not quote me on this but I am not sure on the intergrated video if there is a way, I believe that on an intel board the other day in bios I saw a setting on the video that said 'Auto (128 meg max)'. To me that sounds like there is no commitment, just a supply on demand.

Last edited by Larry Webb; 05-19-2008 at 12:44 PM.
 
Old 05-27-2008, 08:33 AM   #6
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
W/o rebooting I can't say for sure, but I think several of my mobo's w/ on-board video do not have a BIOS setting for how much RAM they appropriate from the CPU. Besides, I'd like as way to check this w/o having to reboot.
 
Old 05-27-2008, 01:17 PM   #7
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194
Look at my answer to a similar question in
http://www.linuxquestions.org/questi...11#post3150011
That may give you the info you need.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
most, er, universal way to get system memory total and usage lumix Linux - Newbie 1 06-03-2007 10:30 AM
Total system physical memory information in linux bhavishya_goel Linux - Kernel 2 08-15-2006 02:22 PM
getting total memory used gecoool Programming 8 10-20-2005 03:23 AM
shared Memory versus the total amount of RAM on the server ashley75 Linux - General 1 08-25-2003 12:21 PM
Limiting the total amount of memory usage by apache. SplashHost.com Linux - General 8 08-30-2002 10:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration