commit
This commit is contained in:
508
bin/Makefile
Normal file
508
bin/Makefile
Normal file
@@ -0,0 +1,508 @@
|
||||
# Makefile.in generated by automake 1.17 from Makefile.am.
|
||||
# bin/Makefile. Generated from Makefile.in by configure.
|
||||
|
||||
# Copyright (C) 1994-2024 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
|
||||
# Copyright (C) 2011 Tobias Oetiker
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
am__rm_f = rm -f $(am__rm_f_notfound)
|
||||
am__rm_rf = rm -rf $(am__rm_f_notfound)
|
||||
pkgdatadir = $(datadir)/smokeping
|
||||
pkgincludedir = $(includedir)/smokeping
|
||||
pkglibdir = $(libdir)/smokeping
|
||||
pkglibexecdir = $(libexecdir)/smokeping
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
subdir = bin
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(dist_bin_SCRIPTS) \
|
||||
$(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
{ test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
SCRIPTS = $(dist_bin_SCRIPTS)
|
||||
AM_V_P = $(am__v_P_$(V))
|
||||
am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_$(V))
|
||||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_$(V))
|
||||
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = ${SHELL} '/root/smoke/smokeping-2.9.0/conftools/missing' aclocal-1.17
|
||||
AMTAR = $${TAR-tar}
|
||||
AM_DEFAULT_VERBOSITY = 1
|
||||
AUTOCONF = ${SHELL} '/root/smoke/smokeping-2.9.0/conftools/missing' autoconf
|
||||
AUTOHEADER = ${SHELL} '/root/smoke/smokeping-2.9.0/conftools/missing' autoheader
|
||||
AUTOMAKE = ${SHELL} '/root/smoke/smokeping-2.9.0/conftools/missing' automake-1.17
|
||||
AWK = mawk
|
||||
CP = /usr/bin/cp
|
||||
CSCOPE = cscope
|
||||
CTAGS = ctags
|
||||
CURL = /usr/bin/curl
|
||||
CYGPATH_W = echo
|
||||
DEFS = -DPACKAGE_NAME=\"smokeping\" -DPACKAGE_TARNAME=\"smokeping\" -DPACKAGE_VERSION=\"2.9.0\" -DPACKAGE_STRING=\"smokeping\ 2.9.0\" -DPACKAGE_BUGREPORT=\"tobi@oetiker.ch\" -DPACKAGE_URL=\"\" -DPACKAGE=\"smokeping\" -DVERSION=\"2.9.0\"
|
||||
ECHO = /usr/bin/echo
|
||||
ECHO_C =
|
||||
ECHO_N = -n
|
||||
ECHO_T =
|
||||
ETAGS = etags
|
||||
FIND = /usr/bin/find
|
||||
GMAKE = /usr/bin/gmake
|
||||
GREP = /usr/bin/grep
|
||||
HTDOCSDIR = /usr/share/smokeping/www
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
|
||||
LIBOBJS =
|
||||
LIBS =
|
||||
LN = /usr/bin/ln
|
||||
LTLIBOBJS =
|
||||
MAKEINFO = ${SHELL} '/root/smoke/smokeping-2.9.0/conftools/missing' makeinfo
|
||||
MKDIR = /usr/bin/mkdir
|
||||
MKDIR_P = /usr/bin/mkdir -p
|
||||
NROFF = /usr/bin/nroff
|
||||
PACKAGE = smokeping
|
||||
PACKAGE_BUGREPORT = tobi@oetiker.ch
|
||||
PACKAGE_NAME = smokeping
|
||||
PACKAGE_STRING = smokeping 2.9.0
|
||||
PACKAGE_TARNAME = smokeping
|
||||
PACKAGE_URL =
|
||||
PACKAGE_VERSION = 2.9.0
|
||||
PATH_SEPARATOR = :
|
||||
PERL = /usr/bin/perl
|
||||
PERL5LIB =
|
||||
RM = /usr/bin/rm
|
||||
RMDIR = /usr/bin/rmdir
|
||||
SED = /usr/bin/sed
|
||||
SENDMAIL = /usr/sbin/sendmail
|
||||
SET_MAKE =
|
||||
SHELL = /bin/bash
|
||||
STRIP =
|
||||
URL_CAT = /usr/bin/curl --location
|
||||
VERSION = 2.9.0
|
||||
WGET = /usr/bin/wget
|
||||
abs_builddir = /root/smoke/smokeping-2.9.0/bin
|
||||
abs_srcdir = /root/smoke/smokeping-2.9.0/bin
|
||||
abs_top_builddir = /root/smoke/smokeping-2.9.0
|
||||
abs_top_srcdir = /root/smoke/smokeping-2.9.0
|
||||
am__leading_dot = .
|
||||
am__rm_f_notfound =
|
||||
am__tar = tar --format=ustar -chf - "$$tardir"
|
||||
am__untar = tar -xf -
|
||||
am__xargs_n = xargs -n
|
||||
bindir = /usr/sbin
|
||||
build_alias = x86_64-linux-gnu
|
||||
builddir = .
|
||||
datadir = ${datarootdir}
|
||||
datarootdir = ${prefix}/share
|
||||
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
|
||||
dvidir = ${docdir}
|
||||
enable_pkgonly =
|
||||
exec_prefix = ${prefix}
|
||||
host_alias =
|
||||
htmldir = ${docdir}
|
||||
includedir = ${prefix}/include
|
||||
infodir = ${prefix}/share/info
|
||||
install_sh = ${SHELL} /root/smoke/smokeping-2.9.0/conftools/install-sh
|
||||
libdir = /usr/share/perl5
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
localedir = ${datarootdir}/locale
|
||||
localstatedir = /var
|
||||
mandir = ${prefix}/share/man
|
||||
mkdir_p = $(MKDIR_P)
|
||||
oldincludedir = /usr/include
|
||||
pdfdir = ${docdir}
|
||||
prefix = /usr
|
||||
program_transform_name = s,x,x,
|
||||
psdir = ${docdir}
|
||||
runstatedir = /run
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
sharedstatedir = ${prefix}/com
|
||||
srcdir = .
|
||||
sysconfdir = /usr/share/doc/smokeping
|
||||
target_alias =
|
||||
top_build_prefix = ../
|
||||
top_builddir = ..
|
||||
top_srcdir = ..
|
||||
dist_bin_SCRIPTS = smokeinfo smokeping smokeping_cgi tSmoke
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign bin/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n' \
|
||||
-e 'h;s|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
|
||||
if (++n[d] == $(am__install_max)) { \
|
||||
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
|
||||
else { print "f", d "/" $$4, $$1 } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-dist_binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 's,.*/,,;$(transform)'`; \
|
||||
dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(SCRIPTS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-$(am__rm_f) $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-dist_binSCRIPTS
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-dist_binSCRIPTS
|
||||
|
||||
.MAKE: install-am install-exec-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
|
||||
ctags-am distclean distclean-generic distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dist_binSCRIPTS install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-exec-hook \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags-am \
|
||||
uninstall uninstall-am uninstall-dist_binSCRIPTS
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
install-exec-hook:
|
||||
test "$(PERL5LIB)" = "" || cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{.*# PERL5LIB}{use lib (split /:/, q{$(PERL5LIB)}); # PERL5LIB}' $(dist_bin_SCRIPTS)
|
||||
cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{.*# LIBDIR}{use lib qw($(libdir)); # LIBDIR}' $(dist_bin_SCRIPTS)
|
||||
cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{^#!.*perl.*}{#!$(PERL)};' $(dist_bin_SCRIPTS)
|
||||
# EOF
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
# Tell GNU make to disable its built-in pattern rules.
|
||||
%:: %,v
|
||||
%:: RCS/%,v
|
||||
%:: RCS/%
|
||||
%:: s.%
|
||||
%:: SCCS/s.%
|
||||
24
bin/Makefile.am
Normal file
24
bin/Makefile.am
Normal file
@@ -0,0 +1,24 @@
|
||||
# Copyright (C) 2011 Tobias Oetiker
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
dist_bin_SCRIPTS = smokeinfo smokeping smokeping_cgi tSmoke
|
||||
|
||||
install-exec-hook:
|
||||
test "$(PERL5LIB)" = "" || cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{.*# PERL5LIB}{use lib (split /:/, q{$(PERL5LIB)}); # PERL5LIB}' $(dist_bin_SCRIPTS)
|
||||
cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{.*# LIBDIR}{use lib qw($(libdir)); # LIBDIR}' $(dist_bin_SCRIPTS)
|
||||
cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{^#!.*perl.*}{#!$(PERL)};' $(dist_bin_SCRIPTS)
|
||||
# EOF
|
||||
508
bin/Makefile.in
Normal file
508
bin/Makefile.in
Normal file
@@ -0,0 +1,508 @@
|
||||
# Makefile.in generated by automake 1.17 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2024 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 2011 Tobias Oetiker
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
am__rm_f = rm -f $(am__rm_f_notfound)
|
||||
am__rm_rf = rm -rf $(am__rm_f_notfound)
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
subdir = bin
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(dist_bin_SCRIPTS) \
|
||||
$(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
{ test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
SCRIPTS = $(dist_bin_SCRIPTS)
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CP = @CP@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CURL = @CURL@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
ETAGS = @ETAGS@
|
||||
FIND = @FIND@
|
||||
GMAKE = @GMAKE@
|
||||
GREP = @GREP@
|
||||
HTDOCSDIR = @HTDOCSDIR@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LN = @LN@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR = @MKDIR@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NROFF = @NROFF@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PERL5LIB = @PERL5LIB@
|
||||
RM = @RM@
|
||||
RMDIR = @RMDIR@
|
||||
SED = @SED@
|
||||
SENDMAIL = @SENDMAIL@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
URL_CAT = @URL_CAT@
|
||||
VERSION = @VERSION@
|
||||
WGET = @WGET@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__rm_f_notfound = @am__rm_f_notfound@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
am__xargs_n = @am__xargs_n@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
enable_pkgonly = @enable_pkgonly@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
dist_bin_SCRIPTS = smokeinfo smokeping smokeping_cgi tSmoke
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign bin/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n' \
|
||||
-e 'h;s|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
|
||||
if (++n[d] == $(am__install_max)) { \
|
||||
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
|
||||
else { print "f", d "/" $$4, $$1 } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-dist_binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 's,.*/,,;$(transform)'`; \
|
||||
dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(SCRIPTS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-$(am__rm_f) $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-dist_binSCRIPTS
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-dist_binSCRIPTS
|
||||
|
||||
.MAKE: install-am install-exec-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
|
||||
ctags-am distclean distclean-generic distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dist_binSCRIPTS install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-exec-hook \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags-am \
|
||||
uninstall uninstall-am uninstall-dist_binSCRIPTS
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
install-exec-hook:
|
||||
test "$(PERL5LIB)" = "" || cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{.*# PERL5LIB}{use lib (split /:/, q{$(PERL5LIB)}); # PERL5LIB}' $(dist_bin_SCRIPTS)
|
||||
cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{.*# LIBDIR}{use lib qw($(libdir)); # LIBDIR}' $(dist_bin_SCRIPTS)
|
||||
cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{^#!.*perl.*}{#!$(PERL)};' $(dist_bin_SCRIPTS)
|
||||
# EOF
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
# Tell GNU make to disable its built-in pattern rules.
|
||||
%:: %,v
|
||||
%:: RCS/%,v
|
||||
%:: RCS/%
|
||||
%:: s.%
|
||||
%:: SCCS/s.%
|
||||
143
bin/smokeinfo
Executable file
143
bin/smokeinfo
Executable file
@@ -0,0 +1,143 @@
|
||||
#!/usr/bin/perl
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use lib (split /:/, q{}); # PERL5LIB
|
||||
use FindBin;use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR
|
||||
|
||||
use Smokeping::Info;
|
||||
use Getopt::Long 2.25 qw(:config no_ignore_case);
|
||||
use Pod::Usage 1.14;
|
||||
|
||||
'$Revision: 3879 $ ' =~ /Revision: (\S*)/;
|
||||
my $Revision = $1;
|
||||
|
||||
sub main()
|
||||
{
|
||||
# parse options
|
||||
my %opt = (mode=>'plain',separator=>';',format=>'%le',start=>'end-24h',end=>'now');
|
||||
|
||||
GetOptions(\%opt, 'help|h', 'man', 'version', 'noaction|no-action|n','no-head',
|
||||
'start=s','end=s','filter=s','mode=s','separator=s','format=s') or exit(1);
|
||||
if($opt{help}) { pod2usage(1) }
|
||||
if($opt{man}) { pod2usage(-exitstatus => 0, -verbose => 2) }
|
||||
if($opt{version}) { print "smokeinfo $Revision\n"; exit(0) }
|
||||
if($opt{noaction}) { die "ERROR: don't know how to \"no-action\".\n" }
|
||||
my $config = shift @ARGV;
|
||||
|
||||
my $si = Smokeping::Info->new($config);
|
||||
my $nodes = $si->fetch_nodes(pattern=>$opt{filter},mode=>$opt{mode});
|
||||
my @rows = qw(med_avg med_min med_max med_now loss_avg loss_max loss_now);
|
||||
print '# ',join $opt{separator}, 'node_path',@rows if not $opt{'no-head'};
|
||||
print "\n";
|
||||
for my $node (@$nodes) {
|
||||
my $data = $si->stat_node($node,$opt{start},$opt{end});
|
||||
print join $opt{separator},$node->{path},map {defined $data->{$_} ? sprintf($opt{format},$data->{$_}) : '?'} @rows;
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
|
||||
main;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
smokeinfo - poll smokeping site for numeric information
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<smokeinfo> path/to/config.cfg [I<options>]
|
||||
|
||||
--start x rrd graph start time. (default now-24h)
|
||||
|
||||
--end y rrd graph end time. (default now)
|
||||
|
||||
--filter pattern search pattern for node selection
|
||||
|
||||
--mode plain (default) how to use the pattern
|
||||
- plain
|
||||
- recursive
|
||||
- regexp
|
||||
|
||||
--separator ; (default)
|
||||
|
||||
--format %le (default)
|
||||
|
||||
--no-head do not print a header
|
||||
|
||||
--man show man-page and exit
|
||||
-h, --help display this help and exit
|
||||
--version output version information and exit
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SmokeInfo is a simple frontend to the L<Smokeping::Info> module. It provides
|
||||
access to numeric data stored in the rrd files.
|
||||
|
||||
Note that --start and --end are passed directly to rrd graph. This means
|
||||
they work on the same syntax.
|
||||
|
||||
=head2 Examples
|
||||
|
||||
Get all data all nodes
|
||||
|
||||
smokeinfo etc/config
|
||||
|
||||
Only show nodes directly under /Customers
|
||||
|
||||
smokeinfo --filter=/Customers/ etc/config
|
||||
|
||||
Show all nodes under /Customers
|
||||
|
||||
smokeinfo --mode=recursive --filter=/Customers/ etc/config
|
||||
|
||||
Show all nodes with '_wlan_' in the name
|
||||
|
||||
smokeinfo --mode=regexp --filter=_wlan_ etc/config
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<smokeping(1)>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (c) 2009 by OETIKER+PARTNER AG. All rights reserved.
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
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
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
S<Tobi Oetiker E<lt>tobi@oetiker.chE<gt>>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
2009-01-05 to Initial Version
|
||||
|
||||
=cut
|
||||
|
||||
# Emacs Configuration
|
||||
#
|
||||
# Local Variables:
|
||||
# mode: cperl
|
||||
# eval: (cperl-set-style "PerlStyle")
|
||||
# mode: flyspell
|
||||
# mode: flyspell-prog
|
||||
# End:
|
||||
#
|
||||
# vi: sw=4 et
|
||||
|
||||
184
bin/smokeping
Executable file
184
bin/smokeping
Executable file
@@ -0,0 +1,184 @@
|
||||
#!/usr/bin/perl
|
||||
# -*-perl-*-
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use FindBin;
|
||||
use lib (split /:/, q{}); # PERL5LIB
|
||||
use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR
|
||||
|
||||
use Smokeping;
|
||||
|
||||
Smokeping::main("$FindBin::RealBin/../etc/config");
|
||||
|
||||
=head1 NAME
|
||||
|
||||
smokeping - Commandline tool for SmokePing
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<smokeping> [ B<--email> | B<--makepod> | B<--version> | B<--restart> ]
|
||||
|
||||
Options:
|
||||
|
||||
--man[=x] Show the manpage for the program (or for probe x, if specified)
|
||||
|
||||
--help Help :-)
|
||||
|
||||
--email Send SmokePing Agents to all Targets marked DYNAMIC
|
||||
|
||||
--config=x Use a config file different from the default
|
||||
|
||||
--check Just check the config file syntax, don't start the daemon
|
||||
|
||||
--makepod[=x] Create POD documentation on Config file (or for probe x, if specified)
|
||||
|
||||
--version Show SmokePing Version
|
||||
|
||||
--debug Run Only once and do not Fork
|
||||
|
||||
--debug-daemon Start the daemon with debugging enabled
|
||||
|
||||
--restart Restart SmokePing
|
||||
|
||||
--reload Reload configuration in the running process without interrupting
|
||||
any probes
|
||||
|
||||
--nodaemon Do no daemonize the process (no fork)
|
||||
|
||||
--filter=x Only measure entries which pass the filter x
|
||||
|
||||
--logfile=x Append warnings to logfile x.
|
||||
|
||||
--static[=x] Generates a static website in directory x. If x is left out,
|
||||
pagedir from the config is used.
|
||||
|
||||
--nosleep For debugging you may want to run SmokePing without sleep interval
|
||||
|
||||
--gen-examples Generate the smokeping_examples document and example config files
|
||||
(to be used while building inside the smokeping distribution)
|
||||
With --check : check the syntax of the generated examples.
|
||||
|
||||
--master-url=s Run smokeping in slave mode. Attach to master for config.
|
||||
|
||||
--slave-name=s By default the slave will use whatever it thinks its name
|
||||
is, when talking to its master. In some cases you may
|
||||
probably want to override this.
|
||||
|
||||
|
||||
--shared-secret=s File containing the shared secret for talking to the server.
|
||||
|
||||
--cache-dir=s Directory for temporary data storage when running in slave mode.
|
||||
|
||||
--pid-dir=s Directory for the PID file when running in slave mode.
|
||||
(optional, defaults to --cache-dir)
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<smokeping> tool is the commandline part of the SmokePing system. Its
|
||||
main function is to run as a daemon and send Pings to all the Targets you
|
||||
have specified in the Config file. When you call B<smokeping> without
|
||||
arguments it will start as a daemon and do its work.
|
||||
|
||||
If called with an argument, then further functions can be activated, as seen
|
||||
in the Synopsis above. The B<--email> function is explained in the
|
||||
documentation on the config file.
|
||||
|
||||
The B<--filter> option allows you to run the daemon on a big config file,
|
||||
but have the config file filtered and only measure the entries that pass the
|
||||
filter. This is useful for remote measurement. Run Smokeping with two
|
||||
exclusive filters in two locations and rsync the rrds back to the webserver
|
||||
host where you run the cgi. Filters act on the section names in the config
|
||||
file. Multiple section names are concatenated with B</> like path names:
|
||||
|
||||
*** targets ***
|
||||
+ A
|
||||
....
|
||||
+ B
|
||||
...
|
||||
++ C
|
||||
|
||||
This gives
|
||||
|
||||
/A
|
||||
|
||||
and
|
||||
|
||||
/B, /B/C
|
||||
|
||||
If I want to monitor /A my filter would look like this:
|
||||
|
||||
--filter=/A
|
||||
|
||||
Filters follow regular expression syntax. The are always anchored at the tip of the string.
|
||||
by adding a B<!> to the front of the filter string you negate it. Matching entries will be excluded from monitoring.
|
||||
Multiple B<--filter> arguments can be used to assemble complex filters:
|
||||
|
||||
--filter=/A --filter=/B
|
||||
|
||||
would include all the targets
|
||||
|
||||
--filter=/A --filter=/B --filter=!/B/C
|
||||
|
||||
would include all but /B/C.
|
||||
|
||||
The B<--makepod> does get used internally to produce the
|
||||
L<documentation on the SmokePing configuration file|smokeping_config>.
|
||||
|
||||
Please refer to L<the installation document|smokeping_install> for detailed setup instructions.
|
||||
|
||||
=head1 SETUP
|
||||
|
||||
When installing SmokePing, this file has to be adjusted to fit your
|
||||
local system. Three paths have to be entered.
|
||||
|
||||
One pointing to your B<rrdtool> installation
|
||||
|
||||
use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl);
|
||||
|
||||
One pointing to the place where you have installed the SmokePing libraries
|
||||
|
||||
use lib qw(/home/oetiker/public_html/smokeping/lib);
|
||||
|
||||
The third path is the argument to the Smokeping::main command. It points to
|
||||
the SmokePing configuration file.
|
||||
|
||||
use Smokeping;
|
||||
Smokeping::main("/home/oetiker/.smokeping/config");
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<smokeping_config(5)>, L<smokeping_examples(5)>, L<smokeping_cgi(1)>,
|
||||
L<tSmoke(1)>, L<smokeping_master_slave(7)>, L<smokeping_extend(7)>,
|
||||
L<smokeping_install(7)>, L<smokeping_upgrade(7)>,
|
||||
How to read the graphs https://oss.oetiker.ch/smokeping/doc/reading.en.html
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (c) 2002 by Tobias Oetiker. All right reserved.
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
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 the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this program; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
|
||||
02139, USA.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Tobias Oetiker E<lt>tobi@oetiker.chE<gt>
|
||||
|
||||
=cut
|
||||
94
bin/smokeping_cgi
Executable file
94
bin/smokeping_cgi
Executable file
@@ -0,0 +1,94 @@
|
||||
#!/usr/bin/perl
|
||||
# -*-perl-*-
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use FindBin;
|
||||
use lib (split /:/, q{}); # PERL5LIB
|
||||
use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR
|
||||
|
||||
# don't bother with zombies
|
||||
$SIG{CHLD} = 'IGNORE';
|
||||
|
||||
use CGI::Carp qw(fatalsToBrowser);
|
||||
|
||||
use Smokeping;
|
||||
|
||||
use CGI::Fast;
|
||||
|
||||
my $cfg = (shift @ARGV) || "$FindBin::Bin/../etc/config";
|
||||
|
||||
|
||||
while (my $q = new CGI::Fast) {
|
||||
Smokeping::cgi($cfg,$q);
|
||||
}
|
||||
|
||||
=head1 NAME
|
||||
|
||||
smokeping_cgi - SmokePing webfrontend
|
||||
|
||||
=head1 OVERVIEW
|
||||
|
||||
This script acts as a 'website' for your SmokePing monitoring operation. It
|
||||
presents the targets you are looking at in a tree structure and draws graphs
|
||||
as they are required by people looking at the pages.
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
To get B<smokeping_cgi> going, you need a webserver which allows you to run
|
||||
CGI or better FastCGI scripts. The system must be setup so that the cgi
|
||||
process is allowed to write to the image caching area as defined in the
|
||||
config file.
|
||||
|
||||
This script runs fine as a normal CGI, B<BUT> it will appear to be very slow,
|
||||
because it does a lot of things when starting up. So if the script has to be
|
||||
started a fresh on every click, this is both slow and a tough thing for your
|
||||
webserver. I therefore strongly recommend using FastCGI.
|
||||
|
||||
Please refer to the installation document for detailed setup instructions.
|
||||
|
||||
=head1 SETUP
|
||||
|
||||
There is a sample F<htdocs> directory in your smokeping installation root.
|
||||
Copy its content to the place where your webserver expects its files. The
|
||||
fcgi script shows the preferred method for running smokeping. You can also
|
||||
run smokeping as a cgi. But make sure to still use the wrapper as exposing
|
||||
ARGV to the webserver represents a security vulnerability you may rather not
|
||||
want to deal with.
|
||||
|
||||
Adjust the paths in the script and you should be ready to go.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<smokeping_config(5)>, L<smokeping(1)>, L<smokeping_install(7)>,
|
||||
L<smokeping_upgrade(7)>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (c) 2011 by Tobias Oetiker. All right reserved.
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
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 the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this program; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
|
||||
02139, USA.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Tobias Oetiker E<lt>tobi@oetiker.chE<gt>
|
||||
|
||||
=cut
|
||||
570
bin/tSmoke
Executable file
570
bin/tSmoke
Executable file
@@ -0,0 +1,570 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
#-----------------------------------------------
|
||||
# tSmoke.pl
|
||||
# Dan McGinn-Combs, Sep 2003
|
||||
# tSmoke.v 0.4 2004/03 McGinn-Combs
|
||||
#-----------------------------------------------
|
||||
#
|
||||
# Modified for Smokeping official distribution since 20050526
|
||||
# Original README follows
|
||||
#
|
||||
# tSmoke.v04.README
|
||||
# - added downtime report (--downtime)
|
||||
# - a few tweaks to the calculations to ensure it's consistent
|
||||
#
|
||||
# tSmoke.v03.README
|
||||
# - Initial Release
|
||||
# - The script, started through cron, will cull through a config file and
|
||||
# determine which hosts are down at a point in time (Morning report) and
|
||||
# send out an smtp message to a mobile phone (for example).
|
||||
#
|
||||
# - It will also cull through the same config file and, using an included html
|
||||
# file (small change to General section of the config file), send an html
|
||||
# message which shows the availability over the past day, week, month
|
||||
# and quarter.
|
||||
#
|
||||
# - It can also show detail data depending on the setting of
|
||||
# command line option "detail".
|
||||
#
|
||||
# tSmoke.v02.README
|
||||
# - Local testing version
|
||||
#-----------------------------------------------
|
||||
#
|
||||
# 1) This program is run via CRON or the command line
|
||||
# 2) It extracts RRD information from a smokeping config file
|
||||
# 3) It pulls data from RRD files to determine if anything is offline, that is returning 0 PINGs
|
||||
# 4) tSmoke reports status via an SMTP alert
|
||||
# 5) tSmoke also generates an SMTP mail showing historical view of availability
|
||||
#
|
||||
# Many thanks to the following people for their help and guidance:
|
||||
# Jim Horwath of Agere Systems Inc. for his examples and pointers to Spreadsheet::WriteExcel
|
||||
# Frank Harper the author of SLAMon, a tool for tracking Service Level Agreements
|
||||
# Tobias Oetiker, or course, the author of Smokeping, RRDTool and MRTG
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
# We need to use
|
||||
# -- Smokeping libraries
|
||||
# -- RRDTool
|
||||
# -- Getopt::Long
|
||||
#
|
||||
# Point the lib variables to your implementation
|
||||
|
||||
use lib (split /:/, q{}); # PERL5LIB
|
||||
use FindBin;
|
||||
use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR
|
||||
|
||||
|
||||
use Smokeping;
|
||||
use Net::SMTP;
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
use RRDs;
|
||||
|
||||
# Point to your Smokeping config file
|
||||
my $cfgfile = (shift @ARGV) || "$FindBin::Bin/../etc/config";
|
||||
|
||||
# global variables
|
||||
my $cfg;
|
||||
|
||||
#this is designed to work on IPv4 only
|
||||
my $havegetaddrinfo = 0;
|
||||
|
||||
# we want opts everywhere
|
||||
my %opt;
|
||||
|
||||
#Hashes for the data
|
||||
my (%Daily,%Weekly,%Monthly,%Quarterly); # the entries
|
||||
my (%DailyC,%WeeklyC,%MonthlyC,%QuarterlyC); # a count of the entries
|
||||
|
||||
######################
|
||||
### Moving Average ###
|
||||
######################
|
||||
# Just a reminder of how to do a moving average if you ever want to
|
||||
# PREV,UN,<DS>,UN,1,<DS>,IF,PREV,IF,<DS>,UN,1,<DS>,IF,-,<WEIGHT>,*,A,UN,1,A,IF,+
|
||||
|
||||
# Change Log:
|
||||
# DMC - Added Quarterly Status
|
||||
# DMC - Added HTML mail reporting and consolidated functions
|
||||
# DMC = Added an external HTML mail template, tMail
|
||||
my $RCS_VERSION = '$id: tSmoke.v 0.4 2004/03 McGinn-Combs';
|
||||
|
||||
sub test_mail($) {
|
||||
my $cfg = shift;
|
||||
my $mail = <<"EOF";
|
||||
Subject: tSmoke test
|
||||
To: $cfg->{Alerts}{to}
|
||||
|
||||
This is a test mail with 'tSmoke --testmail'.
|
||||
EOF
|
||||
print "Sending a test mail to $cfg->{Alerts}{to} from $cfg->{Alerts}{from}...";
|
||||
Smokeping::sendmail($cfg->{Alerts}{from}, $cfg->{Alerts}{to}, $mail);
|
||||
print "done.\n";
|
||||
};
|
||||
|
||||
sub morning_update($) {
|
||||
# Send out a morning summary of devices that are down
|
||||
my $cfg = shift;
|
||||
my $Body = "";
|
||||
my $TmpBody = "";
|
||||
my $To = "";
|
||||
if ( $opt{to} ) { $To = $opt{to}; } else { $To = $cfg->{Alerts}{to}; }
|
||||
|
||||
# Get a list of the existing RRD Files
|
||||
my @rrds = split ( /\n/,list_rrds($cfg->{Targets},"","") );
|
||||
my $Count = $#rrds + 1;
|
||||
my $Down = 0;
|
||||
|
||||
foreach my $target (@rrds) {
|
||||
my $Loss = 0;
|
||||
my ($start,$step,$names,$data) = RRDs::fetch "$target","AVERAGE","--start","-300";
|
||||
my $ERR=RRDs::error;
|
||||
die "ERROR while reading $_: $ERR\n" if $ERR;
|
||||
foreach my $line (@$data) {
|
||||
$Loss += ( defined($$line[3]) ? $$line[3] : 0 );
|
||||
}
|
||||
$Down += 1 if $Loss == 0;
|
||||
$target =~ s/^([a-zA-Z0-9]*\/)*//;
|
||||
$target =~ s/.rrd//;
|
||||
$target =~ s/\~(.*)/ from $1/ if $target =~ m/\~/;
|
||||
$TmpBody .= "$target\n" if $Loss == 0;
|
||||
}
|
||||
$Body = <<MAIL_END;
|
||||
Subject: Of $Count Hosts, $Down Down
|
||||
To: $To
|
||||
Content-Type: text/plain; charset=iso-8859-15
|
||||
Content-Transfer-encoding: 8bit
|
||||
MIME-Version: 1.0
|
||||
|
||||
Of $Count Hosts, $Down Down:
|
||||
|
||||
$TmpBody
|
||||
MAIL_END
|
||||
Smokeping::sendmail($cfg->{Alerts}{from},$To,$Body);
|
||||
}
|
||||
|
||||
sub weekly_update($) {
|
||||
# Send out a formatted HTML Table of the
|
||||
# Previous Day, Week, Month and Quarter Availability
|
||||
# Get a list of the existing RRD Files
|
||||
my @rrds = split ( /\n/,list_rrds($cfg->{Targets},"","") );
|
||||
|
||||
my $To = "";
|
||||
if ( $opt{to} ) { $To = $opt{to}; } else { $To = $cfg->{Alerts}{to}; }
|
||||
|
||||
my $Body ='';
|
||||
|
||||
# Calculations Based on the following:
|
||||
# RRDs::graph "fake.png",
|
||||
# '--start','-86400',
|
||||
# '-end','-300',
|
||||
# "DEF:loss=${rrd}:loss:AVERAGE",
|
||||
# "CDEF:avail=loss,0,100,IF", or more precisely "CDEF:avail=loss,2,GE,0,100,IF"
|
||||
# and adding in the check for unknown for systems just coming on line
|
||||
# "CDEF:avail=loss,UN,0,loss,IF,$pings,GE,0,100,IF"
|
||||
# Arbitrarily a loss of 10% of Pings means the system was down
|
||||
my $pings = $cfg->{Database}{pings} * .1;
|
||||
|
||||
foreach my $target (@rrds) {
|
||||
# Get an average Availability for each RRD file
|
||||
my $ERR;
|
||||
|
||||
my ($DAverage,$Dxsize,$Dysize) = RRDs::graph "fake.png",
|
||||
"--start","-86400",
|
||||
"--end","-600",
|
||||
"--step","1008",
|
||||
"DEF:loss=$target:loss:AVERAGE",
|
||||
"CDEF:avail=loss,UN,0,loss,IF,$pings,GE,0,100,IF",
|
||||
"PRINT:avail:AVERAGE:%.2lf";
|
||||
$ERR=RRDs::error;
|
||||
die "ERROR while reading $_: $ERR\n" if $ERR;
|
||||
|
||||
my ($WAverage,$Wxsize,$Wysize) = RRDs::graph "fake.png",
|
||||
"--start","-604800",
|
||||
"--end","-600",
|
||||
"--step","4320",
|
||||
"DEF:loss=$target:loss:AVERAGE",
|
||||
"CDEF:avail=loss,UN,0,loss,IF,$pings,GE,0,100,IF",
|
||||
"PRINT:avail:AVERAGE:%.2lf";
|
||||
$ERR=RRDs::error;
|
||||
die "ERROR while reading $_: $ERR\n" if $ERR;
|
||||
|
||||
my ($MAverage,$Mxsize,$Mysize) = RRDs::graph "fake.png",
|
||||
"--start","-2592000",
|
||||
"--end","-600",
|
||||
"--step","4320",
|
||||
"DEF:loss=$target:loss:AVERAGE",
|
||||
"CDEF:avail=loss,UN,0,loss,IF,$pings,GE,0,100,IF",
|
||||
"PRINT:avail:AVERAGE:%.2lf";
|
||||
$ERR=RRDs::error;
|
||||
die "ERROR while reading $_: $ERR\n" if $ERR;
|
||||
|
||||
my ($QAverage,$Qxsize,$Qysize) = RRDs::graph "fake.png",
|
||||
"--start","-7776000",
|
||||
"--end","-600",
|
||||
"--step","4320",
|
||||
"DEF:loss=$target:loss:AVERAGE",
|
||||
"CDEF:avail=loss,UN,0,loss,IF,$pings,GE,0,100,IF",
|
||||
"PRINT:avail:AVERAGE:%.2lf";
|
||||
$ERR=RRDs::error;
|
||||
die "ERROR while reading $_: $ERR\n" if $ERR;
|
||||
|
||||
$target =~ s/$cfg->{General}{datadir}\///;
|
||||
$target =~ s/.rrd//;
|
||||
my @Path;
|
||||
push @Path,split/\//,$target;
|
||||
update_stats ( \@Path, @$DAverage[0], @$WAverage[0], @$MAverage[0], @$QAverage[0]);
|
||||
}
|
||||
|
||||
# Prepare the e-mail message
|
||||
$Body = <<MAIL_END;
|
||||
Subject: IT System Availability
|
||||
To: $To
|
||||
Content-Type: text/html; charset=iso-8859-15
|
||||
Content-Transfer-encoding: 8bit
|
||||
MIME-Version: 1.0
|
||||
|
||||
MAIL_END
|
||||
open tSMOKE, $cfg->{General}{tmail} or die "ERROR: can't read $cfg->{General}{tmail}\n";
|
||||
while (<tSMOKE>){
|
||||
my $Summary = Summary_Sheet();
|
||||
s/<##SUMMARY##>/$Summary/ig;
|
||||
my $Daily = DetailSheet(86400);
|
||||
s/<##DAYDETAIL##>/$Daily/ig;
|
||||
my $Weekly = DetailSheet(604800);
|
||||
s/<##WEEKDETAIL##>/$Weekly/ig;
|
||||
my $Monthly = DetailSheet(2592000);
|
||||
s/<##MONTHDETAIL##>/$Monthly/ig;
|
||||
my $Quarterly = DetailSheet(7776000);
|
||||
s/<##QUARTERDETAIL##>/$Quarterly/ig;
|
||||
$Body .= $_;
|
||||
}
|
||||
close tSMOKE;
|
||||
Smokeping::sendmail($cfg->{Alerts}{from}, $To, $Body);
|
||||
}
|
||||
|
||||
sub update_stats($$$$$);
|
||||
sub update_stats($$$$$) {
|
||||
# Update the uptime percentages in the Hash Arrays
|
||||
my $Path = shift;
|
||||
my $DAverage = shift;
|
||||
my $WAverage = shift;
|
||||
my $MAverage = shift;
|
||||
my $QAverage = shift;
|
||||
|
||||
#Enter everything once as it exists
|
||||
#Trim off the rightmost component (hostname) and reenter the code
|
||||
#If there is only one component, this is the final level
|
||||
#This is an average of averages
|
||||
|
||||
my $Ticket = join ( ".",@$Path);
|
||||
$Daily { $Ticket } += $DAverage;
|
||||
$Weekly { $Ticket } += $WAverage;
|
||||
$Monthly { $Ticket } += $MAverage;
|
||||
$Quarterly {$Ticket } += $QAverage;
|
||||
$DailyC { $Ticket }++;
|
||||
$WeeklyC { $Ticket }++;
|
||||
$MonthlyC { $Ticket }++;
|
||||
$QuarterlyC { $Ticket }++;
|
||||
my $Length = @$Path;
|
||||
@$Path = @$Path [ 0 .. $Length - 2 ];
|
||||
update_stats(\@$Path,$DAverage,$WAverage,$MAverage,$QAverage) if $Length > 1;
|
||||
}
|
||||
|
||||
sub Summary_Sheet() {
|
||||
my $Body = '';
|
||||
|
||||
$Body .= "<table border='1' bordercolor=#111111>\n";
|
||||
$Body .= "<tr>\n";
|
||||
$Body .= "<td class ='appHeader' colspan='5'>IT Network Systems Availability Summary</td></tr>\n";
|
||||
$Body .= "<tr>\n";
|
||||
$Body .= "<td class ='appHeader' colspan='5'>Compiled: ". scalar(localtime) . "</td></tr>\n";
|
||||
$Body .= "<tr>\n";
|
||||
$Body .= "<td class = 'subhead' width='20%'>Service</td>
|
||||
<td class = 'subhead' width='20%'>Past Quarter</td>
|
||||
<td class = 'subhead' width='20%'>Past Month</td>
|
||||
<td class = 'subhead' width='20%'>Past Week</td>
|
||||
<td class = 'subhead' width='20%'>Past Day</td></tr>\n";
|
||||
foreach (sort { $a cmp $b } keys %Monthly) {
|
||||
next if ( $_ =~ /\./ );
|
||||
# this is a major section heading
|
||||
$Body .= "<tr>\n";
|
||||
$Body .= "<td class = 'SubHead'>$_</td>";
|
||||
$Body .= "<td class = 'Up99'>" . sprintf('%.2f',$Quarterly{$_}/$QuarterlyC{$_}) . "%</td>"
|
||||
if $Quarterly{$_}/$QuarterlyC{$_} >= 99 ;
|
||||
$Body .= "<td class = 'Up95'>" . sprintf('%.2f',$Quarterly{$_}/$QuarterlyC{$_}) . "%</td>"
|
||||
if $Quarterly{$_}/$QuarterlyC{$_} > 95 and $Quarterly{$_}/$QuarterlyC{$_} < 99 ;
|
||||
$Body .= "<td class = 'Up90'>" . sprintf('%.2f',$Quarterly{$_}/$QuarterlyC{$_}) . "%</td>"
|
||||
if $Quarterly{$_}/$QuarterlyC{$_} > 90 and $Quarterly{$_}/$QuarterlyC{$_} < 95 ;
|
||||
$Body .= "<td class = 'UpNo'>" . sprintf('%.2f',$Quarterly{$_}/$QuarterlyC{$_}) . "%</td>"
|
||||
if $Quarterly{$_}/$QuarterlyC{$_} < 90 ;
|
||||
$Body .= "<td class = 'Up99'>" . sprintf('%.2f',$Monthly{$_}/$MonthlyC{$_}) . "%</td>"
|
||||
if $Monthly{$_}/$MonthlyC{$_} >= 99 ;
|
||||
$Body .= "<td class = 'Up95'>" . sprintf('%.2f',$Monthly{$_}/$MonthlyC{$_}) . "%</td>"
|
||||
if $Monthly{$_}/$MonthlyC{$_} > 95 and $Monthly{$_}/$MonthlyC{$_} < 99 ;
|
||||
$Body .= "<td class = 'Up90'>" . sprintf('%.2f',$Monthly{$_}/$MonthlyC{$_}) . "%</td>"
|
||||
if $Monthly{$_}/$MonthlyC{$_} > 90 and $Monthly{$_}/$MonthlyC{$_} < 95 ;
|
||||
$Body .= "<td class = 'UpNo'>" . sprintf('%.2f',$Monthly{$_}/$MonthlyC{$_}) . "%</td>"
|
||||
if $Monthly{$_}/$MonthlyC{$_} < 90 ;
|
||||
$Body .= "<td class = 'Up99'>" . sprintf('%.2f',$Weekly{$_}/$WeeklyC{$_}) . "%</td>"
|
||||
if $Weekly{$_}/$WeeklyC{$_} >= 99;
|
||||
$Body .= "<td class = 'Up95'>" . sprintf('%.2f',$Weekly{$_}/$WeeklyC{$_}) . "%</td>"
|
||||
if $Weekly{$_}/$WeeklyC{$_} > 95 and $Weekly{$_}/$WeeklyC{$_} < 99 ;
|
||||
$Body .= "<td class = 'Up90'>" . sprintf('%.2f',$Weekly{$_}/$WeeklyC{$_}) . "%</td>"
|
||||
if $Weekly{$_}/$WeeklyC{$_} > 90 and $Weekly{$_}/$WeeklyC{$_} < 95 ;
|
||||
$Body .= "<td class = 'UpNo'>" . sprintf('%.2f',$Weekly{$_}/$WeeklyC{$_}) . "%</td>"
|
||||
if $Weekly{$_}/$WeeklyC{$_} < 90 ;
|
||||
$Body .= "<td class = 'Up99'>" . sprintf('%.2f',$Daily{$_}/$DailyC{$_}) . "%</td>"
|
||||
if $Daily{$_}/$DailyC{$_} >= 99;
|
||||
$Body .= "<td class = 'Up95'>" . sprintf('%.2f',$Daily{$_}/$DailyC{$_}) . "%</td>"
|
||||
if $Daily{$_}/$DailyC{$_} > 95 and $Daily{$_}/$DailyC{$_} < 99 ;
|
||||
$Body .= "<td class = 'Up90'>" . sprintf('%.2f',$Daily{$_}/$DailyC{$_}) . "%</td>"
|
||||
if $Daily{$_}/$DailyC{$_} > 90 and $Daily{$_}/$DailyC{$_} < 95 ;
|
||||
$Body .= "<td class = 'UpNo'>" . sprintf('%.2f',$Daily{$_}/$DailyC{$_}) . "%</td>"
|
||||
if $Daily{$_}/$DailyC{$_} < 90 ;
|
||||
$Body .= "</tr>\n";
|
||||
}
|
||||
$Body .= "</table>";
|
||||
$Body .= "<P><P><P>\n";
|
||||
$Body .= "<table border='1' bordercolor=#111111><tr><td class ='appHeader'>Legend:</td>\n";
|
||||
$Body .= "<tr><td class = 'Up99'>if uptime > 99% then GREEN</td></tr>\n";
|
||||
$Body .= "<tr><td class = 'Up95'>if uptime > 95% but < 99% then BLUE</td></tr>\n";
|
||||
$Body .= "<tr><td class = 'Up90'>if uptime > 90% but < 95% then YELLOW</td></tr>\n";
|
||||
$Body .= "<tr><td class = 'UpNo'>if uptime < 90% then RED</td></tr>\n";
|
||||
$Body .= "</table>\n";
|
||||
return $Body;
|
||||
}
|
||||
|
||||
sub NumDots($) {
|
||||
# Count the number of dots in a string
|
||||
# There's probably a better way to do this
|
||||
my $DNA = shift;
|
||||
my $a = 0;
|
||||
while($DNA =~ /\./ig){$a++}
|
||||
return $a
|
||||
}
|
||||
|
||||
sub DetailSheet($) {
|
||||
# Populate the table with details depending on the value of %opts{detail}
|
||||
my $Seconds = shift;
|
||||
my $Body = '';
|
||||
|
||||
return '' unless $opt{detail};
|
||||
|
||||
# Monthly/Weekly/Daily
|
||||
$Body .= "<table border='1' bordercolor=#111111>\n";
|
||||
$Body .= "<tr>\n";
|
||||
$Body .= "<td class ='appHeader' colspan='3'>IT Network Systems Availability Previous " . $Seconds/86400 . " Day(s)</td></tr>\n";
|
||||
$Body .= "<tr>\n";
|
||||
$Body .= "<td class ='appHeader' colspan='3'>Compiled: ". scalar(localtime) . "</td></tr>\n";
|
||||
$Body .= "<tr>\n";
|
||||
$Body .= "<td class = 'SubHead' width='40%'>Service</td>
|
||||
<td class = 'SubHead' width='30%'>Seconds</td>
|
||||
<td class = 'SubHead' width='30%'>Percent</td></tr>\n";
|
||||
|
||||
my %CornBeef;
|
||||
my %CornBeefC;
|
||||
|
||||
CASE: {
|
||||
%CornBeef = %Daily, %CornBeefC = %DailyC, print "Doing Daily\n", last CASE if $Seconds == 86400;
|
||||
%CornBeef = %Weekly, %CornBeefC = %WeeklyC, print "Doing Weekly\n", last CASE if $Seconds == 604800;
|
||||
%CornBeef = %Monthly, %CornBeefC = %MonthlyC, print "Doing Monthly\n", last CASE if $Seconds == 2592000;
|
||||
%CornBeef = %Quarterly, %CornBeefC = %QuarterlyC, print "Doing Quarterly\n", last CASE if $Seconds == 7776000;
|
||||
} # end of CASE block
|
||||
|
||||
foreach (sort { $a cmp $b } keys %CornBeef ) {
|
||||
next if NumDots ($_) > $opt{detail};
|
||||
if ( $_ =~ /\./ ) {
|
||||
#this is a sub section
|
||||
$Body .= "<tr>\n";
|
||||
$Body .= "<td class = 'SubSubHead'>$_</td>\n";
|
||||
$Body .= "<td class = 'SubDetail'>" . sprintf('%.0f',(100 - $CornBeef{$_} / $CornBeefC{$_}) * ($Seconds/100)) . "</td>\n";
|
||||
$Body .= "<td class = 'SubDetail'>" . sprintf('%.2f',$CornBeef{$_} / $CornBeefC{$_}) . "%</td>\n";
|
||||
$Body .= "</tr>\n";
|
||||
} else {
|
||||
# this is a non-sub section
|
||||
$Body .= "<tr>\n";
|
||||
$Body .= "<td class = 'SubHead'>" . $_ . "</td>\n";
|
||||
$Body .= "<td class = 'SubDetail'>" . sprintf('%.0f',(100 - $CornBeef{$_} / $CornBeefC{$_}) * ($Seconds/100)) . "</td>\n";
|
||||
$Body .= "<td class = 'SubDetail'>" . sprintf('%.2f',$CornBeef{$_} / $CornBeefC{$_}) . "%</td>\n";
|
||||
$Body .= "</tr>";
|
||||
}
|
||||
}
|
||||
$Body .= "</table>\n";
|
||||
return $Body;
|
||||
}
|
||||
|
||||
sub list_rrds($$$$$);
|
||||
sub list_rrds($$$$$) {
|
||||
# List the RRD's used by this configuration
|
||||
my $tree = shift;
|
||||
my $path = shift;
|
||||
my $print = shift;
|
||||
my $slaves = shift;
|
||||
my $nomasterpoll = shift;
|
||||
my $prline = '';
|
||||
if ( $opt{slaves} ) {
|
||||
$slaves = $tree->{slaves} if exists( $tree->{slaves} );
|
||||
} else {
|
||||
$slaves = '';
|
||||
}
|
||||
$nomasterpoll = $tree->{nomasterpoll} if exists ( $tree->{nomasterpoll} );
|
||||
foreach my $rrds (keys %{$tree}) {
|
||||
if (ref $tree->{$rrds} eq 'HASH'){
|
||||
$prline .= list_rrds( $tree->{$rrds}, $path."/$rrds", $print, $slaves, $nomasterpoll );
|
||||
}
|
||||
if ($rrds eq 'host' and $tree->{$rrds} !~ m|/| ) {
|
||||
if ( exists( $opt{slaves} ) && $slaves ) {
|
||||
foreach( split( /\s+/, $slaves ) ) {
|
||||
my $tslave = $_;
|
||||
$prline .= "$cfg->{General}{datadir}$path~$tslave".".rrd\n"
|
||||
if $opt{slaves} eq '' || grep( $tslave, split( ',', $opt{slaves} ) );
|
||||
}
|
||||
$prline .= "$cfg->{General}{datadir}$path".".rrd\n" unless $nomasterpoll;
|
||||
} else {
|
||||
$prline .= "$cfg->{General}{datadir}$path".".rrd\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
return $prline;
|
||||
}
|
||||
|
||||
sub load_cfg ($) {
|
||||
my $cfgfile = shift;
|
||||
# my $parser = get_parser;
|
||||
my $parser = Smokeping::get_parser;
|
||||
$cfg = Smokeping::get_config $parser, $cfgfile;
|
||||
}
|
||||
|
||||
###########################################################################
|
||||
# The Main Program
|
||||
###########################################################################
|
||||
|
||||
sub main($);
|
||||
main($cfgfile);
|
||||
|
||||
sub main ($) {
|
||||
umask 022;
|
||||
my $cfgfile = shift;
|
||||
my $sendto;
|
||||
GetOptions(\%opt, 'quiet','version','testmail','listrrds','to=s','detail=n','morning','weekly','help','man','slaves:s') or pod2usage(2);
|
||||
if($opt{version}) { print "$RCS_VERSION\n"; exit(0) };
|
||||
if($opt{help}) { pod2usage(-verbose => 1); exit 0 };
|
||||
if($opt{man}) { pod2usage(-verbose => 2); exit 0 };
|
||||
load_cfg $cfgfile;
|
||||
print "tSmoke for network managed by $cfg->{General}{owner}\nat $cfg->{General}{contact}\n(c) 2003 Dan McGinn-Combs\n" unless $opt{quiet};
|
||||
if($opt{testmail}) { test_mail($cfg) };
|
||||
if($opt{listrrds}) { print "List of Round Robin Databases used by this implementation\n";
|
||||
my @rrds = split ( /\n/,list_rrds($cfg->{Targets},"","","","") );
|
||||
foreach (@rrds) {
|
||||
print "RRD: $_\n"; };
|
||||
}
|
||||
if($opt{morning}) { morning_update($cfg) };
|
||||
if($opt{weekly}) { weekly_update($cfg) };
|
||||
exit 0;
|
||||
}
|
||||
|
||||
=head1 NAME
|
||||
|
||||
tSmoke - Commandline tool for sending SmokePing information
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<tSmoke> [ B<--testmail> | B<--morning> | B<--weekly> | B<--version> | B<--help> | B<--man> | B<--slaves> ]
|
||||
|
||||
Options:
|
||||
|
||||
--man Show the manpage
|
||||
--help Help :-)
|
||||
--version Show SmokePing Version
|
||||
--testmail Send a test message
|
||||
--listrrds List the RRDs used by this Smokeping
|
||||
--morning Send a morning synopsis
|
||||
--weekly Send a weekly status report
|
||||
--to E-mail address to send message (i.e. '--to=xyz@company.com.invalid'
|
||||
--detail How much detail to send in weekly report (i.e. '--detail=1')
|
||||
--quiet Do not print welcome
|
||||
--slaves Enable slave support assumes all slaves unless csv list of slaves
|
||||
is added (i.e. '--slaves' or '--slaves=slave1[,slave2...]')
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<tSmoke> tool is a commandline tool which interfaces with the SmokePing system.
|
||||
Its main function is to send a message indicating the current status of the systems
|
||||
being monitored by Smokeping or an HTML mail file containing the status over the past day,
|
||||
past week and past month including an overview.
|
||||
|
||||
Typical crontab used to invoke this are
|
||||
|
||||
# Quick morning alert to see what's down
|
||||
0 6 * * * /usr/local/smokeping/bin/tSmoke.pl --q --to=mobilephone@att.net.invalid --morning
|
||||
# Weekly report on the percent availability of network systems with no detail
|
||||
0 8 * * * /usr/local/smokeping/bin/tSmoke.pl --q --to=mailbox@company.com.invalid --weekly --detail=0
|
||||
|
||||
=head1 SETUP
|
||||
|
||||
When installing tSmoke, some variables must be adjusted to fit your local system.
|
||||
|
||||
We need to use the following B<libraries>:
|
||||
|
||||
=over
|
||||
|
||||
=item Smokeping
|
||||
|
||||
=item RRDTool Perl bindings
|
||||
|
||||
=item Getopt::Long
|
||||
|
||||
=back
|
||||
|
||||
Set up your libraries:
|
||||
|
||||
use lib "/usr/local/smokeping/lib";
|
||||
use lib "/usr/local/rrdtool-1.0.39/lib/perl";
|
||||
|
||||
Point to your Smokeping B<config> file
|
||||
|
||||
my $cfgfile = "/usr/local/smokeping/etc/config";
|
||||
|
||||
Modify the Smokeping config file to include a path for tmail in the
|
||||
General section:
|
||||
|
||||
tmail = /usr/local/smokeping/etc/tmail
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<smokeping(1)>, L<smokeping_config(5)>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (c) 2003 by Dan McGinn-Combs. All right reserved.
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
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 the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this program; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
|
||||
02139, USA.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Dan McGinn-Combs E<lt>d.mcginn-combs@mindspring.comE<gt>
|
||||
|
||||
Modified for Smokeping official distribution by Niko Tyni E<lt>ntyni@iki.fiE<gt>
|
||||
|
||||
=cut
|
||||
|
||||
Reference in New Issue
Block a user