Date: Tue, 23 Nov 2004 22:22:48 +0000 (GMT) From: Robert Watson <rwatson@freebsd.org> To: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> Cc: freebsd-hackers@freebsd.org Subject: Re: Tracing Disk Access Message-ID: <Pine.NEB.3.96L.1041123222049.98085C-100000@fledge.watson.org> In-Reply-To: <20041123134502.GA1112@pm514-9.comsys.ntu-kpi.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 23 Nov 2004, Andrey Simonenko wrote: > On Mon, Nov 22, 2004 at 06:33:18PM -0500, Brian Fundakowski Feldman wrote: > > On Mon, Nov 22, 2004 at 04:22:54PM +0100, Hanspeter Roth wrote: > > > > > > Hello, > > > > > > I have set an idle timeout for the hard-disk. But when there is no > > > user activity there are frequent disk accesses. > > > How can one trace disk access? > > > I'd like to know the kind of access and on which files/directories/ > > > nodes. I'd like to log on the console or on a memory disk file. > > > > You should look to the MAC framework to provide you -- if not the entire > > solution -- at least insight into how and where you can do this. If you > > were to do it at the disk device level, it would be a GEOM module, though. > > As I understood you suggested to insert controlling geom between a > consumer and a provider attached to each other. Am I right that with > GEOM framework it is impossible to control if some data is read from the > buffer cache and it is only possible to control device strategy calls? That is correct: GEOM only sees the disk I/O events against storage devices below the abstraction of the buffer cache, which is a service "library" in the file system/VM. So you will only see "real" I/O, not the list of desired disk blocks required by the file system. In 6.x, the file systems actually talk directly to GEOM; in 5.x, file systems take a detour through specfs, which services device vnodes as part of devfs. In 4.x, specfs vnodes may be in any file system. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1041123222049.98085C-100000>