wrong memory report with free command from procps-ng
list Dominique Frise
Hi,
Using Xymon 4.3.19, we noticed that all our RHEL 7 systems are reporting wrong values.
These systems now use free from procps-ng 3.3.10 whose output has changed.
-- free output on RHEL 5/6 ---
[bb at prdexp ~]$ free
total used free shared buffers cached
Mem: 65916528 63391732 2524796 1376104 1484472 47773272
-/+ buffers/cache: 14133988 51782540
Swap: 16777212 180816 16596396
--- free output on RHEL 7 ---
[bb at hns ~]$ free
total used free shared buff/cache available
Mem: 8011888 318844 3365516 98788 4327528 7275020
Swap: 8388604 0 8388604
The "-/+ buffers/cache:" has disappeared, the "used" is now calculated as total - free - buffers - cache, and there is an "available" column which is an "Estimation of how much memory is available for starting new applications, without swapping".
The man page details all that.
Dominique
University of Lausanne
list Japheth Cleaver
▸
On Thu, April 23, 2015 5:26 am, Dominique Frise wrote:
Hi,
Using Xymon 4.3.19, we noticed that all our RHEL 7 systems are reporting
wrong values.
These systems now use free from procps-ng 3.3.10 whose output has changed.
-- free output on RHEL 5/6 ---
[bb at prdexp ~]$ free
total used free shared buffers cached
Mem: 65916528 63391732 2524796 1376104 1484472 47773272
-/+ buffers/cache: 14133988 51782540
Swap: 16777212 180816 16596396
--- free output on RHEL 7 ---
[bb at hns ~]$ free
total used free shared buff/cache
available
Mem: 8011888 318844 3365516 98788 4327528
7275020
Swap: 8388604 0 8388604
The "-/+ buffers/cache:" has disappeared, the "used" is now calculated as
total - free - buffers - cache, and there is an "available" column which
is an "Estimation of how much memory is available for starting new
applications, without swapping".
The man page details all that.
Dominique
University of Lausanne
Thanks... Mind if you could try the following patch? And let me know if it works (it does for me on an EL7 and Fedora 21). I went ahead and took the opportunity to begin using the "Available" figure as the "Actual Used" (well, the Phys - Available figure), since that's going to be a more realistic figure on kernel's new enough to support it. Regards, -jc
Attachments (1)
list Dominique Frise
Hi Japhet, Thanks for the patch. On clients with 3.10 kernels, we found wiered that the value for "Physical Used" is now less than the one for "Actual Used". Have you an explanation for that ? For compatibility with the <3.10 kernels memory display, we have following suggestions for mapping the displayed values: - "Actual Used" should be mapped to "used" - "Physical Used" should be mapped to "buff/cache" What do you think about this? Dominique
▸
De : J.C. Cleaver <user-87556346d4af@xymon.invalid>
Envoyé : dimanche 3 mai 2015 01:35
À : Dominique Frise
Cc : xymon at xymon.com
Objet : Re: [Xymon] wrong memory report with free command from procps-ng
On Thu, April 23, 2015 5:26 am, Dominique Frise wrote:Hi,
Using Xymon 4.3.19, we noticed that all our RHEL 7 systems are reporting
wrong values.
These systems now use free from procps-ng 3.3.10 whose output has changed.
-- free output on RHEL 5/6 ---
[bb at prdexp ~]$ free
total used free shared buffers cached
Mem: 65916528 63391732 2524796 1376104 1484472 47773272
-/+ buffers/cache: 14133988 51782540
Swap: 16777212 180816 16596396
--- free output on RHEL 7 ---
[bb at hns ~]$ free
total used free shared buff/cache
available
Mem: 8011888 318844 3365516 98788 4327528
7275020
Swap: 8388604 0 8388604
The "-/+ buffers/cache:" has disappeared, the "used" is now calculated as
total - free - buffers - cache, and there is an "available" column which
is an "Estimation of how much memory is available for starting new
applications, without swapping".
The man page details all that.
Dominique
University of Lausanne
Thanks... Mind if you could try the following patch? And let me know if it works (it does for me on an EL7 and Fedora 21). I went ahead and took the opportunity to begin using the "Available" figure as the "Actual Used" (well, the Phys - Available figure), since that's going to be a more realistic figure on kernel's new enough to support it. Regards, -jc
list Dominique Frise
Hi again, I made a mistake on the second line of suggestions in my previous mail. One should read: - "Physical Used" should be mapped to "buff/cache" + "used" Sorry for the inconvenience, Dominique
▸
De : Xymon <xymon-bounces at xymon.com> de la part de Dominique Frise <user-78ab6673b600@xymon.invalid>
Envoyé : lundi 4 mai 2015 10:45
À : J.C. Cleaver
Cc : xymon at xymon.com
Objet : Re: [Xymon] wrong memory report with free command from procps-ng
Hi Japhet,
Thanks for the patch.
On clients with 3.10 kernels, we found wiered that the value for "Physical Used" is now less than the one for "Actual Used".
Have you an explanation for that ?
For compatibility with the <3.10 kernels memory display, we have following suggestions for mapping the displayed values:
- "Actual Used" should be mapped to "used"
- "Physical Used" should be mapped to "buff/cache"
What do you think about this?
Dominique
De : J.C. Cleaver <user-87556346d4af@xymon.invalid>
Envoyé : dimanche 3 mai 2015 01:35
À : Dominique Frise
Cc : xymon at xymon.com
Objet : Re: [Xymon] wrong memory report with free command from procps-ng
On Thu, April 23, 2015 5:26 am, Dominique Frise wrote:Hi,
Using Xymon 4.3.19, we noticed that all our RHEL 7 systems are reporting
wrong values.
These systems now use free from procps-ng 3.3.10 whose output has changed.
-- free output on RHEL 5/6 ---
[bb at prdexp ~]$ free
total used free shared buffers cached
Mem: 65916528 63391732 2524796 1376104 1484472 47773272
-/+ buffers/cache: 14133988 51782540
Swap: 16777212 180816 16596396
--- free output on RHEL 7 ---
[bb at hns ~]$ free
total used free shared buff/cache
available
Mem: 8011888 318844 3365516 98788 4327528
7275020
Swap: 8388604 0 8388604
The "-/+ buffers/cache:" has disappeared, the "used" is now calculated as
total - free - buffers - cache, and there is an "available" column which
is an "Estimation of how much memory is available for starting new
applications, without swapping".
The man page details all that.
Dominique
University of Lausanne
Thanks... Mind if you could try the following patch? And let me know if it works (it does for me on an EL7 and Fedora 21). I went ahead and took the opportunity to begin using the "Available" figure as the "Actual Used" (well, the Phys - Available figure), since that's going to be a more realistic figure on kernel's new enough to support it. Regards, -jc
list Japheth Cleaver
▸
On Mon, May 4, 2015 6:04 am, Dominique Frise wrote:
Hi again, I made a mistake on the second line of suggestions in my previous mail. One should read: - "Physical Used" should be mapped to "buff/cache" + "used" Sorry for the inconvenience, Dominique
Well, previously there had just been the physical measurement, but the
addition of the buffer/cache distinction allowed 'Actual Used' to be a
more meaningful reference point.
I think it definitely makes sense to have 'Actual Used' align with the
(inverse of the) Available memory metric when the kernel provides one.
Operating by the principle of least surprise, it's probably best to
continue with the original formula for Physical Used, however.
(Ironically.)
This patch should revert the Physical Used value to its previous composition.
Regards,
-jc
Attachments (1)