* get_nprocs() returns 0 (number of CPUs)
@ 1999-09-08 17:22 Eran Guendelman
1999-09-08 19:47 ` B. James Phillippe
0 siblings, 1 reply; 5+ messages in thread
From: Eran Guendelman @ 1999-09-08 17:22 UTC (permalink / raw)
To: axp-list
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: get_nprocs() returns 0 (number of CPUs)
1999-09-08 17:22 get_nprocs() returns 0 (number of CPUs) Eran Guendelman
@ 1999-09-08 19:47 ` B. James Phillippe
1999-09-08 20:31 ` Eran Guendelman
0 siblings, 1 reply; 5+ messages in thread
From: B. James Phillippe @ 1999-09-08 19:47 UTC (permalink / raw)
To: axp-list
On Wed, 8 Sep 1999, Eran Guendelman wrote:
> Hi.
> I am running RH6.0 on a dual alpha machine. A program I am writing needs
...
> /proc/cpuinfo clearly states "cpus detected : 2". I know, I *could* parse
Did you compile with CONFIG_SMP=y (you need to have picked either the
generic vector or one of a few specific Alpha types; see
arch/alpha/config.in)?
If you boot with SRM, I believe the /proc/cpuinfo would be correct
(assuming your SRM is not "being stupid" [to quote rth]) regardless of
whether or not you said "yes" to SMP.
-bp
--
# bryan at terran dot org
# http://www.terran.org/~bryan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: get_nprocs() returns 0 (number of CPUs)
1999-09-08 19:47 ` B. James Phillippe
@ 1999-09-08 20:31 ` Eran Guendelman
1999-09-08 21:23 ` Suyudi Koeswanto
0 siblings, 1 reply; 5+ messages in thread
From: Eran Guendelman @ 1999-09-08 20:31 UTC (permalink / raw)
To: axp-list
> > Hi.
> > I am running RH6.0 on a dual alpha machine. A program I am writing needs
> ...
> > /proc/cpuinfo clearly states "cpus detected : 2". I know, I *could* parse
>
> Did you compile with CONFIG_SMP=y (you need to have picked either the
> generic vector or one of a few specific Alpha types; see
> arch/alpha/config.in)?
I didn't compile the kernel. I'm using whichever one came with the Red
Hat distribution. How do I find out if it was compiled with CONFIG_SMP=y?
In general, how do I find out the options the kernel was compiled with,
because if I have to recompile it I want to make sure I only change
this specific setting.
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: get_nprocs() returns 0 (number of CPUs)
1999-09-08 20:31 ` Eran Guendelman
@ 1999-09-08 21:23 ` Suyudi Koeswanto
1999-09-08 22:01 ` Eran Guendelman
0 siblings, 1 reply; 5+ messages in thread
From: Suyudi Koeswanto @ 1999-09-08 21:23 UTC (permalink / raw)
To: axp-list
On Wed, Sep 08, 1999 at 04:31:37PM -0400, Eran Guendelman wrote:
>
> I didn't compile the kernel. I'm using whichever one came with the Red
> Hat distribution. How do I find out if it was compiled with CONFIG_SMP=y?
> In general, how do I find out the options the kernel was compiled with,
> because if I have to recompile it I want to make sure I only change
> this specific setting.
>
Install the kernel-smp (i forgot the exact rpm package name but it's on the
redhat cd, just do ls kernel* on RPMS directory on the CD) package. And then
make the links on /boot directory points to the smp kernel (After you install
the package, it will put the kernel and system map in /boot). And if you boot
from /vmlinux.gz then just copy the one on /boot to /.
I think the default from redhat is not SMP. But i could be wrong.
Hope that helps.
u!d
------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: get_nprocs() returns 0 (number of CPUs)
1999-09-08 21:23 ` Suyudi Koeswanto
@ 1999-09-08 22:01 ` Eran Guendelman
0 siblings, 0 replies; 5+ messages in thread
From: Eran Guendelman @ 1999-09-08 22:01 UTC (permalink / raw)
To: axp-list
On Wed, 8 Sep 1999, Suyudi Koeswanto wrote:
> Install the kernel-smp (i forgot the exact rpm package name but it's on the
> redhat cd, just do ls kernel* on RPMS directory on the CD) package. And then
> make the links on /boot directory points to the smp kernel (After you install
> the package, it will put the kernel and system map in /boot). And if you boot
> from /vmlinux.gz then just copy the one on /boot to /.
>
> I think the default from redhat is not SMP. But i could be wrong.
I did that (made links to the smp versions of System.map, module-info, and
vmlinuz), rebooted, and get_nprocs() and get_nprocs_conf() still return
0. I mean, even if it didn't detect two processors, why the heck would
it return 0?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1999-09-08 22:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-09-08 17:22 get_nprocs() returns 0 (number of CPUs) Eran Guendelman
1999-09-08 19:47 ` B. James Phillippe
1999-09-08 20:31 ` Eran Guendelman
1999-09-08 21:23 ` Suyudi Koeswanto
1999-09-08 22:01 ` Eran Guendelman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox