Linux-kernel mailing list archive 1998-48,: Re: /proc and /kern

# Re: /proc and /kern

Mirian Crzig Lennox (mirian@xensei.com)
03 Dec 1998 13:26:29 -0500

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Tymm Twillman: "Re: Toshiba chip (was: win chip)"
- Previous message: Glynn Clements: "Re: High UID support for Linux"
- In reply to: Albert D. Cahalan: "Re: /proc and /kern"
- Next in thread: david parsons: "Re: /proc and /kern"

"Albert D. Cahalan" <acahalan@cs.uml.edu> writes:
> > Another thought I had is to make the pseudo files in /proc and /kern
> > display real size information instead of 0, as they do under BSD,
> > since I often find it's useful to know roughly how much virtual
> > information is "contained" in those files without actually having to
> > look at the contents or pipe the contents through a program.
>
> You can only do that if you change the format to contain fixed length
> records. It would not be reasonable to create the data every time
> somebody does "/bin/ls -l /proc /kern".

Heh. I've gotten enough negative feedback from this idea that I've
decided to drop it.

I didn't realize that most of the information in /proc is generated on
the fly (under NetBSD, most of it is not). Obviously, it would just
be wasteful to compute "file" sizes in this case.

> Perhaps the file type should change to a non-regular file.
> Character devices, sockets, and named pipes are all OK.

At a minimum, it would be nice if there were some way for stat() to
tell the caller "this is a file of indefinite size", rather than the
misleading "this is an empty file". That way, ls could be modified to
display "--" or some other non-numeric for the file size.

I'm not a Linux guru (yet) so I'm not sure if there is an acceptable
way to do this.

    --
    Mirian Crzig Lennox                                Systems Anarchist
              "There's a New World Order coming every minute.
                          Make mine extra cheese."

    -
    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/

- Next message: Tymm Twillman: "Re: Toshiba chip (was: win chip)"
- Previous message: Glynn Clements: "Re: High UID support for Linux"
- In reply to: Albert D. Cahalan: "Re: /proc and /kern"
- Next in thread: david parsons: "Re: /proc and /kern"