On Mon, 4 Sep 2000, Derek Tattersall wrote:

>Date: Mon, 4 Sep 2000 07:27:38 -0400
>From: Derek Tattersall <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Content-Type: text/plain; charset=us-ascii
>Subject: Re: SMP question ?
>
>* Mikael Aronsson ([EMAIL PROTECTED]) [000904 03:16]:
>> 
>> Hi !
>> 
>> What is the best way to detect the number of CPU's ?, I guess I could look in 
>/proc/cpuinfo, but is there a better more portable way to do it ?
>> 
>> Mikael
>> 
>grep -c "processor" /proc/cpuinfo
>gives the number of processors.

mikeharris@orbital:~$ grep -c processor /proc/cpuinfo
2

4 root@asdf:/proc# grep -c processor cpuinfo
1


Yep, it does, quite nicely too.

--
Mike A. Harris                                     Linux advocate     
Computer Consultant                                  GNU advocate  
Capslock Consulting                          Open Source advocate

Looking for Linux software?   http://freshmeat.net  http://www.rpmfind.net
http://filewatcher.org  http://www.coldstorage.org  http://sourceforge.net



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to