Counting processors
MrJean1
MrJean1 at gmail.com
Tue Jul 26 11:53:22 EDT 2005
Or maybe
os.sysconf('SC_NPROCESSORS_ONLN')
Usually, the value returned by os.sysconf('SC_NPROCESSORS_ONLN') and
os.sysconf('SC_NPROCESSORS_CONF') are the same, but if they do differ,
os.sysconf('SC_NPROCESSORS_ONLN') is the reliably figure.
/Jean Brouwers
PS) This applies to Linux and Solaris, at least.
k pur wrote:
> You can use
>
> print os.sysconf("SC_NPROCESSORS_CONF")
>
> works on Linux
>
>
> krishan
>
>
> Pauldoo wrote:
> > Hi,
> > Is a way in python to obtain the total number of processors present in
> > the system?
> >
> > os.platform doesn't seem to contain anything useful.
More information about the Python-list
mailing list