The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: ron minnich <rminnich@gmail.com>
To: Larry McVoy <lm@mcvoy.com>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: Re: [TUHS] 4.1c bsd ptrace man entry ("ptrace is unique and arcane")
Date: Tue, 25 Jun 2019 18:03:47 -0700	[thread overview]
Message-ID: <CAP6exYKFkDYYYNbkhUxC1x4kSf0w-TJvy0L7udcoP4btSmBGxQ@mail.gmail.com> (raw)
In-Reply-To: <20190626004603.GG925@mcvoy.com>

On Tue, Jun 25, 2019 at 5:46 PM Larry McVoy <lm@mcvoy.com> wrote:
>
> I'm curious what Rob and others think of the Linux /proc.  It's string
> based and it seems like it is more like /whatever_you_might_want.

it's very handy but quite difficult to work with programatically. The
output is convenient for humans to parse, not very nice for programs
to parse.

/proc on linux has no real standard way of outputting things. You get
tables, tuples, and lists and some stuff I can't classify
(/proc/execdomains, /proc/devices); and, in some cases, some files
give you more than one type of thing. Units are not clear for many
tables.

/proc on linux has far more than just process information, including
stuff that has nothing to do with processes (51 things on my current
linux, e.g. /proc/mounts).

Things are in many cases not self-describing, though lots of /proc
have this issue.

I do recall (possibly wrongly) at some point in the 2000s there was an
effort to stop putting stuff in /proc, but rather in /sys, but that
seems to have not worked out. /proc is just too convenient a place,
and by convention, lots of stuff lands there.

While I was at LANL we did experiment with having /proc come out as
s-expressions, which were nicely self describing, composable, easily
parsed and operated on, and almost universally disliked b/c humans
don't read s-expressions that easily. So that ended.

We've been reimplementing Unix commands in Go for about 8 years now
and dealing with all the variance in /proc on linux was a headache.
You pretty much need a different function for every file in /proc.

And all that said, it's handy, so hard to complain about too much.

  parent reply	other threads:[~2019-06-26  1:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25 19:33 Norman Wilson
2019-06-25 19:42 ` Bakul Shah
2019-06-25 20:35 ` Clem Cole
2019-06-25 23:52 ` ron minnich
2019-06-26  0:37   ` Rob Pike
2019-06-26  0:46     ` Larry McVoy
2019-06-26  0:56       ` Rob Pike
2019-06-26  1:03       ` ron minnich [this message]
2019-06-26  1:12         ` George Michaelson
2019-06-26  1:32           ` Noel Hunt
2019-06-26 15:41         ` Theodore Ts'o
  -- strict thread matches above, loose matches on Subject: below --
2019-06-25  2:27 Kirk McKusick
2019-06-25  1:08 ron minnich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP6exYKFkDYYYNbkhUxC1x4kSf0w-TJvy0L7udcoP4btSmBGxQ@mail.gmail.com \
    --to=rminnich@gmail.com \
    --cc=lm@mcvoy.com \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).