# of processors
Kolbe Kegel
kolbe at u.washington.edu
Mon Jan 20 18:23:27 PST 2003
I'm very interested to know why your output is so different from mine.
Perhaps it has to do simply with the fact that you're using ppc instead
of x86. My system has many more fields than does yours, and in fact the
only field in common is "bogomips". Attempting to grep ^cpu on my
machine would match "cpu MHz", "cpu family", and "cpuid level" for a
count of 3. That is clearly not the result that we're looking for! This
is quite an interesting discrepancy actually, you would think that there
would be some attempt at standardization of this information. It's also
interesting that your cpuinfo includes information on the motherboard
and the amount of RAM in your machine. Those things seem almost
completely unrelated to "cpu info".
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 4
model name : AMD Athlon(tm) Processor
stepping : 2
cpu MHz : 706.289
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca
cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow
bogomips : 1388.54
Phillip Garland escribió::
>cat /proc/cpuinfo gives:
>
>cpu : 740/750
>temperature : 53-57 C (uncalibrated)
>clock : 233MHz
>revision : 2.2 (pvr 0008 0202)
>bogomips : 465.30
>machine : iMac,1
>motherboard : iMac MacRISC Power Macintosh
>L2 cache : 512K unified
>memory : 96MB
>pmac-generation : NewWorld
>
>so I'm guessing the equivalent command is:
>
>cat /proc/cpuinfo | egrep ^cpu | wc -l
>
>which gives "1", as it should. I don't have a MP box or the kernel source around right now, so I don't for sure that this is correct. Ideally there should be a way to do this that is portable across architectures and recent kernel versions, but don't know what it is.
>
>~Phillip
>
>On Mon, 20 Jan 2003, Kolbe Kegel wrote:
>
>
>
>>well what does the output of 'cat /proc/cpuinfo' look like?
>>
>>and that's not ancient... if it works and you don't need the latest,
>>latest feature, why upgrade? people are still using 2.2! (i use it on my
>>router.)
>>
>>--kolbe
>>
>>Phillip Garland escribió::
>>
>>
>>
>>>This seems not to work across all architectures or kernel versions. On my ppc box running Linux 2.4.16 (Yes, I know it's ancient, but it's worked better for me than more recent kernels), this gives 0.
>>>
>>>~Phillip
>>>
>>>
>>>On Mon, 20 Jan 2003, J. Hughes wrote:
>>>
>>>
>>>
>>>
>>>
>>>>This should do the job:
>>>>
>>>>cat /proc/cpuinfo | egrep ^processor | wc -l
>>>>
>>>>On Mon, 20 Jan 2003, Scholz Matthew wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>Let us just say that I need to know how many
>>>>>processors a linux machine has using. Let us also say
>>>>>that I'm not sure exactly how to retrieve said
>>>>>information.
>>>>>
>>>>>Let us add for the sake of argument, that I would like
>>>>>a single command line argument which returns some
>>>>>useful sembalance of aforementioned processorial
>>>>>quantity.
>>>>>
>>>>>Is there such a beast?
>>>>>
>>>>>Thanx
>>>>>
>>>>>__________________________________________________
>>>>>Do you Yahoo!?
>>>>>Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
>>>>>http://mailplus.yahoo.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
>
>
>
More information about the Linux
mailing list