Jira (FACT-2098) Facter memory inconsistent/incorrect output?

11 views
Skip to first unread message

Jason Lang (JIRA)

unread,
Oct 31, 2019, 9:10:02 AM10/31/19
to puppe...@googlegroups.com
Jason Lang created an issue
 
Facter / Bug FACT-2098
Facter memory inconsistent/incorrect output?
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2019/10/31 6:09 AM
Environment:

[jlang1@ansapn1w1 ~]$ uname -a
Linux ansapn1w1.my.fqdn 3.10.0-1062.1.2.el7.x86_64 #1 SMP Mon Sep 16 14:19:51 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux
[jlang1@ansapn1w1 ~]$

Priority: Normal Normal
Reporter: Jason Lang

I'm finding that either facter (3.11.1)'s "memory" output is incorrect, or i'm not understanding/interpreting properly.

The Bolded item(s) below come from:

 

facter memory.system

free -mh

cat /proc/meminfo

 

Facter tells me i have 7.55Gib Memory "available" and 23.7 Gib Used

free -mh tells me i have 919mb Used 5.1GB "available"

Even converting this to GiB would be 4.65661 GiB "available"

 

Included /proc/meminfo as per the facter doc's that is where it is getting the information from. But that info also isn't showing "7.55Gib "available"

 

I've tried doing some math including used and Buffers, etc. It still doesn't seem to add up any way I slice it

 

[jlang1@ansapn1w1 ~]$ facter --version
3.11.1 (commit 3c760c4d0fd3f7f18a5a7b3be167e7cbb0cbc0b7)

[jlang1@ansapn1w1 ~]$ facter memory.system
{{{}}
{{ available => "7.55 GiB",}}
{{ available_bytes => 8104873984,}}
{{ capacity => "75.84%",}}
{{ total => "31.24 GiB",}}
{{ total_bytes => 33547874304,}}
{{ used => "23.70 GiB",}}
{{ used_bytes => 25443000320}}
}

[jlang1@ansapn1w1 ~]$ free -mh
{{ total used free shared buff/cache available}}
Mem: 31G 919M 5.1G 259M 25G 29G
Swap: 3.9G 0B 3.9G

[jlang1@ansapn1w1 ~]$ cat /proc/meminfo
MemTotal: 32761596 kB
MemFree: 5314676 kB
MemAvailable: 31150564 kB
Buffers: 17748 kB
Cached: 2590832 kB
SwapCached: 0 kB
Active: 2009252 kB
Inactive: 984752 kB
Active(anon): 520860 kB
Inactive(anon): 130480 kB
Active(file): 1488392 kB
Inactive(file): 854272 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 4095996 kB
SwapFree: 4095996 kB
Dirty: 8 kB
Writeback: 0 kB
AnonPages: 385476 kB
Mapped: 163440 kB
Shmem: 265916 kB
Slab: 24041076 kB
SReclaimable: 23895984 kB
SUnreclaim: 145092 kB
KernelStack: 9104 kB
PageTables: 20880 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 20476792 kB
Committed_AS: 1539036 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 242608 kB
VmallocChunk: 34359310332 kB
HardwareCorrupted: 0 kB
AnonHugePages: 182272 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 165696 kB
DirectMap2M: 33388544 kB

 

 

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Mihai Buzgau (JIRA)

unread,
Nov 5, 2019, 8:37:03 AM11/5/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - Triage

Mihai Buzgau (JIRA)

unread,
Nov 5, 2019, 8:37:03 AM11/5/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Team: Night's Watch

Mihai Buzgau (JIRA)

unread,
Nov 14, 2019, 6:16:03 AM11/14/19
to puppe...@googlegroups.com

Mihai Buzgau (JIRA)

unread,
Nov 14, 2019, 6:16:04 AM11/14/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR 2019 - Triage 11-27

George Mrejea (JIRA)

unread,
Nov 14, 2019, 8:03:03 AM11/14/19
to puppe...@googlegroups.com
George Mrejea assigned an issue to George Mrejea
Change By: George Mrejea
Assignee: George Mrejea

George Mrejea (JIRA)

unread,
Nov 15, 2019, 9:05:03 AM11/15/19
to puppe...@googlegroups.com
George Mrejea commented on Bug FACT-2098
 
Re: Facter memory inconsistent/incorrect output?

Hi Jason Lang, thanks for raising this ticket and spending time investigating this. However this seems more of an edge case and this behaviour is expected and satisfies most of our customers use cases.

As stated in documentation, facter gets its information from /proc/meminfo. For Linux system available memory algorithm calculation with data you kindly have provided is the following:

          MemFree 5314676 kb

                 Buffers 17748 kb

            Cached 2590832 kb

sum of these:    7923256 kb → 7737.554688 Mb → *7.55*620575 Gb

Hope it clarifies the matter.

Again, thank you for bringing this to our attention.

 

 

Gheorghe Popescu (JIRA)

unread,
Nov 27, 2019, 4:18:04 AM11/27/19
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages