Difference between system monitor and /proc/meminfo

I'm monitoring memory usage in a CentOS 5.2 instance and I'm noticing a big difference between the utilization reported by the system monitor gui and /proc/meminfo from the command line.

Here's the system monitor which shows 1.4 GB free:

 screen shot
Here's the contents of /proc/meminfo which shows 378 MB free:

 
[ollie@testdataload ~]$ cat /proc/meminfo
MemTotal:      4044272 kB
MemFree:        378764 kB
Buffers:         10124 kB
Cached:         999056 kB
SwapCached:          4 kB
Active:        3448596 kB
Inactive:        43812 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:      4044272 kB
LowFree:        378764 kB
SwapTotal:     2064376 kB
SwapFree:      2064224 kB
Dirty:           24256 kB
Writeback:          20 kB
AnonPages:     2483224 kB
Mapped:          94308 kB
Slab:            94700 kB
PageTables:      34528 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:   4086512 kB
Committed_AS:  3647660 kB
VmallocTotal: 34359738367 kB
VmallocUsed:    271788 kB
VmallocChunk: 34359465687 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
Hugepagesize:     2048 kB

Open in new window


Can someone explain the difference between the two? If I was a betting man I would guess that the command line info is the more accurate one.

BTW, this is a vwmare guest image running on a windows 2008 host.
opikeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

themrrobertCommented:
I believe that from meminfo like the free command you add cached + free to get total available memory
0
themrrobertCommented:
ps, cached contains recently used programs etc in the ram so that if you run them again it runs lightning quick, this memory is technically free since if a program requests it, the memory is used, and the program will have to be run from disk the next time :)

hope i helpd
0
mohansahuCommented:
Hi,

1 .Generally, Linux system memory is used by the kernel for two purposes: processes and file/network cache/buffers. If you look closely at the output of free, Have a look in ur free command and compare as below:

2.If you add "buffers" and "cache", and then subtract that from the "used" column, you'll get the second line under "used" (the line that starts with '-/+ buffers/cache'), which shows about 1.4G (1433.6) in use (In ur case), which matches the reported memory in use that System Monitor is reporting (it is ignoring the buffers/cached because those will go away to make room for more processes)

MS

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mohansahuCommented:
Your grep against /proc/meminfo actually matches the first line's "free" column (1433.6) is close enough to 1433. -- it likely changed between the two command outputs).

MS
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.