[lkml]   [1997]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectMachine friendly format for /proc files
We are in the process of creating an SNMP agent using the UCSD SNMP code 
(specifically for the AToM MIB). Much of the information to be returned by
accesses to this agent comes from various /proc files.

Clearly this is a very clean and convenient solution compared with typical
UNIX solutions which involve the agent itself fishing around inside the kernel
to retrieve info from (usually undocumented and unsupported) locations in the
memory map.

Unfortunately the format of the various /proc files is pretty much ad hoc and
primarily intended to be human readable rather than machine readable. It is
also essentially unsupported - it is not a specifically documented and
maintained interface - so in some ways it is just as bad as fishing around in
the kernel directly. The agent has to be aware of the format of each file and
provide specific decoding for the format provided by the device driver writer.
Accordingly, a minor change to the format can break the agent.

We propose that it would be very convenient if a more machine friendly and
standardised format was added to the /proc files. Something like the
M****soft Windows initialisation file format is what we would be looking for
(surely they didn't get something right ;-) with parameter/value pairs divided
into sections plus comment facilities.

The existing human readable output could be retained as comment either up
front (less likely to break existing programs) or tacked on the end (easier to
read after cat /proc/xxx)..

Any views?

Elwyn Davies

Elwyn B Davies MA
Senior Consultant
Origin UK/TA Cambridge
(Technical Automation Cell)
Tel: +44 1223 423355
Fax: +44 1223 420724

"The Folly is mostly mine"

 \ /
  Last update: 2005-03-22 13:38    [W:0.054 / U:1.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site