All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] sysconf(_SC_NPROCESSORS_CONF) returning zero
@ 2008-08-04 13:58 Stanislav Meduna
  2008-08-04 20:33 ` Jeff Dike
  0 siblings, 1 reply; 6+ messages in thread
From: Stanislav Meduna @ 2008-08-04 13:58 UTC (permalink / raw)
  To: user-mode-linux-devel

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

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

end of thread, other threads:[~2008-08-04 22:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-04 13:58 [uml-devel] sysconf(_SC_NPROCESSORS_CONF) returning zero Stanislav Meduna
2008-08-04 20:33 ` 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

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.