From: Bernd Eckenfels <ecki-news2002-03@lina.inka.de>
To: linux-kernel@vger.kernel.org
Subject: Re: system call for finding the number of cpus??
Date: Tue, 9 Apr 2002 07:36:48 +0200 [thread overview]
Message-ID: <E16uoJE-00087t-00@sites.inka.de> (raw)
In-Reply-To: <20020408221223.GE13043@werewolf.able.es>
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
next prev parent reply other threads:[~2002-04-09 5:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E16uoJE-00087t-00@sites.inka.de \
--to=ecki-news2002-03@lina.inka.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox