Class: Facter::Processors::SunOS
- Defined in:
- lib/facter/processors/os.rb
Instance Method Summary collapse
- #get_physical_processor_count ⇒ Object
- #get_processor_count ⇒ Object
- #get_processor_list ⇒ Object
-
#initialize ⇒ SunOS
constructor
A new instance of SunOS.
Methods inherited from Base
Constructor Details
Instance Method Details
#get_physical_processor_count ⇒ Object
215 216 217 218 219 220 221 222 223 |
# File 'lib/facter/processors/os.rb', line 215 def get_physical_processor_count if @major_version > 5 or (@major_version == 5 and @minor_version >= 8) if output = Facter::Core::Execution.exec("/usr/sbin/psrinfo -p") output.to_i end else count_cpu_with_psrinfo end end |
#get_processor_count ⇒ Object
203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/facter/processors/os.rb', line 203 def get_processor_count if @major_version < 5 or (@major_version == 5 and @minor_version < 8) if count = count_cpu_with_kstat count else count_cpu_with_psrinfo end else count_cpu_with_psrinfo end end |
#get_processor_list ⇒ Object
199 200 201 |
# File 'lib/facter/processors/os.rb', line 199 def get_processor_list Facter::Util::Processor.enum_kstat end |