linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 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

* RE: system call for finding the number of cpus??
  2002-04-08 21:54 system call for finding the number of cpus?? Kuppuswamy, Priyadarshini
@ 2002-04-08 22:05 ` Davide Libenzi
  2002-04-08 22:12 ` J.A. Magallon
  2002-04-09 15:39 ` Tigran Aivazian
  2 siblings, 0 replies; 20+ messages in thread
From: Davide Libenzi @ 2002-04-08 22:05 UTC (permalink / raw)
  To: Kuppuswamy, Priyadarshini; +Cc: Linux Kernel Mailing List

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

> 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.

it always worked fine for me, up to 8 CPUs ...




- Davide



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

* Re: system call for finding the number of cpus??
  2002-04-08 21:54 system call for finding the number of cpus?? 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
  2 siblings, 1 reply; 20+ messages in thread
From: J.A. Magallon @ 2002-04-08 22:12 UTC (permalink / raw)
  To: Kuppuswamy, Priyadarshini; +Cc: Davide Libenzi, linux-kernel


On 2002.04.08 "Kuppuswamy, Priyadarshini" wrote:
>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.
>

Tried and works. get_nproc_conf and _SC_NPROCESSORS_CONF work the same.

-- 
J.A. Magallon                           #  Let the source be with you...        
mailto:jamagallon@able.es
Mandrake Linux release 8.3 (Cooker) for i586
Linux werewolf 2.4.19-pre6-jam1 #1 SMP Sun Apr 7 00:50:05 CEST 2002 i686

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

* Re: system call for finding the number of cpus??
  2002-04-08 22:12 ` J.A. Magallon
@ 2002-04-09  5:36   ` Bernd Eckenfels
  0 siblings, 0 replies; 20+ messages in thread
From: Bernd Eckenfels @ 2002-04-09  5:36 UTC (permalink / raw)
  To: linux-kernel

In article <20020408221223.GE13043@werewolf.able.es> you wrote:
> On 2002.04.08 "Kuppuswamy, Priyadarshini" wrote:
>>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.
>>

> Tried and works. get_nproc_conf and _SC_NPROCESSORS_CONF work the same.

Using "strace getconf _NPROCESSORS_CONF" it tells me, that glibc is also
parsing /proc/cpuinfo.

BTW: there are _NPROCESSORS_CONF and _NPROCESSORS_ONLN, works for me:

3ecki@calista:~> getconf _NPROCESSORS_CONF
1
3ecki@calista:~> getconf _NPROCESSORS_ONLN
1
ecki@SeeDeBrCVS:~$ getconf _NPROCESSORS_CONF
2
ecki@SeeDeBrCVS:~$ getconf _NPROCESSORS_ONLN
2

Greetings
Bernd

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

* RE: system call for finding the number of cpus??
  2002-04-08 21:54 system call for finding the number of cpus?? Kuppuswamy, Priyadarshini
  2002-04-08 22:05 ` Davide Libenzi
  2002-04-08 22:12 ` J.A. Magallon
@ 2002-04-09 15:39 ` Tigran Aivazian
  2 siblings, 0 replies; 20+ messages in thread
From: Tigran Aivazian @ 2002-04-09 15:39 UTC (permalink / raw)
  To: Kuppuswamy, Priyadarshini; +Cc: Davide Libenzi, linux-kernel

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

> 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.

it works:

# /usr/bin/getconf _NPROCESSORS_ONLN
2

If it didn't work then glibc (and other rpms that take advantage of it)
would have taken a lot longer to compile :)



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

* Re: system call for finding the number of cpus??
  2002-04-08 22:02       ` Dr. David Alan Gilbert
@ 2002-04-11 10:11         ` Rusty Russell
  0 siblings, 0 replies; 20+ messages in thread
From: Rusty Russell @ 2002-04-11 10:11 UTC (permalink / raw)
  To: Dr. David Alan Gilbert
  Cc: hahn, hch, rml, Priyadarshini.Kuppuswamy, linux-kernel

On Mon, 8 Apr 2002 23:02:39 +0100
"Dr. David Alan Gilbert" <gilbertd@nospam.treblig.org> wrote:

> But I'd actually go and ask the CPU hotswap guys - they must have a way
> of getting a handle on this (hey does that mean you might have cpu0,
> cpu1, cpu3 .... ?)

