Re: Suggested dual human/binary interface for proc/devfs

From: Ed Carp (erc@pobox.com)
Date: Tue Apr 11 2000 - 02:27:38 EST


Andrew McNabb (amcnabb@argus-systems.com) writes:

> ASCII files are always friendlier to humans, and it is always better to
> stick with them unless there is a very compelling reason to switch. /proc
> stuff is still under discussion, but if there is any way to improve speed
> without switching to a binary system, we should try it out. We certainly
> don't want to mess with existing /etc files.

The only way I can think of to do this is to have a fixed record length, and have the records sorted in some sort of order. That nakes doing a binary search for the data you're looking for relatively simple.

If anyone hasn't noticed, I'm pretty passionate about all of this, because I remember oh-so-clearly writing code to read and interpret struct proc back in 1989 or so for TI in Austin. It was a pain in the rear to have to do all that stuff, and some folks want to put us back in that boat. /proc was meant to be able to be read by HUMANS and SIMPLE SHELL SCRIPTS. If you want anything more complicated, go directly to the kernel structures themselves. But don't force a level of parsing complexity on /proc because someone wants to try and "make their mark" or be clever or use the latest/greatest XML/XSL/whatever stuff.

Make it easy for scripts to read /proc, THEN write tools to convert it to XML or whatever your favorite format is. Forcing the kernel to produce XML is insanity.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:15 EST