Difference between system monitor and /proc/meminfo

Posted on 2011-10-12
Last Modified: 2012-05-12
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.
Question by:opike
    LVL 13

    Expert Comment

    I believe that from meminfo like the free command you add cached + free to get total available memory
    LVL 13

    Expert Comment

    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
    LVL 6

    Accepted Solution


    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)


    LVL 6

    Expert Comment

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


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Does your iMac really need a hardware upgrade? Will upgrading RAM speed-up your computer? If yes, then how can you proceed? Upgrading RAM in your iMac is not as simple as it may seem. This article will help you in getting and installing right RA…
    In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now