LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-12-2011, 09:41 AM   #1
hitmen
Member
 
Registered: Jun 2011
Distribution: Kubuntu 10.04
Posts: 158

Rep: Reputation: Disabled
Memory vs RAM


I use the command free -mt because I want to know the amount of RAM that I have.

However, it only shows me my memory. What is the difference between memory and RAM as I need my RAM.
 
Old 09-12-2011, 09:47 AM   #2
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
Quote:
Originally Posted by hitmen View Post
I use the command free -mt because I want to know the amount of RAM that I have.

However, it only shows me my memory. What is the difference between memory and RAM as I need my RAM.
Its the same.
free -m, shows the memory is MB, you can use -g option also for GB.
Also, you can check /proc/meminfo for more information about your memory.
 
Old 09-12-2011, 09:48 AM   #3
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,718

Rep: Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906
RAM is memory.

The reason why you normally have less 'memory' than RAM is because some RAM can be used for onboard devices (video uses the most, but even networking, sound, etc. will use some RAM) and there is normally some reserved for 'system' use.

To see how much physical RAM is installed, I either check the hardware, or use lshw. BTW, if you use lshw, make sure you run it as su/sudo, it returns less information if run as a normal user.

This is my lshw output (edited to only the 'memory' output)-

Code:
*-memory
          description: System Memory
          physical id: 25
          slot: System board or motherboard
          size: 4GiB
        *-bank:0
             description: DIMM 1800 MHz (0.6 ns)
             physical id: 0
             slot: A0
             size: 2GiB
             width: 64 bits
             clock: 1800MHz (0.6ns)
        *-bank:1
             description: DIMM 1800 MHz (0.6 ns)
             physical id: 1
             slot: A1
             size: 2GiB
             width: 64 bits
             clock: 1800MHz (0.6ns)
        *-bank:2
             description: DIMM 1800 MHz (0.6 ns) [empty]
             physical id: 2
             slot: A2
             width: 64 bits
             clock: 1800MHz (0.6ns)
        *-bank:3
             description: DIMM 1800 MHz (0.6 ns) [empty]
             physical id: 3
             slot: A3
             width: 64 bits
             clock: 1800MHz (0.6ns)
So I have 2 x 2GB sticks for 4GB in total.

Last edited by cascade9; 09-12-2011 at 10:05 AM. Reason: typo
 
Old 09-12-2011, 09:55 AM   #4
hitmen
Member
 
Registered: Jun 2011
Distribution: Kubuntu 10.04
Posts: 158

Original Poster
Rep: Reputation: Disabled
In that case, why is there the term random access memory instead of just memory ?
 
Old 09-12-2011, 10:00 AM   #5
hitmen
Member
 
Registered: Jun 2011
Distribution: Kubuntu 10.04
Posts: 158

Original Poster
Rep: Reputation: Disabled
what the hell is this ?

c@c-laptop:~/bash_folder$ lshw | grep memory
WARNING: you should run this program as super-user.
*-memory
description: System memory
resources: irq:16 memory:58280000-582fffff ioport:60f0(size=8) memory:40000000-4fffffff(prefetchable) memory:58300000-5833ffff
resources: memory:58200000-5827ffff
resources: irq:16 memory:58340000-58343fff
resources: irq:24 ioport:5000(size=4096) memory:57100000-581fffff ioport:50000000(size=16777216)
resources: irq:16 memory:57100000-5710ffff
resources: irq:25 ioport:4000(size=4096) memory:56100000-570fffff ioport:51000000(size=16777216)
resources: irq:26 ioport:2000(size=8192) memory:55000000-560fffff ioport:52000000(size=16777216)
resources: irq:29 memory:55000000-5503ffff ioport:2000(size=128)
resources: irq:27 ioport:1000(size=4096) memory:54000000-54ffffff ioport:53000000(size=16777216)
resources: irq:16 memory:58344400-583447ff
resources: irq:28 ioport:60d8(size=8) ioport:60fc(size=4) ioport:60d0(size=8) ioport:60f8(size=4) ioport:6020(size=16) memory:58344000-583443ff
 
Old 09-12-2011, 10:01 AM   #6
hitmen
Member
 
Registered: Jun 2011
Distribution: Kubuntu 10.04
Posts: 158