We use /proc/sys/cpu/*.

Rusty.
-- 
   there are those who do and those who hang on and you don't see too
   many doers quoting their contemporaries.  -- Larry McVoy

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

* Re: system call for finding the number of cpus??
  2002-04-08 21:18 Kuppuswamy, Priyadarshini
  2002-04-08 21:25 ` Robert Love
  2002-04-08 21:56 ` Davide Libenzi
@ 2002-04-09 15:37 ` Tigran Aivazian
  2 siblings, 0 replies; 20+ messages in thread
From: Tigran Aivazian @ 2002-04-09 15:37 UTC (permalink / raw)
  To: Kuppuswamy, Priyadarshini; +Cc: linux-kernel

Hello Priya,

The portable way to determine the number of cpus _online_ is:

if [ -x /usr/bin/getconf ] ; then
  numprocs=$(/usr/bin/getconf _NPROCESSORS_ONLN)
  if [ $numprocs -eq 0 ]; then
    numprocs=1
  fi
else
  numprocs=1
fi

at least that is the number I usually pass to "make -j$numprocs" when
compiling large software projects.

Regards,
Tigran

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??
>
> Thanks for your time,
> Priya
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>


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

* Re: system call for finding the number of cpus??
  2002-04-08 21:58     ` H. Peter Anvin
@ 2002-04-09 14:28       ` Vince Weaver
  0 siblings, 0 replies; 20+ messages in thread
From: Vince Weaver @ 2002-04-09 14:28 UTC (permalink / raw)
  To: linux-kernel


On 8 Apr 2002, H. Peter Anvin wrote:
> By author:    Christoph Hellwig <hch@infradead.org>
> > On Mon, Apr 08, 2002 at 05:25:08PM -0400, Robert Love wrote:
> > > Linux does not implement such a syscall.  Note
> > >
> > > 	cat /proc/cpuinfo | grep processor | wc -l
> >
> > I guess there is at least one architecture on which it breaks..
> >
>
> Then that architecture should be fixed.

Back in 1999 or so I actually came up with a patch that more-or-less came
up with an arch-independent /proc/cpuinfo file.  It touched off a
mini-flamewar on linux-kernel, none of the arch maintainers wanted to
change their pet format, and Linus silently dropped the patch.

As maintainer of linux_logo I have to have a separate cpuinfo parser for
each architecture.

For number of CPU's..... x86 uses the "count processor/bogomips" type
thing.  Some architectures actually have an "active cpus:" type field.
Some have a "processors total:" type field.  And often the method that
works changes from kernel to kernel, sometimes even within stable
releases.

But no, counting processors or bogomips doesn't work across the board.

Should this be rectified somehow?  I think it would take a proclomation
from on high.

What to do in the meantime?  Well the sysconf() method sounds promising.
If not you can dig out the sysinfo library included with linux_logo which
does a reasonable job with most of the common architectures.

Vince

-- 
____________
\  /\  /\  /  Vince Weaver        Linux 2.4.9 on a K6-2+, Up 45 days
 \/__\/__\/   vince@deater.net    http://www.deater.net/weave



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

* Re: system call for finding the number of cpus??
  2002-04-08 21:58   ` J.A. Magallon
  2002-04-08 22:08     ` Davide Libenzi
@ 2002-04-09  1:12     ` Nicholas Miell
  1 sibling, 0 replies; 20+ messages in thread
From: Nicholas Miell @ 2002-04-09  1:12 UTC (permalink / raw)
  To: J.A. Magallon; +Cc: Davide Libenzi, Kuppuswamy,  Priyadarshini, linux-kernel

On Mon, 2002-04-08 at 14:58, J.A. Magallon wrote:
> >sysconf(_SC_NPROCESSORS_CONF);
> >
> 
> I din't really trusted you, so digged inside includes till bits/confname.h
> Why the h*ll the manpage about sysconf does not talk about that ?????
> 

For some odd reason, the FSF doesn't like man pages. If you read the
info documentation for glibc, you'll find the _SC_NPROCESSORS_CONF
property listed in the "libc : System Configuration : Sysconf :
Constants for Sysconf" page. The man pages tend to lag behind the actual
info documentation, because they are maintained seperately.


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

* Re: system call for finding the number of cpus??
  2002-04-08 21:25 ` Robert Love
  2002-04-08 21:27   ` Christoph Hellwig
  2002-04-08 21:51   ` J.A. Magallon
@ 2002-04-08 22:59   ` David Ford
  2 siblings, 0 replies; 20+ messages in thread
From: David Ford @ 2002-04-08 22:59 UTC (permalink / raw)
  To: Robert Love; +Cc: Kuppuswamy, Priyadarshini, linux-kernel

# grep -c "^processor" /proc/cpuinfo
2

-d

Robert Love wrote:

>
>Linux does not implement such a syscall.  Note
>
>	cat /proc/cpuinfo | grep processor | wc -l
>
>works and is simple; you do not have to do it via script - execute it in
>your C program, save the one-line output, and atoi() it.
>
>	Robert Love
>



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

* Re: system call for finding the number of cpus??
  2002-04-08 21:58   ` J.A. Magallon
@ 2002-04-08 22:08     ` Davide Libenzi
  2002-04-09  1:12     ` Nicholas Miell
  1 sibling, 0 replies; 20+ messages in thread
From: Davide Libenzi @ 2002-04-08 22:08 UTC (permalink / raw)
  To: J.A. Magallon; +Cc: Kuppuswamy, Priyadarshini, Linux Kernel Mailing List

On Mon, 8 Apr 2002, J.A. Magallon wrote:

>
> On 2002.04.08 Davide Libenzi wrote:
> >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);
> >
>
> I din't really trusted you, so digged inside includes till bits/confname.h
> Why the h*ll the manpage about sysconf does not talk about that ?????

.h files usually changes ofter than man pages mainly because developers
like to code not to document



- Davide



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

* Re: system call for finding the number of cpus??
  2002-04-08 21:37     ` Mark Hahn
@ 2002-04-08 22:02       ` Dr. David Alan Gilbert
  2002-04-11 10:11         ` Rusty Russell
  0 siblings, 1 reply; 20+ messages in thread
From: Dr. David Alan Gilbert @ 2002-04-08 22:02 UTC (permalink / raw)
  To: Mark Hahn
  Cc: Christoph Hellwig, Robert Love, Kuppuswamy, Priyadarshini, linux-kernel

* Mark Hahn (hahn@physics.mcmaster.ca) wrote:
> > See http://people.nl.linux.org/~hch/cpuinfo/ for details.
> 
> egads.  "grep -ci bogo /proc/cpuinfo" then.

Hmm, cpuinfo is a very human readable file, I wouldn't use it to do
things like that.

I suggest /proc/stat whose format appears to be designed for machine
reading and which has a 'cpu0' and 'cpu1' line on this here dual
processor box; and from 2.4.x on it seems to have a cpu0 even on
uniprocessor; so I suggest:

grep "^cpu[0-9][0-9]* " /proc/stat

But I'd actually go and ask the CPU hotswap guys - they must have a way
of getting a handle on this (hey does that mean you might have cpu0,
cpu1, cpu3 .... ?)

Me thinks the format of these /proc files needs documenting - is there
anything already?

Dave

 ---------------- Have a happy GNU millennium! ----------------------   
/ Dr. David Alan Gilbert    | Running GNU/Linux on Alpha,68K| Happy  \ 
\ gro.gilbert @ treblig.org | MIPS,x86,ARM, SPARC and HP-PA | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

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

* Re: system call for finding the number of cpus??
  2002-04-08 21:27   ` Christoph Hellwig
  2002-04-08 21:37     ` Mark Hahn
@ 2002-04-08 21:58     ` H. Peter Anvin
  2002-04-09 14:28       ` Vince Weaver
  1 sibling, 1 reply; 20+ messages in thread
From: H. Peter Anvin @ 2002-04-08 21:58 UTC (permalink / raw)
  To: linux-kernel

Followup to:  <20020408222742.A28352@infradead.org>
By author:    Christoph Hellwig <hch@infradead.org>
In newsgroup: linux.dev.kernel
>
> On Mon, Apr 08, 2002 at 05:25:08PM -0400, Robert Love wrote:
> > Linux does not implement such a syscall.  Note
> > 
> > 	cat /proc/cpuinfo | grep processor | wc -l
> > 
> > works and is simple; you do not have to do it via script - execute it in
> > your C program, save the one-line output, and atoi() it.
> 
> I guess there is at least one architecture on which it breaks..
> See http://people.nl.linux.org/~hch/cpuinfo/ for details.
> 

Then that architecture should be fixed.

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>

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

* Re: system call for finding the number of cpus??
  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
  0 siblings, 2 replies; 20+ messages in thread
From: J.A. Magallon @ 2002-04-08 21:58 UTC (permalink / raw)
  To: Davide Libenzi; +Cc: Kuppuswamy, Priyadarshini, linux-kernel


On 2002.04.08 Davide Libenzi wrote:
>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);
>

I din't really trusted you, so digged inside includes till bits/confname.h
Why the h*ll the manpage about sysconf does not talk about that ?????



-- 
J.A. Magallon                           #  Let the source be with you...        
mailto:jamagallon@able.es
Mandrake Linux release 8.3 (Cooker) for i586
Linux werewolf 2.4.19-pre6-jam1 #1 SMP Sun Apr 7 00:50:05 CEST 2002 i686

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

* Re: system call for finding the number of cpus??
  2002-04-08 21:18 Kuppuswamy, Priyadarshini
  2002-04-08 21:25 ` Robert Love
@ 2002-04-08 21:56 ` Davide Libenzi
  2002-04-08 21:58   ` J.A. Magallon
  2002-04-09 15:37 ` Tigran Aivazian
  2 siblings, 1 reply; 20+ messages in thread
From: Davide Libenzi @ 2002-04-08 21:56 UTC (permalink / raw)
  To: Kuppuswamy, Priyadarshini; +Cc: linux-kernel

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

* Re: system call for finding the number of cpus??
  2002-04-08 21:25 ` Robert Love
  2002-04-08 21:27   ` Christoph Hellwig
@ 2002-04-08 21:51   ` J.A. Magallon
  2002-04-08 22:59   ` David Ford
  2 siblings, 0 replies; 20+ messages in thread
From: J.A. Magallon @ 2002-04-08 21:51 UTC (permalink / raw)
  To: Robert Love; +Cc: Kuppuswamy, Priyadarshini, linux-kernel


On 2002.04.08 Robert Love wrote:
>On Mon, 2002-04-08 at 17:18, Kuppuswamy, Priyadarshini wrote:
>
>>   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??
>
>Linux does not implement such a syscall.  Note
>

How about this:

#include <sys/sysinfo.h>       
...
    //nproc = get_nprocs(); // Available processors
    nproc = get_nprocs_conf(); // Configured processors (some can be down...)

(glibc 2.2.5, but i think it keeps working since time ago).

BTW, why linux does not implement sysconf(_SC_NPROC_[CONF,ONLN]) ??

TIA

-- 
J.A. Magallon                           #  Let the source be with you...        
mailto:jamagallon@able.es
Mandrake Linux release 8.3 (Cooker) for i586
Linux werewolf 2.4.19-pre6-jam1 #1 SMP Sun Apr 7 00:50:05 CEST 2002 i686

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

* Re: system call for finding the number of cpus??
  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-08 21:58     ` H. Peter Anvin
  1 sibling, 1 reply; 20+ messages in thread
From: Mark Hahn @ 2002-04-08 21:37 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Robert Love, Kuppuswamy, Priyadarshini, linux-kernel

> See http://people.nl.linux.org/~hch/cpuinfo/ for details.

egads.  "grep -ci bogo /proc/cpuinfo" then.


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

* Re: system call for finding the number of cpus??
  2002-04-08 21:25 ` Robert Love
@ 2002-04-08 21:27   ` Christoph Hellwig
  2002-04-08 21:37     ` Mark Hahn
  2002-04-08 21:58     ` H. Peter Anvin
  2002-04-08 21:51   ` J.A. Magallon
  2002-04-08 22:59   ` David Ford
  2 siblings, 2 replies; 20+ messages in thread
From: Christoph Hellwig @ 2002-04-08 21:27 UTC (permalink / raw)
  To: Robert Love; +Cc: Kuppuswamy, Priyadarshini, linux-kernel

On Mon, Apr 08, 2002 at 05:25:08PM -0400, Robert Love wrote:
> Linux does not implement such a syscall.  Note
> 
> 	cat /proc/cpuinfo | grep processor | wc -l
> 
> works and is simple; you do not have to do it via script - execute it in
> your C program, save the one-line output, and atoi() it.

I guess there is at least one architecture on which it breaks..
See http://people.nl.linux.org/~hch/cpuinfo/ for details.

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

* Re: system call for finding the number of cpus??
  2002-04-08 21:18 Kuppuswamy, Priyadarshini
@ 2002-04-08 21:25 ` Robert Love
  2002-04-08 21:27   ` Christoph Hellwig
                     ` (2 more replies)
  2002-04-08 21:56 ` Davide Libenzi
  2002-04-09 15:37 ` Tigran Aivazian
  2 siblings, 3 replies; 20+ messages in thread
From: Robert Love @ 2002-04-08 21:25 UTC (permalink / raw)
  To: Kuppuswamy,  Priyadarshini; +Cc: linux-kernel

On Mon, 2002-04-08 at 17:18, Kuppuswamy, Priyadarshini wrote:

>   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??

Linux does not implement such a syscall.  Note

	cat /proc/cpuinfo | grep processor | wc -l

works and is simple; you do not have to do it via script - execute it in
your C program, save the one-line output, and atoi() it.

	Robert Love


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

* 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

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:54 system call for finding the number of cpus?? 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
  -- strict thread matches above, loose matches on Subject: below --
2002-04-08 21:18 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).