Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(FACT-2040) Added solaris memory resolver #1999

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

sebastian-miclea
Copy link
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
@puppetcla
Copy link

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

@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

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

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