RE: Detecting number of Physical CPUs in Intel Hyperthreaded CPU systems

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

 



Thanks for the quick reply.  Will this solution work for 2.2 or 2.4
kernels?

Thanks,

Ken

> -----Original Message-----
> From: redhat-devel-list-admin@redhat.com [mailto:redhat-devel-list-
> admin@redhat.com] On Behalf Of René Møller Fonseca
> Sent: Saturday, May 18, 2002 7:22 PM
> To: redhat-devel-list@redhat.com
> Subject: Re: Detecting number of Physical CPUs in Intel Hyperthreaded
CPU
> systems
> 
> You can do something like this from the shell:
> 
> processors=`egrep -c ^cpu[0-9]+ /proc/stat || :`
> 
> René
> 
> Ken Sheppard wrote:
> > Does anyone know how I can determine the number of physical
processors
> > on a machine with Intel Hyperthreaded CPUs? I have code from Intel
which
> > will report the number of physical CPUs on a windows system. It uses
the
> > Win32 process affinity stuff to issue commands on specific CPUs so
it
> > isn't portable to Linux. I was hoping I could simply read
/proc/cpuinfo.
> > The /proc/cpuinfo I looked at on a 2.4.? machine didn't appear to
have
> > enough information.
> >
> > Thanks,
> >
> > Ken
> >
> >
> >
> > _______________________________________________
> > Redhat-devel-list mailing list
> > Redhat-devel-list@redhat.com
> > https://listman.redhat.com/mailman/listinfo/redhat-devel-list
> >
> 
> 
> 
> --
> B.Sc. in Computer Systems Engineering
> The Maersk Mc-Kinney Moller Institute for Production Technology
> University of Southern Denmark
> http://www.mip.sdu.dk/~fonseca
> 
> 
> 
> _______________________________________________
> Redhat-devel-list mailing list
> Redhat-devel-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/redhat-devel-list



_______________________________________________
Redhat-devel-list mailing list
Redhat-devel-list@redhat.com
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux