DHCPD-POOLS(1)
π DHCPD-POOLS π
okay bestie, so this is dhcpd-pools, a User Command, and it's the little tool that does ISC dhcpd pools usage analysis. yes that's the whole vibe. no cap.
β¨ NAME β¨
dhcpd-pools β ISC dhcpd pools usage analysis π¦
β¨ SYNOPSIS β¨
dhcpd-pools [--config file] [--leases file] [--sort nimcptTe]
[--reverse] [--format tHcxXjJ] [--mustach template]
[--output file] [--limit nr] [--color when]
[--warning percent] [--critical percent]
[--warn-count number] [--crit-count number] [--snet-alarms]
[--minsize size] [--perfdata] [--version] [--help]
β¨ DESCRIPTION β¨
so basically π the program analyses ISC dhcpd shared network and pool usage, and then it outputs the results in a format that you selected. main character energy, it does the math and you pick the outfit.
β¨ OUTPUT FIELDS β¨
here's the tea on every field it can show you π
- shared net name β Name of the shared-network for the range.
- first ip β First IP in lease pool range.
- last ip β Last IP in lease pool range.
- max β Number of IPs which exist in a pool, shared network or all together.
- cur β Number of leases currently in use.
- percent β Percent of IPs currently in use compared to max.
- 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.
- t+c β The sum of Touched and Currently in-use leases.
- t+c perc β Percent of IPs either touched or currently in use, compared to max.
- bu β Failover pair can allocate these addresses. The count appears only if there is failover configuration.
- bu perc β Percent of addresses that failover pair can allocate. The percent appears only if there is failover configuration.
π OPTIONS π
-c,--config=FILEβ Path to thedhcpd.conffile. If thedhcpd.confhas include files they can be analysed separately, that can be useful when trying to understand or monitor subset of data. π-l,--leases=FILEβ Path to thedhcpd.leasesfile.-s,--sort=[nimcptTe]β Sort ranges by chosen fields as a sorting keys. 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.-r,--reverseβ Sort results in reverse order. π-f,--format=[tHcxXjJ]β Output format. Text (t). Full-html (H) page output. In html page critical and warning thresholds can be visualized with--color=alwaysoption. The (c) stands for comma-separated values. Output format xml (x) is similar to thedhcpstatusPerl module output. The extended xml (X) format will print ethernet address details. The (j) will output in json format, which can be extended with (J) to include ethernet address. The default format is text.--mustach=TEMPLATEβ Output using mustach template file. This is useful when the native output formats controlled with--formatoption do not provide what you need. See below example mustach template that is using all available{{tags}}to demonstrate what can be displayed and how.
/usr/bin/dhcpd-pools --config /usr/share/doc/dhcpd-
pools/dhcpd.conf --leases /usr/share/doc/dhcpd-pools/dhcpd.leases
--mustach /usr/share/doc/dhcpd-pools/mustach.template
-o,--output=FILEβ File where output is written. Default is stdout.-L,--limit=NRβ The NR will limit what will be printed. Syntax is similar tochmod(1)permission string. The NR 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 numeric analysis tables to include in the output. The following values are "OR'd" together to create the desired output. The default is77.01β Print ranges02β Print shared networks04β Print total summary10β Print range header20β Print shared network header40β Print total summary header The output limit for total summary has special meaning in--warningand--criticalalarming context. When the alarming is in use, and total is not wanted to be seen then in the case of alarming returning success nothing is printed.
--color=whenβ Use yellow for warning, red for critical, green for suppressed by--minsizeand blue when--snet-alarmsis the cause of suppression or shared network does not have any ranges. The when string can bealways,never, orauto. Default isauto, that uses colors when command is running in interactive terminal. With use of--warningor--criticalcoloring thresholds can be changed, but one must also use--format=textto avoid turning on alarting mode. π--skip=whenβ The when can be one of the following:ok,warning,critical,minsize, orsuppressed. The skipping criteria is exact match with colors in--coloroption.--warning=percentβ 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 is1. If only range monitoring is needed one can use limit option for scoping, for example-L10. To monitor shared network only the limit would be-L20. If warning percentage is not specified it defaults to80. The percent argument allows fractions, e.g.,88.8, to be used. π¨--critical=percentβ The option is similar to warning, with exception of return value which is2. If critical percentage is not specified it defaults to90.--warn-count=numberβ A number of free leases before alarm is raised. When specified both--warningpercent and count number are required to be exceeded in order to alarm criteria being fulfilled. This option is intended to be used in setup where very large and small shared-networks and ranges co-exists. In such environments percent based alarming can lead to either flood of alarms about small ranges, or way too great overhead of free addresses in large shared-networks. Suggested usage is to set percentage to a level that makes small ranges to ring, and set the count to match level when an enormous shared-network is too few free leases. Defaults to 2^32, that is size of entire IPv4 address space.--crit-count=numberβ Same as--warn-count, but for critical alarms.--snet-alarmsβ Suppress range alarms that are part of shared networks. Use of this option will keep alarm criteria applied to ranges that are not part of shared-net along with shared-net alarms. This option may help reducing alarm noise for configurations that has lots of small ranges in big shared-networks.--minsize=sizeβ Ignore ranges and shared networks that are smaller or equal to the defined size. This option is meaningful only in context of alarming, and will intended to suppress for example single host ranges. By default this option is not in use.-p,--perfdataβ Print additional performance data, like lease count, touched leases and backup leases. This option is meaningful only in context of alarming and will print lots of data, if there are many networks. By default this option is not in use.-A,--all-as-sharedβ Treat all stand-alone subnets as shared-network with named formed from it's CIDR. By default this option is not in use for backwards compatibility.--ip-version=4|6β Force command to read configuration and leases files in IPv4 or IPv6 mode. Notice that when inputs do not match with what is forced analysis output is garbage. This option should not be necessary to use, and exists only to allow debugging. π-v,--versionβ Print version information to standard output and exit successfully.-h,--helpβ Print help to standard output and exit successfully.
πΈ EXAMPLES πΈ
Print ranges header, and analysis.
$ dhcpd-pools -L 11 -c dhcpd.conf -l dhcpd.leases
Ranges:
shared net name [...]
Print shared networks and totals, both headers and results
$ dhcpd-pools -L 66 -c dhcpd.conf -l dhcpd.leases shared net name
[...]
Alarming
$ dhcpd-pools -c dhcpd.conf -l dhcpd.leases --critical 80.1
--warning 75
CRITICAL: dhcpd-pools: Ranges; crit: 14 warn: 22 ok: 220 Shared
nets; crit: 1 warn: 0 ok: 4
$ dhcpd-pools -c dhcpd.conf -l dhcpd.leases -L 22 --critical 70
--warning 50
[no-output]
Suppress printing OK, and make alarm only to go off if shared networks exceed critial or warning levels.
π FILES π
/etc/dhcp/dhcpd.confβ ISC dhcpd configuration file./var/lib/dhcpd/dhcpd.leasesβ ISC dhcpd lease file./usr/share/doc/dhcpd-pools/prometheus.templateβ Prometheus text file collector mustach template.
π AUTHORS π
- Original design by Sami Kerola.
- uthash by Troy D. Hanson.
- XML support by Dominic Germain, Sogetel inc.
- IPv6 support by Cheer Xiao.
- Mustache templating support by JosΓ© Bollo.
π LICENSE π
The dhcpd-pools uses FreeBSD License, uthash uses BSD license, the mustache uses Apache License, and the gnulib modules are mostly, but not entirely, GPL.
π§ REPORTING BUGS π§
Report bugs to Sami Kerola Home page
β SEE ALSO β
dhcpd.leases(5), dhcpd.conf(5), chmod(1), https://mustache.github.io/
and that's the whole page bestie π«Ά this was dhcpd-pools version 3.3, dated 2024-08-09 β go off, monitor those pools, you ate π β¨
π¦ where this page comes from
- epel 10: dhcpd-pools 3.3-1.el10_1 Β· BSD-2-Clause AND Apache-2.0 AND GPL-3.0-or-later
- epel 9: dhcpd-pools 3.3-1.el9 Β· BSD-2-Clause AND Apache-2.0 AND GPL-3.0-or-later
- fedora 43: dhcpd-pools 3.3-2.fc43 Β· BSD-2-Clause AND Apache-2.0 AND GPL-3.0-or-later
- fedora 44: dhcpd-pools 3.3-4.fc44 Β· BSD-2-Clause AND Apache-2.0 AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms