Feature :)
This all comes down to the architecture of your processor.
Your SPARC64-VII processors is a quad-core, two-way SMT processor. So, you
have one physical CPU, four cores, and 8 threads.
physicalprocessorcount is derived from the output of psrinfo -p
and processorcount is derived from the *unique* list of core_ids in the
output of /usr/sbin/kstat cpu_info - there are two for any given core_id,
one for each thread that core can handle.
If you do;
/usr/bin/kstat cpu_info | grep core_id
you will see duplicate entries for each core;
[x@y ~]$ /usr/bin/kstat cpu_info | grep core_id
core_id 0
core_id 0
core_id 2
core_id 2
core_id 4
core_id 4
core_id 6
core_id 6
core_id 8
core_id 8
core_id 10
core_id 10
core_id 12
core_id 12
core_id 14
core_id 14
core_id 32
core_id 32
core_id 34
core_id 34
core_id 36
core_id 36
core_id 38
core_id 38
core_id 40
core_id 40
core_id 42
core_id 42
core_id 44
core_id 44
core_id 46
core_id 46
Hope that helps!
Andrew
On Monday, 3 December 2012 02:03:25 UTC, Alex Harvey wrote:
>
>
>
> On Tuesday, November 20, 2012 12:02:21 PM UTC+11, Alex Harvey wrote:
>>
>> Hi all,
>>
>> This relates to a discussion we are having in the Redmine ticket
>> https://projects.puppetlabs.com/issues/11612.
>>
>> I am extending the processorcount, physicalprocessorcount and processorX
>> facts that exist for Linux and Solaris.
>>
>> I personally find the behaviour of the processor facts on Solaris
>> surprising -
>>
>> myhost# facter |grep proc
>> physicalprocessorcount => 1
>> processor0 => SPARC64-VII
>> processor1 => SPARC64-VII
>> processor2 => SPARC64-VII
>> processor3 => SPARC64-VII
>> processor4 => SPARC64-VII
>> processor5 => SPARC64-VII
>> processor6 => SPARC64-VII
>> processor7 => SPARC64-VII
>> processorcount => 4
>>
>>
>> We can see that physicalprocessorcount is returning the number of
>> physical CPUs which is good, the processorX array is getting populated with
>> virtual CPUs, and processorcount is returning the number of cores. The
>> command used to set processorcount is essentially kstat cpu_info |grep
>> core_id |sort -u.
>>
>> However, I suspect Solaris sysadmins are more familiar with using
>> commands like psrinfo, prtdiag, and mpstat to get CPU count, and these all
>> report the number of CPUs as 8 rather than 4.
>>
>> If I was writing this from scratch I would have a fact called something
>> like ProcessorCoreCount and have that report 4 and then a separate fact
>> ProcessorCount that would report 8 - as psrinfo is doing.
>>
>> Therefore I am interested to know if others out there regard this
>> behaviour as a 'bug or feature', and also get some feedback on how people
>> are using these facts out there.
>>
>
> There were no responses here - I'd like to bump this up for a second go at
> getting some responses.
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/mRciCXn_60YJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.