Operating System - Linux
1748244 Members
3856 Online
108760 Solutions
New Discussion юеВ

Re: How to account for memory in Redhat Linux

 
Basheer_2
Trusted Contributor

How to account for memory in Redhat Linux

Hello,

RH ES ver 3.5,

#free -m
total used free shared buffers cached
Mem: 6015 5984 30 0 270 3032
-/+ buffers/cache: 2681 3333
Swap: 4094 2439 1655

from this,
Total RAM = 6GB, used = 5.9GB,Free = 30MB

Memroy used by all processess
ps -aux|gawk '{print $4}'|awk '{print s+=$1}'

total %MEM = 51.3

from free -m it says only 30MB free, ps - aux shows, only 51.3 % is used, so

Where is the restof the memory ?

Thanks

ps -aux|gawk '{print $4}'|awk '{print s+=$1}'
3 REPLIES 3
Stuart Browne
Honored Contributor

Re: How to account for memory in Redhat Linux

Buffers and Cache.

Speeds up all your Disk IO.
One long-haired git at your service...
Srimalik
Valued Contributor

Re: How to account for memory in Redhat Linux

Linux dynamically manages the buffer cache.

It stores a lot of data read from the hard disk in RAM.

So total memory consumption = memory taken by process + memory given to caches

The amount of mem given to cache is dynamic i.e when you start a new process the buffer cache will be shrinked and new process will be given that memory.

This all is done to increase the speed of system.
abandon all hope, ye who enter here..
Srimalik
Valued Contributor

Re: How to account for memory in Redhat Linux

a similar thread
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1133779
abandon all hope, ye who enter here..