line
Homepage Alexander Schatten - Software: File Watchdog Vienna University of Technology Faculty for Informatics Institute for Software Technology and Interactive Systems
Home
Contact/CV
Information/Tutorials
Lehre/Forschung
Main Interests
Software
Publications
Images
> Home > Software > File WatchdogPrinter Friendly
line

File Watchdog

1. About Filewatchdog (fwd)

  • fwd is a command-line server-side tool, that allows monitoring server ressources, namly certain files, file-types or complete directories.
  • Configure fwd using an XML config file
  • Every time one of the ressources is modified, the modification is written into a logfile, or some adminstrator is notified by an email.
  • Filewatchdog is "open-source", so you can modify the sources to adapt fwd for your needs. In case of significant changes, please notify me.

Use Filewatchdog as is. I can give no guarantee that fwd will work properly or do what you expect. Use it at your own risk. Take a look into the sources if you are unsure about the functionality in detail.

2. Install Filewatchdog

Requirements

A Java Development Kit or Java Runtime Environement Version 1.2 or newer is required.

Install

Download either the "binaries-only" release, or the complete release containing binaries, documentation (javadoc) and sources:

Binary Release1.2 MBfile-watchdog_bin.zip
Complete Release1.27 MBfile-watchdog_complete.zip

Unpack the zip file into an arbitrary directory.

3. Configuration

In the main directory of fwd you find a config.xml file. Open this and modify the configuration file to fit your needs. The meaning of the parameters is:

ParameterMeaning
CONFIGContains basic configuration settings.
   PollIntervalSecPolling Interval in seconds: Every PollIntervalSec seconds the ressources are checked if some files are changed. Don´t use too small values, as this can harm server performance! Recommended are values bigger than 60 seconds. Probably an interval of a few minutes will be sufficient too. fwd needs nearly no system ressources in "wait state". Moreover don`t forget that eventually every time fwd polls, an email may be sent if ressources change often: this could cause a mail avalanche!
ReportNot used at the moment. Please leave unchanged.
MailSettings for email notification function
 hostMail SMPTP host: Javamail needs this smpt host to send emails. E.g.
fromFrom Address, not really important, but will be displayed as "from" address to person who receives notification emails.
toAddress of person who wants to be notified when modifications occured.
subjectSubject of emails sent.
contentstartText to be put into email content before the notification text appears.
contentendText to be put into email content after the notification text appears.
Log 
 filename Filename of Logfile, where all changes are logged.
WATCHESThis is the main section, where the ressources to be watched are defined.
 Watchtype="file"File type watch: watches one file on server. Every modification is notified.
nameName of this watch; informal: this name is used as "header" in notification email or log.
filenameFilename to be watched.
lessvalue 0 - ... If the watched file is detected to be modified: the last less lines are sent with the email notification to the administrator. Warning: Set this value to 0 when binary files are watched!
Watchtype="directory"Directory type watch: Certain or all files in a directory are observed. Every time one of the files with a certain extension is modified, added or deleted, a notification is created.
nameName of this watch; informal: this name is used as "header" in notification email or log.
filenameDirectory in which files with certain extension should be observed.
extensionEnter the extension to observe certain file-types. To observe all files in a directory (a complete directory) use *. You can use more than one extension tag.

4. Start Filewatchdog

Windows

On Windows Systems: start the go.bat batch file as long as you use the "config.xml" configuration file. If you want to use another config file, or start multiple instances of fwd with different config settings, please modify the batch file.

Other systems/Manual Startup

On other systems modify the batch file or start fwd manually:

java -classpath mail.jar;activation.jar;FileWatchDog.jar filewatchdog.FileWatchdog config.xml

You can easily write different configuration settings into different configuration files.Simply add the desired configuration file as application parameter. Please leave the first two lines (including the !DOCTYPE line) in the config file to guarantee that the syntax of the config file is checked by the parser.

5. Stop Filewatchdog

Fwd will no stop automatically when it is started. To stop it use Ctrl-c on windows systems, the kill command on Unix systems, or any other task management-"kill"-function of the OS you are using.

6. Contact

If you should have requests or comments considering Filewatchdog, please send me an Email. If you should add some significant functionality into the tool, please let me know, so that I can add these functions into fwd.

If you should detect bugs, contact me too!

 

 
line
last changed at - see release info (c) by Alexander SchattenContact/Feedback
line