Compare commits

...

21 commits
v3.1 ... master

Author SHA1 Message Date
Sami Kerola
1722d54103
chore: update web pages
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2025-04-28 15:32:04 +01:00
Sami Kerola
1c413b0653
release: 3.3
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2025-04-28 14:36:52 +01:00
Sami Kerola
d020e4d09f
output: update html javascripts
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2025-04-28 14:33:35 +01:00
Sami Kerola
f917d5b223
build-sys: update bootstrap from gnulib
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2025-04-28 14:33:26 +01:00
Sami Kerola
5b7ab28314
build-sys: quote subshell execution in the autotools file
Ryan discovered a typo/issue while handling the man targets.  This change
fixes the issue.

Reported-by: Ryan Steinmetz <zi@freebsd.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2025-04-28 14:22:56 +01:00
Belkacem Daheb
dc649e27cd
getdata output: add start, end and hostname printing support for xml and json
Ensure strings are always null terminated.
2024-08-09 12:51:20 +01:00
luisδμ
7fc13c60e0
fix: avoid generation of unvalid JSON in summary
This can happen when there are no available shared networks.  A division by
zero throws 'nan', which is non JSON-valid unless it's surrounded by double
quotes.
2024-08-09 12:30:49 +01:00
Sami Kerola
5ed6e7688f
gnulib: update bootstrap and gitignore files
And it turns out mustach.c will not compile without config.h being
explicitly included before other headers, so let me do that.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2024-08-09 12:06:22 +01:00
M. van Brummelen
9c6336e5b6
docs: fix manual page groff warning
The only thing the change does is the way the manpage gets parsed, and fixes
follwing warning.

"W: dhcpd-pools: groff-message an.tmac:<standard input>:147: warning: tbl
preprocessor failed, or it or soelim was not run; table(s) likely not
rendered (TE macro called with TW register undefined)
[usr/share/man/man1/dhcpd-pools.1.gz:1]"

Reference: https://www.mail-archive.com/debian-devel@lists.debian.org/msg377263.html
Signed-off-by: M. van Brummelen <mvb@debian.org>
Reviewed-by: Sami Kerola <kerolasa@iki.fi>
2024-08-09 11:00:02 +01:00
Sami Kerola
d94654e100
getdata: only emit warning when config include file cannot be read
Not being able to open primary config file will cause fatal error, where as
include files will only warn.  This is useful for setups that want to
publish some of the dhcp lease data, but not all.  Such setup obviously
required dhcpd server to have differnt account than dhcpd-pools, with
carefully managed read permissions.

Requested-by: Björn Lässig <b.laessig@pengutronix.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2024-01-28 16:07:56 +00:00
Sami Kerola
dc1f0b9b76
chore: update web links
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2023-09-02 11:55:16 +01:00
Belkacem Daheb
3d37ac0a2d
add start, end and hostname printing support for xml and json
In short it gets these parameters and prints them in json and xml formats.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2023-08-15 22:17:38 +01:00
Sami Kerola
102d017ed5
website: use https
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2023-03-26 11:15:36 +01:00
Sami Kerola
501bc15b43
update project web page
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2022-11-26 10:00:53 +00:00
Sami Kerola
0c5b8301dd
release: 3.2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2022-06-04 12:42:00 +01:00
Sami Kerola
1d20604519
build-sys: routine update
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2022-06-04 12:40:39 +01:00
Sami Kerola
5126e63665
build-sys: autotools and gnulib related updates
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2021-09-05 15:52:07 +01:00
Sami Kerola
c7e0058994
config: remove unnecessary padding
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2021-09-05 15:51:29 +01:00
Sami Kerola
2ecfc86a06
build-sys: update .gitignore files
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2020-09-09 20:22:37 +01:00
Jean Benoit
0f19d44c1d
contrib: snmptest.pl SNMPwalk can't access to all variables/wrong sort
Large quantity of data will be missing when snmptest.pl is used.  The reason
is a sort in lexicographic order:

    $ snmpwalk -v2c -c public localhost .1.3.6.1.4.1.2021.250.255 |head
    iso.3.6.1.4.1.2021.250.255.2.1 = STRING:  "10.4.52.1"
    iso.3.6.1.4.1.2021.250.255.2.10 = STRING: "192.168.35.64"
    iso.3.6.1.4.1.2021.250.255.2.100 = STRING: "192.168.196.1"
    iso.3.6.1.4.1.2021.250.255.2.101 = STRING: "192.168.198.1"
    iso.3.6.1.4.1.2021.250.255.2.102 = STRING: "192.168.209.225"
    iso.3.6.1.4.1.2021.250.255.2.103 = STRING: "192.168.209.241"

SNMPGetNext after "root.2.1" should give "root.2.2".  Thus, lots of
variables are missing.

The function is now dependant on a CPAN module NetSNMP::OID, (debian/ubuntu
package is called libsnmp-perl).  This is probably not the most efficient
way to do it: walking the whole tree will be much slower.

Signed-off-by: Jean Benoit <jean@unistra.fr>
2020-09-04 19:38:17 +01:00
Sami Kerola
b005ce9a25
contrib: point out where one can find zabbix template
Thanks to Mathieu Morier for adding a Zabbix support.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2020-08-29 09:46:21 +01:00
31 changed files with 2053 additions and 1281 deletions

View file

@ -1,7 +1,6 @@
## Makefile.am -- Process this file with automake to produce Makefile.in ## Makefile.am -- Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = gnu AUTOMAKE_OPTIONS = gnu
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = \ EXTRA_DIST = \
.version \ .version \
@ -40,7 +39,7 @@ edit_cmd = sed \
$(PATHFILES): Makefile $(PATHFILES): Makefile
@ rm -f $@ $@.tmp @ rm -f $@ $@.tmp
$(AM_V_at) test -d $(dir $@) || mkdir -p $(dir $@) $(AM_V_at) mkdir -p $$(dirname $@)
$(AM_V_GEN) srcdir=''; \ $(AM_V_GEN) srcdir=''; \
test -f ./$@.in || srcdir=$(srcdir)/; \ test -f ./$@.in || srcdir=$(srcdir)/; \
$(edit_cmd) $${srcdir}$@.in >$@.tmp $(edit_cmd) $${srcdir}$@.in >$@.tmp

34
NEWS
View file

@ -7,6 +7,40 @@ Please send dhcpd-pools bug reports to kerolasa@iki.fi.
gpg: Signature is crated using RSA key ID 8ED396E37E38D471A00530D3A9553245FDE9B739. gpg: Signature is crated using RSA key ID 8ED396E37E38D471A00530D3A9553245FDE9B739.
Version 3.3
Belkacem Daheb (2):
add start, end and hostname printing support for xml and json
getdata output: add start, end and hostname printing support for xml and json
M. van Brummelen (1):
docs: fix manual page groff warning
Sami Kerola (9):
update project web page
website: use https
chore: update web links
getdata: only emit warning when config include file cannot be read
gnulib: update bootstrap and gitignore files
build-sys: quote subshell execution in the autotools file
build-sys: update bootstrap from gnulib
output: update html javascripts
release: 3.3
luisδμ (1):
fix: avoid generation of unvalid JSON in summary
Version 3.2
Jean Benoit (1):
contrib: snmptest.pl SNMPwalk can't access to all variables/wrong sort
Sami Kerola (5):
contrib: point out where one can find zabbix template
build-sys: update .gitignore files
config: remove unnecessary padding
build-sys: autotools and gnulib related updates
build-sys: routine update
release: 3.2
Version 3.1 Version 3.1
Mark Sangster (1): Mark Sangster (1):

4
README
View file

@ -28,7 +28,7 @@ Quick start.
Dependencies to other projects. Dependencies to other projects.
http://www.gnu.org/software/gnulib/ https://www.gnu.org/software/gnulib/
You can avoid repeated gnulib downloads by setting You can avoid repeated gnulib downloads by setting
GNULIB_SRCDIR environment variable. For example: GNULIB_SRCDIR environment variable. For example:
@ -39,7 +39,7 @@ Dependencies to other projects.
Assumign detached gnulib please remember to git pull the Assumign detached gnulib please remember to git pull the
latest updates before building dhcpd-pools. latest updates before building dhcpd-pools.
http://uthash.sourceforge.net/ https://troydhanson.github.io/uthash/
See quick start. See quick start.

5
THANKS
View file

@ -47,3 +47,8 @@ José Bollo
Sebastián Cramatte Sebastián Cramatte
Mark Sangster Mark Sangster
Brent Swingle Brent Swingle
Mathieu Morier
Jean Benoit
Belkacem Daheb
Björn Lässig
Luisδμ

1733
bootstrap

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,10 @@
# Bootstrap configuration. # Bootstrap configuration. -*- sh -*-
# Copyright (C) 2006-2020 Free Software Foundation, Inc. # Copyright (C) 2006-2025 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or # the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version. # (at your option) any later version.
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
@ -64,7 +64,7 @@ XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
gettext_external=0 gettext_external=0
grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null && grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null &&
gettext_external=1 gettext_external=1
grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null && grep '^[ ]*AM_GNU_GETTEXT(\[external]' configure.ac > /dev/null &&
gettext_external=1 gettext_external=1
if test $gettext_external = 1; then if test $gettext_external = 1; then

View file

@ -1,12 +1,12 @@
#!/bin/sh #!/bin/sh
# Print a version string. # Print a version string.
scriptversion=2012-12-31.23; # UTC scriptversion=2022-01-27.18; # UTC
# Copyright (C) 2007-2013 Free Software Foundation, Inc. # Copyright (C) 2007-2022 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or # the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
@ -15,9 +15,9 @@ scriptversion=2012-12-31.23; # UTC
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. # This script is derived from GIT-VERSION-GEN from GIT: https://git-scm.com/.
# It may be run two ways: # It may be run two ways:
# - from a git repository in which the "git describe" command below # - from a git repository in which the "git describe" command below
# produces useful output (thus requiring at least one signed tag) # produces useful output (thus requiring at least one signed tag)
@ -65,19 +65,21 @@ scriptversion=2012-12-31.23; # UTC
# EXTRA_DIST = $(top_srcdir)/.version # EXTRA_DIST = $(top_srcdir)/.version
# BUILT_SOURCES = $(top_srcdir)/.version # BUILT_SOURCES = $(top_srcdir)/.version
# $(top_srcdir)/.version: # $(top_srcdir)/.version:
# echo $(VERSION) > $@-t && mv $@-t $@ # echo '$(VERSION)' > $@-t
# mv $@-t $@
# dist-hook: # dist-hook:
# echo $(VERSION) > $(distdir)/.tarball-version # echo '$(VERSION)' > $(distdir)/.tarball-version
me=$0 me=$0
year=`expr "$scriptversion" : '\([^-]*\)'`
version="git-version-gen $scriptversion version="git-version-gen $scriptversion
Copyright 2011 Free Software Foundation, Inc. Copyright (C) ${year} Free Software Foundation, Inc.
There is NO warranty. You may redistribute this software License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
under the terms of the GNU General Public License. This is free software: you are free to change and redistribute it.
For more information about these matters, see the files named COPYING." There is NO WARRANTY, to the extent permitted by law."
usage="\ usage="\
Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT] Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT]
@ -85,8 +87,9 @@ Print a version string.
Options: Options:
--prefix prefix of git tags (default 'v') --prefix PREFIX prefix of git tags (default 'v')
--fallback fallback version to use if \"git --version\" fails --fallback VERSION
fallback version to use if \"git --version\" fails
--help display this help and exit --help display this help and exit
--version output version information and exit --version output version information and exit
@ -100,8 +103,8 @@ while test $# -gt 0; do
case $1 in case $1 in
--help) echo "$usage"; exit 0;; --help) echo "$usage"; exit 0;;
--version) echo "$version"; exit 0;; --version) echo "$version"; exit 0;;
--prefix) shift; prefix="$1";; --prefix) shift; prefix=${1?};;
--fallback) shift; fallback="$1";; --fallback) shift; fallback=${1?};;
-*) -*)
echo "$0: Unknown option '$1'." >&2 echo "$0: Unknown option '$1'." >&2
echo "$0: Try '--help' for more information." >&2 echo "$0: Try '--help' for more information." >&2
@ -140,11 +143,9 @@ then
v=`cat $tarball_version_file` || v= v=`cat $tarball_version_file` || v=
case $v in case $v in
*$nl*) v= ;; # reject multi-line output *$nl*) v= ;; # reject multi-line output
[0-9]*) ;;
*) v= ;;
esac esac
test "x$v" = x \ test "x$v" = x \
&& echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2 && echo "$0: WARNING: $tarball_version_file is damaged" 1>&2
fi fi
if test "x$v" != x if test "x$v" != x
@ -166,9 +167,10 @@ then
# tag or the previous older version that did not? # tag or the previous older version that did not?
# Newer: v6.10-77-g0f8faeb # Newer: v6.10-77-g0f8faeb
# Older: v6.10-g0f8faeb # Older: v6.10-g0f8faeb
case $v in vprefix=`expr "X$v" : 'X\(.*\)-g[^-]*$'` || vprefix=$v
*-*-*) : git describe is okay three part flavor ;; case $vprefix in
*-*) *-*) : git describe is probably okay three part flavor ;;
*)
: git describe is older two part flavor : git describe is older two part flavor
# Recreate the number of commits and rewrite such that the # Recreate the number of commits and rewrite such that the
# result is the same as if we were using the newer version # result is the same as if we were using the newer version
@ -183,9 +185,9 @@ then
;; ;;
esac esac
# Change the first '-' to a '.', so version-comparing tools work properly. # Change the penultimate "-" to ".", for version-comparing tools.
# Remove the "g" in git describe's output string, to save a byte. # Remove the "g" to save a byte.
v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; v=`echo "$v" | sed 's/-\([^-]*\)-g\([^-]*\)$/.\1-\2/'`;
v_from_git=1 v_from_git=1
elif test "x$fallback" = x || git --version >/dev/null 2>&1; then elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
v=UNKNOWN v=UNKNOWN
@ -199,7 +201,7 @@ v=`echo "$v" |sed "s/^$prefix//"`
# string we're using came from git. I.e., skip the test if it's "UNKNOWN" # string we're using came from git. I.e., skip the test if it's "UNKNOWN"
# or if it came from .tarball-version. # or if it came from .tarball-version.
if test "x$v_from_git" != x; then if test "x$v_from_git" != x; then
# Don't declare a version "dirty" merely because a time stamp has changed. # Don't declare a version "dirty" merely because a timestamp has changed.
git update-index --refresh > /dev/null 2>&1 git update-index --refresh > /dev/null 2>&1
dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty= dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
@ -214,12 +216,12 @@ if test "x$v_from_git" != x; then
fi fi
# Omit the trailing newline, so that m4_esyscmd can use the result directly. # Omit the trailing newline, so that m4_esyscmd can use the result directly.
echo "$v" | tr -d "$nl" printf %s "$v"
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:

View file

@ -2,11 +2,11 @@
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69]) AC_PREREQ([2.69])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIRS([m4])
AC_INIT([dhcpd-pools], AC_INIT([dhcpd-pools],
[m4_esyscmd([build-aux/git-version-gen .tarball-version])], [m4_esyscmd([build-aux/git-version-gen .tarball-version])],
[kerolasa@iki.fi],[], [kerolasa@iki.fi],[],
[http://dhcpd-pools.sourceforge.net/]) [https://dhcpd-pools.sourceforge.net/])
PACKAGE_MAINTAINER="Sami Kerola" PACKAGE_MAINTAINER="Sami Kerola"
AC_SUBST([PACKAGE_MAINTAINER]) AC_SUBST([PACKAGE_MAINTAINER])
AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_AUX_DIR([build-aux])

View file

@ -7,7 +7,7 @@ pkgver=0
pkgrel=1 pkgrel=1
pkgdesc="ISC dhcpd lease status utility" pkgdesc="ISC dhcpd lease status utility"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
url=http://dhcpd-pools.sourceforge.net/ url=https://dhcpd-pools.sourceforge.net/
license=('BSD') license=('BSD')
depends=('pacman') depends=('pacman')
makedepends=('uthash' 'git') makedepends=('uthash' 'git')

View file

@ -23,9 +23,10 @@
# you set $dbg to 1 then output will be generated in /tmp. # you set $dbg to 1 then output will be generated in /tmp.
use strict; use strict;
use NetSNMP::OID;
# Version info: # Version info:
my $SNMPver = "snmp1.0"; my $SNMPver = "snmp1.1";
my $DHCPver = "dhcp1.0"; my $DHCPver = "dhcp1.0";
my $VERSION = "$SNMPver/$DHCPver"; my $VERSION = "$SNMPver/$DHCPver";
# #
@ -193,7 +194,7 @@ sub ParseDataFile () {
} }
close IN; close IN;
if ($dbg) { if ($dbg) {
foreach (sort @validoidlist) { print DBG "ValidOID: $_\n"; } foreach (sort Oidcmp @validoidlist) { print DBG "ValidOID: $_\n"; }
} }
if ($dbg) { if ($dbg) {
@ -370,7 +371,7 @@ sub GetData ($) {
@userquery = split (/\./, $userqueryoid); @userquery = split (/\./, $userqueryoid);
my $found = 0; my $found = 0;
foreach (sort @validoidlist) { foreach (sort Oidcmp @validoidlist) {
$next = $_; $next = $_;
print DBG "Comparing $userqueryoid vs. $_\n" if $dbg; print DBG "Comparing $userqueryoid vs. $_\n" if $dbg;
@validoid = split (/\./, $_); @validoid = split (/\./, $_);
@ -432,6 +433,12 @@ sub Pong {
$line = 0; $line = 0;
} }
sub Oidcmp {
my $oida = new NetSNMP::OID($a);
my $oidb = new NetSNMP::OID($b);
snmp_oid_compare($oida, $oidb);
}
################################## START ################################## ################################## START ##################################
# #
# Main # Main

4
contrib/zabbix.txt Normal file
View file

@ -0,0 +1,4 @@
Zabbix 5 template, and instructions how to use it, can be found from
Mathieu's repository.
https://github.com/mmorier86/dhcpd-pools-zabbix-template

117
lib/.gitignore vendored
View file

@ -1,13 +1,22 @@
/alloca.h /alloca.h
/alloca.in.h /alloca.in.h
/arg-nonnull.h /arg-nonnull.h
/arpa/inet.h /arpa/
/arpa_inet.c
/arpa_inet.in.h /arpa_inet.in.h
/assert.in.h
/attribute.h
/basename-lgpl.c /basename-lgpl.c
/basename-lgpl.h
/c32is-impl.h
/c32isprint.c
/calloc.c
/c-ctype.c /c-ctype.c
/c-ctype.h /c-ctype.h
/c++defs.h /c++defs.h
/cdefs.h /cdefs.h
/cloexec.c
/cloexec.h
/close.c /close.c
/closeout.c /closeout.c
/closeout.h /closeout.h
@ -17,15 +26,15 @@
/c-strcaseeq.h /c-strcaseeq.h
/c-strcase.h /c-strcase.h
/c-strncasecmp.c /c-strncasecmp.c
/dirname.h /dup2.c
/dirname-lgpl.c
/dosname.h
/errno.in.h /errno.in.h
/error.c /error.c
/error.h /error.h
/error.in.h
/exitfail.c /exitfail.c
/exitfail.h /exitfail.h
/fclose.c /fclose.c
/fcntl.c
/fcntl.h /fcntl.h
/fcntl.in.h /fcntl.in.h
/fd-hook.c /fd-hook.c
@ -36,6 +45,7 @@
/flexmember.h /flexmember.h
/float.c /float.c
/float+.h /float+.h
/float.h
/float.in.h /float.in.h
/fopen.c /fopen.c
/fpending.c /fpending.c
@ -43,11 +53,15 @@
/fpurge.c /fpurge.c
/freading.c /freading.c
/freading.h /freading.h
/free.c
/fseek.c /fseek.c
/fseeko.c /fseeko.c
/fstat.c /fstat.c
/ftell.c /ftell.c
/ftello.c /ftello.c
/getdtablesize.c
/getlocalename_l-unsafe.c
/getlocalename_l-unsafe.h
/getopt1.c /getopt1.c
/getopt.c /getopt.c
/getopt-cdefs.in.h /getopt-cdefs.in.h
@ -60,11 +74,14 @@
/getprogname.c /getprogname.c
/getprogname.h /getprogname.h
/gettext.h /gettext.h
/glthread/*
/hard-locale.c /hard-locale.c
/hard-locale.h /hard-locale.h
/ialloc.c
/ialloc.h
/idx.h
/inet_pton.c /inet_pton.c
/intprops.h /intprops.h
/intprops-internal.h
/inttypes.h /inttypes.h
/inttypes.in.h /inttypes.in.h
/isnan.c /isnan.c
@ -76,16 +93,60 @@
/lc-charset-dispatch.h /lc-charset-dispatch.h
/libc-config.h /libc-config.h
/libdhcpd_pools.la /libdhcpd_pools.la
/libdhcpd_pools_la-arpa_inet.lo
/libdhcpd_pools_la-basename-lgpl.lo
/libdhcpd_pools_la-c32isprint.lo
/libdhcpd_pools_la-c-ctype.lo
/libdhcpd_pools_la-cloexec.lo
/libdhcpd_pools_la-closeout.lo
/libdhcpd_pools_la-close-stream.lo
/libdhcpd_pools_la-c-strcasecmp.lo
/libdhcpd_pools_la-exitfail.lo
/libdhcpd_pools_la-fclose.lo
/libdhcpd_pools_la-fcntl.lo
/libdhcpd_pools_la-fd-hook.lo
/libdhcpd_pools_la-fflush.lo
/libdhcpd_pools_la-float.lo
/libdhcpd_pools_la-fopen.lo
/libdhcpd_pools_la-fpurge.lo
/libdhcpd_pools_la-freading.lo
/libdhcpd_pools_la-fseek.lo
/libdhcpd_pools_la-fseeko.lo
/libdhcpd_pools_la-getprogname.lo
/libdhcpd_pools_la-hard-locale.lo
/libdhcpd_pools_la-ialloc.lo
/libdhcpd_pools_la-localcharset.lo
/libdhcpd_pools_la-malloca.lo
/libdhcpd_pools_la-math.lo
/libdhcpd_pools_la-mbrtoc32.lo
/libdhcpd_pools_la-mbrtowc.lo
/libdhcpd_pools_la-mbszero.lo
/libdhcpd_pools_la-mktime.lo
/libdhcpd_pools_la-nstrftime.lo
/libdhcpd_pools_la-progname.lo
/libdhcpd_pools_la-quotearg.lo
/libdhcpd_pools_la-reallocarray.lo
/libdhcpd_pools_la-realloc.lo
/libdhcpd_pools_la-setlocale_null.lo
/libdhcpd_pools_la-setlocale_null-unlocked.lo
/libdhcpd_pools_la-stat-time.lo
/libdhcpd_pools_la-stdlib.lo
/libdhcpd_pools_la-sys_socket.lo
/libdhcpd_pools_la-timegm.lo
/libdhcpd_pools_la-time_rz.lo
/libdhcpd_pools_la-unistd.lo
/libdhcpd_pools_la-wctype-h.lo
/libdhcpd_pools_la-xalloc-die.lo
/libdhcpd_pools_la-xmalloc.lo
/.libs/ /.libs/
/limits.h /limits.h
/limits.in.h /limits.in.h
/*.lo
/localcharset.c /localcharset.c
/localcharset.h /localcharset.h
/locale.h /locale.h
/locale.in.h /locale.in.h
/localtime-buffer.c /localename.h
/localtime-buffer.h /localename-unsafe.c
/lseek.c /lseek.c
/Makefile.am /Makefile.am
/malloca.c /malloca.c
@ -94,10 +155,12 @@
/math.c /math.c
/math.h /math.h
/math.in.h /math.in.h
/mbrtoc32.c
/mbrtowc.c /mbrtowc.c
/mbrtowc-impl.h /mbrtowc-impl.h
/mbrtowc-impl-utf8.h /mbrtowc-impl-utf8.h
/mbsinit.c /mbsinit.c
/mbszero.c
/mbtowc-lock.c /mbtowc-lock.c
/mbtowc-lock.h /mbtowc-lock.h
/memchr.c /memchr.c
@ -112,29 +175,36 @@
/netinet_in.in.h /netinet_in.in.h
/_Noreturn.h /_Noreturn.h
/nstrftime.c /nstrftime.c
/open.c
/pathmax.h /pathmax.h
/progname.c /progname.c
/progname.h /progname.h
/quotearg.c /quotearg.c
/quotearg.h /quotearg.h
/quote.h /quote.h
/reallocarray.c
/realloc.c /realloc.c
/setenv.c /setenv.c
/setlocale-lock.c /setlocale-lock.c
/setlocale_null.c /setlocale_null.c
/setlocale_null.h /setlocale_null.h
/setlocale_null-unlocked.c
/stat.c /stat.c
/stat-time.c /stat-time.c
/stat-time.h /stat-time.h
/stat-w32.c /stat-w32.c
/stat-w32.h /stat-w32.h
/stdalign.in.h /stdckdint.h
/stdbool.in.h /stdckdint.in.h
/stddef.h
/stddef.in.h /stddef.in.h
/stdint.in.h /stdint.in.h
/stdio.h /stdio.h
/stdio-impl.h /stdio-impl.h
/stdio.in.h /stdio.in.h
/stdio-read.c
/stdio-write.c
/stdlib.c
/stdlib.h /stdlib.h
/stdlib.in.h /stdlib.in.h
/stpncpy.c /stpncpy.c
@ -143,21 +213,18 @@
/strerror.c /strerror.c
/strerror-override.c /strerror-override.c
/strerror-override.h /strerror-override.h
/strftime.c
/strftime.h /strftime.h
/string.h /string.h
/string.in.h /string.in.h
/stripslash.c
/strstr.c /strstr.c
/strtod.c /strtod.c
/str-two-way.h /str-two-way.h
/sys/
/sys_socket.c /sys_socket.c
/sys/socket.h
/sys_socket.in.h /sys_socket.in.h
/sys/stat.h
/sys_stat.in.h /sys_stat.in.h
/sys/types.h
/sys_types.in.h /sys_types.in.h
/sys/uio.h
/sys_uio.in.h /sys_uio.in.h
/timegm.c /timegm.c
/time.h /time.h
@ -166,11 +233,21 @@
/time_r.c /time_r.c
/time_rz.c /time_rz.c
/tzset.c /tzset.c
/uchar.h
/uchar.in.h
/unictype/
/unictype/bitmap.h
/unictype/ctype_print.c
/unictype/ctype_print.h
/unictype/.gitignore
/unictype.h
/unictype.in.h
/unistd.c /unistd.c
/unistd.h /unistd.h
/unistd.in.h /unistd.in.h
/unitypes.h
/unitypes.in.h
/unsetenv.c /unsetenv.c
/unused-parameter.h
/verify.h /verify.h
/warn-on-use.h /warn-on-use.h
/wchar.h /wchar.h
@ -179,14 +256,6 @@
/wctype-h.c /wctype-h.c
/wctype.in.h /wctype.in.h
/windows-initguard.h /windows-initguard.h
/windows-mutex.c
/windows-mutex.h
/windows-once.c
/windows-once.h
/windows-recmutex.c
/windows-recmutex.h
/windows-rwlock.c
/windows-rwlock.h
/xalloc-die.c /xalloc-die.c
/xalloc.h /xalloc.h
/xalloc-oversized.h /xalloc-oversized.h

View file

@ -1,4 +1,5 @@
.TH DHCPD-POOLS "1" "2017-11-15" "@VERSION@" "User Commands" '\" t
.TH DHCPD-POOLS "1" "2024-08-09" "@VERSION@" "User Commands"
.SH NAME .SH NAME
dhcpd-pools \- ISC dhcpd pools usage analysis dhcpd-pools \- ISC dhcpd pools usage analysis
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -3,9 +3,9 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"> xmlns:foaf="http://xmlns.com/foaf/0.1/">
<Project rdf:about="http://dhcpd-pools.sourceforge.net/"> <Project rdf:about="https://dhcpd-pools.sourceforge.net/">
<name>dhcpd-pools</name> <name>dhcpd-pools</name>
<homepage rdf:resource="http://dhcpd-pools.sourceforge.net/" /> <homepage rdf:resource="https://dhcpd-pools.sourceforge.net/" />
<shortdesc>This is dhcpd-pools ISC dhcp shared network and pool <shortdesc>This is dhcpd-pools ISC dhcp shared network and pool
range usage analysis tool.</shortdesc> range usage analysis tool.</shortdesc>
<description>Purpose of command is to count usage ratio of each <description>Purpose of command is to count usage ratio of each

View file

@ -343,8 +343,7 @@ int main(int argc, char **argv)
.header_limit = 8, .header_limit = 8,
.ranges_size = 64, .ranges_size = 64,
.ip_version = IPvUNKNOWN, .ip_version = IPvUNKNOWN,
.color_mode = color_auto, .color_mode = color_auto
0
}; };
int ret_val; int ret_val;

View file

@ -102,6 +102,9 @@ enum prefix_t {
PREFIX_BINDING_STATE_ACTIVE, PREFIX_BINDING_STATE_ACTIVE,
PREFIX_BINDING_STATE_BACKUP, PREFIX_BINDING_STATE_BACKUP,
PREFIX_HARDWARE_ETHERNET, PREFIX_HARDWARE_ETHERNET,
PREFIX_STARTS,
PREFIX_ENDS,
PREFIX_HOSTNAME,
NUM_OF_PREFIX NUM_OF_PREFIX
}; };
@ -127,7 +130,6 @@ struct shared_network_t {
double backups; double backups;
struct shared_network_t *next; struct shared_network_t *next;
int netmask; int netmask;
uint32_t pad;
}; };
/*! \struct range_t /*! \struct range_t
@ -152,7 +154,6 @@ struct output_helper_t {
double tcp; double tcp;
double bup; double bup;
int status; int status;
uint32_t pad;
}; };
/*! \struct status_counts_t /*! \struct status_counts_t
@ -182,7 +183,9 @@ struct leases_t {
char *ethernet; char *ethernet;
UT_hash_handle hh; UT_hash_handle hh;
enum ltype type; enum ltype type;
uint32_t pad; char *ends;
char *starts;
char *hostname;
}; };
/*! \enum limbits /*! \enum limbits
@ -251,8 +254,7 @@ struct conf_t {
skip_critical:1, /*!< Skip critical values from output. */ skip_critical:1, /*!< Skip critical values from output. */
skip_minsize:1, /*!< Skip alarming values that are below minsize from output. */ skip_minsize:1, /*!< Skip alarming values that are below minsize from output. */
skip_suppressed:1, /*!< Skip alarming values that are suppressed with --snet-alarms option, or they are shared networks without IP availability. */ skip_suppressed:1, /*!< Skip alarming values that are suppressed with --snet-alarms option, or they are shared networks without IP availability. */
color_mode:2, /*!< Indicator if colors should be used in output. */ color_mode:2; /*!< Indicator if colors should be used in output. */
pad_bits:4;
}; };
/* Function prototypes */ /* Function prototypes */

View file

@ -83,7 +83,7 @@ enum isc_conf_parser {
int parse_leases(struct conf_t *state) int parse_leases(struct conf_t *state)
{ {
FILE *dhcpd_leases; FILE *dhcpd_leases;
char *line, *ipstring, macstring[20], *stop; char *line, *ipstring, macstring[20], *stop, endsstr[30], startsstr[30], hostnamestr[MAXLEN];
union ipaddr_t addr; union ipaddr_t addr;
struct leases_t *lease; struct leases_t *lease;
@ -100,6 +100,9 @@ int parse_leases(struct conf_t *state)
line[0] = '\0'; line[0] = '\0';
ipstring = xmalloc(sizeof(char) * MAXLEN); ipstring = xmalloc(sizeof(char) * MAXLEN);
ipstring[0] = '\0'; ipstring[0] = '\0';
endsstr[0] = '\0';
startsstr[0] = '\0';
hostnamestr[0] = '\0';
while (!feof(dhcpd_leases)) { while (!feof(dhcpd_leases)) {
if (!fgets(line, MAXLEN, dhcpd_leases) && ferror(dhcpd_leases)) if (!fgets(line, MAXLEN, dhcpd_leases) && ferror(dhcpd_leases))
error(EXIT_FAILURE, errno, "parse_leases: %s", state->dhcpdlease_file); error(EXIT_FAILURE, errno, "parse_leases: %s", state->dhcpdlease_file);
@ -142,8 +145,35 @@ int parse_leases(struct conf_t *state)
break; break;
memcpy(macstring, line + 20, 17); memcpy(macstring, line + 20, 17);
macstring[17] = '\0'; macstring[17] = '\0';
if ((lease = find_lease(state, &addr)) != NULL) if ((lease = find_lease(state, &addr)) != NULL) {
lease->ethernet = xstrdup(macstring); lease->ethernet = xstrdup(macstring);
lease->starts = xstrdup(startsstr);
startsstr[0] = '\0';
lease->ends = xstrdup(endsstr);
endsstr[0] = '\0';
}
break;
case PREFIX_ENDS:
if (state->print_mac_addreses == 0)
break;
strncpy(endsstr, line + 7, sizeof(endsstr)-1);
endsstr[strlen(endsstr)-2] = '\0';
break;
case PREFIX_STARTS:
if (state->print_mac_addreses == 0)
break;
strncpy(startsstr, line + 9, sizeof(startsstr)-1);
startsstr[strlen(startsstr)-2] = '\0';
break;
case PREFIX_HOSTNAME:
if (state->print_mac_addreses == 0)
break;
strncpy(hostnamestr, line + 19, sizeof(hostnamestr)-1);
hostnamestr[strlen(hostnamestr)-3] = '\0';
if ((lease = find_lease(state, &addr)) != NULL) {
lease->hostname = xstrdup(hostnamestr);
}
hostnamestr[0] = '\0';
break; break;
default: default:
/* do nothing */ ; /* do nothing */ ;
@ -211,8 +241,14 @@ void parse_config(struct conf_t *state, const int is_include, const char *restri
shared_p->name = state->shared_net_root->name; shared_p->name = state->shared_net_root->name;
/* Open configuration file */ /* Open configuration file */
dhcpd_config = fopen(config_file, "r"); dhcpd_config = fopen(config_file, "r");
if (dhcpd_config == NULL) if (dhcpd_config == NULL) {
if (is_include) {
error(0, errno, "cannot open inlude: %s", config_file);
return;
}
/* config if from command line, just exit with error */
error(EXIT_FAILURE, errno, "parse_config: %s", config_file); error(EXIT_FAILURE, errno, "parse_config: %s", config_file);
}
#ifdef HAVE_POSIX_FADVISE #ifdef HAVE_POSIX_FADVISE
# ifdef POSIX_FADV_SEQUENTIAL # ifdef POSIX_FADV_SEQUENTIAL
if (posix_fadvise(fileno(dhcpd_config), 0, 0, POSIX_FADV_SEQUENTIAL) != 0) if (posix_fadvise(fileno(dhcpd_config), 0, 0, POSIX_FADV_SEQUENTIAL) != 0)

View file

@ -66,6 +66,9 @@ void add_lease_v4(struct conf_t *state, union ipaddr_t *addr, enum ltype type)
l->type = type; l->type = type;
HASH_ADD_INT(state->leases, ip.v4, l); HASH_ADD_INT(state->leases, ip.v4, l);
l->ethernet = NULL; l->ethernet = NULL;
l->ends = NULL;
l->starts = NULL;
l->hostname = NULL;
} }
void add_lease_v6(struct conf_t *state, union ipaddr_t *addr, enum ltype type) void add_lease_v6(struct conf_t *state, union ipaddr_t *addr, enum ltype type)
@ -77,6 +80,9 @@ void add_lease_v6(struct conf_t *state, union ipaddr_t *addr, enum ltype type)
l->type = type; l->type = type;
HASH_ADD_V6(state->leases, ip.v6, l); HASH_ADD_V6(state->leases, ip.v6, l);
l->ethernet = NULL; l->ethernet = NULL;
l->ends = NULL;
l->starts = NULL;
l->hostname = NULL;
} }
/*! \brief Find pointer to lease from hash array. /*! \brief Find pointer to lease from hash array.
@ -110,6 +116,9 @@ struct leases_t *find_lease_v6(struct conf_t *state, union ipaddr_t *addr)
void delete_lease(struct conf_t *state, struct leases_t *lease) void delete_lease(struct conf_t *state, struct leases_t *lease)
{ {
free(lease->ethernet); free(lease->ethernet);
free(lease->ends);
free(lease->starts);
free(lease->hostname);
HASH_DEL(state->leases, lease); HASH_DEL(state->leases, lease);
free(lease); free(lease);
} }
@ -122,6 +131,9 @@ void delete_all_leases(struct conf_t *state)
HASH_ITER(hh, state->leases, l, tmp) { HASH_ITER(hh, state->leases, l, tmp) {
free(l->ethernet); free(l->ethernet);
free(l->ends);
free(l->starts);
free(l->hostname);
HASH_DEL(state->leases, l); HASH_DEL(state->leases, l);
free(l); free(l);
} }
@ -134,6 +146,9 @@ void delete_all_leases(struct conf_t *state)
l = state->leases; l = state->leases;
free(l->ethernet); free(l->ethernet);
free(l->ends);
free(l->starts);
free(l->hostname);
HASH_DEL(state->leases, l); /* leases advances to next on delete */ HASH_DEL(state->leases, l); /* leases advances to next on delete */
free(l); free(l);
} }

View file

@ -8,7 +8,7 @@
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
@ -19,6 +19,8 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#include "config.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View file

@ -8,7 +8,7 @@
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,

View file

@ -417,6 +417,12 @@ int
} }
if (!memcmp("lease ", str, 6)) if (!memcmp("lease ", str, 6))
return PREFIX_LEASE; return PREFIX_LEASE;
else if (!memcmp(" starts ", str, 9))
return PREFIX_STARTS;
else if (!memcmp(" ends ", str, 7))
return PREFIX_ENDS;
else if (!memcmp(" client-hostname ", str, 18))
return PREFIX_HOSTNAME;
return NUM_OF_PREFIX; return NUM_OF_PREFIX;
} }
@ -472,6 +478,12 @@ int
} }
if (!memcmp(" iaaddr ", str, 9)) if (!memcmp(" iaaddr ", str, 9))
return PREFIX_LEASE; return PREFIX_LEASE;
else if (!memcmp(" starts ", str, 9))
return PREFIX_STARTS;
else if (!memcmp(" ends ", str, 7))
return PREFIX_ENDS;
else if (!memcmp(" client-hostname ", str, 18))
return PREFIX_HOSTNAME;
return NUM_OF_PREFIX; return NUM_OF_PREFIX;
} }

View file

@ -387,7 +387,19 @@ static int output_xml(struct conf_t *state)
if (l->ethernet != NULL) { if (l->ethernet != NULL) {
fputs(l->ethernet, outfile); fputs(l->ethernet, outfile);
} }
fputs("</macaddress>\n</active_lease>\n", outfile); fputs("</macaddress>\n\t<starts>", outfile);
if (l->starts != NULL) {
fputs(l->starts, outfile);
}
fputs("</starts>\n\t<ends>", outfile);
if (l->ends != NULL) {
fputs(l->ends, outfile);
}
fputs("</ends>\n\t<hostname>", outfile);
if (l->hostname != NULL) {
fputs(l->hostname, outfile);
}
fputs("</hostname>\n</active_lease>\n", outfile);
} }
} }
} }
@ -481,6 +493,18 @@ static int output_json(struct conf_t *state)
if (l->ethernet != NULL) { if (l->ethernet != NULL) {
fputs(l->ethernet, outfile); fputs(l->ethernet, outfile);
} }
fputs("\", \"starts\":\"", outfile);
if (l->starts != NULL) {
fputs(l->starts, outfile);
}
fputs("\", \"ends\":\"", outfile);
if (l->ends != NULL) {
fputs(l->ends, outfile);
}
fputs("\", \"hostname\":\"", outfile);
if (l->hostname != NULL) {
fputs(l->hostname, outfile);
}
fputs("\" }", outfile); fputs("\" }", outfile);
} }
} }
@ -587,9 +611,15 @@ static int output_json(struct conf_t *state)
fprintf(outfile, " \"touched\":%g,\n", state->shared_net_root->touched); fprintf(outfile, " \"touched\":%g,\n", state->shared_net_root->touched);
fprintf(outfile, " \"free\":%g,\n", fprintf(outfile, " \"free\":%g,\n",
state->shared_net_root->available - state->shared_net_root->used); state->shared_net_root->available - state->shared_net_root->used);
fprintf(outfile, " \"percent\":%g,\n", oh.percent); if (fpclassify(state->shared_net_root->available) == FP_ZERO)
fprintf(outfile, " \"percent\":\"%g\",\n", oh.percent);
else
fprintf(outfile, " \"percent\":%g,\n", oh.percent);
fprintf(outfile, " \"touch_count\":%g,\n", oh.tc); fprintf(outfile, " \"touch_count\":%g,\n", oh.tc);
fprintf(outfile, " \"touch_percent\":%g,\n", oh.tcp); if (fpclassify(state->shared_net_root->available) == FP_ZERO)
fprintf(outfile, " \"touch_percent\":\"%g\",\n", oh.tcp);
else
fprintf(outfile, " \"touch_percent\":%g,\n", oh.tcp);
if (state->backups_found == 1) { if (state->backups_found == 1) {
fprintf(outfile, " \"backup_count\":%g,\n", fprintf(outfile, " \"backup_count\":%g,\n",
state->shared_net_root->backups); state->shared_net_root->backups);
@ -628,8 +658,8 @@ static void html_header(struct conf_t *state, FILE *restrict f)
fprintf(f, "<meta charset=\"utf-8\">\n"); fprintf(f, "<meta charset=\"utf-8\">\n");
fprintf(f, "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n"); fprintf(f, "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n");
fprintf(f, "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n"); fprintf(f, "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n");
fprintf(f, "<link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css\" type=\"text/css\">\n"); fprintf(f, "<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css\" type=\"text/css\">\n");
fprintf(f, "<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css\">\n"); fprintf(f, "<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.datatables.net/v/dt/dt-2.2.2/datatables.min.css\">\n");
fprintf(f, "<style type=\"text/css\">\n"); fprintf(f, "<style type=\"text/css\">\n");
fprintf(f, "table.dhcpd-pools th { text-transform: capitalize }\n"); fprintf(f, "table.dhcpd-pools th { text-transform: capitalize }\n");
fprintf(f, "</style>\n"); fprintf(f, "</style>\n");
@ -652,8 +682,8 @@ static void html_footer(FILE *restrict f)
fprintf(f, "<small>Generated using %s<br />\n", PACKAGE_STRING); fprintf(f, "<small>Generated using %s<br />\n", PACKAGE_STRING);
fprintf(f, "More info at <a href=\"%s\">%s</a>\n", PACKAGE_URL, PACKAGE_URL); fprintf(f, "More info at <a href=\"%s\">%s</a>\n", PACKAGE_URL, PACKAGE_URL);
fprintf(f, "</small></div></div>\n"); fprintf(f, "</small></div></div>\n");
fprintf(f, "<script src=\"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js\" type=\"text/javascript\"></script>\n"); fprintf(f, "<script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js\" type=\"text/javascript\"></script>\n");
fprintf(f, "<script type=\"text/javascript\" src=\"https://cdn.datatables.net/v/bs/jq-3.2.1/dt-1.10.16/datatables.min.js\"></script>\n"); fprintf(f, "<script type=\"text/javascript\" src=\"https://cdn.datatables.net/v/dt/dt-2.2.2/datatables.min.js\"></script>\n");
fprintf(f, "<script type=\"text/javascript\" class=\"init\">$(document).ready(function() { $('#s').DataTable({ \"iDisplayLength\": 50, \"lengthMenu\": [ [25, 50, 100, -1], [25, 50, 100, \"All\"] ], \"order\": [[ 4, \"desc\" ]] } ); } );</script>\n"); fprintf(f, "<script type=\"text/javascript\" class=\"init\">$(document).ready(function() { $('#s').DataTable({ \"iDisplayLength\": 50, \"lengthMenu\": [ [25, 50, 100, -1], [25, 50, 100, \"All\"] ], \"order\": [[ 4, \"desc\" ]] } ); } );</script>\n");
fprintf(f, "<script type=\"text/javascript\" class=\"init\">$(document).ready(function() { $('#r').DataTable({ \"iDisplayLength\": 100, \"lengthMenu\": [ [25, 50, 100, -1], [25, 50, 100, \"All\"] ], \"order\": [[ 6, \"desc\" ]] } ); } );</script>\n"); fprintf(f, "<script type=\"text/javascript\" class=\"init\">$(document).ready(function() { $('#r').DataTable({ \"iDisplayLength\": 100, \"lengthMenu\": [ [25, 50, 100, -1], [25, 50, 100, \"All\"] ], \"order\": [[ 6, \"desc\" ]] } ); } );</script>\n");
fprintf(f, "</body></html>\n"); fprintf(f, "</body></html>\n");

View file

@ -7,7 +7,16 @@ dhcpd-pools: unknown color mode: 'sometimes'
=== IPv5 === IPv5
dhcpd-pools: unknown --ip-version argument: 5 dhcpd-pools: unknown --ip-version argument: 5
=== missing conf === missing conf
dhcpd-pools: parse_config: ./tests/confs/complete_NXFILE: No such file or directory dhcpd-pools: cannot open inlude: ./tests/confs/complete_NXFILE: No such file or directory
Ranges:
shared net name first ip last ip max cur percent touch t+c t+c perc
Shared networks:
name max cur percent touch t+c t+c perc
Sum of all ranges:
name max cur percent touch t+c t+c perc
All networks 0 0 nan 0 0 nan
=== missing leases === missing leases
dhcpd-pools: parse_leases: ./tests/leases/complete_NXFILE: No such file or directory dhcpd-pools: parse_leases: ./tests/leases/complete_NXFILE: No such file or directory
=== html table === html table

View file

@ -23,8 +23,8 @@ All networks 100 43 43.000 0 43 43.000
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" type="text/css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-2.2.2/datatables.min.css">
<style type="text/css"> <style type="text/css">
table.dhcpd-pools th { text-transform: capitalize } table.dhcpd-pools th { text-transform: capitalize }
</style> </style>
@ -176,10 +176,10 @@ table.dhcpd-pools th { text-transform: capitalize }
</tbody> </tbody>
</table> </table>
<br /><div class="well well-lg"> <br /><div class="well well-lg">
More info at <a href="http://dhcpd-pools.sourceforge.net/">http://dhcpd-pools.sourceforge.net/</a> More info at <a href="https://dhcpd-pools.sourceforge.net/">https://dhcpd-pools.sourceforge.net/</a>
</small></div></div> </small></div></div>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" type="text/javascript"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js" type="text/javascript"></script>
<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jq-3.2.1/dt-1.10.16/datatables.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-2.2.2/datatables.min.js"></script>
<script type="text/javascript" class="init">$(document).ready(function() { $('#s').DataTable({ "iDisplayLength": 50, "lengthMenu": [ [25, 50, 100, -1], [25, 50, 100, "All"] ], "order": [[ 4, "desc" ]] } ); } );</script> <script type="text/javascript" class="init">$(document).ready(function() { $('#s').DataTable({ "iDisplayLength": 50, "lengthMenu": [ [25, 50, 100, -1], [25, 50, 100, "All"] ], "order": [[ 4, "desc" ]] } ); } );</script>
<script type="text/javascript" class="init">$(document).ready(function() { $('#r').DataTable({ "iDisplayLength": 100, "lengthMenu": [ [25, 50, 100, -1], [25, 50, 100, "All"] ], "order": [[ 6, "desc" ]] } ); } );</script> <script type="text/javascript" class="init">$(document).ready(function() { $('#r').DataTable({ "iDisplayLength": 100, "lengthMenu": [ [25, 50, 100, -1], [25, 50, 100, "All"] ], "order": [[ 6, "desc" ]] } ); } );</script>
</body></html> </body></html>

View file

@ -1,6 +1,6 @@
{ {
"active_leases": [ "active_leases": [
{ "ip":"10.0.0.5", "macaddress":"00:00:00:00:00:00" } { "ip":"10.0.0.5", "macaddress":"00:00:00:00:00:00", "starts":"", "ends":"", "hostname":"" }
], ],
"subnets": [ "subnets": [
{ "location":"All networks", "range":"10.0.0.1 - 10.0.0.10", "first_ip":"10.0.0.1", "last_ip":"10.0.0.10", "defined":10, "used":1, "touched":0, "free":9, "percent":10, "touch_count":1, "touch_percent":10, "status":0 } { "location":"All networks", "range":"10.0.0.1 - 10.0.0.10", "first_ip":"10.0.0.1", "last_ip":"10.0.0.10", "defined":10, "used":1, "touched":0, "free":9, "percent":10, "touch_count":1, "touch_percent":10, "status":0 }

View file

@ -2,6 +2,9 @@
<active_lease> <active_lease>
<ip>10.0.0.5</ip> <ip>10.0.0.5</ip>
<macaddress>00:00:00:00:00:00</macaddress> <macaddress>00:00:00:00:00:00</macaddress>
<starts></starts>
<ends></ends>
<hostname></hostname>
</active_lease> </active_lease>
<subnet> <subnet>
<location>All networks</location> <location>All networks</location>

View file

@ -4,12 +4,11 @@
# analysis algorithm is sane. This script is no longer # analysis algorithm is sane. This script is no longer
# maintained, and can be considered as historic reference. # maintained, and can be considered as historic reference.
# #
# Licensed under the Open Software License version 1.1 # Licensed under the Open Software License version 1.0
# http://opensource.org/licenses/osl.php # https://opensource.org/license/osl-1-0/
# #
# Sami Kerola <sami.kerola@teliasonera.com> # Sami Kerola <sami.kerola@teliasonera.com>
# #
# Latest version is available from http://www.iki.fi/kerolasa/dhcp/
# This is version 1.4 # This is version 1.4
BEGIN { BEGIN {

View file

@ -30,7 +30,7 @@ font-variant: normal;
</style> </style>
</head> </head>
<body> <body>
<div itemscope itemtype="http://schema.org/SoftwareApplication"> <div itemscope itemtype="https://schema.org/SoftwareApplication">
<h1>ISC dhcpd lease analysis and reporting</h1> <h1>ISC dhcpd lease analysis and reporting</h1>
<p>This is <span itemprop="name">dhcpd-pools</span> <p>This is <span itemprop="name">dhcpd-pools</span>
<a href="https://www.isc.org/software/dhcp" itemprop="applicationSuite">ISC dhcp</a> <a href="https://www.isc.org/software/dhcp" itemprop="applicationSuite">ISC dhcp</a>
@ -49,9 +49,18 @@ any significant difference in getting analysis done.</p>
prompt&gt; ./dhcpd-pools --config=/etc/dhcpd.conf prompt&gt; ./dhcpd-pools --config=/etc/dhcpd.conf
--leases=/var/lib/dhcp/dhcpd.leases --format=H --leases=/var/lib/dhcp/dhcpd.leases --format=H
--color=always --warning=40 --critical=50 --output=<a --color=always --warning=40 --critical=50 --output=<a
href="http://dhcpd-pools.sourceforge.net/sampleoutput.html">sampleoutput.html</a> href="https://dhcpd-pools.sourceforge.net/sampleoutput.html">sampleoutput.html</a>
</div> </div>
<hr /> <hr />
<h3>Is dhcpd-pools still developed?</h3>
<p>In short no, it is not.</p>
<p>
<a href="https://www.isc.org/blogs/isc-dhcp-eol/">ISC DHCPD has reached
EOL</a>. Users are Kea DHCP server instead. Kea has <a
href="https://kea.readthedocs.io/en/kea-2.2.0/arm/stats.html">native
statistics</a>, so it does not require this tool and therefore the
dhcpd-pools is obsolte.
</p>
<h3>Where I can get dhcpd-pools?</h3> <h3>Where I can get dhcpd-pools?</h3>
<p>Download <p>Download
<a href="https://sourceforge.net/projects/dhcpd-pools/files/" itemprop="downloadUrl">release package</a> <a href="https://sourceforge.net/projects/dhcpd-pools/files/" itemprop="downloadUrl">release package</a>
@ -61,11 +70,11 @@ file.
<br /></p> <br /></p>
<div class="tt">git clone git://git.code.sf.net/p/dhcpd-pools/code dhcpd-pools</div> <div class="tt">git clone git://git.code.sf.net/p/dhcpd-pools/code dhcpd-pools</div>
<p>See also <p>See also
<a href="http://sourceforge.net/projects/dhcpd-pools">SourceForge</a> project page.</p> <a href="https://sourceforge.net/projects/dhcpd-pools">SourceForge</a> project page.</p>
<h3>Documentation</h3> <h3>Documentation</h3>
<p>The dhcpd-pools <p>The dhcpd-pools
<a href="http://dhcpd-pools.sourceforge.net/man.html">manual page</a>, and <a href="https://dhcpd-pools.sourceforge.net/man.html">manual page</a>, and
<a href="http://dhcpd-pools.sourceforge.net/doxygen/">Doxygen</a> software <a href="https://dhcpd-pools.sourceforge.net/doxygen/">Doxygen</a> software
reference documentation are available online.</p> reference documentation are available online.</p>
<h3>Getting the output you need</h3> <h3>Getting the output you need</h3>
<ol> <ol>
@ -80,8 +89,8 @@ try:<br />
<li>Start filtering output. Options to try:<br /> <li>Start filtering output. Options to try:<br />
<span style="font-family:monospace">--skip --limit</span></li> <span style="font-family:monospace">--skip --limit</span></li>
<li>Change <span style="font-family:monospace">--format</span> <li>Change <span style="font-family:monospace">--format</span>
option to what you need, and maybe include <span style= option to what you need, and maybe include <span style="font-family:monospace">
"font-family:monospace">--perfdata</span> if you want nagios alarm --perfdata</span> if you want nagios alarm
format.</li> format.</li>
<li>Done.</li> <li>Done.</li>
</ol> </ol>
@ -90,33 +99,33 @@ format.</li>
<script type='text/javascript' src='https://www.openhub.net/p/dhcpd-pools/widgets/project_factoids_stats?format=js'></script> <script type='text/javascript' src='https://www.openhub.net/p/dhcpd-pools/widgets/project_factoids_stats?format=js'></script>
</p> </p>
<p>The program was written because <p>The program was written because
<a href="http://dhcpstatus.sourceforge.net/">DHCPStatus</a>, <a href="https://dhcpstatus.sourceforge.net/">DHCPStatus</a>,
<a href="http://freshmeat.net/projects/dhcpusestats/">DHCP Usage Statistics</a>, <a href="https://freshmeat.net/projects/dhcpusestats/">DHCP Usage Statistics</a>,
<a href="http://www.omar.org/opensource/reportdhcp/">reportdhcp.pl</a>, <a href="https://www.omar.org/opensource/reportdhcp/">reportdhcp.pl</a>,
<a href="http://www.ofb.net/%7Ejheiss/lease_analyzer">lease_analyzer</a> and <a href="https://www.ofb.net/%7Ejheiss/lease_analyzer">lease_analyzer</a> and
<a href="http://www.net-track.ch/opensource/dhcpd-snmp/">dhcpd-snmp</a> <a href="https://www.net-track.ch/opensource/dhcpd-snmp/">dhcpd-snmp</a>
where too slow to handle huge number of leases. There is also difference in where too slow to handle huge number of leases. There is also difference in
printed details. The dhcpd-pools does not print quite as much information as printed details. The dhcpd-pools does not print quite as much information as
some other tools.</p> some other tools.</p>
<p>Notice that this utility is not the same as <p>Notice that this utility is not the same as
<a href="http://folk.uio.no/trondham/software/dhcpd-pool.html">dhcpd-pool</a> <a href="https://folk.uio.no/trondham/software/dhcpd-pool.html">dhcpd-pool</a>
that is maintained by Trond Hasle Amundsen.</p> that is maintained by Trond Hasle Amundsen.</p>
<p>Just for laugh, obsolete awk proof of concept (version 1.4) <p>Just for laugh, obsolete awk proof of concept (version 1.4)
<a href="http://dhcpd-pools.sourceforge.net/dhcpd-pools.awk">dhcpd-pools.awk</a></p> <a href="https://dhcpd-pools.sourceforge.net/dhcpd-pools.awk">dhcpd-pools.awk</a></p>
<h3>Where to send questions, bug reports, code contributions...</h3> <h3>Where to send questions, bug reports, code contributions...</h3>
<p><a href="http://www.iki.fi/kerolasa/" itemprop="copyrightHolder">Sami Kerola</a> <p><a href="https://kerolasa.iki.fi/" itemprop="copyrightHolder">Sami Kerola</a>
&lt;<a href="mailto:kerolasa@iki.fi">kerolasa@iki.fi</a>&gt;</p> &lt;<a href="mailto:kerolasa@iki.fi">kerolasa@iki.fi</a>&gt;</p>
<div style="visibility:hidden"> <div style="visibility:hidden">
<span itemprop="datePublished" datetime="2006-03-13T00:00:00+0000">Mon Mar 13 00:00:00 GMT 2006</span> <span itemprop="datePublished" datetime="2006-03-13T00:00:00+0000">Mon Mar 13 00:00:00 GMT 2006</span>
<span itemprop="dateModified" datetime="2017-11-15T12:47:30+0000">Wed Nov 15 12:47:30 GMT 2017</span> <span itemprop="dateModified" datetime="2022-11-26T09:58:28+0000">Sat Nov 26 09:58:28 GMT 2022</span>
<span itemprop="version">3.0</span> <span itemprop="version">3.0</span>
<span itemprop="license">FreeBSD License</span> <span itemprop="license">FreeBSD License</span>
<a href="http://dhcpd-pools.sourceforge.net/" itemprop="url"></a> <a href="https://dhcpd-pools.sourceforge.net/" itemprop="url"></a>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<span itemprop="price">0</span> <span itemprop="price">0</span>
<meta itemprop="priceCurrency" content="EUR" /> <meta itemprop="priceCurrency" content="EUR" />
</div> </div>
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <div itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating">
<span itemprop="ratingValue">5</span> ( <span itemprop="ratingValue">5</span> (
<span itemprop="ratingCount">2</span> ratings ) <span itemprop="ratingCount">2</span> ratings )
</div> </div>

View file

@ -1,3 +1,3 @@
Sitemap: http://dhcpd-pools.sourceforge.net/sitemap.txt Sitemap: https://dhcpd-pools.sourceforge.net/sitemap.txt
User-agent: * User-agent: *
Disallow: Disallow:

View file

@ -5,8 +5,8 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" type="text/css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/jq-3.2.1/dt-1.10.16/datatables.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-2.2.2/datatables.min.css">
<style type="text/css"> <style type="text/css">
table.dhcpd-pools th { text-transform: capitalize } table.dhcpd-pools th { text-transform: capitalize }
</style> </style>
@ -14,7 +14,7 @@ table.dhcpd-pools th { text-transform: capitalize }
<body> <body>
<div class="container"> <div class="container">
<h2>ISC DHCPD status</h2> <h2>ISC DHCPD status</h2>
<small>File samples/dhcpd.leases was last modified at 2017-11-11T23:59:04+0000</small><hr /> <small>File tests/leases/formats was last modified at 2025-04-15T14:32:48+0100</small><hr />
<h3>Sum of all</h3> <h3>Sum of all</h3>
<table id="a" class="dhcpd-pools order-column table table-hover" summary="all"> <table id="a" class="dhcpd-pools order-column table table-hover" summary="all">
<thead> <thead>
@ -27,8 +27,6 @@ table.dhcpd-pools th { text-transform: capitalize }
<th>touch</th> <th>touch</th>
<th>t+c</th> <th>t+c</th>
<th>t+c perc</th> <th>t+c perc</th>
<th>bu</th>
<th>bu perc</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -41,8 +39,6 @@ table.dhcpd-pools th { text-transform: capitalize }
<td>0</td> <td>0</td>
<td>43</td> <td>43</td>
<td>43.000</td> <td>43.000</td>
<td>2</td>
<td>43.000</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -58,8 +54,6 @@ table.dhcpd-pools th { text-transform: capitalize }
<th>touch</th> <th>touch</th>
<th>t+c</th> <th>t+c</th>
<th>t+c perc</th> <th>t+c perc</th>
<th>bu</th>
<th>bu perc</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -72,8 +66,6 @@ table.dhcpd-pools th { text-transform: capitalize }
<td>0</td> <td>0</td>
<td>21</td> <td>21</td>
<td>52.500</td> <td>52.500</td>
<td>1</td>
<td>2.500</td>
</tr> </tr>
<tr> <tr>
<td>example2</td> <td>example2</td>
@ -84,8 +76,6 @@ table.dhcpd-pools th { text-transform: capitalize }
<td>0</td> <td>0</td>
<td>17</td> <td>17</td>
<td>42.500</td> <td>42.500</td>
<td>0</td>
<td>0.000</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -103,8 +93,6 @@ table.dhcpd-pools th { text-transform: capitalize }
<th>touch</th> <th>touch</th>
<th>t+c</th> <th>t+c</th>
<th>t+c perc</th> <th>t+c perc</th>
<th>bu</th>
<th>bu perc</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -119,8 +107,6 @@ table.dhcpd-pools th { text-transform: capitalize }
<td>0</td> <td>0</td>
<td>11</td> <td>11</td>
<td>55.000</td> <td>55.000</td>
<td>1</td>
<td>5.000</td>
</tr> </tr>
<tr> <tr>
<td>example1</td> <td>example1</td>
@ -133,8 +119,6 @@ table.dhcpd-pools th { text-transform: capitalize }
<td>0</td> <td>0</td>
<td>10</td> <td>10</td>
<td>50.000</td> <td>50.000</td>
<td>0</td>
<td>0.000</td>
</tr> </tr>
<tr> <tr>
<td>example2</td> <td>example2</td>
@ -147,8 +131,6 @@ table.dhcpd-pools th { text-transform: capitalize }
<td>0</td> <td>0</td>
<td>8</td> <td>8</td>
<td>40.000</td> <td>40.000</td>
<td>0</td>
<td>0.000</td>
</tr> </tr>
<tr> <tr>
<td>example2</td> <td>example2</td>
@ -161,8 +143,6 @@ table.dhcpd-pools th { text-transform: capitalize }
<td>0</td> <td>0</td>
<td>9</td> <td>9</td>
<td>45.000</td> <td>45.000</td>
<td>0</td>
<td>0.000</td>
</tr> </tr>
<tr> <tr>
<td>All networks</td> <td>All networks</td>
@ -175,17 +155,15 @@ table.dhcpd-pools th { text-transform: capitalize }
<td>0</td> <td>0</td>
<td>5</td> <td>5</td>
<td>25.000</td> <td>25.000</td>
<td>1</td>
<td>5.000</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<br /><div class="well well-lg"> <br /><div class="well well-lg">
<small>Generated using dhcpd-pools 3.0<br /> <small>Generated using dhcpd-pools 3.3<br />
More info at <a href="http://dhcpd-pools.sourceforge.net/">http://dhcpd-pools.sourceforge.net/</a> More info at <a href="https://dhcpd-pools.sourceforge.net/">https://dhcpd-pools.sourceforge.net/</a>
</small></div></div> </small></div></div>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js" type="text/javascript"></script>
<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jq-3.2.1/dt-1.10.16/datatables.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-2.2.2/datatables.min.js"></script>
<script type="text/javascript" class="init">$(document).ready(function() { $('#s').DataTable({ "iDisplayLength": 50, "lengthMenu": [ [25, 50, 100, -1], [25, 50, 100, "All"] ], "order": [[ 4, "desc" ]] } ); } );</script> <script type="text/javascript" class="init">$(document).ready(function() { $('#s').DataTable({ "iDisplayLength": 50, "lengthMenu": [ [25, 50, 100, -1], [25, 50, 100, "All"] ], "order": [[ 4, "desc" ]] } ); } );</script>
<script type="text/javascript" class="init">$(document).ready(function() { $('#r').DataTable({ "iDisplayLength": 100, "lengthMenu": [ [25, 50, 100, -1], [25, 50, 100, "All"] ], "order": [[ 6, "desc" ]] } ); } );</script> <script type="text/javascript" class="init">$(document).ready(function() { $('#r').DataTable({ "iDisplayLength": 100, "lengthMenu": [ [25, 50, 100, -1], [25, 50, 100, "All"] ], "order": [[ 6, "desc" ]] } ); } );</script>
</body></html> </body></html>

File diff suppressed because it is too large Load diff