public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* system call for finding the number of cpus??
@ 2002-04-08 21:18 Kuppuswamy, Priyadarshini
  2002-04-08 21:25 ` Robert Love
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Kuppuswamy, Priyadarshini @ 2002-04-08 21:18 UTC (permalink / raw)
  To: linux-kernel

Hi!
  I have a script that is using the /cpu/procinfo file to determine the number of cpus present in the system. But I would like to implement it using a system call rather than use the environment variables?? I couldn't find a system call for linux that would give me the result. Could anyone please let me know if there is one for redhat linux??

Thanks for your time,
Priya

^ permalink raw reply	[flat|nested] 20+ messages in thread
* RE: system call for finding the number of cpus??
@ 2002-04-08 21:54 Kuppuswamy, Priyadarshini
  2002-04-08 22:05 ` Davide Libenzi
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Kuppuswamy, Priyadarshini @ 2002-04-08 21:54 UTC (permalink / raw)
  To: Davide Libenzi; +Cc: linux-kernel

I don't think that (sysconf(_SC_NPROCESSORS_CONF)) command works on linux. It works on Unix. I tried that. It returns 1 when there are 4 processors on linux.


-----Original Message-----
From: Davide Libenzi [mailto:davidel@xmailserver.org]
Sent: Monday, April 08, 2002 5:57 PM
To: Kuppuswamy, Priyadarshini
Cc: linux-kernel@vger.kernel.org
Subject: Re: system call for finding the number of cpus??


On Mon, 8 Apr 2002, Kuppuswamy, Priyadarshini wrote:

> Hi!
>   I have a script that is using the /cpu/procinfo file to determine the
> number of cpus present in the system. But I would like to implement it
> using a system call rather than use the environment variables?? I
> couldn't find a system call for linux that would give me the result.
> Could anyone please let me know if there is one for redhat linux??

sysconf(_SC_NPROCESSORS_CONF);




- Davide



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2002-04-11 13:20 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-08 21:18 system call for finding the number of cpus?? Kuppuswamy, Priyadarshini
2002-04-08 21:25 ` Robert Love
2002-04-08 21:27   ` Christoph Hellwig
2002-04-08 21:37     ` Mark Hahn
2002-04-08 22:02       ` Dr. David Alan Gilbert
2002-04-11 10:11         ` Rusty Russell
2002-04-08 21:58     ` H. Peter Anvin
2002-04-09 14:28       ` Vince Weaver
2002-04-08 21:51   ` J.A. Magallon
2002-04-08 22:59   ` David Ford
2002-04-08 21:56 ` Davide Libenzi
2002-04-08 21:58   ` J.A. Magallon
2002-04-08 22:08     ` Davide Libenzi
2002-04-09  1:12     ` Nicholas Miell
2002-04-09 15:37 ` Tigran Aivazian
  -- strict thread matches above, loose matches on Subject: below --
2002-04-08 21:54 Kuppuswamy, Priyadarshini
2002-04-08 22:05 ` Davide Libenzi
2002-04-08 22:12 ` J.A. Magallon
2002-04-09  5:36   ` Bernd Eckenfels
2002-04-09 15:39 ` Tigran Aivazian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox