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 Date: Thu, 15 Oct 2009 23:51:11 +0100 From: Dave User-Agent: Thunderbird 2.0.0.19 (X11/20090218) MIME-Version: 1.0 Newsgroups: comp.sys.hp.hpux,comp.unix.aix,comp.unix.tru64 Subject: Re: Determine number of CPUs References: <4ad5a2ed@212.67.96.135> <402175f9-1707-4871-b076-9371fc977ee9@y21g2000yqn.googlegroups.com> In-Reply-To: <402175f9-1707-4871-b076-9371fc977ee9@y21g2000yqn.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 213.78.42.15 Message-ID: <4ad7a761@212.67.96.135> X-Trace: 15 Oct 2009 23:51:13 GMT, 213.78.42.15 Path: g2news2.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!212.67.96.135!213.78.42.15 Xref: g2news2.google.com comp.sys.hp.hpux:1324 comp.unix.aix:3682 comp.unix.tru64:119 Leo wrote: > Hi, > > You can use "prtconf | grep Processors" which will display the number > of processors. > you can use "lsdev -Cc processor" which will display all the > processors and id's. you can count the number of lines which gives the > total number of processors by the command "lsdev -Cc processor | wc - > l" > And you can use "bindprocessor -q" which shows the number of cores. > > all the above commands can be used by a basic user. hope it helps > > -LeO Thank you for the help on AIX. Would I be right in assuming this box has a pair of dual core processors? $ lsdev -Cc processor proc0 Available 00-00 Processor proc2 Available 00-02 Processor $ bindprocessor -q The available processors are: 0 1 2 3 $ prtconf | grep Processors Number Of Processors: 2 Do you know if the format of the output has been stable over the various AIX releases, so it can be parsed and used in scripts which will work on most AIX releases? Can anyone come up with similar data for HP-UX? Just out of interest I'll add for a Solaris box with two CPUs, each with 8 cores, and each core having 4 hardware threads (i.e. 128 threads) kirkby@t2:[~] $ psrinfo 0 on-line since 08/14/2009 09:24:31 1 on-line since 08/14/2009 09:24:33 2 on-line since 08/14/2009 09:24:33 etc. so kirkby@t2:[~] $ psrinfo | wc -l 128 means it has 128 threads. kirkby@t2:[~] $ psrinfo -p 2 means there are two physical processors. I do not know how to get the number of cores, which is probably the most useful thing actually. Dave -- I respectfully request that this message is not archived by companies as unscrupulous as 'Experts Exchange' . In case you are unaware, 'Experts Exchange' take questions posted on the web and try to find idiots stupid enough to pay for the answers, which were posted freely by others. They are leeches.