> 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
[root@dugite /root]# man getconf
No manual entry for getconf
[root@dugite /root]# getconf _NPROCESSORS_ONLN
1
[root@dugite /root]# which getconf
/usr/bin/getconf
[root@dugite /root]# rpm -qif /usr/bin/getconf
Name        : glibc                        Relocations: (not relocateable)
Version     : 2.1.3                             Vendor: Red Hat, Inc.
Release     : 15                            Build Date: Wed 01 Mar 2000 06:00:05 AM 
WST             

How is one supposed to find that? Of having found it, use it?
[root@dugite /root]# getconf --help
getconf: Unrecognized variable `--help'
[root@dugite /root]#






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

Reply via email to