111 lines
4.7 KiB
Groff
111 lines
4.7 KiB
Groff
.TH wcmgr 1 "12-Jul-2008" "Version 1.00" "The Webalizer"
|
|
.SH NAME
|
|
wcmgr - Webalizer (DNS) Cache file Manager
|
|
.SH SYNOPSIS
|
|
.B wcmgr\fP [\fI option ... \fP] \fIcache-file\fP
|
|
.PP
|
|
.SH DESCRIPTION
|
|
\fIwcmgr\fP is a utility program which allows manipulation of the DNS cache
|
|
files used and produced by The \fIWebalizer\fP. Each record in the cache
|
|
file contains an IP address (either IPv4 or IPv6), a timestamp of when the
|
|
entry was added to the cache, a flag to indicate if the record contains
|
|
a resolved name or not, and either the same IP address or a resolved host
|
|
name. All records are accessed by their IP address.
|
|
.SH RUNNING WCMGR
|
|
\fIwcmgr\fP was designed to be run from the Unix shell command line. This
|
|
facilitates its use in shell scripts and other automated processes. A
|
|
valid DNS cache file \fBmust\fP be specified. Command line options are
|
|
optional, and if none are given, the default action is to list the
|
|
contents of the specified cache file.
|
|
.SH COMMAND LINE OPTIONS
|
|
Different functions are selected by using one or more of the following
|
|
command line options. If no options are given, the default is to display
|
|
the contents of the cache file to the screen (stdout).
|
|
.PP
|
|
.TP 8
|
|
.B \-h
|
|
Display all available command line options and exit.
|
|
.TP 8
|
|
.B \-v
|
|
Be verbose.
|
|
|
|
.TP 8
|
|
.B \-V
|
|
Display the program version and exit. Additional program specific
|
|
information will be displayed if \fIverbose\fP mode is also used
|
|
(e.g. '\fI-vV\fP'), which can be useful when submitting bug reports.
|
|
.TP 8
|
|
.B \-a \fIaddress\fP [\fI-n hostname\fP] [\fI-t0\fP]
|
|
Add a new record to the cache file. The IP \fIaddress\fP will be added to
|
|
the cache file using the current time as the timestamp and with a resolved
|
|
name \fIhostname\fP. If \fI-t0\fP is specified, the record will be
|
|
considered permanent, and will not be removed (during a purge) or expired.
|
|
If a \fIhostname\fP is not specified with the \fI-n\fP option, then the
|
|
\fIaddress\fP will be used instead, and the record will be flagged as
|
|
unresolved.
|
|
.TP 8
|
|
.B \-c
|
|
Create a new cache file. If used alone, this option will create a new,
|
|
empty cache file. If used with the \fIimport\fP option, a new cache
|
|
file will be created before importing the data. An error will occur
|
|
if the file \fIcache-file\fP already exists.
|
|
.TP 8
|
|
.B \-d \fIaddress\fP
|
|
Delete a record from the cache file using the specified \fIaddress\fP.
|
|
.TP 8
|
|
.B \-f \fIaddress\fP
|
|
Find and display information for \fIaddress\fP from the cache file.
|
|
A single line similar to that produced by the \fI-l\fP option will
|
|
be displayed unless \fIverbose\fP mode is enabled, in which case a
|
|
more detailed listing will be produced.
|
|
.TP 8
|
|
.B \-i \fIname\fP [\fI-c\fP]
|
|
Import data into the cache file from the file \fIname\fP. The import
|
|
file must be a valid tab delimited text file, such as that created by
|
|
the \fIexport\fP option. If the imported data contains records already
|
|
present in the cache file, those records will be overwritten by the
|
|
imported data. The cache file must exist unless the \fI-c\fP option
|
|
is specified, in which case, a new cache file will be created for the
|
|
imported data.
|
|
.TP 8
|
|
.B \-l
|
|
List the contents of the cache file. This is the default action of the
|
|
program, so does not necessarily need to be specified. If \fIverbose\fP
|
|
mode is enabled, a report title, column headers and summary totals will
|
|
also be displayed.
|
|
.TP 8
|
|
.B \-p \fInum\fP
|
|
Purge the cache file of entries older than \fInum\fP days. If \fInum\fP
|
|
is not specified, then a default of \fB7 days\fP will be used. if
|
|
\fIverbose\fP mode is enabled, each purged record will be printed and
|
|
the total number of purged records will be displayed.
|
|
.TP 8
|
|
.B \-s [\fI-t num\fP]
|
|
Display cache file information/statistics. If a TTL value (in days) is
|
|
specified using the \fI-t\fP option, it will be used to calculate how
|
|
many records are older than \fInum\fP days, otherwise, the default value
|
|
of \fB7 days\fP will be used.
|
|
.TP 8
|
|
.B \-n \fIname\fP
|
|
Specify the \fIname\fP to use as the resolved hostname when adding records
|
|
to the cache.
|
|
.TP 8
|
|
.B \-t \fInum\fP
|
|
Time to live (TTL) value. If used along with the \fI-p\fP (purge) option,
|
|
it specifies how many days a record will remain valid. Any record that is
|
|
older than \fInum\fP days is considered expired and will be purged. If
|
|
used with the \fI-a\fP (add) option, a zero value will cause the record
|
|
to be considered permanent.
|
|
.TP 8
|
|
.B \-x \fIname\fP
|
|
Export data from a cache file to a tab delimited text file named \fIname\fP.
|
|
If the text file \fIname\fP exists, it will be overwritten.
|
|
.SH BUGS
|
|
Please report bugs to the author.
|
|
.SH COPYRIGHT
|
|
Copyright (C) 1997-2013 by Bradford L. Barrett. Distributed under
|
|
the GNU GPL. See the files "\fICOPYING\fP" and "\fICopyright\fP",
|
|
supplied with all distributions for additional information.
|
|
.SH AUTHOR
|
|
Bradford L. Barrett <\fIbrad at mrunix dot net\fP>
|