Results 1 to 6 of 6

Thread: watching for changes anywhere in a file system

  1. #1
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,664
    Distro
    Xubuntu 18.04 Bionic Beaver

    watching for changes anywhere in a file system

    is it possible to have a watch scope over a whole file system, instead of filling up the kernel with millions of individual watches?
    Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweeter

  2. #2
    Join Date
    Oct 2005
    Location
    Al Ain
    Beans
    9,818

    Re: watching for changes anywhere in a file system

    Maybe read up on tripwire.

  3. #3
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,664
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: watching for changes anywhere in a file system

    tripwire is entirely unsuitable. it keeps a checksum for each file and has to scan everything to look for changes. for millions of files, the performance would be impractical.
    Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweeter

  4. #4
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: watching for changes anywhere in a file system

    Does inotify fit the bill ?

    The inotify API provides a mechanism for monitoring filesystem events.
    Inotify can be used to monitor individual files, or to monitor directo‐
    ries. When a directory is monitored, inotify will return events for
    the directory itself, and for files inside the directory.

  5. #5
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,664
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: watching for changes anywhere in a file system

    inotify was the first (and only) tool i have looked at. it wants me to identify every individual file or directory to be checked. i have not seen any means to get a notification for a file system (a mount point or mounted device) for an event anywhere within that file system. i am thinking that i will need to do this by implementing my own file system driver an just report
    Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweeter

  6. #6
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,664
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: watching for changes anywhere in a file system

    i think what i need is to modify the source of something simpler like overlayfs. that way it will get every operation and can stream those to another process that records or reacts to the events of interest. my current interest is anything that is renamed anywhere in the whole filesystem of about 4.8 million files. the idea is to replicate the renames in the backups to reduce the backup traffic due to renames.
    Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweeter

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •