Subject: how to determine the number of processors
To: None <tech-pkg@NetBSD.org>
From: Klaus Heinz <k.heinz.mai.vier@onlinehome.de>
List: tech-pkg
Date: 05/31/2004 06:35:39
Hi,

I would like to know how to determine the number of processors under the
different supported operating systems:

NetBSD: /sbin/sysctl -n hw.ncpu
Solaris: through prtdiag or psrinfo
Linux: /proc/cpuinfo 
darwin/MacOS X: /usr/sbin/sysctl -n hw.ncpu
FreeBSD 4+5: /sbin/sysctl -n hw.ncpu
OpenBSD:
IRIX5:
IRIX6:
BSD/OS:
AIX:
Interix:

Tru64: psrinfo -n
HP-UX would be nice but not really important.

While we're at it, I also need the identifier Perl assigns to those
systems (I know already: netbsd, freebsd, linux, solaris, hpux, dec_osf)

  perl -e 'print "$^O\n";'


ciao
     Klaus