All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Olive Leite <fleite@redhat.com>
To: autofs@linux.kernel.org
Subject: Re: determining which process triggered an automount
Date: Fri, 13 Apr 2007 01:20:58 -0300	[thread overview]
Message-ID: <20070413042058.GB5320@sleipnir.redhat.com> (raw)
In-Reply-To: <20070412141307.GV5812@lenin.net>

On Thu, Apr 12, 2007 at 07:13:07AM -0700, Peter C. Norton wrote:
> 
> I think a system tap module could get you this, but it will take some
> time investment for you to find out how to use it.
> 
> http://sourceware.org/systemtap/

And it also takes a bit of time to find probe points that have not
been optimized away, auto-inlined, etc. In any case, here's a working
(in FC5) probe that will tell you who requested a directory. It could
be improved to provide a full path, but I'm satisfied by it as is.

probe module("autofs4").function("autofs4_find_wait") {
	printf("%s(%d) requested %s\n", execname(), pid(),
		kernel_string($name))
}

The output is:

$ sudo stap autofs4_notify_daemon.stap
bash(5913) requested foobar
bash(5913) requested foobar
bash(5913) requested foobar
...

Maybe autofs4_find_wait is not the best place, but it works, and I
found the more obvious autofs4_notify_daemon to be auto-inlined.

Hope this helps!
Fábio
-- 
ex sed lex awk yacc, e pluribus unix, amem

  reply	other threads:[~2007-04-13  4:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-11 23:48 determining which process triggered an automount Chris Walker
2007-04-12 10:05 ` Ian Kent
2007-04-12 14:13   ` Peter C. Norton
2007-04-13  4:20     ` Fabio Olive Leite [this message]
2007-04-13  5:22       ` Chris Walker

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=20070413042058.GB5320@sleipnir.redhat.com \
    --to=fleite@redhat.com \
    --cc=autofs@linux.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.