Imported Debian patch 2.23.05-1
[hcoop/zz_old/debian/webalizer.git] / wcmgr.1
CommitLineData
e015f748
CE
1.TH wcmgr 1 "12-Jul-2008" "Version 1.00" "The Webalizer"
2.SH NAME
3wcmgr - Webalizer (DNS) Cache file Manager
4.SH SYNOPSIS
5.B wcmgr\fP [\fI option ... \fP] \fIcache-file\fP
6.PP
7.SH DESCRIPTION
8\fIwcmgr\fP is a utility program which allows manipulation of the DNS cache
9files used and produced by The \fIWebalizer\fP. Each record in the cache
10file contains an IP address (either IPv4 or IPv6), a timestamp of when the
11entry was added to the cache, a flag to indicate if the record contains
12a resolved name or not, and either the same IP address or a resolved host
13name. All records are accessed by their IP address.
14.SH RUNNING WCMGR
15\fIwcmgr\fP was designed to be run from the Unix shell command line. This
16facilitates its use in shell scripts and other automated processes. A
17valid DNS cache file \fBmust\fP be specified. Command line options are
18optional, and if none are given, the default action is to list the
19contents of the specified cache file.
20.SH COMMAND LINE OPTIONS
21Different functions are selected by using one or more of the following
22command line options. If no options are given, the default is to display
23the contents of the cache file to the screen (stdout).
24.PP
25.TP 8
26.B \-h
27Display all available command line options and exit.
28.TP 8
29.B \-v
30Be verbose.
31
32.TP 8
33.B \-V
34Display the program version and exit. Additional program specific
35information will be displayed if \fIverbose\fP mode is also used
36(e.g. '\fI-vV\fP'), which can be useful when submitting bug reports.
37.TP 8
38.B \-a \fIaddress\fP [\fI-n hostname\fP] [\fI-t0\fP]
39Add a new record to the cache file. The IP \fIaddress\fP will be added to
40the cache file using the current time as the timestamp and with a resolved
41name \fIhostname\fP. If \fI-t0\fP is specified, the record will be
42considered permanent, and will not be removed (during a purge) or expired.
43If a \fIhostname\fP is not specified with the \fI-n\fP option, then the
44\fIaddress\fP will be used instead, and the record will be flagged as
45unresolved.
46.TP 8
47.B \-c
48Create a new cache file. If used alone, this option will create a new,
49empty cache file. If used with the \fIimport\fP option, a new cache
50file will be created before importing the data. An error will occur
51if the file \fIcache-file\fP already exists.
52.TP 8
53.B \-d \fIaddress\fP
54Delete a record from the cache file using the specified \fIaddress\fP.
55.TP 8
56.B \-f \fIaddress\fP
57Find and display information for \fIaddress\fP from the cache file.
58A single line similar to that produced by the \fI-l\fP option will
59be displayed unless \fIverbose\fP mode is enabled, in which case a
60more detailed listing will be produced.
61.TP 8
62.B \-i \fIname\fP [\fI-c\fP]
63Import data into the cache file from the file \fIname\fP. The import
64file must be a valid tab delimited text file, such as that created by
65the \fIexport\fP option. If the imported data contains records already
66present in the cache file, those records will be overwritten by the
67imported data. The cache file must exist unless the \fI-c\fP option
68is specified, in which case, a new cache file will be created for the
69imported data.
70.TP 8
71.B \-l
72List the contents of the cache file. This is the default action of the
73program, so does not necessarily need to be specified. If \fIverbose\fP
74mode is enabled, a report title, column headers and summary totals will
75also be displayed.
76.TP 8
77.B \-p \fInum\fP
78Purge the cache file of entries older than \fInum\fP days. If \fInum\fP
79is not specified, then a default of \fB7 days\fP will be used. if
80\fIverbose\fP mode is enabled, each purged record will be printed and
81the total number of purged records will be displayed.
82.TP 8
83.B \-s [\fI-t num\fP]
84Display cache file information/statistics. If a TTL value (in days) is
85specified using the \fI-t\fP option, it will be used to calculate how
86many records are older than \fInum\fP days, otherwise, the default value
87of \fB7 days\fP will be used.
88.TP 8
89.B \-n \fIname\fP
90Specify the \fIname\fP to use as the resolved hostname when adding records
91to the cache.
92.TP 8
93.B \-t \fInum\fP
94Time to live (TTL) value. If used along with the \fI-p\fP (purge) option,
95it specifies how many days a record will remain valid. Any record that is
96older than \fInum\fP days is considered expired and will be purged. If
97used with the \fI-a\fP (add) option, a zero value will cause the record
98to be considered permanent.
99.TP 8
100.B \-x \fIname\fP
101Export data from a cache file to a tab delimited text file named \fIname\fP.
102If the text file \fIname\fP exists, it will be overwritten.
103.SH BUGS
104Please report bugs to the author.
105.SH COPYRIGHT
106Copyright (C) 1997-2011 by Bradford L. Barrett. Distributed under
107the GNU GPL. See the files "\fICOPYING\fP" and "\fICopyright\fP",
108supplied with all distributions for additional information.
109.SH AUTHOR
110Bradford L. Barrett <\fIbrad at mrunix dot net\fP>