Cornelis Swanepoel wrote:
I have a FreeBSD 6.0 box with a partition that is accessible to a number of
clients via SMB and NFS.
I would like to monitor activity on this partition so that every time a
write to it is completed, my C program is run (which stats the file and
stores some info about it in a database amongst other things)
My question is: What do I need to learn in order to construct a trigger for
my code?
If anyone can point me in the right direction I would greatly appreciate it.
Using kqueue you can monitor a file/directory for changes and have it
trigger something when that event happens. But you want to monitor you
whole partition.. perhaps intercept some syscalls ?
--
Giovanni P. Tirloni
http://blog.tirloni.org
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"