Yes, but because of the way the facts are done, this one only gets called if the first one doesn't have a valid result, and since the first implementation does (even though incorrect), it doesn't call this one.  We may want both, for active and total.  This total gives the incorrect answer (per the ticket mentioned).  So there are certain situations where totalprocessorcount is not the same as the current implementation of processorcount, the situation where some processors are disabled.




>________________________________
> From: Adrien Thebo <notifications@github.com>
>To: puppetlabs/facter <facter@noreply.github.com> 
>Cc: riffraff169 <riffraff169@yahoo.com> 
>Sent: Friday, May 3, 2013 2:25 PM
>Subject: Re: [facter] Please consider this patch to update processor count and create a couple new facts. (#437)
> 
>
>
>In lib/facter/processor.rb:
>> +    if aprocs.length != 0
> +      aprocs.length.to_s
> +    end
> +  end
> +end
> +
> +def sysfs_proc_count()
> +  sysfs_cpu_directory = '/sys/devices/system/cpu'
> +  if File.exists?(sysfs_cpu_directory)
> +    lookup_pattern = "#{sysfs_cpu_directory}" + "/cpu[0-9]*"
> +    cpuCount = Dir.glob(lookup_pattern).length
> +    cpuCount.to_s
> +  end
> +end
> +
> +Facter.add("TotalProcessorCount") do 
>This will always be the same as processorcount; it would be better to update the documentation for the processorcount fact rather than create a duplicate fact.
>—
>Reply to this email directly or view it on GitHub.
>
>