Messages in this thread | | | Date | Wed, 1 Sep 1999 00:00:16 -0400 (EDT) | From | "Albert D. Cahalan" <> | Subject | Re: /proc/cpuinfo verbiage differ unnecessarily between ports... |
| |
Michael K. Johnson writes: > Ronald Cole writes:
>> But, there's probably a better, more portable, way to calculate the >> number of processors for ps. > > That would be /proc/stat.
What are you two talking about? This is the portable way:
sysconf(_SC_NPROCESSORS_CONF);
It would seem that libc is broken on SPARC. It would also seem that the kernel does not provide an efficient way to get this value. Naturally, one would fix the library and perhaps improve the kernel.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |