LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   RAM Output (https://www.linuxquestions.org/questions/linux-general-1/ram-output-4175444599/)

Ztcoracat 01-07-2013 10:11 PM

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;)

unSpawn 01-08-2013 12:59 AM

Quote:

Originally Posted by Ztcoracat (Post 4865114)
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).

Ztcoracat 01-08-2013 10:55 PM

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 ?

suicidaleggroll 01-08-2013 11:18 PM

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.

Ztcoracat 01-09-2013 12:22 AM

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?

suicidaleggroll 01-09-2013 08:27 AM

Just roundoff error most likely

unSpawn 01-09-2013 08:49 AM

Quote:

Originally Posted by Ztcoracat (Post 4865872)
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.

Ztcoracat 01-09-2013 07:17 PM

Got it; (kb) I understand now-:hattip:

Thank you both!


All times are GMT -5. The time now is 12:51 AM.