Sha256: ff0f10c65b5c2ffe66067654f710efff9702d47276d72bff144328a2a2fd09ce
Contents?: true
Size: 641 Bytes
Versions: 95
Compression:
Stored size: 641 Bytes
Contents
# Fact: physicalprocessorcount # # Purpose: Return the number of physical processors. # # Resolution: # Uses the physicalprocessorcount key of the processors structured # fact, which itself attempts to use sysfs to get the physical IDs of # the processors and falls back to `/proc/cpuinfo` and `physical id` if # sysfs is not available. # # Caveats: # Facter.add('physicalprocessorcount') do confine do !Facter.value(:processors).nil? end setcode do processors = Facter.value(:processors) if (physicalprocessorcount = processors["physicalcount"]) physicalprocessorcount else nil end end end
Version data entries
95 entries across 95 versions & 2 rubygems