from C: #include <unistd.h> int main(void) { printf("%ld CPUs online\n", sysconf(_SC_NPROCESSORS_ONLN)); return 0; } from shell: $ getconf _NPROCESSORS_ONLN Cheers, Matt On Mon, Sep 04, 2000 at 09:08:25AM +0100, Mikael Aronsson wrote: > 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 > _______________________________________________ Redhat-devel-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-devel-list
- SMP question ? Mikael Aronsson
- Re: SMP question ? Mike A. Harris
- Re: SMP question ? Derek Tattersall
- Re: SMP question ? Mike A. Harris
- Re: SMP question ? Mikael Aronsson
- Re: SMP question ? Venkatesh Krishnamurthi
- Re: SMP question ? Norman Levin
- Re: SMP question ? Mike A. Harris
- RE: SMP question ? Martin Waller
- Re: SMP question ? Matt Wilson
- Re: SMP question ? John Summerfield
- Re: SMP question ? Chris Abbey
- Re: SMP question ? Julie
- Re: SMP question ? Mike A. Harris
- Re: SMP question ? Mike A. Harris
- Re: SMP question ? Julie
- Re: SMP question ? John Summerfield
- Re: SMP question ? John Summerfield
- Re: SMP question ? Mike A. Harris
- Re: SMP question ? Mike A. Harris