> Neither method is completely reliable since they rely on having > either sysfs or procfs mounted. And remember this has to work > reasonably on the small minority of systems without CPU hotplug :-) > > So how about: I'll count the entries in /sys/devices/system/cpu > and use that if possible. Otherwise I'll fall back to > sysconf(_SC_NPROCESSORS_CONF). > > Sound ok? Sounds OK. CC me on that patch and I'll try to be sure it gets to Redhat and SuSE, as the versions they currently ship have the broken top.