Re: Machine friendly format for /proc files
Marty Leisner (leisner@sdsp.mc.xerox.com)
Wed, 19 Feb 1997 09:29:24 PST
>
>
> On Mon, 17 Feb 1997, Snow Cat wrote:
>
> > Wouldn't ioctl support for /proc files be more logical?
>
> You've got my vote for that. Its fine for a human to browse through /proc,
> but programs shouldn't have to rely on the format of /proc file entries to
> work properly - for the simple reason that its WASTEFUL to convert binary
> information to text just to convert the text back to binary in order to
> use it, not to mention any file descriptors opened in the process.
>
>
Actual, historically, programs like ps and top groveled around kernel
structures, reading kernel memory to figure out what was going on.
One of the reason for the /proc file system is it makes things very
easy to examine, and the applications doesn't have to be setguid kmem.
If you define a special ioctl, you still need something special, in
which case why don't you just grovel around kernel structures.
You **could** make a top which reads the kernel structures (some ports do).
--
marty
leisner@sdsp.mc.xerox.com
Member of the League for Programming Freedom