-
Notifications
You must be signed in to change notification settings - Fork 495
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
Conversation
CLA signed by all contributors. |
424c0bc
to
97bbdae
Compare
97bbdae
to
46faa70
Compare
return unless pagesize != 0 | ||
|
||
total = kstats['physmem'].to_i * pagesize | ||
free = kstats['pagesfree'].to_i * pagesize |
There was a problem hiding this comment.
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
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
@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 😛 |
No description provided.