Skip to content

(FACT-2040) Added solaris memory resolver#1999

Merged
BogdanIrimie merged 1 commit intopuppetlabs:4.xfrom
sebastian-miclea:FACT-2040
Aug 4, 2020
Merged

(FACT-2040) Added solaris memory resolver#1999
BogdanIrimie merged 1 commit intopuppetlabs:4.xfrom
sebastian-miclea:FACT-2040

Conversation

@sebastian-miclea
Copy link
Copy Markdown
Contributor

No description provided.

@sebastian-miclea sebastian-miclea requested review from a team July 28, 2020 19:34
@sebastian-miclea sebastian-miclea added do not merge enhancement New feature or enhancement labels Jul 28, 2020
Comment thread lib/facter/resolvers/solaris/memory.rb Outdated
Comment thread spec/facter/resolvers/solaris/memory_spec.rb Outdated
Comment thread lib/facter/resolvers/solaris/memory.rb Outdated
@puppetcla
Copy link
Copy Markdown

CLA signed by all contributors.

@BogdanIrimie BogdanIrimie merged commit f412202 into puppetlabs:4.x Aug 4, 2020
return unless pagesize != 0

total = kstats['physmem'].to_i * pagesize
free = kstats['pagesfree'].to_i * pagesize
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will log the pagesize 3 times. Probably
unless @fact_list[:pagesize] @fact_list[:pagesize] ||= Facter::Core::Execution.execute('pagesize', logger: log).strip.to_i log.debug("Pagesize: #{@pagesize}") @fact_list[:pagesize] in the pagesize method will work better

Copy link
Copy Markdown

@igalic igalic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo: implement this for freebsd, cc @smortex ;)


def sys
sys = {}
output = Facter::Core::Execution.execute('/usr/bin/kstat -m unix -n system_pages', logger: log).strip
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given that freebsd doesn't have this utility


def swap
swap_hash = {}
output = Facter::Core::Execution.execute('/usr/sbin/swap -l', logger: log).strip
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nor this one

we need a freebsd version of this resolver now too

@smortex
Copy link
Copy Markdown
Contributor

smortex commented Aug 10, 2020

@igalic Yes, adding memory and dmi fact is high on my Puppet todo-list: it's the only piece missing so that Facter 4 can be used as a drop-in replacement to Facter 3, at least on my computer 😛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants