mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
docs: help screen & man page
The help screen has now same notation as most of the GNU/Linux utilities, e.g. if a option requires argument it is marked as option=ARG. That enabled me to use help2man to make small nroff fixes to manual page to unify it's outlook as well. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
441431eae8
commit
2cb7369e20
2 changed files with 47 additions and 39 deletions
|
|
@ -5,12 +5,12 @@
|
||||||
.\" Add'l ontributions by:
|
.\" Add'l ontributions by:
|
||||||
.\" Dan Thorson
|
.\" Dan Thorson
|
||||||
.\"
|
.\"
|
||||||
.TH DHCPD-POOLS 1 "Jan 21 2011" "SourceForge" "ISC dhcpd analysis"
|
.TH DHCPD-POOLS "1" "June 2011" "dhcpd-pools 2.15" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
dhcpd-pools \- ISC dhcpd pools usage analysis
|
dhcpd-pools \- ISC dhcpd pools usage analysis
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B dhcpd-pools
|
.B dhcpd-pools
|
||||||
[-c file] [-l file] [-f thcxX] [-s nimcptTe] [-r] [-o file] [-L nr] [-v] [-h]
|
[\fIOPTIONS\fR]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The program analyses ISC dhcpd shared network and pool usage and outputs the
|
The program analyses ISC dhcpd shared network and pool usage and outputs the
|
||||||
results in a user selectable format.
|
results in a user selectable format.
|
||||||
|
|
@ -55,21 +55,21 @@ Percent of addresses that failover pair can allocate. The percent appears
|
||||||
only if there is failover configuration.
|
only if there is failover configuration.
|
||||||
.SH ARGUMENTS
|
.SH ARGUMENTS
|
||||||
.TP
|
.TP
|
||||||
.I "\-c, \-\-config"
|
\fB\-c\fR, \fB\-\-config\fR=\fIFILE\fR
|
||||||
Path to the dhcpd.conf file.
|
Path to the dhcpd.conf file.
|
||||||
.TP
|
.TP
|
||||||
.I "\-l, \-\-leases"
|
\fB\-l\fR, \fB\-\-leases\fR=\fIFILE\fR
|
||||||
Path to the dhcpd.leases file.
|
Path to the dhcpd.leases file.
|
||||||
.TP
|
.TP
|
||||||
.I "\-s, \-\-sort"
|
\fB\-s\fR, \fB\-\-sort\fR=\fI[nimcptTe]\fR
|
||||||
Sort ranges by chosen fields as a sorting keys. Maximum of five sort keys
|
Sort ranges by chosen fields as a sorting keys. Maximum of five sort keys
|
||||||
can be defined. Keys weight from left to right IE if more weighting keys
|
can be defined. Keys weight from left to right IE if more weighting keys
|
||||||
are equal next one is used. The IP field is default sort key.
|
are equal next one is used. The IP field is default sort key.
|
||||||
.TP
|
.TP
|
||||||
.I "\-r, \-\-reverse"
|
\fB\-r\fR, \fB\-\-reverse\fR
|
||||||
Sort results in reverse order.
|
Sort results in reverse order.
|
||||||
.TP
|
.TP
|
||||||
.I "\-f, \-\-format"
|
\fB\-f\fR, \fB\-\-format\fR=\fI[thcxX]\fR
|
||||||
Output format. Currently there is text, html, full-html and csv
|
Output format. Currently there is text, html, full-html and csv
|
||||||
(comma-separated values). Default is text. Standard html (h) outputs only
|
(comma-separated values). Default is text. Standard html (h) outputs only
|
||||||
the HTML tables, and is useful for embeding more complex web pages.
|
the HTML tables, and is useful for embeding more complex web pages.
|
||||||
|
|
@ -77,16 +77,15 @@ Full-html (H) provides complete HTML headers, etc., including in-line CSS.
|
||||||
Output format xml (x) is similar to the dhcpstatus Perl module output. The
|
Output format xml (x) is similar to the dhcpstatus Perl module output. The
|
||||||
extended xml (X) format will print ethernet address details.
|
extended xml (X) format will print ethernet address details.
|
||||||
.TP
|
.TP
|
||||||
.I "\-o, \-\-output"
|
\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
|
||||||
File where output is written. Default is stdout.
|
File where output is written. Default is stdout.
|
||||||
.TP
|
.TP
|
||||||
.I "\-L, \-\-limit"
|
\fB\-L\fR, \fB\-\-limit\fR=\fINR\fR
|
||||||
Limit what will be printed. Syntax is similar to chmod permission string.
|
Limit what will be printed. Syntax is similar to chmod permission string.
|
||||||
The limit string uses two digits which vary between 0 to 7. The first digit
|
The limit string uses two digits which vary between 0 to 7. The first digit
|
||||||
determines which headers to display, and the second digit determines which
|
determines which headers to display, and the second digit determines which
|
||||||
numeric analysis tables to include in the output. The following values are
|
numeric analysis tables to include in the output. The following values are
|
||||||
"OR'd" together to create the desired output. The default is 77.
|
"OR'd" together to create the desired output. The default is 77.
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
.PD 0
|
.PD 0
|
||||||
.TP
|
.TP
|
||||||
|
|
@ -110,10 +109,10 @@ Print headers for z
|
||||||
.PD
|
.PD
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.I "\-v, \-\-version"
|
\fB\-v\fR, \fB\-\-version\fR
|
||||||
Print version information to standard output and exit successfully.
|
Print version information to standard output and exit successfully.
|
||||||
.TP
|
.TP
|
||||||
.I "\-h, \-\-help"
|
\fB\-h\fR, \fB\-\-help\fR
|
||||||
Print help to standard output and exit successfully.
|
Print help to standard output and exit successfully.
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.if n .ta 2.8i
|
.if n .ta 2.8i
|
||||||
|
|
@ -127,9 +126,18 @@ Print help to standard output and exit successfully.
|
||||||
.br
|
.br
|
||||||
ISC dhcpd lease file.
|
ISC dhcpd lease file.
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Sami Kerola <kerolasa@iki.fi>
|
Written by Sami Kerola.
|
||||||
.br
|
.br
|
||||||
http://dhcpd-pools.sourceforge.net/
|
XML support by Dominic Germain, Sogetel inc.
|
||||||
|
.PP
|
||||||
|
License GPLv3+: GNU GPL version 3 or later
|
||||||
|
<http://gnu.org/licenses/gpl.html>
|
||||||
|
This is free software: you are free to change and redistribute it.
|
||||||
|
There is NO WARRANTY, to the extent permitted by law.
|
||||||
|
.SH "REPORTING BUGS"
|
||||||
|
Report bugs to <kerolasa@iki.fi>
|
||||||
|
.br
|
||||||
|
Homepage: http://dhcpd-pools.sourceforge.net/
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR dhcpd.leases (5),
|
.BR dhcpd.leases (5),
|
||||||
.BR dhcpd.conf (5),
|
.BR dhcpd.conf (5),
|
||||||
|
|
|
||||||
50
src/other.c
50
src/other.c
|
|
@ -123,38 +123,38 @@ void usage(int status)
|
||||||
FILE *out;
|
FILE *out;
|
||||||
out = status != 0 ? stderr : stdout;
|
out = status != 0 ? stderr : stdout;
|
||||||
|
|
||||||
fprintf(out, "\
|
fprintf(out, "\n\
|
||||||
Usage: %s [OPTIONS]\n", program_invocation_short_name);
|
Usage: %s [OPTIONS]\n\n", program_invocation_short_name);
|
||||||
fprintf(out, "\
|
fprintf(out, "\
|
||||||
This is ISC dhcpd pools usage analyzer.\n\
|
This is ISC dhcpd pools usage analyzer.\n\
|
||||||
\n");
|
\n");
|
||||||
fprintf(out, "\
|
fprintf(out, "\
|
||||||
-c --config file path to the dhcpd.conf file\n\
|
-c, --config=FILE path to the dhcpd.conf file\n\
|
||||||
-l --leases file path to the dhcpd.leases file\n\
|
-l, --leases=FILE path to the dhcpd.leases file\n\
|
||||||
-f --format [thcxX] output format\n");
|
-f, --format=[thcxX] output format\n");
|
||||||
fprintf(out, "\
|
fprintf(out, "\
|
||||||
t for text\n\
|
t for text\n\
|
||||||
h for html table\n\
|
h for html table\n\
|
||||||
H for full html page\n\
|
H for full html page\n\
|
||||||
x for xml\n\
|
x for xml\n\
|
||||||
X for xml with active lease details\n\
|
X for xml with active lease details\n\
|
||||||
c for comma separated values\n");
|
c for comma separated values\n");
|
||||||
fprintf(out, "\
|
fprintf(out, "\
|
||||||
-s --sort [nimcptTe] sort ranges by\n\
|
-s, --sort=[nimcptTe] sort ranges by\n\
|
||||||
n name\n\
|
n name\n\
|
||||||
i IP\n\
|
i IP\n\
|
||||||
m maxium\n\
|
m maxium\n\
|
||||||
c current\n\
|
c current\n\
|
||||||
p percent\n\
|
p percent\n\
|
||||||
t touched\n\
|
t touched\n\
|
||||||
T t+c\n\
|
T t+c\n\
|
||||||
e t+c perc\n");
|
e t+c perc\n");
|
||||||
fprintf(out, "\
|
fprintf(out, "\
|
||||||
-r --reverse reverse order sort\n\
|
-r, --reverse reverse order sort\n\
|
||||||
-o --output file output into a file\n\
|
-o, --output=FILE output into a file\n\
|
||||||
-L --limit nr output limit mask 77 - 00\n\
|
-L, --limit=NR output limit mask 77 - 00\n\
|
||||||
-v --version version information\n\
|
-v, --version version information\n\
|
||||||
-h --help this screen\n\
|
-h, --help this screen\n\
|
||||||
\n\
|
\n\
|
||||||
Report bugs to <%s>\n\
|
Report bugs to <%s>\n\
|
||||||
Homepage: %s\n", PACKAGE_BUGREPORT, PACKAGE_URL);
|
Homepage: %s\n", PACKAGE_BUGREPORT, PACKAGE_URL);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue