Thread: Filesystem monitoring question

  1. #1
    Registered User
    Join Date
    Sep 2005
    Location
    London
    Posts
    4

    Filesystem monitoring question

    I have a FreeBSD 6.0 box with a mounted filesystem that is accessible to a number of clients via SMB and NFS.

    I would like to monitor activity on this filesystem so that every time a write to the mount is completed, my program is run (which stats the file and stores info about it in a database etc.)

    How do I construct a trigger for my code?

    If anyone can point me in the right direction I would greatly appreciate it.

  2. #2
    Registered User Jaqui's Avatar
    Join Date
    Feb 2005
    Posts
    416
    use fam?
    every alteration to filesystem gets logged then, you can add a call to your code whenever fam updates it's log.
    Quote Originally Posted by Jeff Henager
    If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.

  3. #3
    Registered User
    Join Date
    Sep 2005
    Location
    London
    Posts
    4
    thanks a bunch

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM