Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sysconf - number of processors

Status
Not open for further replies.

jprabaker

Technical User
May 31, 2001
185
GB
Hi,

We are trying to to install some ODBC drivers on to an LPAR on a 670 (AIX 5200-03). The install goes off and uses the sysconf _SC_NPROCESSORS_CONF routine to determine the number of processors. However, it is getting back a value of 4, when the LPAR only has 2 processors. I've checked and the 670 has a total 4 processors, but the partition has 2 assigned and available.

Any thoughts? The installation fails and I'm a bit stuck!

thanks,
John

 
maybe you should remove all defined cpu's - leave only available in the system.

# lsdev -Cc processor
proc0 Available 00-00 Processor
proc1 Available 00-01 Processor
 
Thanks for the responses.

The _SC_NPROCESSORS_CONF value returns the total number of CPUs in the machine. On a partitioned system is displays the total for the managed system not the partition. The _SC_NPROCESSORS_ONLN value for sysconf shows the number of "active" CPUs.

John
 
Interestingly; AIX 5.1 reports the same for both values, 5.2 doesn't! Perhaps a feature of 5.2?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top