Date: Mon, 11 Mar 2002 13:57:14 +1100 (EST) From: "Aaron Hill" <fbsdlist@futureuse.net> To: <mpd6334@cs.rit.edu> Cc: <questions@freebsd.org> Subject: Re: Utility to list accessed files? Message-ID: <24177.203.11.225.5.1015815434.squirrel@www.futureuse.net> In-Reply-To: <20020310215346.A243@rochester.rr.com> References: <20020310215346.A243@rochester.rr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Mon, Mar 11, 2002 at 01:19:58PM +1100, Aaron Hill wrote: >> Hello, >> >> I have a scripted process here that I am trying to debug. It would >> help me if I could a listing of all the files being accessed by the >> process. The scripts themselves are somewhat complex. >> >> Is there a utility available able that can do this? For example, the >> time utility ... >> >> time ls -l >> >> ... calculates how long "ls -l" takes to execute. What if I wanted a >> list of any files opened by "ls" ... can it be done? >> >> Thanks >> Aaron Hill > > ports/sysutils/lsof should do the trick. > > mike Mike, Thanks for the reply, I appreciate it. I've had a look at lsof and fstat before I sent my email. They make a list of files opened by a process at a particular point in time, so I could get a rough idea of what is going on by running the utility constantly. But say if I'm running the utility every second I could easily miss a quick access to a file. Does that sound reasonable? I was hoping for a utility that would somehow get between the application and the system calls or tie into the VFS system ... ? Maybe I'm hoping for too much. Thanks Aaron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?24177.203.11.225.5.1015815434.squirrel>