lib/resolvers/solaris/processors.rb in facter-4.0.20 vs lib/resolvers/solaris/processors.rb in facter-4.0.21
- old
+ new
@@ -2,11 +2,10 @@
module Facter
module Resolvers
module Solaris
class Processors < BaseResolver
- @log = Facter::Log.new(self)
@semaphore = Mutex.new
@fact_list ||= {}
class << self
private
@@ -15,14 +14,11 @@
end
def collect_kstat_info(fact_name)
return unless File.executable?('/usr/bin/kstat')
- kstat_output, stderr, status = Open3.capture3('/usr/bin/kstat -m cpu_info')
- unless status.to_i.zero?
- @log.debug("Command /usr/bin/kstat failed with error message: #{stderr}")
- return
- end
+ kstat_output = Facter::Core::Execution.execute('/usr/bin/kstat -m cpu_info', logger: log)
+ return if kstat_output.empty?
parse_output(kstat_output.chomp)
@fact_list[fact_name]
end