Original Poster
Rep: Reputation: Disabled
I got another question.

If I type lshw | grep memory , the lshw will run all over again whenever I reenter the command. How do I prevent the "all over" from occuring again?
 
Old 09-12-2011, 10:05 AM   #7
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,718

Rep: Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906
Quote:
Originally Posted by hitmen View Post
In that case, why is there the term random access memory instead of just memory ?
Because there is also ROM (read only memory).

Quote:
Originally Posted by hitmen View Post
I got another question.

If I type lshw | grep memory , the lshw will run all over again whenever I reenter the command. How do I prevent the "all over" from occuring again?
Just use lshw.

There is some way to remove the rest of the output from lshw and only get the memory section, but I dont know the command offhand.

Its not that hard to just scroll though the info you dont want to get the memory bit.
 
Old 09-12-2011, 10:06 AM   #8
hitmen
Member
 
Registered: Jun 2011
Distribution: Kubuntu 10.04
Posts: 158

Original Poster
Rep: Reputation: Disabled
In that case, how do I know if it is RAM or ROM if I see memory?
 
Old 09-12-2011, 10:24 AM   #9
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,718

Rep: Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906
If its in the lshw output, its RAM.

ROM is used in lots of places, but it shouldnt show up as 'memory' in lshw.

http://en.wikipedia.org/wiki/Read-only_memory
 
Old 09-12-2011, 10:37 AM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,959

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
There can be many different hardware devices that are considered memory i.e. system memory, Hard drive, tape drive, CDROM/DVD etc. Typically when one talks about RAM it means system memory.

In a nutshell devices like the ethernet controller or video adapter use resources i.e IRQ - interrupt request, I/O port addresses and Memory Address. This is how the processor talks to the device.

BTW RAM - Random Access Memory is a type of integrated circuit. There are two main types of RAM dynamic and static. The type used in most PCs is dynamic RAM.

http://duartes.org/gustavo/blog/post...ets-memory-map

Last edited by michaelk; 09-12-2011 at 10:48 AM.
 
Old 09-13-2011, 12:54 AM   #11
hitmen
Member
 
Registered: Jun 2011
Distribution: Kubuntu 10.04
Posts: 158

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hitmen View Post
what the hell is this ?

c@c-laptop:~/bash_folder$ lshw | grep memory
WARNING: you should run this program as super-user.
*-memory
description: System memory
resources: irq:16 memory:58280000-582fffff ioport:60f0(size=8) memory:40000000-4fffffff(prefetchable) memory:58300000-5833ffff
resources: memory:58200000-5827ffff
resources: irq:16 memory:58340000-58343fff
resources: irq:24 ioport:5000(size=4096) memory:57100000-581fffff ioport:50000000(size=16777216)
resources: irq:16 memory:57100000-5710ffff
resources: irq:25 ioport:4000(size=4096) memory:56100000-570fffff ioport:51000000(size=16777216)
resources: irq:26 ioport:2000(size=8192) memory:55000000-560fffff ioport:52000000(size=16777216)
resources: irq:29 memory:55000000-5503ffff ioport:2000(size=128)
resources: irq:27 ioport:1000(size=4096) memory:54000000-54ffffff ioport:53000000(size=16777216)
resources: irq:16 memory:58344400-583447ff
resources: irq:28 ioport:60d8(size=8) ioport:60fc(size=4) ioport:60d0(size=8) ioport:60f8(size=4) ioport:6020(size=16) memory:58344000-583443ff
Errr can anyone explain the garbage I am seeing?
 
Old 09-13-2011, 01:20 AM   #12
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,200

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
you are looking at irqs as well as hexadecimal representations of physical 'memory' addresses that are accessed by hardware drivers when talking to devices.
 
  


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
Ram Memory Dimon-z Slackware 2 06-17-2008 12:06 PM
RAM memory issue rrr-jr Linux - Software 5 01-07-2007 12:46 AM
Memory / Ram issues...please help.. elstupidos Slackware 2 01-17-2005 12:21 AM
RAM Memory Installation kermit Linux - Newbie 1 12-07-2004 09:57 AM
RAM Memory use dtsfanatic Linux - General 1 01-11-2002 10:30 AM


All times are GMT -5. The time now is 03:57 PM.

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