.\" Sami Kerola .\" http://www.iki.fi/kerolasa/ .\" kerolasa@iki.fi .\" .\" Add'l ontributions by: .\" Dan Thorson .\" .TH DHCPD-POOLS "1" "October 2012" "dhcpd-pools" "User Commands" .SH NAME dhcpd-pools \- ISC dhcpd pools usage analysis .SH SYNOPSIS .B dhcpd-pools [options] .SH DESCRIPTION The program analyses ISC dhcpd shared network and pool usage and outputs the results in a format selected by user. .SH OUTPUT FIELDS .TP .I "shared net name" Name of the shared-network for the range. .TP .I "first ip" First IP in lease pool range. .TP .I "last ip" Last IP in lease pool range. .TP .I "max" Number of IPs which exist in a pool, shared network or all together. .TP .I "cur" Number of leases currently in use. .TP .I "percent" Percent of IPs currently in use compared to max. .TP .I "touch" Number of IP's which appear in the lease file, but who's leases have expired. A touched IP is either expired or abandoned. The touched IP count is somewhat misleading when you try to determine if an IP pool is big enough; it is a better indicator of whether a pool is too large. .TP .I "t+c" The sum of Touched and Currently in-use leases. .TP .I "t+c perc" Percent of IPs either touched or currently in use, compared to max. .TP .I "bu" Failover pair can allocate these addresses. The count appears only if there is failover configuration. .TP .I "bu perc" Percent of addresses that failover pair can allocate. The percent appears only if there is failover configuration. .SH OPTIONS .TP \fB\-c\fR, \fB\-\-config\fR=\fIFILE\fR Path to the dhcpd.conf file. .TP \fB\-l\fR, \fB\-\-leases\fR=\fIFILE\fR Path to the dhcpd.leases file. .TP \fB\-s\fR, \fB\-\-sort\fR=\fI[nimcptTe]\fR Sort ranges by chosen fields as a sorting keys. Maximum of five sort keys can be defined. Keys weight from left to right i.e. if more weighting keys are equal next one is used. The IP field is default sort key. .TP \fB\-r\fR, \fB\-\-reverse\fR Sort results in reverse order. .TP \fB\-f\fR, \fB\-\-format\fR=\fI[thHcxX]\fR Output format. The default is text .RI ( t ). Standard html .RI ( h ) outputs only the HTML tables, and is useful for embeding more complex web pages. Full-html .RI ( H ) provides complete HTML headers, etc., including in-line CSS. The .RI ( c ) stands for comma-separated values. Output format xml .RI ( x ) is similar to the dhcpstatus Perl module output. The extended xml .RI ( X ) format will print ethernet address details. .TP \fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR .I File where output is written. Default is stdout. .TP \fB\-L\fR, \fB\-\-limit\fR=\fINR\fR The .I NR will limit what will be printed. Syntax is similar to .IR chmod (1) permission string. The .I NR limit string uses two digits which vary between .IR 0 \ to \ 7 . The first digit determines which headers to display, and the second digit determines which numeric analysis tables to include in the output. The following values are "OR'd" together to create the desired output. The default is .IR 77 . .PP .RS .PD 0 .TP .B 01 Print ranges .TP .B 02 Print shared networks .TP .B 04 Print total summary .TP .B 10 Print range header .TP .B 20 Print shared network header .TP .B 40 Print total summary header .PD .RE .TP \fB\-\-warning\fR=\fIpercent\fR Turn on alarm output format, and specify percentage number which will cause an alarm. If either a range or shared network will exceed warning level return value of the command is .BR 1 . If only range monitoring is needed one can limit output by using option .IR \-L10 , and for shared network monitoring similar is .IR \-L20 . If critical level is not speficied it defaults to .BR 90 . The .I percent argument allows fractions to be used. Alarm output is intented to be used with monitoring, such as Nagios. .TP \fB\-\-critical\fR=\fIpercent\fR The option is similar to warning, with exception of return value which is .BR 2 . If warning level is not specified it defaults to .BR 80 . .TP \fB\-v\fR, \fB\-\-version\fR Print version information to standard output and exit successfully. .TP \fB\-h\fR, \fB\-\-help\fR Print help to standard output and exit successfully. .SH EXAMPLES .TP Print ranges header, and analysis. $ dhcpd-pools -L 11 -c dhcpd.conf -l dhcpd.leases .br Ranges: .br shared net name [...] .TP Print shared networks and totals, both headers and results $ dhcpd-pools -L 66 -c dhcpd.conf -l dhcpd.leases shared net name .br [...] .TP Alarming $ dhcpd-pools -c dhcpd.conf -l dhcpd.leases --critical 80.1 --warning 75 .br CRITICAL: dhcpd-pools: Ranges; crit: 14 warn: 22 ok: 220 Shared nets; crit: 1 warn: 0 ok: 4 .SH FILES .TP /etc/dhcpd.conf ISC dhcpd configuration file. .TP /var/lib/dhcp/dhcpd.leases ISC dhcpd lease file. .SH AUTHOR Written by Sami Kerola. .br XML support by Dominic Germain, Sogetel inc. .PP The software has FreeBSD License. .SH "REPORTING BUGS" Report bugs to .MT kerolasa@iki.fi Sami Kerola .ME .br .UR http://dhcpd-pools.sourceforge.net/ Home page .UE .SH "SEE ALSO" .BR dhcpd.leases (5), .BR dhcpd.conf (5), .BR chmod (1)