autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: number of processors


From: Philip Willoughby
Subject: Re: number of processors
Date: Tue, 27 Aug 2002 22:38:23 +0100 (BST)

Today, Andreas Schwab wrote:

>$ grep processor /proc/cpuinfo
>$ uname -a
>Linux eta 2.4.18-SMP #1 SMP Tue Mar 5 11:48:27 GMT 2002 alpha unknown

Ooops....

Alphas always have homogenous processors, so they just have a line which
says:
cpus detected : #

Unfortunately this isn't the number of CPUs detected but rather the CPU
slots which are filled, so you need to count the number of numbers after
the colon in that line.

PPC seems to use the x86 style, and on sparc you need to count the number
of lines which begin `CPU#:' and end with `online'.

Aren't consistent interfaces marvellous.

Sorry for misleading you all earlier.

I can't check anything but x86 directly, so if any of this has changed, we
can assume the format of /proc/cpuinfo has probably changed and thus we
can't reliably parse it.

Regards,

Philip Willoughby

Systems Programmer, Department of Computing, Imperial College, London, UK
-- 
echo address@hidden | tr "bizndfohces" "pwgd9ociaku"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]