[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: procfs problems
From:       Frank Sweetser <rasmusin () paramount ! res ! wpi ! edu>
Date:       1997-04-30 23:29:12
[Download RAW message or body]

==> Regarding Re: procfs problems; tim@franck.Princeton.EDU (Tim Hollebeek) adds:

tim> How much more complex is a /bin/proccat that (for example) changes
tim> null terminated key:value pairs into text?  E.g. the proc files would
tim> contain something like:

tim> "key1\0val1\0key2\0val2\0..."

tim> which would translate to:

tim> key1 : val1 key2 : val2 ...

tim> Support for hierarchical entries, simple tables, etc doesn't make it
tim> much bigger.  Anything can appear in a field (including ':'), and the
tim> binary version is trivially machine readable.  /bin/proccat is likely
tim> to succeed whenever /bin/cat would, so it is usable when your system
tim> is hosed.

Hmm....  I'd use a tab instead of a null (I admit, I'm a stickler for
human readability :) but other than that, yeah, I definatelly like it.
Human readably, easily parsed by C progs or by your favorite perl script...
perhaps even different versions of proccat to format the output to your
taste.

-- 
Windows: I can play Doom!              |RedHat Linux 2.0.30 i486
Linux: I can be a file server, be a Web|Because reboots are for upgrades!
server, run the accounting package with|finger rasmusin@paramount.res.wpi.edu
twelve terminals AND play Doom!        |for pgp key.        frank sweetser
	pgp fingerprint = 79 26 EF D7 97 EC 50 AF  17 1F 39 D9 93 6F 04 D4

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic