nproc uses sysconf(3M) for determining the number of processors on Solaris 
which means that zones with CPU pools will see the number in the pool, rather 
than the number in the machine.

It may be worthwhile updating the documentation to reflect this, but then again 
sysconf(3C) itself is not documented in this way.

-JohnS

On 2010-05-13, at 8:15 AM, Darren J Moffat wrote:

> On 13/05/2010 15:19, Alan Coopersmith wrote:
>>>         Between 7.4 and 8.5, the following new command was introduced:
>>> 
>>>         /usr/bin/
>>>                 nproc
>>>                        Location                     Uncommitted
>>>                        Invocation                   Uncommitted
>>>                        Human-readable output        Not an Interface
> 
> What API is nproc calling on Solaris to get the "number of processing units" ?
> 
> What happens when it is run in a Zone that is part of a processor pool ?  I 
> think the "-a" output won't actually be "all installed".
> 
> My concern here is that this command could depending how it is implemented be 
> very misleading on Solaris because of the processor virualisation and 
> resource management functionality we have.
> 
> At the moment I'm not suggested it be dropped or its documentation be changed 
> in anyway, just trying to understand it it has a chance of giving the user a 
> reasonable (ideally actually correct) answer.
> 
> -- 
> Darren J Moffat
> _______________________________________________
> opensolaris-arc mailing list
> opensolaris-arc@opensolaris.org

_______________________________________________
opensolaris-arc mailing list
opensolaris-arc@opensolaris.org

Reply via email to