[SOLVED] Correlation between "free -m" shared line & "/proc/meminfo" shmem RHEL 6.2 - Anyone?
Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Correlation between "free -m" shared line & "/proc/meminfo" shmem RHEL 6.2 - Anyone?
Hi,
I would like to know, if anyone has any ideas, the correlation to the 'shared' memory column in "free -m" and the shmem when you do a "cat /proc/meminfo".
I was recently asked by a dba, which I support, why the shared memory in "free" was completely different to the "shmem" in /proc/meminfo".
Embarrassed, I returned to my desk and avoided the question, stating "I will get back to you".
Can someone please shed some light on this for me, as I have had no luck in searching for this answer.
REDHAT 6.2 (But I'm sure it's not limited to this flavour alone).
FREE(1) Linux User’s Manual FREE(1)
NAME
free - Display amount of free and used memory in the system
SYNOPSIS
free [-b | -k | -m] [-o] [-s delay ] [-t] [-l] [-V]
DESCRIPTION
free displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel. The shared memory column should be ignored; it is obsolete.
Options
The -b switch displays the amount of memory in bytes; the -k switch (set by default) displays it in kilobytes; the -m switch displays it in
megabytes.
The -t switch displays a line containing the totals.
The -o switch disables the display of a "buffer adjusted" line. If the -o option is not specified, free subtracts buffer memory from the used mem-
ory and adds it to the free memory reported.
The -s switch activates continuous polling delay seconds apart. You may actually specify any floating point number for delay, usleep(3) is used for
microsecond resolution delay times.
The -l switch shows detailed low and high memory statistics.
The -V switch displays version information.
FILES
/proc/meminfo-- memory information
SEE ALSO
ps(1), slabtop(1), vmstat(8), top(1)
AUTHORS
Written by Brian Edmonds.
It's probably not being displayed because it isn't reporting right.
WOW!!!... I can't believe I missed that - considering I even read the man page... I'm so sorry about that.. I generally laugh at ppl that don't read it.
Okay, so the shared memory in the "free" command is obsolete, that's good news.
As a segue to this post then, am I correct in assuming that the /proc/meminfo - shmem is actually in fact shared memory? If so, what is it shared between? The OS and the applications? Is it displaying the reserved memory for the OS? Is it possible to change this to anything other than what it's set at? As I have two servers, supposedly configured the same. One has shmem as 288Kb and the other at 18769372Kb.
Thanks for your assistance.
*shaking head*... I still can't believe I skipped that in the man page. So sorry to everyone in the future that's reading this post... omg.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.