Monitoring directories with iWatch



Why wait for cron? iWatch monitors critical files and directories in realtime. This handy Perl script then notifies the user or runs a configurable command when change occurs.

If an intruder is loose on your system, it is important to learn about the attack as soon as possible. Several tools in the Linux environment check individual directories, and files send notice of changes. You can run one of these tools as a cronjob or write a script that runs in a loop and regularly performs file checks. In both cases, however, you are forced to either run the tool frequently (at high cost to system resources) or else settle for long intervals between checks, which could potentially open a window for an intruder.

The Linux 2.6.13 kernel introduced a solution to this dilemma. The kernel’s Inotify interface provides a means for monitoring files and directories in realtime. Users need only tell the kernel which files they are interested in, and the kernel notifies the user whenever a change occurs.

Read full article as PDF:

iWatch.pdf  (139.43 kB)

Related content

  • Detecting Intruders Intro

    If you think your systems are too obscure for an attacker to worry about, think again. Today’s intruders are happy for any victim.

  • Monitoring with incron

    The incron utility provides an easy way to initiate commands and scripts triggered by filesystem events.

  • Perl: noworries

    We'll show you how you can avoid the tragedy of lost files with a transparent, Perl-based version control system.

  • Charly's Column

    While cron doggedly keeps to a fixed schedule, Incron monitors directories and runs commands when changes occur.

  • Fsniper

    Every day, computers are inundated with hundreds of files. Fsniper welcomes the new arrivals and processes them according to rules that you define.

comments powered by Disqus

Direct Download

Read full article as PDF:

iWatch.pdf  (139.43 kB)