From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 13138 invoked from network); 8 Sep 1999 17:22:38 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 8 Sep 1999 17:22:38 -0000 Received: from iceland.sidefx.com (iceland.sidefx.com [204.92.234.75]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id NAA29052 for ; Wed, 8 Sep 1999 13:22:27 -0400 Received: from localhost (eran@localhost) by iceland.sidefx.com (8.9.3/8.9.3) with ESMTP id NAA22213 for ; Wed, 8 Sep 1999 13:22:29 -0400 X-Authentication-Warning: iceland.sidefx.com: eran owned process doing -bs Date: Wed, 8 Sep 1999 13:22:29 -0400 (EDT) From: Eran Guendelman To: axp-list@redhat.com Subject: get_nprocs() returns 0 (number of CPUs) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi. I am running RH6.0 on a dual alpha machine. A program I am writing needs to know the number of CPUs. I tried get_procs_conf() and get_nprocs(), but they both return 0. Is this a known bug? Is there a fix? /proc/cpuinfo clearly states "cpus detected : 2". I know, I *could* parse this file to get the number of processors, but I'd rather not do it that way. Also, the program "top" doesn't say anything about having 2 CPUs. Is it possibly using these same system calls and not detecting the two CPUs? Thanks for any help.