
mseedscan_plugin - Scan for Mini-SEED files

A SeedLink plugin to recursively scan one or more directory
structures and continuously check for file modifications.  The
files are presumed to be composed of 512-byte Mini-SEED records.
As the files are appended or created the plugin will feed the new
records to the controlling SeedLink server.

The scanning of files uses the concept of active and idle files.
Files that have not been modified for a specified amount of time
are considered idle.  These idle files will not be checked on every
scan, instead a specified number of scans will be skipped for each
idle file.

If a file is scanned and a valid Mini-SEED record was not read from
the file a placeholder will be kept but the file will not be read
from again.  This way files which do not contain Mini-SEED will
only be reported once.  This placeholder will be retained in a
statefile (if used), this means that the file will not be scanned
if the program is re-started.  In order to get the plugin to
re-scan a file it must be removed from the state file.

Broken symbolic links are quietly skipped.  If they are eventually
re-connected to something the something will be scanned as
expected.

A balanced tree is used to keep track of the files processed and
allows for operation with 200,000+ files.

If the signal SIGUSR1 is recieved the program will print the
current file list to standard error.

When starting an operational instance of this plugin with many,
many data files the '-n' is useful to first load all the files
and create a state file with their current sizes without actually
processing all of the data records.  After which the plugin can be
started without the '-n' flag and will only process newer data.

