From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: e63b27eb52,f19613495899e6db X-Google-Attributes: gide63b27eb52,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!news2.glorb.com!usenet.stanford.edu!newsfeed.news.ucla.edu!ihnp4.UCSD.Edu!sdd.hp.com!usenet01.boi.hp.com!not-for-mail From: Rick Jones Newsgroups: comp.sys.hp.hpux,comp.unix.aix,comp.unix.tru64 Subject: Re: Determine number of CPUs Date: Wed, 14 Oct 2009 18:52:42 +0000 (UTC) Organization: the Unofficial HP Sender: Rick Jones Message-ID: References: <4ad5a2ed@212.67.96.135> NNTP-Posting-Host: tardy.cup.hp.com X-Trace: usenet01.boi.hp.com 1255546362 16526 16.89.104.60 (14 Oct 2009 18:52:42 GMT) X-Complaints-To: news@usenet01.boi.hp.com NNTP-Posting-Date: Wed, 14 Oct 2009 18:52:42 +0000 (UTC) User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (HP-UX/B.11.11 (9000/785)) Xref: g2news2.google.com comp.sys.hp.hpux:1317 comp.unix.aix:3673 comp.unix.tru64:113 In comp.sys.hp.hpux Dave wrote: > Does anyone know the best way to determine the number of CPUs on AIX, > HP-UX? (I'll extend the code to test on Tru64 and IRIX if anyone wants > to give me the info, but that is hardly high on the priority list). > The constraints are > 1) It can be done from the shell. > 2) It must not require root privileges > 3) It gives the number of physical CPUs, rather than cores. Out of curiousity, to what purpose will the information be put? Particularly since it seems to be to find the number of chips/sockets rather than the number of scheduling entities. > Finding the number of cores, and/or hardware threads would be a nice > addition, but I'm trying to improve an autoconf macro > http://www.nongnu.org/autoconf-archive/ax_count_cpus.html > which has a description of "Attempt to count the number of processors > present on the machine." Doesn't autoconf have the ability to compile and run "test" programs? rick jones -- oxymoron n, Hummer H2 with California Save Our Coasts and Oceans plates these opinions are mine, all mine; HP might not want them anyway... :) feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...