Messages in this thread | | | Date | Wed, 20 Apr 2005 21:31:09 +0100 | From | Ralf Baechle <> | Subject | Re: /proc/cpuinfo format - arch dependent! |
| |
On Tue, Apr 19, 2005 at 09:24:17AM -0400, Lennart Sorensen wrote:
> If you change it now, how many tools would break? > > Maybe if you can list what statistics you think should be common to all > systems, that could be presented in another file that is always the same > format on each architecture. > > Certainly looking at arm and i386, other than the bogomips field there > is nothing in common between their cpuinfo contents. THey don't even > capitalize bogomips the same either. > > I doubt this is really doable. If all you want is the number of CPUs > then something like sysconf(_SC_NPROCESSORS_CONF) should do.
Which in glibc is implemented by counting the number of processor: records in /proc/cpuinfo, so simply Nico's parser seems to be insufficient.
Ralf - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |