"/usr/sbin/psrinfo -p" will print the number of physical processors on the system, though it does not indocate if they are on- or off-line. You could also write an extension which gets processor information using the sys/processor library. Example code is available in the "p_online" man page. Chris