LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-07-2013, 11:11 PM   #1
Ztcoracat
Senior Member
 
Registered: Dec 2011
Distribution: Slackware, CentOS & Android
Posts: 3,270
Blog Entries: 1

Rep: Reputation: Disabled
RAM Output


Hi:

I haven't been trained to read the output to the memory cmd.
Nor other cmds as well.

For now I am trying to calculate how much RAM I'm using and how much is free.
I wouldn't want to run the risk of installing VMware not have enought room for Puppy Linux and crash Fedora.

I see in this output that:
Code:
6083800 is being used and 1048012 is free and 5035788 is shared
I understand how the terminal calculated the amount of free RAM.
What I'm having an issue with is not knowing if the calculation is in kb's, mb's or gb's- Kilo bytes?

Code:
RAM OUTPUT
[redhat ~]$ free 
             total       used       free     shared    buffers     cached
Mem:       6083800    1048012    5035788          0      55532     337732
-/+ buffers/cache:     654748    5429052
Swap:      4194300          0    4194300
[redhat ~]$ free -m -t
             total       used       free     shared    buffers     cached
Mem:          5941       1023       4917          0         54        329
-/+ buffers/cache:        639       5301
Swap:         4095          0       4095
Total:       10037       1023       9013
[redhat ~]$ cat /proc/meminfo
MemTotal:        6083800 kB
MemFree:         5036020 kB
Buffers:           55532 kB
Cached:           337732 kB
SwapCached:            0 kB
Active:           525952 kB
Inactive:         314616 kB
Active(anon):     448240 kB
Inactive(anon):     5312 kB
Active(file):      77712 kB
Inactive(file):   309304 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       4194300 kB
SwapFree:        4194300 kB
Dirty:               184 kB
Writeback:             0 kB
AnonPages:        447296 kB
Mapped:            84568 kB
Shmem:              6264 kB
Slab:              95232 kB
SReclaimable:      54964 kB
SUnreclaim:        40268 kB
KernelStack:        2576 kB
PageTables:        23020 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     7236200 kB
Committed_AS:    1400576 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      308080 kB
VmallocChunk:   34359426540 kB
HardwareCorrupted:     0 kB
AnonHugePages:     94208 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       75776 kB
DirectMap2M:     6191104 kB
[redhat ~]$ grep 'MemTotal:' /proc/meminfo
I found these article's but they weren't so helpful-
http://linuxdevcenter.com/pub/a/linux/lpt/13_01.html
http://www.aboutlinux.info/2006/01/i...simple-in.html
http://www.unix.com/unix-advanced-ex...tput-file.html

Is there documentation for learning "How To"read terminal results/output?

Thanks in advance

Last edited by Ztcoracat; 01-08-2013 at 11:33 PM.
 
Old 01-08-2013, 01:59 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,561
Blog Entries: 54

Rep: Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927
Quote:
Originally Posted by Ztcoracat View Post
What I'm having an issue with is not knowing if the calculation is in kb's, mb's or gb's- Kilo bytes?
Since the total free memory value from 'free' output looks convincingly similar to the MemTotal value from /proc/meminfo it would be odd if it wasn't in kB too ;-p 'man free' actually tells you that also, so that answers your "is there documentation" question as well (also see whatis, whereis, which, apropos, locate, man, info, /usr/share/doc).
 
1 members found this post helpful.
Old 01-08-2013, 11:55 PM   #3
Ztcoracat
Senior Member
 
Registered: Dec 2011
Distribution: Slackware, CentOS & Android
Posts: 3,270
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
Thanks UnSpawn

I followed the path you indicated; /usr/share/doc and I have approx. 115 files to go thru.

I specifically looked for a file that could be related to RAM, Memory or something to the nature.
The result of what I searched for in my file system was not found. I don't understand-

Are there files that are actually logs or system calls that I could learn from as to what I am looking at?

For example; this output is foreign to me:
-Shem
-Slab and -
-Kernel Stack ?
 
Old 01-09-2013, 12:18 AM   #4
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 3,144

Rep: Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108
Run "free -m" and look at the number under "free" in the row "-/+ buffers/cache". That's your current available memory in MB. In your example output:
Code:
[redhat ~]$ free -m -t
             total       used       free     shared    buffers     cached
Mem:          5941       1023       4917          0         54        329
-/+ buffers/cache:        639       5301
Swap:         4095          0       4095
Total:       10037       1023       9013
You have 5301 MB available RAM out of your 5941 MB total.

Last edited by suicidaleggroll; 01-09-2013 at 12:19 AM.
 
1 members found this post helpful.
Old 01-09-2013, 01:22 AM   #5
Ztcoracat
Senior Member
 
Registered: Dec 2011
Distribution: Slackware, CentOS & Android
Posts: 3,270
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
suicidaleggroll:

Thanks for showing me specifically-


Code:
redhat ~]$ free -m
             total       used       free     shared    buffers     cached
Mem:          5941        917       5023          0         34        313
-/+ buffers/cache:        569       5371
Swap:         4095          0       4095
So, here I have 5941 total and 5371 free-
A difference of 570 yet the output indicates 569 used. Difference of 1 but why?
 
Old 01-09-2013, 09:27 AM   #6
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 3,144

Rep: Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108
Just roundoff error most likely
 
Old 01-09-2013, 09:49 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,561
Blog Entries: 54

Rep: Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927
Quote:
Originally Posted by Ztcoracat View Post
I followed the path you indicated; /usr/share/doc and I have approx. 115 files to go thru.
It was a generic remark wrt how and where to find documentation. Like I already said 'man free' tells you the output default is in kB.
 
Old 01-09-2013, 08:17 PM   #8
Ztcoracat
Senior Member
 
Registered: Dec 2011
Distribution: Slackware, CentOS & Android
Posts: 3,270
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
Got it; (kb) I understand now-

Thank you both!
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding out what RAM chip needed to upgrade from 2GB to 4GB RAM. farmerluk Linux - Hardware 4 11-17-2011 01:02 PM
Why size of swap space is 2x of RAM??? Why not 1.5x of RAM or 2.5x of RAM??? Saurav Ghosh Linux - Newbie 7 11-01-2011 04:49 AM
/proc/meminfo output if you have exactly 4GB of RAM elpy Linux - Hardware 10 07-31-2007 08:55 PM
System Command To Output CPU Type and RAM stranger_6_7 Linux - General 5 02-07-2007 04:08 AM
Win98SE Pentium166MMX/64MB RAM vs Linux AthlonXP+ 3000/512MB RAM : Lucent LT WinModem t3gah Linux - Software 2 04-22-2005 02:01 PM


All times are GMT -5. The time now is 11:29 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration