awips2/ldm/src/scour/scour.1
root a02aeb236c Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: 06a8b51d6d [formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]
Former-commit-id: 9f19e3f712
2012-01-06 08:55:05 -06:00

107 lines
3.8 KiB
Groff

'\"
'\" $Header: /cvsroot/ldm/src/scour/scour.1,v 1.1.22.1 2009/06/18 16:19:54 steve Exp $
.TH SCOUR 1 "$Date: 2009/06/18 16:19:54 $"
.SH NAME
scour - utility for deleting old data files
.SH "UNIX SYNOPSIS"
\fBscour \fR[\fB\-l\fR] \fR[\fB\-v\fR] \fR[\fB\-x\fR] \fR[\fIconfig-file\fR]
.SH DESCRIPTION
.B scour
is part of the Unidata Local Data Management system (LDM).
.B scour
deletes old data files from a set of data directories. For each directory
specified in a configuration file,
.B scour
deletes files in that directory and all of its subdirectories that are older
than a specified number of days and that have a filename matching a
specified pattern. If no new data files with filenames matching the
specified pattern have been written in the directory or its subdirectories
since the last time scour was invoked on that directory with that pattern,
no files are deleted. This insures that the specified data directories will
retain a set of data files, even if there is a failure in the system that
generates or captures the data.
The directories, retention time in days, and an optional shell filename
pattern for files to delete appear in a configuration file.
.B scour
is designed to be invoked periodically from a crontab(1) file to keep the
directories of data captured by the Unidata LDM system from filling up. It
can also be invoked manually as needed.
.SH OPTIONS
.TP 8
.B \-l
Indicates that messages are appended to a system log used by other LDM
processes with syslogd(8). In the absence of this flag, messages
generated by
.B scour
are written to standard output.
.TP
.B \-v
Verbose flag. If present, the output
will note when (in UTC time)
.B scour
starts and exits, and a message for each directory scoured will tell how
many disk blocks were recovered and what the retention period for that
directory was.
.TP
.BI \-x
Turn on debugging. This will produce extra debugging output in the log file.
.TP
.BI "config-file"
The path name of the configuration file containing the table of data
directories to be scoured and data retention times in days. If no
configuration file is named, a default configuration file,
/usr/local/ldm/etc/scour.conf, is used.
.SH EXAMPLE
The command
.RS +4
.nf
scour -v -l ~ldm/etc/scour.conf
.fi
.RE
will read the specified configuration file and delete old files as specified
from the directories named in the configuration file, logging its messages
to the same log file used by other LDM processes. Here is an example of
a configuration file:
.RS +4
.nf
# Directory Days-old Optional-filename-pattern
~ldm/data/forecasts 3 *.gdbm
~ldm/data/warnings 3 *.gdbm
~ldm/data/decoded 2 *.nc
~ldm/data/upperair 2 *.wmo
~ldm/data/GRIB 2
~ldm/data/GRIB 1 *eta.nc
# this contains sao, rad, buoy, syn, and front subdirectories
~ldm/data/surface 2
~ldm/data/gempak 2
.fi
.RE
Comment lines must begin with the `#' character. Blank lines are ignored.
Directory names may be absolute pathnames, or may use the `~user' notation of
csh(1). If a filename pattern is not specified, `*' matching all files that
don't begin with the character `.' is assumed.
.RE
In the example above, the directory name `~ldm/data/GRIB' is specified
twice, once without a pattern and once with a pattern. The intention is
that all files in ~ldm/data/GRIB older than 2 days should be removed, but
that in addition, files with names matching the pattern `*eta.nc' that are
older than 1 day should also be removed.
.SH FILES
.PD 0
.TP 20
.B .scour*
Zero-size files created at the top of each scoured directory hierarchy to
maintain the time the directory was last scoured with particular patterns.
.SH "SEE ALSO"
ldmd(1)
.SH DIAGNOSTICS
In case a directory contains no new files since the last time scour was run
on that directory, a message wil be logged since this may indicate a data
ingest failure.