Class: Facter::Processors::Darwin

Inherits:
Base
  • Object
show all
Defined in:
lib/facter/processors/os.rb

Instance Method Summary collapse

Methods inherited from Base

#get_physical_processor_count, #get_processor_list

Constructor Details

#initializeDarwin

Returns a new instance of Darwin.



146
147
148
149
# File 'lib/facter/processors/os.rb', line 146

def initialize
  require "cfpropertylist"
  @system_hardware_data = query_system_profiler
end

Instance Method Details

#get_processor_countObject



151
152
153
# File 'lib/facter/processors/os.rb', line 151

def get_processor_count
  Facter::Util::POSIX.sysctl("hw.ncpu").to_i
end

#get_processor_speedObject



155
156
157
# File 'lib/facter/processors/os.rb', line 155

def get_processor_speed
  @system_hardware_data["current_processor_speed"]
end