linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: PROPOSAL: /proc standards (was dot-proc interface [was: /proc
@ 2001-11-06 21:21 William Knop
  2001-11-06 21:31 ` Erik Hensema
  0 siblings, 1 reply; 49+ messages in thread
From: William Knop @ 2001-11-06 21:21 UTC (permalink / raw)
  To: linux-kernel

>>1)  IT SHOULD NOT BE PRETTY.  No tabs to line up columns. No "progress
>>bars."  No labels except as "proc comments" (see later).  No in-line
>>labelling.
>
>It should not be pretty TO HUMANS. Slight difference. It should be >pretty 
>to shellscripts and other applications though.

If this is the case, why are we using ASCII for everything? If the only 
interface to /proc will be applications, then we could just as well let the 
application turn four bytes into an ASCII IPv4 adddress. We could easily 
have it set up to parse using the format [single byte type identifier (ie 4 
for string with the first byte of "data" being the string length, 1 for 
unsigned int, 2 for signed int, 19 for IPv4, 116 for progress bar, 
etc.)][data]. Let people standardize away. Am I missing the point?

I think every aspect of an OS should be intuitive (so long as it is 
efficient), which IMO /proc isn't. If this means splitting it in two, as 
some have suggested, so be it. It certainly should have a design 
guideline/spec so we may at least be consistant. Just my 2 coppers.


Will Knop
w_knop@hotmail.com

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


^ permalink raw reply	[flat|nested] 49+ messages in thread
* Re: PROPOSAL: /proc standards (was dot-proc interface [was: /proc
@ 2001-11-07 19:28 William Knop
  2001-11-07 23:01 ` Miquel van Smoorenburg
  0 siblings, 1 reply; 49+ messages in thread
From: William Knop @ 2001-11-07 19:28 UTC (permalink / raw)
  To: linux-kernel


>Yes, but I meant a program which reads a single binary value and >outputs 
>it as ascii, as a generic layer between the binary /proc and >the ascii 
>world of shell scripts.
>
>I don't like a binary /proc.

The binary issue could very easily be solved, as you said, by a small 
generic program to do the conversion. Upside it only shell scripts need 
this, while more advanced (lower level) programs will get better preformance 
out of binary format. Downside? I am not sure I see the problem. If a 
program needs to get a lot of /proc info frequently, a binary interface will 
be faster. Idealistically, do we want the kernel interfaces binary or ascii? 
Do we want them to preform best with (be native to) shell scripts or 
programs?

In any event, is the format of process info (actually should be in /proc) or 
the-other-stuff the issue? If it is the latter, the compatibility issue has 
a fairly easy solution...

>But I agree: /proc is populated with files that don't really belong >there. 
>Maybe everything should be moved to /kernel? (except for the
>process info, offcourse).

I like this idea a lot, and so far I haven't heard any objections, save 
compatability...

>It will be very, very hard for distributors to create a distribution >which 
>runs one the native 2.6 /proc interface as soon as 2.6 comes >out. I think 
>we must assume rewriting things like procps, init >scripts, etc. will only 
>start as soon as 2.6 comes out. We should >provide some transitional period 
>for userspace to adapt, but make >clear to everybody that compatibility 
>isn't going to last forever.

Simple solution is to move /kernel stuff of /proc to /kernel (new format, 
bin, ascii, whatever) and put transition code (old code still serving the 
old format /kernel stuff) serving in /proc. Make the backwards compatibility 
/proc a compile option. That way, userland developers will have time to 
migrate to /kernel (or whatever it should be called). Not too much effort, 
makes userland developers not sweat to death...

Will Knop
w_knop@hotmail.com

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


^ permalink raw reply	[flat|nested] 49+ messages in thread
* Re: PROPOSAL: dot-proc interface [was: /proc stuff]
@ 2001-11-05 13:41 Petr Baudis
  2001-11-06 18:56 ` PROPOSAL: /proc standards (was dot-proc interface [was: /proc stuff]) Stephen Satchell
  0 siblings, 1 reply; 49+ messages in thread
From: Petr Baudis @ 2001-11-05 13:41 UTC (permalink / raw)
  To: Jakob ?stergaard, linux-kernel, Daniel Kobras, Tim Jansen

Hi,

> We want to avoid these problems:
>  1)  It is hard to parse (some) /proc files from userspace
>  2)  As /proc files change, parsers must be changed in userspace
> 
> Still, we want to keep on offering
>  3)  Human readable /proc files with some amount of pretty-printing
>  4)  A /proc fs that can be changed as the kernel needs those changes

  I've read the whole thread, but i still don't get it. Your solution doesn't
improve (1) for parsers in scripting languages, where it is frequently far
easier to parse ASCII stuff than messing with binary things, when not almost
impossible. So we don't make any progress here.  And for languages like C,
where this will have most use, there actually is solution and it is working.
So, please, can you enlighten me, what's so wrong on sysctl? It actually
provides exactly what do you want, and you even don't need to bother yourself
with open() etc ;). So it would be maybe better improving sysctl interface,
especially mirroring of all /proc stuff there, instead of arguing about scanf()
:-).

  So can you please explain me merits of your approach against sysctl?

-- 

				Petr "Pasky" Baudis

UN*X programmer, UN*X administrator, hobbies = IPv6, IRC
Real Users hate Real Programmers.
Public PGP key, geekcode and stuff: http://pasky.ji.cz/~pasky/

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2001-11-19 19:22 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-06 21:21 PROPOSAL: /proc standards (was dot-proc interface [was: /proc William Knop
2001-11-06 21:31 ` Erik Hensema
2001-11-06 22:09   ` Ricky Beam
2001-11-07 16:08     ` Erik Hensema
2001-11-07 16:19       ` lkml user
2001-11-08  0:22       ` Albert D. Cahalan
2001-11-08  6:19         ` john slee
2001-11-08  8:14           ` Albert D. Cahalan
2001-11-08 11:49             ` john slee
  -- strict thread matches above, loose matches on Subject: below --
2001-11-07 19:28 William Knop
2001-11-07 23:01 ` Miquel van Smoorenburg
2001-11-05 13:41 PROPOSAL: dot-proc interface [was: /proc stuff] Petr Baudis
2001-11-06 18:56 ` PROPOSAL: /proc standards (was dot-proc interface [was: /proc stuff]) Stephen Satchell
2001-11-06 20:12   ` PROPOSAL: /proc standards (was dot-proc interface [was: /proc Erik Hensema
2001-11-06 20:58     ` Roy Sigurd Karlsbakk
2001-11-06 21:43       ` Ricky Beam
2001-11-06 22:14         ` Alexander Viro
2001-11-07  0:33           ` Alex Bligh - linux-kernel
2001-11-07  7:20             ` Albert D. Cahalan
2001-11-07  8:07               ` Alexander Viro
2001-11-07 17:24               ` Alex Bligh - linux-kernel
2001-11-07 17:22                 ` Blue Lang
2001-11-07 19:21                   ` Ricky Beam
2001-11-11 10:27                   ` Kai Henningsen
2001-11-08  0:47                 ` Albert D. Cahalan
2001-11-08 18:53                   ` Alex Bligh - linux-kernel
2001-11-08 21:28                     ` Ricky Beam
2001-11-09  5:15                     ` Albert D. Cahalan
2001-11-19 19:22                     ` bill davidsen
2001-11-07  0:13         ` Martin Dalecki
2001-11-07  0:40           ` Alex Bligh - linux-kernel
2001-11-07  1:10           ` Ricky Beam
     [not found]             ` <Pine.GSO.4.33.0111061947540.17287-100000@sweetums.bluetronic.ne t>
2001-11-07  1:17               ` Alex Bligh - linux-kernel
2001-11-07 11:32             ` Martin Dalecki
2001-11-07 12:35         ` Remco Post
2001-11-07 23:53           ` Albert D. Cahalan
2001-11-07 22:24         ` Paul P Komkoff Jr
2001-11-07 23:15           ` Phil Howard
2001-11-06 21:24     ` Rik van Riel
2001-11-06 21:45       ` Erik Hensema
2001-11-06 22:06       ` Tim Jansen
2001-11-06 22:28       ` Erik Andersen
2001-11-06 22:33         ` Jan-Benedict Glaw
2001-11-06 22:42           ` Erik Andersen
2001-11-06 22:49             ` Jan-Benedict Glaw
2001-11-06 22:53             ` Patrick Mochel
2001-11-06 22:52               ` Erik Andersen
2001-11-06 22:46           ` Ben Greear
2001-11-06 22:50             ` Jan-Benedict Glaw
2001-11-07  0:17           ` Martin Dalecki
2001-11-06 22:53     ` J . A . Magallon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).