On Mon, Oct 26, 2009 at 08:53:50PM -0700, Anil wrote:
> I haven't tried this, but this must be very easy with dtrace. How come
> no one mentioned it yet? :) You would have to monitor some specific
> syscalls...

DTrace is not reliable in this sense: it will drop events rather than
overburden the system.  Also, system calls are not the only thing you
want to watch for -- you should really trace the VFS/fop rather than
syscalls for this.  In any case, port_create(3C) and gamin are the way
forward.

port_create(3C) is rather easy to use.  Searching the web for
PORT_SOURCE_FILE you'll find useful docs like:

http://blogs.sun.com/praks/entry/file_events_notification

which has example code too.

I do think it'd be useful to have command-line utility in core Solaris
that uses this facility, something like the example in Prakash's blog
(which, incidentally, _works_), but perhaps a bit more complete.

Nico
-- 
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to