LSB1.1: /proc/cpuinfo
Joerg Schilling
schilling at fokus.gmd.de
Thu Jan 3 15:55:59 PST 2002
>From: Christoph Hellwig <hch at caldera.de>
>> I would prefer to document something that already exists, and not require
>> that a new feature has to be implemented by everyone. Also, it's slightly
>> easier for an application to just open a text file instead of having to popen()
>> a command.
>The problem is just that current Linux /proc is full of abuse.
>cpuinfo is one of the very good example why it should NOT be set in
>stone.
I really hope that /proc/<non-number> will vanish in the future.
It definitely is an abuse of the /proc filesystem that is rerserved
for process.
First let me give some background information:
The way /proc works has been introduced by Plan 9 in the first half of the 80s.
What Linux added as an abuse of the /proc filesytem in principle is a Plan 9
idea too. It makes sense to have something similar, but please please _not_
inside the /proc tree.
Sun is planning to have /sys with similar backgound in a future version of
Solaris so it wouls make sense to talk to the Solaris kernel kackers to have a
common way to go for the new /sys tree.
If you like to look for other ideas on how to retrieve the needed information
it makes sense to look at Solaris too. The reason is that Solaris uses "prtconf"
which is close to the device tree from the IEEE standard Boot loader.
prtconf -p is giving exactly the IEEE device tree
prtconf -p -v gives more verbose information.
If you don't use -p you will see the kernel view of the device tree.
On MacOS X which also uses the IEEE Boot architecture the same beast
will be shown via a 'ioreg -l'
Jörg
EMail:joerg at schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js at cs.tu-berlin.de (uni) If you don't have iso-8859-1
schilling at fokus.gmd.de (work) chars I am J"org Schilling
URL: http://www.fokus.gmd.de/usr/schilling ftp://ftp.fokus.gmd.de/pub/unix
More information about the lsb-discuss
mailing list