9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: ron minnich <rminnich@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: [9fans] recreational programming of an evening
Date: Sat, 20 Mar 2010 22:48:53 -0700	[thread overview]
Message-ID: <13426df11003202248l4c8f9577ueab252b93b785810@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]

I wanted /proc/<pid>/truss to be more infomative ... and I wanted to
trace things that fork/exec. I can now see things like file names, IO
data, and so on. This is only in 9vx at present.

For RFORK, the output from /proc/<pid>/truss is just Rfork unless it
is creating new proc, in which case it is ProcRfork. That's how the rc
script knows to start a new truss.

So here is the result: very minor extension to the kernel code, shell
script a bit longer (25 lines!) but what happens is e.g. you trace an
rc, and for each fork/exec that happens, a new truss display pops up
in a new window and you can now watch the kid. And yes it does work
fine if the thing you start is an rc.

Watching ssh is fun. I hope to use this to try to find out what hg is up to.

Screen shot attached, this is pretty handy for me and if you want my
patch to 9vx let me know. What's interesting to me about this is that
I can not imagine even attempting this on any other os or windowing
system. It was just too easy on Plan 9 however.

ron

[-- Attachment #2: trussf.png --]
[-- Type: image/png, Size: 55126 bytes --]

             reply	other threads:[~2010-03-21  5:48 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-21  5:48 ron minnich [this message]
2010-03-21  8:30 ` EBo
2010-03-21 17:36 ` Stuart Morrow
2010-03-21 17:39   ` erik quanstrom
2010-03-21 21:47   ` ron minnich
2010-03-21 22:02     ` EBo
2010-03-21 22:56       ` hiro
2010-03-22  0:02         ` EBo
2010-03-22 15:50           ` David Leimbach
2010-03-22 15:57             ` andrey mirtchovski
2010-03-22 16:09               ` David Leimbach
2010-03-22 17:22                 ` Chad Brown
2010-03-22 17:54                   ` Chad Brown
2010-03-22 16:09               ` erik quanstrom
2010-03-21 23:19       ` Ethan Grammatikidis
2010-03-21 23:54         ` EBo
2010-03-22  5:57         ` Skip Tavakkolian
2010-03-22 15:47     ` David Leimbach
2010-03-22 16:07       ` ron minnich
2010-03-21 17:57 ` Bakul Shah
2010-03-21 18:03   ` Devon H. O'Dell
2010-03-21 18:59     ` Lyndon Nerenberg
2010-03-21 22:08       ` EBo
2010-03-21 19:37     ` Steve Simon
2010-03-21 20:41     ` Bakul Shah
2010-03-21 21:48   ` ron minnich
  -- strict thread matches above, loose matches on Subject: below --
2010-03-17  4:37 ron minnich
2010-03-17  9:15 ` Noah Evans
2010-03-17 15:12   ` 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=13426df11003202248l4c8f9577ueab252b93b785810@mail.gmail.com \
    --to=rminnich@gmail.com \
    --cc=9fans@9fans.net \
    /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).