On Tue, 5 Sep 2000, Matt Wilson wrote:

>#include <unistd.h>
>
>int main(void)
>{
>    printf("%ld CPUs online\n", sysconf(_SC_NPROCESSORS_ONLN));
>    return 0;
>}
>
>from shell:
>
>$ getconf _NPROCESSORS_ONLN

Drat!  That is one thing that bugs me about Linux...  You hunt
around looking for the wheel, and can't find it.  So you make
your own wheel, and then 10 minutes later, someone tells you
where the existing wheel is...  ;o)

Thanks for the info Matt.  I'll bet sysconf tells a lot more
similar information as well...  I just hope it is documented
somewhere other than in the library source code.  ;oP

Take care,
TTYL


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

#[Mike A. Harris bash tip #3 - how to disable core dumps]
# Put the following at the bottom of your ~/.bash_profile
ulimit -c 0



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

Reply via email to