From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio Olive Leite Subject: Re: determining which process triggered an automount Date: Fri, 13 Apr 2007 01:20:58 -0300 Message-ID: <20070413042058.GB5320@sleipnir.redhat.com> References: <20070411234847.GH21698@pixar.com> <1176372304.3441.63.camel@raven.themaw.net> <20070412141307.GV5812@lenin.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <20070412141307.GV5812@lenin.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autofs-bounces@linux.kernel.org Errors-To: autofs-bounces@linux.kernel.org To: autofs@linux.kernel.org 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=E1bio -- = ex sed lex awk yacc, e pluribus unix, amem