From: Stanislav Meduna <stano@meduna.org>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] sysconf(_SC_NPROCESSORS_CONF) returning zero
Date: Mon, 04 Aug 2008 15:58:04 +0200 [thread overview]
Message-ID: <48970AEC.6020503@meduna.org> (raw)
Hi,
the following program
===
#include <unistd.h>
#include <stdio.h>
main()
{
printf("Number of processors: %d\n", sysconf(_SC_NPROCESSORS_CONF));
}
===
produces
Number of processors: 0
on my system.
# uname -a
Linux dirk 2.6.26 #1 Wed Jul 30 10:56:10 CEST 2008 i686 GNU/Linux
# cat /proc/cpuinfo
processor : 0
vendor_id : User Mode Linux
model name : UML
mode : skas
host : Linux seldon-base 2.6.23.17 #2 SMP Sat Jun 21 15:04:22 CEST 2008 i686
bogomips : 4771.02
# ls -l /lib/libc.so.6
lrwxrwxrwx 1 root root 11 2008-07-17 17:16 /lib/libc.so.6 -> libc-2.7.so
The monit monitoring tool (http://www.tildeslash.com/monit/)
crashes because of this. I don't know whose fault it is, but
I suspect the UML - otherwise I'd expect many more instances
of this problem when googling for it.
Regards
--
Stano
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next reply other threads:[~2008-08-04 13:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-04 13:58 Stanislav Meduna [this message]
2008-08-04 20:33 ` [uml-devel] sysconf(_SC_NPROCESSORS_CONF) returning zero Jeff Dike
2008-08-04 20:59 ` Stanislav Meduna
2008-08-04 21:47 ` Jeff Dike
2008-08-04 22:06 ` Stanislav Meduna
2008-08-04 22:07 ` Ingo van Lil
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=48970AEC.6020503@meduna.org \
--to=stano@meduna.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.