torrus-2.08/0000755000175000017500000000000012413221023007770 500000000000000torrus-2.08/README0000644000175000017500000000045611545711242010611 00000000000000Torrus project http://sourceforge.net/projects/torrus http://torrus.org http://sourceforge.net/apps/mediawiki/torrus/ For installation instructions, see doc/install.txt or convert doc/install.pod into a format of your preference. (C) 2002-2010, Stanislav Sinyagin torrus-2.08/INSTALL0000644000175000017500000002243211545711242010760 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. torrus-2.08/configure.ac0000644000175000017500000002631612413217640012220 00000000000000# Copyright (C) 2002-2013 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # AC_INIT([torrus],[2.08],[ssinyagin@users.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_AUX_DIR(conftools) AC_CANONICAL_HOST AM_INIT_AUTOMAKE(1.9) AC_PATH_PROG(PERL, perl, no) AC_PATH_PROG(PERLCRITIC, perlcritic, no) # Need this for init.torrus AC_PATH_PROG(SU, su, no) AC_PATH_PROG(KILL, kill, no) AC_PATH_PROG(SED, sed, no) AC_PATH_PROG(FIND, find, no) AC_PATH_PROG(RM, rm, no) AC_PATH_PROG(SLEEP, sleep, no) # This will generate doc pages from POD sources AC_PATH_PROG(POD2TEXT, pod2text, no) AM_CONDITIONAL([POD2TEXT_PRESENT], [test "$POD2TEXT" != no]) AC_PATH_PROG(POD2MAN, pod2man, no) AM_CONDITIONAL([POD2MAN_PRESENT], [test "$POD2MAN" != no]) AC_ARG_ENABLE(pkgonly, [AC_HELP_STRING([--enable-pkgonly], [Skip all checking])]) AC_SUBST(enable_pkgonly) AC_ARG_ENABLE(threads, [AC_HELP_STRING([--disable-threads], [Disable Perl threads usage])]) perllibdirs="\'\${perllibdir}\'" PERLOPTS= AC_ARG_VAR(PERLINC, [[] Additional space-separated Perl library paths]) if test ! -z "$PERLINC"; then for d in $PERLINC; do PERLOPTS="${PERLOPTS} -I${d}" perllibdirs=${perllibdirs}"\,\'"${d}"\'" done fi find_rrdtool () { if ${PERL} -e 'use RRDs' 2>/dev/null; then :; else if test "$enable_pkgonly" != yes; then AC_MSG_NOTICE([RRDs.pm is not in default Perl search paths.]) AC_MSG_CHECKING([RRDtool in /usr/local/rrdtool*]) with_rrdtool=`ls -1dr /usr/local/rrdtool* | head -1` if test -d $with_rrdtool; then AC_MSG_RESULT([${with_rrdtool}]) else AC_MSG_ERROR([Cannot find RRDtool]) fi test_rrdtool else with_rrdtool="/usr/local/rrdtool" fi fi } test_rrdtool () { if test "$enable_pkgonly" != yes; then if ${PERL} -I${with_rrdtool}/lib/perl -e 'use RRDs'; then :; else AC_MSG_ERROR([Could not find RRDs perl module in ${with_rrdtool}]) fi fi perllibdirs=${perllibdirs}"\,\'"${with_rrdtool}"/lib/perl/\'" } AC_ARG_WITH(rrdtool, [AC_HELP_STRING(--with-rrdtool=DIR,RRDTool location)], test_rrdtool, find_rrdtool) AC_SUBST(perllibdirs, [${perllibdirs}]) # Check the necessary Perl modules if test "$enable_pkgonly" != yes; then for module in 'BerkeleyDB' 'XML::LibXML' 'Template' \ 'Proc::Daemon' 'Net::SNMP' 'URI::Escape' 'Apache::Session' \ 'Date::Parse' 'JSON' do AC_MSG_CHECKING([presence of $module]) if ${PERL} ${PERLOPTS} -e 'use '$module 2>/dev/null; then AC_MSG_RESULT([Ok]) else AC_MSG_ERROR([Perl cannot find $module]); fi done # Check if Perl threads can be used. # Requirements are: perl 5.8.8 with threads compiled, # threads ver. 1.41 or higher, threads::shared ver. 1.03 or higher perlithreads=1 if test x"$enable_threads" = xno; then perlithreads=0 else AC_MSG_CHECKING([if Perl version is 5.8.8 or higher]) if ${PERL} ${PERLOPTS} -e 'use 5.8.8' 2>/dev/null; then AC_MSG_RESULT([Ok]) else perlithreads=0 fi if test ${perlithreads} -eq 1; then AC_MSG_CHECKING([threading support in Perl]) if ${PERL} ${PERLOPTS} -e 'use threads' 2>/dev/null; then AC_MSG_RESULT([Ok]) else perlithreads=0 fi fi if test ${perlithreads} -eq 1; then AC_MSG_CHECKING([if threads module version is 1.41 or higher]) if ${PERL} ${PERLOPTS} -e \ 'use threads; exit($threads::VERSION >= 1.41 ? 0:1)'; then AC_MSG_RESULT([Ok]) else perlithreads=0 fi fi if test ${perlithreads} -eq 1; then AC_MSG_CHECKING([if threads::shared module version is 1.03 or higher]) if ${PERL} ${PERLOPTS} -e \ 'use threads; use threads::shared; exit($threads::shared::VERSION >= 1.03 ? 0:1)'; then AC_MSG_RESULT([Ok]) else perlithreads=0 fi fi if test ${perlithreads} -eq 0; then AC_MSG_RESULT([No. Multithreading will not be used.]) fi fi AC_SUBST(perlithreads, [${perlithreads}]) fi AC_ARG_VAR(torrus_user, [[torrus] UID to run the daemons]) if test -z "$torrus_user"; then torrus_user=torrus; fi if test "$enable_pkgonly" != yes; then AC_MSG_CHECKING([if user ${torrus_user} exists]) torrus_check_file=torrus_usercheck_$$ torrus_check_error=no if ! touch ${torrus_check_file}; then AC_MSG_ERROR([Cannot create ${torrus_check_file}]) elif ! chown ${torrus_user} ${torrus_check_file}; then torrus_check_error=yes fi rm -f ${torrus_check_file} if test ${torrus_check_error} = yes; then AC_MSG_ERROR([User ${torrus_user} does not exist]) else AC_MSG_RESULT([Ok]) fi fi # Set the var/db and var/cache ownership AC_ARG_VAR(var_user, [[TORRUS_USER] Owner of db and cache directories]) AC_ARG_VAR(var_group, [[torrus] Group of db and cache directories]) AC_ARG_VAR(var_mode, [[775] Mode of db and cache directories]) AC_ARG_ENABLE(varperm, [AC_HELP_STRING(--disable-varperm, Disable db and cache access rights tuning)], [], [enable_varperm="yes"]) AC_SUBST(enable_varperm) AC_ARG_VAR(pkghome, [[PREFIX/torrus] Place for Torrus static files]) if test -z "$pkghome"; then pkghome='${prefix}/torrus'; fi AC_ARG_VAR(pkgbindir, [[PKGHOME/bin] Torrus executables]) if test -z "$pkgbindir"; then pkgbindir='${pkghome}/bin'; fi AC_ARG_VAR(cfgdefdir, [[PKGHOME/conf_defaults] torrus-config.pl and others]) if test -z "$cfgdefdir"; then cfgdefdir='${pkghome}/conf_defaults'; fi AC_ARG_VAR(pkgdocdir, [[PKGHOME/doc] Documentation files]) if test -z "$pkgdocdir"; then pkgdocdir='${pkghome}/doc'; fi AC_ARG_VAR(exmpdir, [[PKGHOME/examples] Examples]) if test -z "$exmpdir"; then exmpdir='${pkghome}/examples'; fi AC_ARG_VAR(perllibdir, [[PKGHOME/perllib] Torrus Perl libraries]) if test -z "$perllibdir"; then perllibdir='${pkghome}/perllib'; fi AC_ARG_VAR(pluginsdir, [[PKGHOME/plugins] Plugin configurations]) if test -z "$pluginsdir"; then pluginsdir='${pkghome}/plugins'; fi AC_ARG_VAR(plugtorruscfgdir, [[PLUGINSDIR/torrus-config]]) if test -z "$plugtorruscfgdir"; then plugtorruscfgdir='${pluginsdir}/torrus-config'; fi AC_ARG_VAR(plugdevdisccfgdir, [[PLUGINSDIR/devdiscover-config]]) if test -z "$plugdevdisccfgdir"; then plugdevdisccfgdir='${pluginsdir}/devdiscover-config'; fi AC_ARG_VAR(plugwrapperdir, [[PLUGINSDIR/wrapper]]) if test -z "$plugwrapperdir"; then plugwrapperdir='${pluginsdir}/wrapper'; fi AC_ARG_VAR(scriptsdir, [[PKGHOME/scripts] Script files]) if test -z "$scriptsdir"; then scriptsdir='${pkghome}/scripts'; fi AC_ARG_VAR(supdir, [[PKGHOME/sup] Supplementary files]) if test -z "$supdir"; then supdir='${pkghome}/sup'; fi AC_ARG_VAR(webplaindir, [[SUPDIR/webplain] Web interface plain files path]) if test -z "$webplaindir"; then webplaindir='${supdir}/webplain'; fi AC_ARG_VAR(webscriptsdir, [[SUPDIR/webscripts] Directory for optional web scripts]) if test -z "$webscriptsdir"; then webscriptsdir='${supdir}/webscripts'; fi AC_ARG_VAR(tmpldir, [[PKGHOME/templates] Template files]) if test -z "$tmpldir"; then tmpldir='${pkghome}/templates'; fi AC_ARG_VAR(distxmldir, [[PKGHOME/xmlconfig] Distribution XML config files]) if test -z "$distxmldir"; then distxmldir='${pkghome}/xmlconfig'; fi AC_ARG_VAR(sitedir, [[SYSCONFDIR/torrus] Site configuration files]) if test -z "$sitedir"; then sitedir='${sysconfdir}/torrus'; fi AC_ARG_VAR(siteconfdir, [[SITEDIR/conf] Site configuration files]) if test -z "$siteconfdir"; then siteconfdir='${sitedir}/conf'; fi AC_ARG_VAR(tmpluserdir, [[SITEDIR/templates] User-defined Template files]) if test -z "$tmpluserdir"; then tmpluserdir='${sitedir}/templates'; fi AC_ARG_VAR(sitexmldir, [[SITEDIR/xmlconfig] Site XML configs]) if test -z "$sitexmldir"; then sitexmldir='${sitedir}/xmlconfig'; fi AC_ARG_VAR(logdir, [[/var/log/torrus] Log files]) if test -z "$logdir"; then logdir='/var/log/torrus'; fi AC_ARG_VAR(piddir, [[/var/run/torrus] PID files]) if test -z "$piddir"; then piddir='/var/run/torrus'; fi AC_ARG_VAR(varprefix, [[/var/torrus] Common prefix for runtime data]) if test -z "$varprefix"; then varprefix='/var/torrus'; fi AC_ARG_VAR(cachedir, [[VARPREFIX/cache] Renderer cache]) if test -z "$cachedir"; then cachedir='${varprefix}/cache'; fi AC_ARG_VAR(dbhome, [[VARPREFIX/db] Berkeley DB files]) if test -z "$dbhome"; then dbhome='${varprefix}/db'; fi AC_ARG_VAR(reportsdir, [[VARPREFIX/reports] Reports output]) if test -z "$reportsdir"; then reportsdir='${varprefix}/reports'; fi AC_ARG_VAR(seslockdir, [[VARPREFIX/session_data/lock] Web session locks]) if test -z "$seslockdir"; then seslockdir='${varprefix}/session_data/lock'; fi AC_ARG_VAR(sesstordir, [[VARPREFIX/session_data/store] Web session storage]) if test -z "$sesstordir"; then sesstordir='${varprefix}/session_data/store'; fi AC_ARG_VAR(wrapperdir, [[BINDIR] CLI wrapper]) if test -z "$wrapperdir"; then wrapperdir='${bindir}'; fi AC_ARG_VAR(mansec_usercmd, [[1] User commands man section]) if test -z "$mansec_usercmd"; then mansec_usercmd='1'; fi AC_ARG_VAR(mansec_misc, [[7] Miscellaneous man section]) if test -z "$mansec_misc"; then mansec_misc='7'; fi AC_ARG_VAR(defrrddir, [[/srv/torrus/collector_rrd] Default RRD storage path]) if test -z "$defrrddir"; then defrrddir='/srv/torrus/collector_rrd'; fi AC_CONFIG_FILES([Makefile bin/Makefile configs/Makefile]) AC_CONFIG_FILES([doc/Makefile doc/manpages/Makefile]) AC_CONFIG_FILES([examples/Makefile perllib/Makefile]) AC_CONFIG_FILES([sup/Makefile xmlconfig/Makefile]) AC_CONFIG_FILES([setup_tools/substvars.sh],[chmod +x setup_tools/substvars.sh]) AC_CONFIG_FILES([setup_tools/mkvardir.sh], [chmod +x setup_tools/mkvardir.sh]) AC_CONFIG_FILES([init.d/torrus], [chmod +x init.d/torrus]) AC_SUBST(VERSION) AC_OUTPUT VARSAVE=configs/instvars echo creating $VARSAVE rm -f $VARSAVE for VAR in $ac_subst_vars; do case ${VAR} in DEFS | PACKAGE* | INSTALL* | VERSION | ACLOCAL | AUTO* | MAKEINFO |\ install_sh | AM* | am* | ac* | ECHO* | build* | host* | target* |\ CYG* | PATH_SEPARATOR | AWK | STRIP | mkdir* |\ perllibdirs ) ;; *) eval 'VAL=${'$VAR'}' echo ${VAR}=\'${VAL}\' >>$VARSAVE ;; esac done torrus-2.08/conftools/0000755000175000017500000000000012413221021011774 500000000000000torrus-2.08/conftools/install-sh0000755000175000017500000002202111545711243013734 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2005-05-14.22 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $cpprog "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit 0 } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: torrus-2.08/conftools/config.sub0000755000175000017500000007577711545711243013745 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-07-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | ms1 \ | msp430 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m32c) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | ms1-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; m32c-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: torrus-2.08/conftools/missing0000755000175000017500000002540611545711243013341 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-06-08.21 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: torrus-2.08/conftools/config.guess0000755000175000017500000012463411545711243014265 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-07-08' # This file 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: torrus-2.08/discovery/0000755000175000017500000000000012413221021011775 500000000000000torrus-2.08/discovery/README0000644000175000017500000000031411545711242012611 00000000000000This directory is a typical place for SNMP device discovery instruction files. The discovery instruction files may be generated by "genddx" utility. They are used as the input for "devdiscover" utility. torrus-2.08/DIST_REVISION0000644000175000017500000000013612413221023011714 00000000000000Thu Oct 2 11:59:47 CEST 2014 * master 8b29da6 [origin/master] tp-cisco-cbqos release 2.08.01 torrus-2.08/NEWS0000644000175000017500000004013412413217640010423 0000000000000002-OCT-2014: Torrus release 2.08 In this release: -- Fix for a long time hidden bug in Cisco IOS discovery modules. It popped up first under Perl 5.18 -- IPv6 traffic statistics via RFC4293_IP_MIB -- Cisco IOS: support for persistent interface indexes; 64-bit memory statistics; IOS and IOS XR detection from sysDescr string -- Improvements for unknown devices (port name and comment hints) -- RPC interface allows retrieving of time series. -- Support for Albis Technologies ULAF devices -- Support for context name in SNMPv3 -- Event escalation for threshold monitors -- Various improvements in RFC2662_ADSL_LINE discovery module 29-APR-2013: Torrus release 2.07 This is a bugfix release that fixes some problems in tp-cbqos plugin 15-FEB-2013: Torrus release 2.06 In this release: -- F5 BigIP LTM support added -- action_snmptrap now sends the severity level properly -- Bugfix in Cisco QoS plugin: unreachable devices could block the QoS collector from initialization. 07-OCT-2012: Torrus release 2.05 In this release: -- Important bugfixes: collector worked incorrectly with SNMPv1 devices (maxrepetitions parameter is incompatible with v1); "disable-snmpcollector" in DDX produced invalid configuration. -- APC PowerNet: added support for Modular Environmental Manager -- Removed support for F5 BigIP version 4.x because it's end of life and outdated. Support for version 11 is in development. 16-AUG-2012: Torrus release 2.04 In this release: -- Default value for $Torrus::Collector::SNMP::unreachableTimeout is set to 0 instead of 6 hours, and now collector never gives up on unreachable hosts. -- CA eHealth SystemEDGE support is significantly refactored by Roman Hochuli. -- New URL parameters: Gborder, Gcolors. -- New graph view for embedding into external websites: "embedded-small", in addition to the existing "embedded" view. -- Added support for Comtech EF Data satellite modems. -- New plugin: "tp-rrdfit" for updating the existing RRD files to match the torrus conbfiguration. 22-APR-2012: Torrus release 2.03 This is a bugfix release. No new features are added. The MAC address based ifIndex mapping was broken in 2.02. 20-MAR-2012: Torrus release 2.02 In this release: -- Collector and Monitor daemons now send logs to Syslog facility local0 by default. torrus-siteconfig.pl can be used to change the facility or revert to the file logging (file logging is not recommended because of no rotation mechanism). File log rotation on SIGHUP is removed (it never was stable anyway). Syslog to a custom UNIX socket is also supported. -- WebUI: In/Out graphs now use a slightly darker green area. Also new URL arguments are supported to display the maximums alongside averages: Gmaxline, Gmaxlinestep -- RPN expressions can now refer to leaves by their NodeID: [[nodeid]] -- Discovery modules refactored: $dd->walkSnmpTable() is the only recommended way to walk SNMP tables. Older methods are still supported, but deprecated. -- New parameter: "snmp-maxrepetitions", with default value: 10. This ensures proper work of the Collector and Devdiscover when retrieving interface names. -- RFC2863_IF_MIB: interface speed can be monitored (used for Actelis SHDSL modems). -- New parameter "RFC2863_IF_MIB::sort-by-name" disables the sorting by ifIndex. -- New discovery modules: RFC4319_HDSL2_SHDSL_LINE_MIB, APC_PowerNet -- Improved discovery modules: NetBotz, RFC2670_DOCS_IF -- "rrd-create-rra" is now automatically copied from DDX into Torrus configuration. -- Minor bugfixes and improvements to increase the database stability. 04-SEP-2011: Torrus release 2.01 In this release: -- New release numbering scheme. Torrus releases are two-number, and compatible plugins have 3-number versions. -- New discovery modules: CiscoWLC, C-COM CAPSPAN, Thomson_xDSL, Actelis, NexComm, Patton -- New MIBs supported: CISCO-WAN-3G-MIB -- New IF-MIB selector action: AddTemplates -- "rrgraph-view" parameter can be used in tokensets to define the default graph presentation. It can also be set by XXX-tokenset-rrgraph-view in DevDiscover input file. -- RFC2662_ADSL_LINE discovery module is now compatible with Cisco 837 -- Port QoS stats for Cisco ME3400 -- ifDescr and ifName uniqueness is checked before using them as interface identifiers. This eases the use of new devices with their special interface naming. -- WebUI now uses NodeID whenever it is available instead of tokens, and full node paths if NodeID is unavailable. -- MicrosoftWindows discovery module is improved and lots of unneeded IF-MIB interfaces are eliminated. -- New feature: SNMP reachability statistics for devices. -- FastCGI handler is automatically re-spawning every 5000 requests. -- Device uptime is no longer displayed in the graph legend. -- Exclusive collector initialization lock is added for servers with multiple collector processes. This reduces the disk seek concurrency at collector startup. -- Default rrd-create-heartbeat changed from 500 to 720 -- Reduced the possibility for NaN values in RRD files at collector re-initialization -- Integration into external portals: Web RPC, embedded graph view, PDF and SVG formats for the graphs -- New plugin: tp-siam for SIAM library integration. It enables to build customer portals with the use of Extopus software and an external service inventory. See docs/nodeid_usage.pod for more details. 24-OCT-2010: Torrus release 1.0.9 It is recommended to re-run discovery and compilation immediately after upgrading from 1.0.8. In this release: -- WebUI handling is re-designed. FastCGI is supported with Apache and Lighttpd. User authorization option has changed its name: "$Torrus::CGI::authorizeUsers". Login page has now "remember me" checkbox. Apache configuration statements for mod_perl have slightly changed. Removed dependency: libapreq2 is no longer needed. -- New Perl module required by installer: JSON -- New discovery modules: Force10, NetBotz, Arista, ALU_Timetra, Foundry, CasaCMTS, Jacarta. -- Support for semi-transparent lines and areas in multigraphs. -- Support for arbitrary names for subtrees and leaves (node-display-name parameter). Now original interface names are displayed, without underscores. -- Monitor alarms are now preserved between config re-compilations. Also dynamic tokenset members are preserved. A new utility: "torrus flushmonitors" flushes old alarms. -- New parameter: nodeid. It is designed for easier integration of Torrus with other OSS systems. See the "NodeID usage guidelines" document for more details. -- Current SNMP failures are recorded in a database and displayed by "torrus snmpfailures" utility. The output is in JSON format, so it's easy to integrate into other alerting systems. -- RHEL compatibility: the old Init script did not stop the daemons properly upon a system reboot. -- Compatibility with the newest version of Net::SNMP module. -- Host-based authentication: remote systems, such as customer self-care portals, can retrieve graphs from Torrus WebUI. -- Performance optimizations: XML compiler runs 10-15% faster. -- Custom CSS styles must no longer reside in Torrus installation directory. 26-APR-2010: Torrus release 1.0.8bf01 Bugfix release. No new features or functionality. 05-APR-2009: Torrus release 1.0.8 Note: a complete re-compile of the XML is required after upgrading. In this release: -- BerkeleyDB stability has significantly improved due to new signal handlers. -- View parameters can be overridden with URL variables "Gstart", "Gend" and so on. -- Collector initialization time is improved by shifting some work to the XML compiler. -- New command-line utility: srvderive. It combines several serviceIDs into a single report by calculating their sum or maximum value (sponsored by nexellent ag, www.nexellent.ch) -- A number of bugfixes and minor imprvements. -- Added SNMP discovery support for Arbor E series and Liebert HVAC 05-AUG-2008: Torrus release 1.0.7 In this release: -- Added and improved vendor support for Symmetricom, Juniper JunOS, Cisco SCE, -- New discovery parameters, selectors and selector actions. -- Default value for "collector-timeoffset-step" increased from 30 to 60 seconds. 30 seconds is too short for many installations. -- Support for PostgreSQL in reports generator. -- Support for IPv6 in SNMP discovery and collector. -- New collector plugin: "tp-rawexport" for plaintext export of collector data. -- Cisco QoS monitoring plugin "tp-cisco-cbqos" upgraded to version 1.6. It fixes an old bug in RRD file naming, thus all the QoS-related RRD files would have to be renamed or started from scratch. -- Other minor enhancements and bugfixes (see ChangeLog for details). 03-AUG-2007: Torrus release 1.0.6 In this release: -- All the trees need to be recompiled after Torrus upgrade. -- Search capability. The nodes can be searched within a tree or globally. The search database needs to be updated with "torrus buildsearchdb" utility. -- GUI improvements. Recursive view is restricted and is not offered averywhere. Bugfix for Mozilla browser compatibility: now the graph images are clickable. -- devdiscover accepts multiple DDX files. Combined with multithreading, this improves the discovery performance even further. -- SNMP collector periodically refreshes the table mappings. This helps for modular routers with online insertion and removal: the collector does not need to be restarted after the physical configuration changes. Also the OIDs that return noSuchObject are excluded from polling immediately. -- New MIBs support: Cisco SCE per-service traffic statistics; Cisco CAR statistics; Cisco Ethernet MAC accounting statistics now available on subinterfaces; JunOS per-CoS stats; support for Alteon hardware. -- XML statement is no longer supported. Use the rrddir2xml utility instead. -- The CDEF collector from Chrstian Schnidrig is integrated in the main distribution. Devdiscover supports traffic summaries for multiple interfaces. -- The report generator can generate HTML in any tree. Earlier it was generating the reports only for the trees where data was collected. This improvement allows to split the collecting and viewing trees. -- The installer allows multithreading for Perl version 5.8.8 or higher only. Earlier versions are known for memory leaks in multithreaded operation. -- Multiple collector instances per tree. This improves the CPU utilization for multi-CPU servers. See the torrus_collector manpage. 25-JAN-2007: Torrus release 1.0.5 This is a major release with many new features. In this release: -- Bugfixes in SNMPv3 support -- Perl multithreading. If threads are supported by local Perl, Devdiscover can perform parallel discoveries per output file. Also the Collector runs a background thread for RRD updates. -- Improvement in SNMP collector initialization. Now the collector expands the interface names and other maps asynchronously, which dramatically reduces the initialization time for large installations. Cisco QoS plugin needs an upgrade to version 1.4 or higher. -- New vendor support in SNMP discovery engine: Motorola BSR CMTS (ex-Riverdelta), Cisco SCE, BGP prefix statistics for Cisco IOS routers, Cisco IOS XR support. -- DOCSIS upstream statistics have changed the format, therefore the old stats will be lost after upgrade. The stats now include the US Frequency graphs. -- Interface statistics now contain "All Errors" tab with all error graphs in one page. -- Interface traffic graphs may contain bandwidth utilization percentage information (see RFC2863_IF_MIB::bandwidth-usage in SNMP Discovery Guide). -- Cisco MAC accounting can also be used for billing reports. 20-JUL-2006: Torrus release 1.0.4 This is a major release with many new features. In this release: -- SNMP Version 3 support in Devdiscover and SNMP collector. -- Usage reports for billing. Including 95% percentile reports. More details at http://torrus.org/reporting_setup.pod.html -- Various improvements in SNMP discovery engine and new equipment vendor support -- Improved monitor notifications. New parameter: "severity" and new action "action_notify". -- New torrus-siteconfig.pl variables to improve WebUI customization 02-AUG-2005: Torrus release 1.0.3 This is a minor bugfix release. Unreachable device handling is improved, and also there's a possibility to specify extra Perl library path in ./configure 27-JUL-2005: Torrus release 1.0.2 The new release requires one additional Perl module to be installed: Date::Parse. You can install it from CPAN by using the command: perl -MCPAN -e 'install Date::Parse' In this release: -- Unreachable SNMP devices handling has significantly improved. The default unreachable timeout is set to 6 hours. -- Support for the new mod_perl 2.0 layout. -- New OID in TORRUS-MIB: torrusMonitorDesc, for easier processing of SNMP traps. -- ./configure checks if the user "torrus" exists in the system -- New SNMP discovery parameters: RFC2863_IF_MIB::only-interfaces disable-snmpcollector -- On the graph page, it is now possible to choose the date for displaying old statistics. -- The Cisco CPUs are now managed by devdiscover's selectors. This allows you to add monitors to specific CPU graphs, and also add them to a tokenset. 21-JUN-2005: Torrus release 1.0.1 In this release: -- SNMP errors are now handled better. See the User guide for more details. -- New command line option for monitor: --delay. The init script launches the monitor with 20 minutes delay, to allow the collector update RRD files before monitoring them. -- New devdiscover option: --fallback. It is useful in large production environments when it's important to have a device in the web interface even if it's turned off -- Cisco DOCSIS templates now include Total, Active, and Registered modem quantities. RRD file structure has changed, so the graphs will start anew. -- The meaning of $Torrus::Renderer::stylingProfileOverlay has changed: now it refers to a file name. 10-JUN-2005: Torrus release 1.0.0 In this release, compared to RRFW release 0.1.8: -- New directory structure, with local configuration completely separated from the distribution files -- Comand-line wrapper "torrus" for executing all commands, with short aliases ("dd" for "devdiscover" etc.) -- Plugins may be easily added to existing installation -- Relative file names in DDX files searched in the right directories -- Discovery object selectors: the new way to customize the discovery results -- New discovery modules: AxxessIT.pm: Cisco ONS 15300 SDH switches CiscoIOS_Docsis.pm: Cisco IOS DOCSIS specifics: upstream utilization and modem quantities BetterNetworks.pm: BetterNetworks EthernetBox sensors (temperature, humidity and so on) CiscoIOS_MacAccounting.pm: Automated discovery for Cisco MAC accounting. If applicable, MAC peers are associated with BGP peers. -- Discovery modules improvements: IF-MIB indexing hints for unknown devices Docsis downstream utilization Selector actions for IF-MIB, Docsis, and temperature sensor objects Line cards and modules memory stats for modular Ciscso routers -- Improved performance of monitor daemon -- extended example of DOCSIS monitors and 3-level alarms in xmlconfig/examples/docsis-monitors.xml -- Renderer module improved for multi-CPU servers -- Web interface improvements: Recursive directory view, Monitor names and comments diaplayed, Sizes of tokensets displayed Multiple overviews possible for a subtree -- SO_RCVBUF is set explicitly in SNMP collector to sustain bursts of traffic -- RRD files automatically moved in case of conflicts -- ttproclist: the new utility for automating the DDX files generation -- action_snmptrap now sends an optional severity parameter -- New option for devdiscover: --forcebundle to write the bundle file even if errors occur -- The init script is configurable by a separate configuration file. It also launches the monitors with 20 minutes delay if monitors are launched together with collectors torrus-2.08/Makefile.in0000644000175000017500000010042612413220736011772 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } 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 = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_discovery_DATA) \ $(dist_scripts_DATA) $(dist_tmpl_DATA) $(dist_xmlscripts_DATA) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/configure $(top_srcdir)/init.d/torrus.in \ $(top_srcdir)/setup_tools/mkvardir.sh.in \ $(top_srcdir)/setup_tools/substvars.sh.in AUTHORS COPYING \ ChangeLog INSTALL NEWS TODO conftools/config.guess \ conftools/config.sub conftools/install-sh conftools/missing 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) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = setup_tools/substvars.sh setup_tools/mkvardir.sh \ init.d/torrus CONFIG_CLEAN_VPATH_FILES = SCRIPTS = $(noinst_SCRIPTS) SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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 -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(discoverydir)" \ "$(DESTDIR)$(scriptsdir)" "$(DESTDIR)$(tmpldir)" \ "$(DESTDIR)$(xmlscriptsdir)" DATA = $(dist_discovery_DATA) $(dist_scripts_DATA) $(dist_tmpl_DATA) \ $(dist_xmlscripts_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ FIND = @FIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KILL = @KILL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ 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@ PERLCRITIC = @PERLCRITIC@ PERLINC = @PERLINC@ POD2MAN = @POD2MAN@ POD2TEXT = @POD2TEXT@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SLEEP = @SLEEP@ STRIP = @STRIP@ SU = @SU@ VERSION = @VERSION@ 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__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cachedir = @cachedir@ cfgdefdir = @cfgdefdir@ datadir = @datadir@ datarootdir = @datarootdir@ dbhome = @dbhome@ defrrddir = @defrrddir@ distxmldir = @distxmldir@ docdir = @docdir@ dvidir = @dvidir@ enable_pkgonly = @enable_pkgonly@ enable_varperm = @enable_varperm@ exec_prefix = @exec_prefix@ exmpdir = @exmpdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mansec_misc = @mansec_misc@ mansec_usercmd = @mansec_usercmd@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ perlithreads = @perlithreads@ perllibdir = @perllibdir@ perllibdirs = @perllibdirs@ piddir = @piddir@ pkgbindir = @pkgbindir@ pkgdocdir = @pkgdocdir@ pkghome = @pkghome@ plugdevdisccfgdir = @plugdevdisccfgdir@ pluginsdir = @pluginsdir@ plugtorruscfgdir = @plugtorruscfgdir@ plugwrapperdir = @plugwrapperdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ reportsdir = @reportsdir@ sbindir = @sbindir@ scriptsdir = @scriptsdir@ seslockdir = @seslockdir@ sesstordir = @sesstordir@ sharedstatedir = @sharedstatedir@ siteconfdir = @siteconfdir@ sitedir = @sitedir@ sitexmldir = @sitexmldir@ srcdir = @srcdir@ supdir = @supdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tmpldir = @tmpldir@ tmpluserdir = @tmpluserdir@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ torrus_user = @torrus_user@ var_group = @var_group@ var_mode = @var_mode@ var_user = @var_user@ varprefix = @varprefix@ webplaindir = @webplaindir@ webscriptsdir = @webscriptsdir@ wrapperdir = @wrapperdir@ SUBDIRS = . bin configs doc examples perllib sup xmlconfig EXTRA_DIST = \ setup_tools/Bundle/Torrus.pm \ setup_tools/replace_rrfw.sh \ setup_tools/configure_fhs \ setup_tools/check_perlthreading.pl noinst_SCRIPTS = \ setup_tools/substvars.sh \ setup_tools/mkvardir.sh \ init.d/torrus dist_tmpl_DATA = \ templates/aclexport.xml \ templates/adminfo.html \ templates/default-chooser.html \ templates/default-dir.html \ templates/default-helptext.html \ templates/default-login.html \ templates/default-recursivedir.html \ templates/default-rrd.html \ templates/default-tset.html \ templates/expanded-dir.html \ templates/globalsearch.html \ templates/overview-subleaves.html \ templates/report-index.html \ templates/report-monthly.html \ templates/report-serviceid.html \ templates/report-yearly.html \ templates/search.html \ templates/html-incblocks.txt \ templates/iframe-rrd.html \ templates/tset-list.html \ templates/email-alarm.txt dist_scripts_DATA = scripts/rrdup_notify.sh xmlscriptsdir = @scriptsdir@/xml dist_xmlscripts_DATA = scripts/xml/extract-skeleton.xsl discoverydir = @sitedir@/discovery dist_discovery_DATA = discovery/README mkvardir = @abs_top_builddir@/setup_tools/mkvardir.sh HTMLDIR = @abs_top_builddir@/../htdocs UPLOADPATH = \ ssinyagin,torrus@web.sourceforge.net:/home/groups/t/to/torrus/htdocs/devel PERLCRITIC_CMD = ${PERLCRITIC} --profile=critic.profile all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): setup_tools/substvars.sh: $(top_builddir)/config.status $(top_srcdir)/setup_tools/substvars.sh.in cd $(top_builddir) && $(SHELL) ./config.status $@ setup_tools/mkvardir.sh: $(top_builddir)/config.status $(top_srcdir)/setup_tools/mkvardir.sh.in cd $(top_builddir) && $(SHELL) ./config.status $@ init.d/torrus: $(top_builddir)/config.status $(top_srcdir)/init.d/torrus.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-dist_discoveryDATA: $(dist_discovery_DATA) @$(NORMAL_INSTALL) @list='$(dist_discovery_DATA)'; test -n "$(discoverydir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(discoverydir)'"; \ $(MKDIR_P) "$(DESTDIR)$(discoverydir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(discoverydir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(discoverydir)" || exit $$?; \ done uninstall-dist_discoveryDATA: @$(NORMAL_UNINSTALL) @list='$(dist_discovery_DATA)'; test -n "$(discoverydir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(discoverydir)'; $(am__uninstall_files_from_dir) install-dist_scriptsDATA: $(dist_scripts_DATA) @$(NORMAL_INSTALL) @list='$(dist_scripts_DATA)'; test -n "$(scriptsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(scriptsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(scriptsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(scriptsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(scriptsdir)" || exit $$?; \ done uninstall-dist_scriptsDATA: @$(NORMAL_UNINSTALL) @list='$(dist_scripts_DATA)'; test -n "$(scriptsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(scriptsdir)'; $(am__uninstall_files_from_dir) install-dist_tmplDATA: $(dist_tmpl_DATA) @$(NORMAL_INSTALL) @list='$(dist_tmpl_DATA)'; test -n "$(tmpldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(tmpldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(tmpldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tmpldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(tmpldir)" || exit $$?; \ done uninstall-dist_tmplDATA: @$(NORMAL_UNINSTALL) @list='$(dist_tmpl_DATA)'; test -n "$(tmpldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(tmpldir)'; $(am__uninstall_files_from_dir) install-dist_xmlscriptsDATA: $(dist_xmlscripts_DATA) @$(NORMAL_INSTALL) @list='$(dist_xmlscripts_DATA)'; test -n "$(xmlscriptsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(xmlscriptsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(xmlscriptsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xmlscriptsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(xmlscriptsdir)" || exit $$?; \ done uninstall-dist_xmlscriptsDATA: @$(NORMAL_UNINSTALL) @list='$(dist_xmlscripts_DATA)'; test -n "$(xmlscriptsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(xmlscriptsdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(SCRIPTS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(discoverydir)" "$(DESTDIR)$(scriptsdir)" "$(DESTDIR)$(tmpldir)" "$(DESTDIR)$(xmlscriptsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-dist_discoveryDATA \ install-dist_scriptsDATA install-dist_tmplDATA \ install-dist_xmlscriptsDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-dist_discoveryDATA uninstall-dist_scriptsDATA \ uninstall-dist_tmplDATA uninstall-dist_xmlscriptsDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-hook dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-generic distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-local install-dist_discoveryDATA \ install-dist_scriptsDATA install-dist_tmplDATA \ install-dist_xmlscriptsDATA install-dvi install-dvi-am \ install-exec install-exec-am 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 installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-dist_discoveryDATA \ uninstall-dist_scriptsDATA uninstall-dist_tmplDATA \ uninstall-dist_xmlscriptsDATA install-data-local: @echo Testing if prefix has changed during make test "$(prefix)" = "@prefix@" $(mkvardir) $(DESTDIR)$(dbhome) $(mkvardir) $(DESTDIR)$(cachedir) $(mkvardir) $(DESTDIR)$(piddir) $(mkvardir) $(DESTDIR)$(reportsdir) $(mkvardir) $(DESTDIR)$(logdir) $(mkvardir) $(DESTDIR)$(sesstordir) $(mkvardir) $(DESTDIR)$(seslockdir) $(mkinstalldirs) $(DESTDIR)$(tmpluserdir) $(mkinstalldirs) $(DESTDIR)$(plugtorruscfgdir) $(mkinstalldirs) $(DESTDIR)$(plugdevdisccfgdir) $(mkinstalldirs) $(DESTDIR)$(plugwrapperdir) htdocs: cd doc; make htdocs @for f in $(dist_mibs_DATA); do \ f2=$(HTMLDIR)/`basename $$f`; \ if test ! -f $$f2 -o $$f -nt $$f2; then \ echo "cp $$f $$f2"; \ cp $$f $$f2; \ fi; \ done upload: dist scp $(distdir).tar.gz TODO $(UPLOADPATH) todoup: scp TODO $(UPLOADPATH) dist-hook: date >DIST_REVISION git branch -vv >>DIST_REVISION cp DIST_REVISION $(distdir)/ critic: @if test ${PERLCRITIC} != no; then \ ${PERLCRITIC_CMD} `egrep -l '^\#..PERL' bin/*.in`; \ ${PERLCRITIC_CMD} perllib/Torrus/; \ else \ echo 'perlcritic command not found'; \ fi # 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: torrus-2.08/init.d/0000755000175000017500000000000012413221021011153 500000000000000torrus-2.08/init.d/torrus.in0000644000175000017500000001272111661302716013003 00000000000000#!@SHELL@ # # init.d script for Torrus # Install it as /etc/init.d/torrus (most UNIXes), # or as /usr/local/etc/rc.d/torrus.sh (FreeBSD), or probably somewhere else. # # Stanislav Sinyagin # # ### chkconfig info # chkconfig: 2345 90 10 # description: Starts/Stops Torrus collectors and monitors ### # ### BEGIN INIT INFO # Provides: collector monitor # Required-Start: $network # Required-Stop: $network # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Torrus collectors and monitors # Description: Start/stop Torrus collectors and monitors ### END INIT INFO prefix=@prefix@ sysconfdir=@sysconfdir@ pkghome=@pkghome@ cmddir=@pkgbindir@ piddir=@piddir@ sitedir=@sitedir@ torrus_config_pl=@cfgdefdir@/torrus-config.pl . @cfgdefdir@/initscript.conf if test -f @siteconfdir@/initscript.siteconf; then . @siteconfdir@/initscript.siteconf fi if test "$TORRUS_CHANGE_UID" = yes -a \ "${LOGNAME:-root}" = root -a \ "@SU@" != "no"; then user=@torrus_user@ su="@SU@ ${user} -c" else su="@SHELL@ -c" fi # Second argument can be the daemon name if test x"$2" = x; then daemons="collector monitor" monitor_cmdopts="$TORRUS_MONITOR_DELAY" all_daemons=yes else daemons=$2 # Third and fourth arguments may be the tree name and instance if test x"$3" != x -a x"$4" != x; then eval trees_${daemons}=$3 eval col_inst_${3}=$4 read_treenames=no fi fi if test x"$TORRUS_COLLECTOR_CMDOPTS" != x; then collector_cmdopts="$TORRUS_COLLECTOR_CMDOPTS" fi if test x${read_treenames} != xno; then # Get the names of the trees for each daemon for d in ${daemons}; do eval trees_${d}=\"`@PERL@ -e 'require "'$torrus_config_pl'"; while((my $key, $val) = each %Torrus::Global::treeConfig) { print "$key " if $val->{run}{'${d}'}; };'`\" done # Get the collector instance numbers for each tree eval trees=\"\$\{trees_collector\}\" for t in ${trees}; do eval col_inst_${t}=\"`@PERL@ -e 'require "'$torrus_config_pl'"; print join(" ", (0 .. $Torrus::Global::treeConfig{'${t}'}{run}{collector}-1))'`\" done fi start_daemons () { for d in ${daemons}; do eval trees=\"\$\{trees_${d}\}\" eval daemon_cmdopts=\"\$\{${d}_cmdopts\}\" for t in ${trees}; do if test ${d} = collector; then eval instances=\"\$\{col_inst_${t}\}\" for i in ${instances}; do echo "starting Torrus collector instance ${i} for tree ${t}" ${su} "${cmddir}/${d} --tree=${t} --instance=${i} \ ${daemon_cmdopts} ${TORRUS_CMDOPTS}" done else echo "starting Torrus ${d} for tree ${t} ${daemon_cmdopts}" ${su} "${cmddir}/${d} --tree=${t} ${daemon_cmdopts} ${TORRUS_CMDOPTS}" fi done done # RHEL based systems (RHEL, CentOS, Fedora) ignore the KXXtorrus script # unless the corresponding lock is present if test -d /var/lock/subsys; then touch /var/lock/subsys/torrus fi } stop_daemons () { tokill="" for d in ${daemons}; do eval trees=\"\$\{trees_${d}\}\" for t in ${trees}; do if test ${d} = collector; then eval instances=\"\$\{col_inst_${t}\}\" for i in ${instances}; do pidfile="${piddir}/${d}.${t}_${i}.pid" if test -r ${pidfile}; then tokill=${tokill}' t='${t}'_'${i}';d='${d} echo "stopping Torrus collector instance ${i} for tree ${t}" pid=`cat ${pidfile}` @KILL@ ${pid} || \ echo "Error: Cannot kill collector instance ${i} for tree ${t}" fi done else pidfile="${piddir}/${d}.${t}.pid" if test -r ${pidfile}; then tokill=${tokill}' t='${t}';d='${d} echo "stopping Torrus ${d} for tree ${t}" pid=`cat ${pidfile}` @KILL@ ${pid} || echo "Error: Cannot kill ${d} for tree ${t}" fi fi done done killed=`echo $tokill | wc -w` notdead=1 kc=$TORRUS_KILL_COUNT while test $killed -gt 0 -a $kc -gt 0; do echo "Sleeping for $TORRUS_KILL_SLEEP seconds to allow processes to exit" @SLEEP@ $TORRUS_KILL_SLEEP echo "Checking for kill resistant processes [$kc/$TORRUS_KILL_COUNT]" kc=`expr $kc - 1` for tuple in $tokill; do eval $tuple pidfile="${piddir}/${d}.${t}.pid" if test -r ${pidfile}; then echo " Sending kill signal to Torrus ${d} for tree ${t}" pid=`cat ${pidfile}` @KILL@ ${pid} || echo "Error: Cannot kill ${d} for tree ${t}" else echo "${d} for ${t} has stopped" killed=`expr $killed - 1` fi done done if test \( $killed -gt 0 \); then echo " Killing Remaining Processes" for tuple in $tokill; do eval $tuple pidfile="${piddir}/${d}.${t}.pid" if test -r ${pidfile}; then echo " Sending final kill -9 to Torrus ${d} for tree ${t}" pid=`cat ${pidfile}` @KILL@ -9 ${pid} || echo "Error: Cannot kill ${d} for tree ${t}" @RM@ -f $pidfile else echo "${d} for ${t} has stopped" fi done fi # RHEL specifics if test x"$all_daemons" = xyes -a -d /var/lock/subsys; then rm -f /var/lock/subsys/torrus fi } case "$1" in 'start') start_daemons ;; 'stop') stop_daemons ;; 'restart') stop_daemons; start_daemons ;; *) echo "Usage: $0 [start|stop|restart] [collector|monitor] [tree]" ;; esac # Local Variables: # mode: shell-script # sh-shell: sh # indent-tabs-mode: nil # sh-basic-offset: 2 # End: torrus-2.08/scripts/0000755000175000017500000000000012413221021011455 500000000000000torrus-2.08/scripts/xml/0000755000175000017500000000000012413221021012255 500000000000000torrus-2.08/scripts/xml/extract-skeleton.xsl0000644000175000017500000000401311545711243016236 00000000000000 This file is a result of extract-skeleton.xsl template torrus-2.08/scripts/rrdup_notify.sh0000644000175000017500000000153711661302716014502 00000000000000#!/bin/sh # # Periodically check if there are RRD files not updated by collector, # and email the warning message. # *.old.rrd files are ignored # Stanislav Sinyagin # # Where the RRD files are located. Separate multiple paths with space RRDSTORAGE=/srv/torrus/collector_rrd # Maximum allowed age of an RRD file, in minutes. MAXAGE=60 # Where to send complaints NOTIFY=root TMPFILE=/tmp/rrdup_notify.$$ cp /dev/null ${TMPFILE} for d in ${RRDSTORAGE}; do find ${d} -name '*.rrd' ! -name '*.old.rrd' \ -mmin +${MAXAGE} -print >>${TMPFILE} done nLines=`wc -l ${TMPFILE} | awk '{print $1}'` if test ${nLines} -gt 0; then cat ${TMPFILE} | \ mail -s "`printf \"Warning: %d aged RRD files\" ${nLines}`" ${NOTIFY} fi rm ${TMPFILE} # Local Variables: # mode: shell-script # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/configure0000755000175000017500000037161112413220735011641 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for torrus 2.08. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: ssinyagin@users.sourceforge.net about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='torrus' PACKAGE_TARNAME='torrus' PACKAGE_VERSION='2.08' PACKAGE_STRING='torrus 2.08' PACKAGE_BUGREPORT='ssinyagin@users.sourceforge.net' PACKAGE_URL='' ac_subst_vars='LTLIBOBJS LIBOBJS defrrddir mansec_misc mansec_usercmd wrapperdir sesstordir seslockdir reportsdir dbhome cachedir varprefix piddir logdir sitexmldir tmpluserdir siteconfdir sitedir distxmldir tmpldir webscriptsdir webplaindir supdir scriptsdir plugwrapperdir plugdevdisccfgdir plugtorruscfgdir pluginsdir perllibdir exmpdir pkgdocdir cfgdefdir pkgbindir pkghome enable_varperm var_mode var_group var_user torrus_user perlithreads perllibdirs PERLINC enable_pkgonly POD2MAN_PRESENT_FALSE POD2MAN_PRESENT_TRUE POD2MAN POD2TEXT_PRESENT_FALSE POD2TEXT_PRESENT_TRUE POD2TEXT SLEEP RM FIND SED KILL SU PERLCRITIC PERL am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_pkgonly enable_threads with_rrdtool enable_varperm ' ac_precious_vars='build_alias host_alias target_alias PERLINC torrus_user var_user var_group var_mode pkghome pkgbindir cfgdefdir pkgdocdir exmpdir perllibdir pluginsdir plugtorruscfgdir plugdevdisccfgdir plugwrapperdir scriptsdir supdir webplaindir webscriptsdir tmpldir distxmldir sitedir siteconfdir tmpluserdir sitexmldir logdir piddir varprefix cachedir dbhome reportsdir seslockdir sesstordir wrapperdir mansec_usercmd mansec_misc defrrddir' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures torrus 2.08 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/torrus] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of torrus 2.08:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-pkgonly Skip all checking --disable-threads Disable Perl threads usage --disable-varperm Disable db and cache access rights tuning Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-rrdtool=DIR RRDTool location Some influential environment variables: PERLINC [] Additional space-separated Perl library paths torrus_user [torrus] UID to run the daemons var_user [TORRUS_USER] Owner of db and cache directories var_group [torrus] Group of db and cache directories var_mode [775] Mode of db and cache directories pkghome [PREFIX/torrus] Place for Torrus static files pkgbindir [PKGHOME/bin] Torrus executables cfgdefdir [PKGHOME/conf_defaults] torrus-config.pl and others pkgdocdir [PKGHOME/doc] Documentation files exmpdir [PKGHOME/examples] Examples perllibdir [PKGHOME/perllib] Torrus Perl libraries pluginsdir [PKGHOME/plugins] Plugin configurations plugtorruscfgdir [PLUGINSDIR/torrus-config] plugdevdisccfgdir [PLUGINSDIR/devdiscover-config] plugwrapperdir [PLUGINSDIR/wrapper] scriptsdir [PKGHOME/scripts] Script files supdir [PKGHOME/sup] Supplementary files webplaindir [SUPDIR/webplain] Web interface plain files path webscriptsdir [SUPDIR/webscripts] Directory for optional web scripts tmpldir [PKGHOME/templates] Template files distxmldir [PKGHOME/xmlconfig] Distribution XML config files sitedir [SYSCONFDIR/torrus] Site configuration files siteconfdir [SITEDIR/conf] Site configuration files tmpluserdir [SITEDIR/templates] User-defined Template files sitexmldir [SITEDIR/xmlconfig] Site XML configs logdir [/var/log/torrus] Log files piddir [/var/run/torrus] PID files varprefix [/var/torrus] Common prefix for runtime data cachedir [VARPREFIX/cache] Renderer cache dbhome [VARPREFIX/db] Berkeley DB files reportsdir [VARPREFIX/reports] Reports output seslockdir [VARPREFIX/session_data/lock] Web session locks sesstordir [VARPREFIX/session_data/store] Web session storage wrapperdir [BINDIR] CLI wrapper mansec_usercmd [1] User commands man section mansec_misc [7] Miscellaneous man section defrrddir [/srv/torrus/collector_rrd] Default RRD storage path Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF torrus configure 2.08 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by torrus $as_me 2.08, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in conftools "$srcdir"/conftools; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in conftools \"$srcdir\"/conftools" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='torrus' VERSION='2.08' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "perlcritic", so it can be a program name with args. set dummy perlcritic; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PERLCRITIC+:} false; then : $as_echo_n "(cached) " >&6 else case $PERLCRITIC in [\\/]* | ?:[\\/]*) ac_cv_path_PERLCRITIC="$PERLCRITIC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERLCRITIC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PERLCRITIC" && ac_cv_path_PERLCRITIC="no" ;; esac fi PERLCRITIC=$ac_cv_path_PERLCRITIC if test -n "$PERLCRITIC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERLCRITIC" >&5 $as_echo "$PERLCRITIC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Need this for init.torrus # Extract the first word of "su", so it can be a program name with args. set dummy su; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SU+:} false; then : $as_echo_n "(cached) " >&6 else case $SU in [\\/]* | ?:[\\/]*) ac_cv_path_SU="$SU" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SU="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SU" && ac_cv_path_SU="no" ;; esac fi SU=$ac_cv_path_SU if test -n "$SU"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SU" >&5 $as_echo "$SU" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "kill", so it can be a program name with args. set dummy kill; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_KILL+:} false; then : $as_echo_n "(cached) " >&6 else case $KILL in [\\/]* | ?:[\\/]*) ac_cv_path_KILL="$KILL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_KILL" && ac_cv_path_KILL="no" ;; esac fi KILL=$ac_cv_path_KILL if test -n "$KILL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KILL" >&5 $as_echo "$KILL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else case $SED in [\\/]* | ?:[\\/]*) ac_cv_path_SED="$SED" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SED" && ac_cv_path_SED="no" ;; esac fi SED=$ac_cv_path_SED if test -n "$SED"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 $as_echo "$SED" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "find", so it can be a program name with args. set dummy find; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_FIND+:} false; then : $as_echo_n "(cached) " >&6 else case $FIND in [\\/]* | ?:[\\/]*) ac_cv_path_FIND="$FIND" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_FIND" && ac_cv_path_FIND="no" ;; esac fi FIND=$ac_cv_path_FIND if test -n "$FIND"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5 $as_echo "$FIND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RM+:} false; then : $as_echo_n "(cached) " >&6 else case $RM in [\\/]* | ?:[\\/]*) ac_cv_path_RM="$RM" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_RM" && ac_cv_path_RM="no" ;; esac fi RM=$ac_cv_path_RM if test -n "$RM"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 $as_echo "$RM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "sleep", so it can be a program name with args. set dummy sleep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SLEEP+:} false; then : $as_echo_n "(cached) " >&6 else case $SLEEP in [\\/]* | ?:[\\/]*) ac_cv_path_SLEEP="$SLEEP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SLEEP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SLEEP" && ac_cv_path_SLEEP="no" ;; esac fi SLEEP=$ac_cv_path_SLEEP if test -n "$SLEEP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SLEEP" >&5 $as_echo "$SLEEP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # This will generate doc pages from POD sources # Extract the first word of "pod2text", so it can be a program name with args. set dummy pod2text; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_POD2TEXT+:} false; then : $as_echo_n "(cached) " >&6 else case $POD2TEXT in [\\/]* | ?:[\\/]*) ac_cv_path_POD2TEXT="$POD2TEXT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_POD2TEXT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_POD2TEXT" && ac_cv_path_POD2TEXT="no" ;; esac fi POD2TEXT=$ac_cv_path_POD2TEXT if test -n "$POD2TEXT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POD2TEXT" >&5 $as_echo "$POD2TEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$POD2TEXT" != no; then POD2TEXT_PRESENT_TRUE= POD2TEXT_PRESENT_FALSE='#' else POD2TEXT_PRESENT_TRUE='#' POD2TEXT_PRESENT_FALSE= fi # Extract the first word of "pod2man", so it can be a program name with args. set dummy pod2man; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_POD2MAN+:} false; then : $as_echo_n "(cached) " >&6 else case $POD2MAN in [\\/]* | ?:[\\/]*) ac_cv_path_POD2MAN="$POD2MAN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_POD2MAN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_POD2MAN" && ac_cv_path_POD2MAN="no" ;; esac fi POD2MAN=$ac_cv_path_POD2MAN if test -n "$POD2MAN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POD2MAN" >&5 $as_echo "$POD2MAN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$POD2MAN" != no; then POD2MAN_PRESENT_TRUE= POD2MAN_PRESENT_FALSE='#' else POD2MAN_PRESENT_TRUE='#' POD2MAN_PRESENT_FALSE= fi # Check whether --enable-pkgonly was given. if test "${enable_pkgonly+set}" = set; then : enableval=$enable_pkgonly; fi # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then : enableval=$enable_threads; fi perllibdirs="\'\${perllibdir}\'" PERLOPTS= if test ! -z "$PERLINC"; then for d in $PERLINC; do PERLOPTS="${PERLOPTS} -I${d}" perllibdirs=${perllibdirs}"\,\'"${d}"\'" done fi find_rrdtool () { if ${PERL} -e 'use RRDs' 2>/dev/null; then :; else if test "$enable_pkgonly" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: RRDs.pm is not in default Perl search paths." >&5 $as_echo "$as_me: RRDs.pm is not in default Perl search paths." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking RRDtool in /usr/local/rrdtool*" >&5 $as_echo_n "checking RRDtool in /usr/local/rrdtool*... " >&6; } with_rrdtool=`ls -1dr /usr/local/rrdtool* | head -1` if test -d $with_rrdtool; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_rrdtool}" >&5 $as_echo "${with_rrdtool}" >&6; } else as_fn_error $? "Cannot find RRDtool" "$LINENO" 5 fi test_rrdtool else with_rrdtool="/usr/local/rrdtool" fi fi } test_rrdtool () { if test "$enable_pkgonly" != yes; then if ${PERL} -I${with_rrdtool}/lib/perl -e 'use RRDs'; then :; else as_fn_error $? "Could not find RRDs perl module in ${with_rrdtool}" "$LINENO" 5 fi fi perllibdirs=${perllibdirs}"\,\'"${with_rrdtool}"/lib/perl/\'" } # Check whether --with-rrdtool was given. if test "${with_rrdtool+set}" = set; then : withval=$with_rrdtool; test_rrdtool else find_rrdtool fi perllibdirs=${perllibdirs} # Check the necessary Perl modules if test "$enable_pkgonly" != yes; then for module in 'BerkeleyDB' 'XML::LibXML' 'Template' \ 'Proc::Daemon' 'Net::SNMP' 'URI::Escape' 'Apache::Session' \ 'Date::Parse' 'JSON' do { $as_echo "$as_me:${as_lineno-$LINENO}: checking presence of $module" >&5 $as_echo_n "checking presence of $module... " >&6; } if ${PERL} ${PERLOPTS} -e 'use '$module 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Ok" >&5 $as_echo "Ok" >&6; } else as_fn_error $? "Perl cannot find $module" "$LINENO" 5; fi done # Check if Perl threads can be used. # Requirements are: perl 5.8.8 with threads compiled, # threads ver. 1.41 or higher, threads::shared ver. 1.03 or higher perlithreads=1 if test x"$enable_threads" = xno; then perlithreads=0 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Perl version is 5.8.8 or higher" >&5 $as_echo_n "checking if Perl version is 5.8.8 or higher... " >&6; } if ${PERL} ${PERLOPTS} -e 'use 5.8.8' 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Ok" >&5 $as_echo "Ok" >&6; } else perlithreads=0 fi if test ${perlithreads} -eq 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking threading support in Perl" >&5 $as_echo_n "checking threading support in Perl... " >&6; } if ${PERL} ${PERLOPTS} -e 'use threads' 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Ok" >&5 $as_echo "Ok" >&6; } else perlithreads=0 fi fi if test ${perlithreads} -eq 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if threads module version is 1.41 or higher" >&5 $as_echo_n "checking if threads module version is 1.41 or higher... " >&6; } if ${PERL} ${PERLOPTS} -e \ 'use threads; exit($threads::VERSION >= 1.41 ? 0:1)'; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Ok" >&5 $as_echo "Ok" >&6; } else perlithreads=0 fi fi if test ${perlithreads} -eq 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if threads::shared module version is 1.03 or higher" >&5 $as_echo_n "checking if threads::shared module version is 1.03 or higher... " >&6; } if ${PERL} ${PERLOPTS} -e \ 'use threads; use threads::shared; exit($threads::shared::VERSION >= 1.03 ? 0:1)'; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Ok" >&5 $as_echo "Ok" >&6; } else perlithreads=0 fi fi if test ${perlithreads} -eq 0; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: No. Multithreading will not be used." >&5 $as_echo "No. Multithreading will not be used." >&6; } fi fi perlithreads=${perlithreads} fi if test -z "$torrus_user"; then torrus_user=torrus; fi if test "$enable_pkgonly" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if user ${torrus_user} exists" >&5 $as_echo_n "checking if user ${torrus_user} exists... " >&6; } torrus_check_file=torrus_usercheck_$$ torrus_check_error=no if ! touch ${torrus_check_file}; then as_fn_error $? "Cannot create ${torrus_check_file}" "$LINENO" 5 elif ! chown ${torrus_user} ${torrus_check_file}; then torrus_check_error=yes fi rm -f ${torrus_check_file} if test ${torrus_check_error} = yes; then as_fn_error $? "User ${torrus_user} does not exist" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Ok" >&5 $as_echo "Ok" >&6; } fi fi # Set the var/db and var/cache ownership # Check whether --enable-varperm was given. if test "${enable_varperm+set}" = set; then : enableval=$enable_varperm; else enable_varperm="yes" fi if test -z "$pkghome"; then pkghome='${prefix}/torrus'; fi if test -z "$pkgbindir"; then pkgbindir='${pkghome}/bin'; fi if test -z "$cfgdefdir"; then cfgdefdir='${pkghome}/conf_defaults'; fi if test -z "$pkgdocdir"; then pkgdocdir='${pkghome}/doc'; fi if test -z "$exmpdir"; then exmpdir='${pkghome}/examples'; fi if test -z "$perllibdir"; then perllibdir='${pkghome}/perllib'; fi if test -z "$pluginsdir"; then pluginsdir='${pkghome}/plugins'; fi if test -z "$plugtorruscfgdir"; then plugtorruscfgdir='${pluginsdir}/torrus-config'; fi if test -z "$plugdevdisccfgdir"; then plugdevdisccfgdir='${pluginsdir}/devdiscover-config'; fi if test -z "$plugwrapperdir"; then plugwrapperdir='${pluginsdir}/wrapper'; fi if test -z "$scriptsdir"; then scriptsdir='${pkghome}/scripts'; fi if test -z "$supdir"; then supdir='${pkghome}/sup'; fi if test -z "$webplaindir"; then webplaindir='${supdir}/webplain'; fi if test -z "$webscriptsdir"; then webscriptsdir='${supdir}/webscripts'; fi if test -z "$tmpldir"; then tmpldir='${pkghome}/templates'; fi if test -z "$distxmldir"; then distxmldir='${pkghome}/xmlconfig'; fi if test -z "$sitedir"; then sitedir='${sysconfdir}/torrus'; fi if test -z "$siteconfdir"; then siteconfdir='${sitedir}/conf'; fi if test -z "$tmpluserdir"; then tmpluserdir='${sitedir}/templates'; fi if test -z "$sitexmldir"; then sitexmldir='${sitedir}/xmlconfig'; fi if test -z "$logdir"; then logdir='/var/log/torrus'; fi if test -z "$piddir"; then piddir='/var/run/torrus'; fi if test -z "$varprefix"; then varprefix='/var/torrus'; fi if test -z "$cachedir"; then cachedir='${varprefix}/cache'; fi if test -z "$dbhome"; then dbhome='${varprefix}/db'; fi if test -z "$reportsdir"; then reportsdir='${varprefix}/reports'; fi if test -z "$seslockdir"; then seslockdir='${varprefix}/session_data/lock'; fi if test -z "$sesstordir"; then sesstordir='${varprefix}/session_data/store'; fi if test -z "$wrapperdir"; then wrapperdir='${bindir}'; fi if test -z "$mansec_usercmd"; then mansec_usercmd='1'; fi if test -z "$mansec_misc"; then mansec_misc='7'; fi if test -z "$defrrddir"; then defrrddir='/srv/torrus/collector_rrd'; fi ac_config_files="$ac_config_files Makefile bin/Makefile configs/Makefile" ac_config_files="$ac_config_files doc/Makefile doc/manpages/Makefile" ac_config_files="$ac_config_files examples/Makefile perllib/Makefile" ac_config_files="$ac_config_files sup/Makefile xmlconfig/Makefile" ac_config_files="$ac_config_files setup_tools/substvars.sh" ac_config_files="$ac_config_files setup_tools/mkvardir.sh" ac_config_files="$ac_config_files init.d/torrus" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${POD2TEXT_PRESENT_TRUE}" && test -z "${POD2TEXT_PRESENT_FALSE}"; then as_fn_error $? "conditional \"POD2TEXT_PRESENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${POD2MAN_PRESENT_TRUE}" && test -z "${POD2MAN_PRESENT_FALSE}"; then as_fn_error $? "conditional \"POD2MAN_PRESENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by torrus $as_me 2.08, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ torrus config.status 2.08 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; "configs/Makefile") CONFIG_FILES="$CONFIG_FILES configs/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/manpages/Makefile") CONFIG_FILES="$CONFIG_FILES doc/manpages/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "perllib/Makefile") CONFIG_FILES="$CONFIG_FILES perllib/Makefile" ;; "sup/Makefile") CONFIG_FILES="$CONFIG_FILES sup/Makefile" ;; "xmlconfig/Makefile") CONFIG_FILES="$CONFIG_FILES xmlconfig/Makefile" ;; "setup_tools/substvars.sh") CONFIG_FILES="$CONFIG_FILES setup_tools/substvars.sh" ;; "setup_tools/mkvardir.sh") CONFIG_FILES="$CONFIG_FILES setup_tools/mkvardir.sh" ;; "init.d/torrus") CONFIG_FILES="$CONFIG_FILES init.d/torrus" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac case $ac_file$ac_mode in "setup_tools/substvars.sh":F) chmod +x setup_tools/substvars.sh ;; "setup_tools/mkvardir.sh":F) chmod +x setup_tools/mkvardir.sh ;; "init.d/torrus":F) chmod +x init.d/torrus ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi VARSAVE=configs/instvars echo creating $VARSAVE rm -f $VARSAVE for VAR in $ac_subst_vars; do case ${VAR} in DEFS | PACKAGE* | INSTALL* | VERSION | ACLOCAL | AUTO* | MAKEINFO |\ install_sh | AM* | am* | ac* | ECHO* | build* | host* | target* |\ CYG* | PATH_SEPARATOR | AWK | STRIP | mkdir* |\ perllibdirs ) ;; *) eval 'VAL=${'$VAR'}' echo ${VAR}=\'${VAL}\' >>$VARSAVE ;; esac done torrus-2.08/examples/0000755000175000017500000000000012413221022011605 500000000000000torrus-2.08/examples/README0000644000175000017500000000066111545711243012426 00000000000000Some useful exmples of Torrus configuration and usage. XML configuration examples reside in xmlconfig/examples. *.xupdate.xml files are examples of XUpdate usage to modify the XML files generated by devdiscover. See also: Torrus User Guide XUpdate specification: http://www.xmldb.org/xupdate/ XUpdate implementation in Perl by Petr Pajas: XML::XUpdate::LibXML XML Editing shell by Petr Pajas: http://xsh.sourceforge.net/ torrus-2.08/examples/onms.tmpl0000644000175000017500000000341611545711243013421 00000000000000[%# Template-Toolkit template for OpenNMS Torrus config generation. Author: Gustavo Torres $Id$ %] [% PROCESS $data %] [% FOREACH interface = ifs %] [% FOREACH svc = interface.services; IF svc.name == 'icmp' %] [% ELSE %] [% END; END %] [% END %] torrus-2.08/examples/onmsInterfaces.sh0000644000175000017500000000360711661302716015065 00000000000000#!/bin/sh # Copyright (C) 2004 Gustavo Torres # Copyright (C) 2004 Stanislav Sinyagin # # 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. # Gustavo Torres # Stanislav Sinyagin # # This shell script extracts OpenNMS information about interfaces # and builds the data file which you can use with onms.tmpl to generate # Torrus XML configuration. # Usage (RESPONCEDIR setting may be skipped if it's in the default path) # # RESPONCEDIR=/var/opennms/rrd/response # export RESPONCEDIR # cd /usr/local/torrus-0.1/share/torrus/ # ./examples/onmsInterfaces.sh > onms.data # tpage --define data=onms.data examples/onms.tmpl > xmlconfig/onms.xml if test x"$RESPONCEDIR" = x""; then RESPONCEDIR=/var/opennms/rrd/response fi echo '[% responcedir = "'$RESPONCEDIR'" %]' echo '[% ifs = [' for ipaddr in `ls ${RESPONCEDIR}`; do echo " { addr => '$i',"; echo " services => ["; for service in `ls ${RESPONCEDIR}/$i | awk -F. '{print $1}'`; do echo -n " {name => '${service}', " legend=`echo $j | awk '{print toupper($1)}'` echo "legend => '${legend}'}" done echo ' ]'; echo ' }'; done echo '] %]' # Local Variables: # mode: shell-script # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/examples/Makefile.in0000644000175000017500000003276012413220736013615 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } 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 = : build_triplet = @build@ host_triplet = @host@ subdir = examples DIST_COMMON = README $(dist_examples_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in 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) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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__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 -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(dist_examples_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ FIND = @FIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KILL = @KILL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ 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@ PERLCRITIC = @PERLCRITIC@ PERLINC = @PERLINC@ POD2MAN = @POD2MAN@ POD2TEXT = @POD2TEXT@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SLEEP = @SLEEP@ STRIP = @STRIP@ SU = @SU@ VERSION = @VERSION@ 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__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cachedir = @cachedir@ cfgdefdir = @cfgdefdir@ datadir = @datadir@ datarootdir = @datarootdir@ dbhome = @dbhome@ defrrddir = @defrrddir@ distxmldir = @distxmldir@ docdir = @docdir@ dvidir = @dvidir@ enable_pkgonly = @enable_pkgonly@ enable_varperm = @enable_varperm@ exec_prefix = @exec_prefix@ exmpdir = @exmpdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mansec_misc = @mansec_misc@ mansec_usercmd = @mansec_usercmd@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ perlithreads = @perlithreads@ perllibdir = @perllibdir@ perllibdirs = @perllibdirs@ piddir = @piddir@ pkgbindir = @pkgbindir@ pkgdocdir = @pkgdocdir@ pkghome = @pkghome@ plugdevdisccfgdir = @plugdevdisccfgdir@ pluginsdir = @pluginsdir@ plugtorruscfgdir = @plugtorruscfgdir@ plugwrapperdir = @plugwrapperdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ reportsdir = @reportsdir@ sbindir = @sbindir@ scriptsdir = @scriptsdir@ seslockdir = @seslockdir@ sesstordir = @sesstordir@ sharedstatedir = @sharedstatedir@ siteconfdir = @siteconfdir@ sitedir = @sitedir@ sitexmldir = @sitexmldir@ srcdir = @srcdir@ supdir = @supdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tmpldir = @tmpldir@ tmpluserdir = @tmpluserdir@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ torrus_user = @torrus_user@ var_group = @var_group@ var_mode = @var_mode@ var_user = @var_user@ varprefix = @varprefix@ webplaindir = @webplaindir@ webscriptsdir = @webscriptsdir@ wrapperdir = @wrapperdir@ examplesdir = $(exmpdir) dist_examples_DATA = \ README \ onms.tmpl \ onmsInterfaces.sh \ torrus-siteconfig.powerbook.pl \ setmonitor.xupdate.xml 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) --gnu examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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_examplesDATA: $(dist_examples_DATA) @$(NORMAL_INSTALL) @list='$(dist_examples_DATA)'; test -n "$(examplesdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(examplesdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(examplesdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-dist_examplesDATA: @$(NORMAL_UNINSTALL) @list='$(dist_examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(examplesdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(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 $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)"; 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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-dist_examplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: 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_examplesDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_examplesDATA install-dvi install-dvi-am \ install-exec install-exec-am 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 uninstall uninstall-am \ uninstall-dist_examplesDATA # 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: torrus-2.08/examples/setmonitor.xupdate.xml0000644000175000017500000000316311545711243016144 00000000000000 This file was modified with XUpdate script setmonitor.xupdate.xml ifErrors torrus-2.08/examples/torrus-siteconfig.powerbook.pl0000644000175000017500000000262111661302716017575 00000000000000# Torrus Site config. Put all your site specifics here. # You need to stop and start Apache server every time you change this file. # # An example using the rainbow-schema overlay. # Shawn Ferry # # (ssinyagin) You can use statements like these from inside your # XML configurations: # # Besides, "devdiscover" discovery tool will soon support most # of these vendor definitions. # @(#) 10/18/03 torrus-siteconfig.pl 1.3 (10/18/03 18:44:31) sferry @Torrus::Global::xmlAlwaysIncludeFirst = qw( defaults.xml snmp-defs.xml collector-periods.xml vendor/cisco.ios.xml generic/rfc2790.host-resources.xml generic/rfc1213.xml vendor/ucd-snmp.xml ); %Torrus::Global::treeConfig = ( 'powerbook' => { 'description' => 'Powerbook Laptop Tree', 'xmlfiles' => [qw( powerbook/powerbook-defaults.xml powerbook/powerbook-ti.xml )], 'run' => { 'collector' => 1, } }, ); # CLOSE %Torrus::Global::treeConfig # Override values in the current schema with those in # rainbow schema, schema changes require an apache restart $Torrus::Renderer::stylingProfileOverlay = "rainbow-schema"; 1; torrus-2.08/examples/Makefile.am0000644000175000017500000000167511661302716013610 00000000000000 # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # examplesdir = $(exmpdir) dist_examples_DATA = \ README \ onms.tmpl \ onmsInterfaces.sh \ torrus-siteconfig.powerbook.pl \ setmonitor.xupdate.xml torrus-2.08/aclocal.m40000644000175000017500000005535612413220734011576 00000000000000# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, # Inc. # This file 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. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software # Foundation, Inc. # # This file 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. # serial 1 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file 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. # serial 1 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file 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. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, # Inc. # # This file 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. # serial 1 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file 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. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, # Inc. # # This file 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. # serial 1 # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software # Foundation, Inc. # # This file 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. # serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file 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. # serial 1 # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file 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. # serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file 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. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR torrus-2.08/TODO0000644000175000017500000000002311656000215010401 00000000000000Torrus to-do list torrus-2.08/templates/0000755000175000017500000000000012413221021011764 500000000000000torrus-2.08/templates/default-dir.html0000644000175000017500000000423311545711243015013 00000000000000[% PROCESS 'html-incblocks.txt' %] [% thepath=path(token) %] [% INCLUDE htmlstart title=thepath printpath=1 %]

[% xmlnorm(nodeParam(token,'comment')) %]

[% INCLUDE legend %]

Directories you can jump to:

[% hasLeaves = 0; hasSubtrees = 0; childCounter = 0; evenRow = 0; FOREACH child = sortTokens(children(token)); hidden = 0; IF nodeParam(child,'hidden') == 'yes'; hidden = 1; END; comment = nodeParam(child,'comment',1); IF not hidden or variables.SHOWHIDDEN; childCounter = childCounter + 1; evenRow = childCounter % 2 == 0; IF isLeaf(child); hasLeaves = hasLeaves + 1; ELSE; IF isAlias(child); thisIsAlias = 1; urlTitle=' TITLE="Symbolic link to ' _ path(isAlias(child)) _'"'; IF isLeaf(isAlias(child)); hasLeaves = hasLeaves + 1; END; ELSE; hasSubtrees = 1; urlTitle = ''; END; END; %]
[% thisIsAlias ? '':''; hidden ? '':'' %] [% nodeName(child) %] [% hidden ? '':''; thisIsAlias ? '':''; %] [% IF comment %] [% hidden ? '':'' %] [% xmlnorm(comment) %] [% hidden ? '':'' %] [% END %]
[% END %] [% END %]
[% IF hasLeaves > 1; INCLUDE shortcut url=url(token, 'expanded-dir-html') text="Expand leaves" title="Show all leaf graphs in one page"; END; IF hasSubtrees and nodeParam(token,'show-recursive',1) == 'yes'; INCLUDE shortcut url=url(token, 'recursive-dir-html') text="Recursive view" title="Show all subtrees and leaves in one page"; END; INCLUDE overviewShortcuts %]
[% INCLUDE bottomline %] [% INCLUDE htmlend %] torrus-2.08/templates/default-chooser.html0000644000175000017500000000152511545711243015700 00000000000000[% PROCESS 'html-incblocks.txt' %] [% INCLUDE htmlstart title="Torrus Top: " _ companyName contentClass="SingleColumnContent" noTopMenu=1 %]

Choose the datasource tree

[% counter = 0; evenRow = 0; FOREACH tree = treeNames(); IF not userAuth or mayDisplayTree(tree); counter = counter + 1; IF counter % 2 == 0; evenRow = 1; ELSE; evenRow = 0; END; %]
[% tree %] [% xmlnorm(treeDescr(tree)) %]
[% END %] [% END %]
[% global.contentFinished = 1 %]
[% INCLUDE globalsearchdialog %]
[% INCLUDE htmlend %] torrus-2.08/templates/expanded-dir.html0000644000175000017500000000244511545711243015162 00000000000000[% PROCESS 'html-incblocks.txt' %] [% INCLUDE setdate %] [% thepath=path(token) %] [% INCLUDE htmlstart title=thepath printpath=1 %]

[% xmlnorm(nodeParam(token,'comment')) %]

[% INCLUDE variables %] [% INCLUDE legend %]

Leaf nodes:

[% FOREACH child = sortTokens(children(token)); IF isLeaf(child); INCLUDE shortgraph token=child nodename=nodeName(child) comment=nodeParam(child,'comment',1); ELSIF isAlias(child); atoken=isAlias(child); IF isLeaf(atoken); INCLUDE shortgraph token=atoken nodename=nodeName(atoken) comment=path(atoken); END; END; END; %]
[% IF global.hwpredict; IF variables.NOHW; INCLUDE shortcut url=url(token, view, 'NOHW', '') text="Enable Holt-Winters" title="Switch Holt-Winters prediction boundaries"; ELSE; INCLUDE shortcut url=url(token, view, 'NOHW', 1) text="Disable Holt-Winters" title="Switch Holt-Winters prediction boundaries"; END; END %] [% INCLUDE shortcut url=url(token) text="Default view" title="Restore default subtree view" %]
[% INCLUDE bottomline %] [% INCLUDE htmlend %] torrus-2.08/templates/default-tset.html0000644000175000017500000000435212413217640015213 00000000000000[% PROCESS 'html-incblocks.txt' %] [% INCLUDE setdate %] [% comment = xmlnorm(param(token, 'comment')) %] [% INCLUDE htmlstart title=comment contentClass="SingleColumnContent" %]

[% comment %]

[% INCLUDE treename %] [% INCLUDE variables %] [% SET pos = 1; SET global.hwpredict = 0 %] [% FOREACH node = sortTokens(tsetMembers(token)) %] [% IF pos == 1 %]
[% ELSE %]
[% END %] [% nodename=nodeParam(node,'descriptive-nickname'); IF nodename==''; nodename=path(node); END; comment=nodeParam(parent(node),'comment',1); %]
[%IF comment%]
[%xmlnorm(comment)%]
[%END%] [% nodeView = param(token,'rrgraph-view'); IF nodeView==''; nodeView = nodeParam(node,'rrgraph-views').split(',').0; END; nodevars = []; IF nodeParam(node, 'rrd-hwpredict') == 'enabled' and param(nodeView, 'rrd-hwpredict') != 'disabled'; global.hwpredict = 1; IF variables.NOHW; nodevars = ['NOHW', 1]; ELSE; nodevars = ['NOHW', '']; END; END %]
[% IF pos == 1 %] [% SET pos = 2 %] [% ELSE %] [% SET pos = 1 %] [% END %] [% END %]
[% IF global.hwpredict; IF variables.NOHW; INCLUDE shortcut url=url(token, view, 'NOHW', '') text="Enable Holt-Winters" title="Switch Holt-Winters prediction boundaries"; ELSE; INCLUDE shortcut url=url(token, view, 'NOHW', 1) text="Disable Holt-Winters" title="Switch Holt-Winters prediction boundaries"; END; END %] [% INCLUDE shortcut url=url('SS') text="Back to tokensets list" title="List of non-empty tokensets"%]
[% INCLUDE tsetbottomline %] [% INCLUDE htmlend %] torrus-2.08/templates/overview-subleaves.html0000644000175000017500000000241211545711243016445 00000000000000[% PROCESS 'html-incblocks.txt' %] [% INCLUDE setdate %] [% ovs=variables.OVS; clearVar('OVS'); global.bookmarkVars=['OVS',ovs]; thepath=path(token) %] [% INCLUDE htmlstart title=thepath printpath=1 %]

[% p = 'overview-page-title-' _ ovs; nodeParam(token, p, 1) %]

[% INCLUDE variables %] [% INCLUDE legend %] [% FOREACH child = sortTokens(children(token)); childpath = path(child); p = 'overview-subleave-name-' _ ovs; FOREACH childname = nodeParam(token, p,1).split('\s*,\s*'); ovwpath = childpath _ childname; IF nodeExists(ovwpath); ovwtoken = pathToken(ovwpath); urltoken = ovwtoken; p = 'overview-direct-link-' _ ovs; IF nodeParam(token, p, 1) == 'yes'; urltoken = child; p = 'overview-direct-link-view-' _ ovs; urlview = nodeParam(token, p, 1); END; INCLUDE shortgraph token=ovwtoken urltoken=urltoken urlview=urlview nodename=nodeName(child) comment=nodeParam(child,'comment',1); END; END; END %]
[% INCLUDE shortcut url=url(token) text="Default view" title="Restore default subtree view" %]
[% INCLUDE bottomline %] [% INCLUDE htmlend %] torrus-2.08/templates/default-recursivedir.html0000644000175000017500000000257511545711243016752 00000000000000[% PROCESS 'html-incblocks.txt' %] [% thepath=path(token) %] [% INCLUDE htmlstart title=thepath printpath=1 %]

[% xmlnorm(nodeParam(token,'comment')) %]

[% INCLUDE legend %] [%# ########### Recursively print the children ################ %] [% BLOCK recursiveChildren; FOREACH child = sortTokens(children(token)); hidden = 0; IF nodeParam(child,'hidden') == 'yes'; hidden = 1; END; IF isAlias(child); thisIsAlias = 1; urlTitle = 'Symbolic link to ' _ path(isAlias(child)); ELSE; urlTitle = nodeParam(child,'comment',1); END; IF not hidden or variables.SHOWHIDDEN; %]
[% thisIsAlias ? '':''; hidden ? '':'' %] [% nodeName(child) %] [% hidden ? '':''; thisIsAlias ? '':''; %] [% INCLUDE recursiveChildren token=child %]
[% END; END; END %]

Directories you can jump to:

[% INCLUDE recursiveChildren token=token %]
[% INCLUDE shortcut url=url(token) text="Default view" title="Restore default subtree view"; INCLUDE overviewShortcuts %]
[% INCLUDE bottomline %] [% INCLUDE htmlend %] torrus-2.08/templates/report-index.html0000644000175000017500000000120511545711243015227 00000000000000[% PROCESS 'html-incblocks.txt' %] [% INCLUDE htmlstart title="Torrus Reports" contentClass="SingleColumnContent" noTopMenu=1 %]

Torrus reports

[% INCLUDE treename %] [% rowCount = 0; FOREACH yr = data.keys.sort; rowCount = rowCount + 1; IF rowCount % 2 %] [% ELSE %] [% END %] [% END %]
Year
[% yr %]
[% INCLUDE htmlend %] torrus-2.08/templates/search.html0000644000175000017500000000216111567655764014101 00000000000000[% PROCESS 'html-incblocks.txt' %] [% global.SearchString = variables.SEARCH; clearVar('SEARCH') %] [% INCLUDE htmlstart title='Search results: ' _ global.SearchString contentClass="SingleColumnContent" %]

Search results: [% global.SearchString %]

[% INCLUDE treename %]
[% results = searchResults(global.SearchString); counter = 0; FOREACH entry = results; counter = counter + 1; IF counter % 2 == 0; evenRow = 1; ELSE; evenRow = 0; END; etoken = pathToken(entry.0); NEXT UNLESS etoken; %]
[% entry.0 %] [% IF entry.1; entry.1 _ ': ' _ xmlnorm(nodeParam(etoken, entry.1)); END %]
[% END %]
[% global.contentFinished = 1 %]
[% INCLUDE shortcut url=url(pathToken('/')) text="Datasources tree" title="Back to the datasources tree" %] [% INCLUDE searchdialog %]
[% INCLUDE htmlend %] torrus-2.08/templates/html-incblocks.txt0000644000175000017500000002336111567655764015425 00000000000000[%# $Id$ All BLOCK statements are defined here %] [%# ########### Initialize globals ################ %] [% global.setDateDialog = 0; %] [%# ########### Print the starting HTML blahblah ################ %] [% BLOCK htmlstart; IF ! contentClass; contentClass="Content"; END %] [% title %] [% IF expires %][% END %]
[% IF companyLogo %][%companyName%][% ELSE; companyName; END %] [% IF siteInfo %] [% siteInfo %] [% END %] [% IF treeName and treeInfo %] [% treeInfo %] [% END %] [% IF userAuth and uid; commonname = userAttr('cn'); IF commonname == ''; commonname = uid; END; %]
[% commonname %] Logout
[% END %]
[% timestamp %]
[% IF printpath %]
[% INCLUDE treename %]
Current path: [% splitUrls(token) %]
[% END %] [% IF not noTopMenu %]
[% INCLUDE shortcut url=topURL text="Top" title="Choose from the list of trees"%] [% theParent=parent(token); IF theParent and theParent != token; INCLUDE shortcut url=url(theParent) text="Up" title="Climb up the tree"; END %] [% INCLUDE helpshortcut %] [% IF mayDisplayAdmInfo(token); INCLUDE shortcut url=url(token,'adminfo') text="AdmInfo" title="Administrative details" newwindow=1; END %]
[% END %]
[% global.contentFinished = 0 %] [% IF global.printError %]
[% global.printError %]
[% global.printError = '' %] [% END %] [% END %] [%# ########### Print the legend ################ %] [% BLOCK legend %] [% legend = nodeParam(token, 'legend') %] [% IF legend.length > 0 %]
[% FOREACH legpairstring = legend.split(';') %] [% SET legpair = legpairstring.split(':') %]
[% xmlnorm(legpair.0) %]: [% xmlnorm(legpair.1) %]
[% END %]
[% END %] [% END %] [%# ########### Print the TZ and NOW variables ################ %] [% BLOCK variables %] [% IF variables.TZ or variables.NOW %]

[% IF variables.TZ %] Timezone: [% variables.TZ %]. [% END %] [% IF variables.NOW %] Report date: [% variables.NOW %]. [% END %]

[% END %] [% END %] [%# ########### Print the current tree name ################ %] [% BLOCK treename %]
Tree: [% treeName %]
[% END %] [%# ########### Print the shortcut ################ %] [% BLOCK shortcut %] [%text%] ] [% END %] [%# ########### Print the Help shortcut ################ %] [% BLOCK helpshortcut; IF nodeParam(token, 'help-text', 1); INCLUDE shortcut url="javascript:helpwindow()" text="Help" title="Open a help window for this page"; END; END %] [%# ########### Print the common bottomline ################ %] [% BLOCK bottomline %]
[% global.contentFinished = 1 %]
[% INCLUDE shortcut url=url('SS') text="Tokensets" title="List of non-empty tokensets"%] [% INCLUDE shortcut url=url(token,view,'MEDIA','printer','OVS',ovs) text="Printable view" title="Prepare this page for printing" newwindow=1%] [% IF mayDisplayReports(); INCLUDE shortcut url=reportsUrl text="Reports" title="Show reports page" newwindow=1; END %] [% IF global.setDateDialog; INCLUDE enterdate; END %] [% INCLUDE searchdialog %]
[% END %] [%# ########### Print the Tokensets bottomline ################ %] [% BLOCK tsetbottomline %] [% global.contentFinished = 1 %]
[% INCLUDE shortcut url=url(pathToken('/')) text="Datasources tree" title="Back to the datasources tree" %] [% INCLUDE shortcut url=url(token,view,'MEDIA','printer') text="Printable view" title="Prepare this page for printing" newwindow=1%] [% INCLUDE helpshortcut %] [% INCLUDE searchdialog %]
[% END %] [%# ########### Print the ending HTML blahblah ################ %] [% BLOCK htmlend %] [% IF ! global.contentFinished %][% END %] [% END %] [%# ######## Print the RRD graph image ####### %] [% BLOCK rrgraph %]
[% param(view, 'description') %]
[% END %] [%# ######## Print the short-term RRD graph image ####### %] [% BLOCK shortgraph %] [% hidden = 0; IF nodeParam(token,'hidden') == 'yes'; hidden = 1; END; IF not hidden or variables.SHOWHIDDEN %]
[% IF not urltoken; urltoken = token; END %] [% hidden ? '':'' %] [%IF comment%]
[%xmlnorm(comment)%]
[%END%] [% hidden ? '
':'' %] [% shortView = nodeParam(token,'rrgraph-views').split(',').0; shortvars = []; IF nodeParam(token, 'rrd-hwpredict') == 'enabled' and param(view, 'rrd-hwpredict') != 'disabled'; global.hwpredict = 1; IF variables.NOHW; shortvars = ['NOHW', 1]; ELSE; shortvars = ['NOHW', '']; END; END %]
[% END %] [% END %] [%# ######## Print the overview shortcuts ####### %] [% BLOCK overviewShortcuts %] [% IF nodeParam(token, 'has-overview-shortcuts', 1) == 'yes'; FOREACH ovs = nodeParam(token,'overview-shortcuts').split('\s*,\s*'); p1 = 'overview-shortcut-text-' _ ovs; p2 = 'overview-shortcut-title-' _ ovs; INCLUDE shortcut url=url(token, 'overview-subleaves-html', 'OVS', ovs) text=nodeParam(token, p1, 1) title=nodeParam(token, p2, 1); END; END %] [% END %] [%# ######## Set the date variable ####### %] [% BLOCK setdate %] [% IF variables.SETDATE == 1; thedate = verifyDate( variables.SETDATEV ); IF thedate.length == 0; global.printError = 'Incorrect date format'; clearVar('SETDATE'); ELSE; variables.NOW = thedate; END; ELSE; clearVar('NOW'); clearVar('SETDATE'); clearVar('SETDATEV'); END; global.setDateDialog = 1; %] [% END %] [%# ######## Print the date selection elements ####### %] [% BLOCK enterdate %]
[% IF ovs %][% END %]
[% END %] [%# ######## Print the searchform HTML ####### %] [% BLOCK searchdialog %] [% IF searchEnabled %]
[% END %] [% END %] [%# ######## Print the Global searchform HTML ####### %] [% BLOCK globalsearchdialog %] [% IF mayGlobalSearch() %]
[% END %] [% END %] torrus-2.08/templates/default-rrd.html0000644000175000017500000000675111567655764015056 00000000000000[% PROCESS 'html-incblocks.txt' %] [% INCLUDE setdate %] [% INCLUDE htmlstart title='Graphs for ' _ path(token) printpath=1 %] [% parentComment = nodeParam(parent(token),'comment') %] [% IF parentComment %]

Graphs for [% xmlnorm(parentComment) %]

[% END %] [% INCLUDE variables %]

[% xmlnorm(nodeParam(token,'comment')) %]

[% INCLUDE legend %] [% monitors = nodeParam(token,'monitor'); IF monitors != ''; moncount = monitors.split(',').size %]
Monitor[% (moncount > 1) ? 's' : '' %]: [% (moncount > 1) ? moncount : '' %] [% FOREACH monitor = monitors.split(','); mondesc = param(monitor, 'comment') %]
[% monitor %] [% IF mondesc; %]([% mondesc %])[% END %]
[% END %]
[% END %] [% IF nodeParam(token, 'ds-type') != 'rrd-multigraph' %] [% dayValues = rrprint(token, 'rrd-print-daily') %] [% lastValue = rrprint(token, 'rrd-print-last') %]

24-hour minimum: [% scale('%.1f', dayValues.0) %],   average: [% scale('%.1f', dayValues.1) %],   maximum: [% scale('%.1f', dayValues.2) %].   Last: [% scale('%.1f', lastValue) %]

[% END %] [% graphvars = []; graphviews = nodeParam(token,'rrgraph-views').split(','); dayView = graphviews.1; weekView = graphviews.2; monthView = graphviews.3; yearView = graphviews.4; IF nodeParam(token, 'rrd-hwpredict') == 'enabled' and ( param(view, 'rrd-hwpredict') == 'disabled' or variables.NOHW ); graphvars = ['NOHW', 1]; END; %]

Last day graph

[% INCLUDE rrgraph view=dayView vars=graphvars %]

Last week graph

[% INCLUDE rrgraph view=weekView vars=graphvars %]
[% longterm = param(view, 'longterm') %] [% IF longterm %]

Last month graph

[% INCLUDE rrgraph view=monthView %]

Last year graph

[% INCLUDE rrgraph view=yearView %]
[% END %]
[% IF longterm; hwview='longterm-rrd-html'; termview='default-rrd-html'; ELSE; hwview='default-rrd-html'; termview='longterm-rrd-html'; END; hwvars = []; termvars = []; IF nodeParam(token, 'rrd-hwpredict') == 'enabled' and param(view, 'rrd-hwpredict') != 'disabled'; IF not variables.NOHW; hwaction = 'Disable'; hwvars = ['NOHW', 1]; termvars = ['NOHW', '']; ELSE; hwaction = 'Enable'; hwvars = ['NOHW', '']; termvars = ['NOHW', 1]; END; INCLUDE shortcut url=url(token, hwview, hwvars) text=hwaction _ " Holt-Winters" title="Switch Holt-Winters prediction boundaries"; ELSE; IF longterm; termview='default-rrd-html'; ELSE; termview='longterm-rrd-html'; END; END; IF longterm; termstr='Short'; sctitle="View last day and last week graphs"; ELSE; termstr='Long'; sctitle="View last day, week, month, and year graphs"; END; INCLUDE shortcut url=url(token, termview, termvars) text=termstr _ "term view" title=sctitle; INCLUDE shortcut url=plainURL _ 'explain-rrdgraph.html' text='Explain graph' title='Describe graph elements and values' newwindow=1; %]
[% INCLUDE bottomline %] [% INCLUDE htmlend %] torrus-2.08/templates/report-serviceid.html0000644000175000017500000000700511545711243016101 00000000000000[% PROCESS 'html-incblocks.txt' %] [% INCLUDE htmlstart title="Torrus Reports: " _ year contentClass="SingleColumnContent" noTopMenu=1 %]

Torrus report: [% year %], [% serviceid %]

[% INCLUDE treename %] [% FOREACH reportname = data.keys.sort; fieldshash = data.$reportname; IF reportname == 'MonthlyUsage' %] [% rowCount = 0; FOREACH mth = fieldshash.keys.sort; rowCount = rowCount + 1; IF rowCount % 2 %] [% ELSE %] [% END %] [% FOREACH varname = ['AVG', '95TH_PERCENTILE', 'MAX', 'UNAVAIL', 'VOLUME'] %] [% END %] [% END %]
Monthly usage
Month Average 95th
Percentile
Maximum Unavailable
samples
Volume Extrapolated
volume
[% monthName(mth) %] [% formatValue( fieldshash.$mth.$varname ) %] [% extr.value = fieldshash.$mth.VOLUME.value * 100 / ( 100 - fieldshash.$mth.UNAVAIL.value ); extr.units = fieldshash.$mth.VOLUME.units; formatValue( extr ) %]
[% ELSE %] [% rowCount = 0; FOREACH mth = fieldshash.keys.sort; FOREACH varname = fieldshash.$mth.keys.sort; rowCount = rowCount + 1; IF rowCount % 2 %] [% ELSE %] [% END %] [% END; END %]
[% reportname %]
Month Field Value
[% monthName(mth) %] [% varname %] [% formatValue( fieldshash.$mth.$varname ) %]
[% END; END %]
Average: the monthly average of 5-minute samples.
95th percentile: 95% of the time, the usage is at or below this amount.
Maximum: the maximum value among 5-minute samples.
Unavailable samples: how many 5-minute samples were missed from the measurements.
Volume: for traffic usage, this is the absolut volume of data in avaiable 5-minute samples.
Extrapolated volume: for traffic usage, this is the volume of data extrapolated to the whole time range.
[% INCLUDE htmlend %] torrus-2.08/templates/iframe-rrd.html0000644000175000017500000000646211567655764014674 00000000000000[%# Minimalistic HTML to include into an iframe %] [% PROCESS 'html-incblocks.txt' %]
[% graphdescr=nodeParam(token,'descriptive-nickname'); IF graphdescr.length > 0 %]

Graphs for [% graphdescr %]

[% END %] [% INCLUDE variables %] [% INCLUDE legend %] [% IF nodeParam(token, 'ds-type') != 'rrd-multigraph' %] [% dayValues = rrprint(token, 'rrd-print-daily') %] [% lastValue = rrprint(token, 'rrd-print-last') %]

24-hour minimum: [% scale('%.1f', dayValues.0) %],   average: [% scale('%.1f', dayValues.1) %],   maximum: [% scale('%.1f', dayValues.2) %].   Last: [% scale('%.1f', lastValue) %]

[% END %] [% graphvars = []; graphviews = nodeParam(token,'rrgraph-views').split(','); dayView = graphviews.1; weekView = graphviews.2; monthView = graphviews.3; yearView = graphviews.4; IF nodeParam(token, 'rrd-hwpredict') == 'enabled' and ( param(view, 'rrd-hwpredict') == 'disabled' or variables.NOHW ); graphvars = ['NOHW', 1]; END; %]

Last day graph

[% INCLUDE rrgraph view=dayView vars=graphvars %]

Last week graph

[% INCLUDE rrgraph view=weekView vars=graphvars %]

Last month graph

[% INCLUDE rrgraph view=monthView %]

Last year graph

[% INCLUDE rrgraph view=yearView %]
torrus-2.08/templates/globalsearch.html0000644000175000017500000000201011656602724015236 00000000000000[% PROCESS 'html-incblocks.txt' %] [% global.SearchString = variables.SEARCH; clearVar('SEARCH') %] [% INCLUDE htmlstart title='Global Search results: ' _ global.SearchString contentClass="SingleColumnContent" noTopMenu=1 %]
[% INCLUDE shortcut url=url('') text="Top" title="Choose from the list of trees"%]

Global Search results: [% global.SearchString %]

[% results = searchResults( global.SearchString ); counter = 0; FOREACH entry = results; counter = counter + 1; IF counter % 2 == 0; evenRow = 1; ELSE; evenRow = 0; END; %]
[%entry.0%]: [% entry.1 %]
[% END %]
[% global.contentFinished = 1 %]
[% INCLUDE globalsearchdialog %]
[% INCLUDE htmlend %] torrus-2.08/templates/default-helptext.html0000644000175000017500000000167111545711243016075 00000000000000[%# #### We don't need the standard header and footer ####### %] [% PROCESS 'html-incblocks.txt' %] [% thepath=path(token) %] Help: [%thepath%]
Torrus Help
[% thepath %]
[% helptext=nodeParam(token, 'help-text', 1); %]
[% markup( helptext ) %]
torrus-2.08/templates/tset-list.html0000644000175000017500000000137512413217640014544 00000000000000[% PROCESS 'html-incblocks.txt' %] [% INCLUDE htmlstart title="Non-empty tokensets" contentClass="SingleColumnContent" %]

Tokensets

[% INCLUDE treename %]
[% counter = 0; evenRow = 0; FOREACH tset = tsetList().sort; sz = tsetMembers(tset).size; IF sz.length == 0; sz=0; END; counter = counter + 1; IF counter % 2 == 0; evenRow = 1; ELSE; evenRow = 0; END; %] [% END %]
[% INCLUDE tsetbottomline %] [% INCLUDE htmlend %] torrus-2.08/templates/report-yearly.html0000644000175000017500000000134111545711243015426 00000000000000[% PROCESS 'html-incblocks.txt' %] [% INCLUDE htmlstart title="Torrus Reports: " _ year contentClass="SingleColumnContent" noTopMenu=1 %]

Torrus reports: [% year %]

[% INCLUDE treename %] [% rowCount = 0; FOREACH mth = data.months; rowCount = rowCount + 1; IF rowCount % 2 %] [% ELSE %] [% END %] [% END %]
Monthly reports
Month
[% monthName(mth) _ ' ' _ year %]
[% INCLUDE htmlend %] torrus-2.08/templates/default-login.html0000644000175000017500000000341011545711243015341 00000000000000[% PROCESS 'html-incblocks.txt' %] [% INCLUDE htmlstart title="Torrus Login: " _ companyName contentClass="SingleColumnContent" noTopMenu=1 %] [% IF authFailed %]

Incorrect username or password.

[% END %]

Please authenticate yourself

[% IF urlPassParams.token.defined AND urlPassParams.token.length > 0 %] [% ELSE; IF urlPassParams.path.defined AND urlPassParams.path.length > 0 %] [% ELSE; IF urlPassParams.nodeid.defined AND urlPassParams.nodeid.length > 0 %] [% END; END; END %] [% IF urlPassParams.view.defined AND urlPassParams.view.length > 0 %] [% END %]
Username:
Password:
  remember me
[% IF lostPasswordURL %] [% END %] [% INCLUDE htmlend %] torrus-2.08/templates/adminfo.html0000644000175000017500000000142411545711243014227 00000000000000[% PROCESS 'html-incblocks.txt' %] [% INCLUDE htmlstart title='Administrative information: ' _ path(token) contentClass="SingleColumnContent" noTopMenu=1 %]

Administrative information

[% INCLUDE treename %]

Path: [% path(token) %]

[% FOREACH category = adminfo.keys.sort; %]

[% category %]

[% counter = 0; evenRow = 0; FOREACH pname = adminfo.$category.keys.sort; counter = counter + 1; IF counter % 2 == 0; evenRow = 1; ELSE; evenRow = 0; END; %]
[% pname %] [% adminfo.$category.$pname %]
[% END %]
[% END %] [% INCLUDE htmlend %] torrus-2.08/templates/aclexport.xml0000644000175000017500000000201311545711243014442 00000000000000 1.1 [% FOREACH group = groups() %] [% privhash = privileges(group); FOREACH object = privhash.keys.sort; FOREACH priv = privhash.$object.keys.sort %] [% END; END; FOREACH attr = gattrlist(group); %] [% END; %] [% END %] [% FOREACH uid = users() %] [% FOREACH group = memberof(uid) %] [% END; FOREACH attr = uattrlist(uid); IF attr != 'uid' %] [% END; END %] [% END %] torrus-2.08/templates/email-alarm.txt0000644000175000017500000000146512413217640014650 00000000000000Subject: Monitor event: [%event%], [% nickname %] This is automatic Torrus event notification. Event timestamp: [% timestamp %] Tree name: [% tree %] Node path: [% path %] Node description: [% npcomment %] Monitor name: [% monitor %] Monitor description: [% mcomment %] Event type: [% event %] [% IF event=='escalate' %]Escalation time: [% escalation %] seconds [% END %] You can browse the node up-to-date graphs at this URL: [% url %] Event types description: set Alarm condition is met first time repeat Alarm condition repeats escalate Alarm is persistent for the escalation period clear Alarm condition is no longer met forget Information about this alarm has expired Torrus home page and documentation: http://torrus.sourceforge.nettorrus-2.08/templates/report-monthly.html0000644000175000017500000000610711545711243015620 00000000000000[% PROCESS 'html-incblocks.txt' %] [% INCLUDE htmlstart title="Torrus Reports: " _ year contentClass="SingleColumnContent" noTopMenu=1 %]

Torrus report: [% monthName(month) %] [% year %]

[% INCLUDE treename %] [% FOREACH reportname = data.keys.sort; fieldshash = data.$reportname; IF reportname == 'MonthlyUsage' %] [% rowCount = 0; FOREACH serviceid = fieldshash.keys.sort; rowCount = rowCount + 1; IF rowCount % 2 %] [% ELSE %] [% END %] [% FOREACH varname = ['AVG', '95TH_PERCENTILE', 'MAX', 'UNAVAIL', 'VOLUME'] %] [% END %] [% END %]
Monthly usage
Service ID Average 95th
Percentile
Maximum Unavailable
samples
Volume
[% serviceid %] [% formatValue( fieldshash.$serviceid.$varname ) %]
[% ELSE %] [% rowCount = 0; FOREACH serviceid = fieldshash.keys.sort; FOREACH varname = fieldshash.$serviceid.keys.sort; rowCount = rowCount + 1; IF rowCount % 2 %] [% ELSE %] [% END %] [% END; END %]
[% reportname %]
Service ID Field Value
[% serviceid %] [% varname %] [% formatValue( fieldshash.$serviceid.$varname ) %]
[% END; END %]
Average: the monthly average of 5-minute samples.
95th percentile: 95% of the time, the usage is at or below this amount.
Maximum: the maximum value among 5-minute samples.
Unavailable samples: how many 5-minute samples were missed from the measurements.
Volume: for traffic usage, this is the absolut volume of data in avaiable 5-minute samples.
[% INCLUDE htmlend %] torrus-2.08/bin/0000755000175000017500000000000012413221021010536 500000000000000torrus-2.08/bin/buildsearchdb.in0000644000175000017500000001217411661302716013625 00000000000000#!@PERL@ -w # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use Getopt::Long; use Torrus::ConfigTree; use Torrus::Search; use Torrus::SiteConfig; use Torrus::Log; exit(1) unless Torrus::SiteConfig::verify(); my @trees; my $build_global; my $all_trees; my $verbose; my $help_needed; my $ok = GetOptions ('tree=s' => \@trees, 'all' => \$all_trees, 'global' => \$build_global, 'verbose' => \$verbose, 'help' => \$help_needed); if( not $ok or not (scalar(@trees) or $all_trees or $build_global) or $help_needed or scalar(@ARGV) > 0 ) { print STDERR "Usage: $0 --tree=NAME [options...]\n", "Options:\n", " --tree=NAME rebuild search DB for a tree\n", " --all rebuild search DB for all trees\n", " --global rebuild global search DB\n", " --verbose print extra information\n", " --help this help message\n"; exit 1; } if( $build_global ) { $all_trees = 1; } if( $all_trees ) { @trees = Torrus::SiteConfig::listTreeNames(); } if( $verbose ) { Torrus::Log::setLevel('verbose'); } &Torrus::DB::setSafeSignalHandlers(); Verbose(sprintf('Torrus version %s', '@VERSION@')); my $search = new Torrus::Search( -WriteAccess => 1 ); if( $build_global ) { $search->openGlobal(); } foreach my $tree ( @trees ) { if( not Torrus::SiteConfig::treeExists( $tree ) ) { Error("Tree named \"" . $tree . "\" does not exist"); exit(1); } &Torrus::DB::checkInterrupted(); my $config_tree = new Torrus::ConfigTree( -TreeName => $tree ); if( not defined($config_tree) ) { print("Configuration is not ready\n"); exit(1); } Verbose("Processing the tree: $tree"); $search->openTree( $tree ); walkSubtree( $config_tree, $config_tree->token('/') ); $search->closeTree( $tree ); $config_tree = undef; } exit(0); sub walkSubtree { my $config_tree = shift; my $ptoken = shift; my $tree = $config_tree->treeName(); foreach my $token ( $config_tree->getChildren( $ptoken ) ) { &Torrus::DB::checkInterrupted(); if( $config_tree->isSubtree( $token ) ) { walkSubtree( $config_tree, $token ); } my $isSearchable = $config_tree->getNodeParam( $token, 'searchable', 1 ); if( defined( $isSearchable ) and $isSearchable eq 'yes' ) { my $path = $config_tree->path( $token ); my $nodeName = $config_tree->nodeName( $path ); splitAndStore( $tree, $nodeName, $path ); my $params = $config_tree->getParams( $token, 1 ); while( my( $param, $value ) = each %{$params} ) { if( $config_tree->getParamProperty( $param, 'search' ) ) { splitAndStore( $tree, $value, $path, $param ); } } } } return; } sub splitAndStore { my $tree = shift; my $value = shift; my $path = shift; my $param = shift; if( length( $value ) > 0 ) { # split the value into words my @words = split( /[^a-zA-Z0-9-_]+/mso, $value ); if( scalar( @words ) > 0 ) { foreach my $word ( @words ) { if( length( $word ) > 1 ) { $search->storeKeyword( $tree, $word, $path, $param ); # Split the word by underscores and dashes my @subwords = split( /[-_]+/o, $word ); if( scalar( @subwords ) > 1 ) { foreach my $subword ( @subwords ) { if( length( $subword ) > 1 ) { $search->storeKeyword( $tree, $subword, $path, $param ); } } } } } } } return; } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/configinfo.in0000644000175000017500000001163211661302716013151 00000000000000#!@PERL@ -w # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use BerkeleyDB; use Torrus::ConfigTree; use Torrus::TimeStamp; use Torrus::SiteConfig; use Torrus::Log; exit(1) unless Torrus::SiteConfig::verify(); &Torrus::DB::setSafeSignalHandlers(); Torrus::TimeStamp::init(); my @tree_names = Torrus::SiteConfig::listTreeNames(); printf("Torrus version %s\n", '@VERSION@'); printf("%s\n", DB_VERSION_STRING); printf("BerkeleyDB.pm version %s\n", $BerkeleyDB::VERSION); printf("\n"); printf("Datasource trees: %d\n", scalar( @tree_names ) ); printf("Tree names: %s\n", join(', ', @tree_names) ); printf("\n"); foreach my $tree ( @tree_names ) { &Torrus::DB::checkInterrupted(); printf("Tree: %s\n", $tree ); my $config_tree = new Torrus::ConfigTree( -TreeName => $tree ); if( not defined($config_tree) ) { print("Configuration is not ready\n"); } else { my $stats = {}; foreach my $name ( 'leaves', 'collectorLeaves', 'monitorLeaves', 'holtwintersLeaves', 'subtrees', 'maxSubtreePath', 'maxSubtreeSize', 'views', 'monitors', 'actions', 'compiled' ) { $stats->{$name} = 0; } collectStats( $config_tree, $stats ); collectOtherStats( $config_tree, $stats ); printf("Leaves: %d\n", $stats->{'leaves'} ); printf("Collector leaves: %d\n", $stats->{'collectorLeaves'} ); printf("Monitor leaves: %d\n", $stats->{'monitorLeaves'} ); printf("Holt-Winters leaves: %d\n", $stats->{'holtwintersLeaves'} ); printf("Subtrees: %d\n", $stats->{'subtrees'} ); printf("Largest subtree: %s\n", $stats->{'maxSubtreePath'} ); printf("Largest subtree size: %d\n", $stats->{'maxSubtreeSize'} ); printf("Views: %d\n", $stats->{'views'} ); printf("Monitors: %d\n", $stats->{'monitors'} ); printf("Actions: %d\n", $stats->{'actions'} ); printf("Last compiled: %s\n", scalar(localtime($stats->{'compiled'}))); printf("\n"); } } sub collectStats { my $config_tree = shift; my $stats = shift; my $token = shift; &Torrus::DB::checkInterrupted(); if( not defined( $token ) ) { $token = $config_tree->token('/'); } my @children = $config_tree->getChildren( $token ); my $nChildren = scalar( @children ); if( not defined( $stats->{'maxSubtreeSize'} ) or $stats->{'maxSubtreeSize'} < $nChildren ) { $stats->{'maxSubtreeSize'} = $nChildren; $stats->{'maxSubtreePath'} = $config_tree->path( $token ); } foreach my $ctoken ( @children ) { if( $config_tree->isSubtree( $ctoken ) ) { $stats->{'subtrees'}++; collectStats( $config_tree, $stats, $ctoken ); } elsif( $config_tree->isLeaf( $ctoken ) ) { $stats->{'leaves'}++; if( $config_tree->getNodeParam( $ctoken, 'ds-type' ) eq 'collector' ) { $stats->{'collectorLeaves'}++; } if( defined( $config_tree->getNodeParam( $ctoken, 'monitor' ) ) ) { $stats->{'monitorLeaves'}++; } my $val = $config_tree->getNodeParam( $ctoken, 'rrd-hwpredict' ); if( defined( $val ) and $val eq 'enabled' ) { $stats->{'holtwintersLeaves'}++; } } } return; } sub collectOtherStats { my $config_tree = shift; my $stats = shift; my $n = scalar( $config_tree->getViewNames() ); $stats->{'views'} = $n if defined( $n ); $n = scalar( $config_tree->getMonitorNames() ); $stats->{'monitors'} = $n if defined( $n ); $n = scalar( $config_tree->getActionNames() ); $stats->{'actions'} = $n if defined( $n ); $n = $config_tree->getTimestamp(); $stats->{'compiled'} = $n if defined( $n ); return; } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/install_plugin.in0000644000175000017500000000256011661302716014054 00000000000000#!@SHELL@ # Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # disable Perl::Critic because this is not a Perl script ## no critic # Torrus plugin installation utility plugin=$1 shift if test -z "$plugin"; then echo "Usage: $0 plugin_dir [options...]" 1>&2 exit 1 fi if test ! -d $plugin; then echo "No such directory: $plugin" 1>&2 exit 1 fi echo Installing Torrus plugin from $plugin cd $plugin eval './configure '`cat @cfgdefdir@/instvars`' '$@ || exit 1 make || exit 1 make install || exit 1 echo Plugin installation finished # Local Variables: # mode: shell-script # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/configsnapshot.in0000644000175000017500000002024711661302716014057 00000000000000#!@PERL@ # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use Getopt::Long; use Torrus::Log; use Torrus::ConfigTree; use Torrus::SiteConfig; use Torrus::ConfigBuilder; exit(1) unless Torrus::SiteConfig::verify(); my $tree; my $help_needed; my $verbose = 0; my $outfile = 'snapshot.xml'; my $filter_param; my $filter_value; my $filter_op = '='; my %filterTokens; my $creator = "Torrus version @VERSION@\n" . "This file was generated by command:\n" . $0 . " \\\n"; foreach my $arg ( @ARGV ) { if( $arg =~ /^--/ ) { $creator .= ' ' . $arg . ' '; } else { $creator .= "\'" . $arg . "\'\\\n"; } } $creator .= "\nOn " . scalar(localtime(time)); my $ok = GetOptions('tree=s' => \$tree, 'out=s' => \$outfile, 'param=s' => \$filter_param, 'value=s' => \$filter_value, 'op=s' => \$filter_op, 'verbose' => \$verbose, 'help' => \$help_needed); if( not $ok or not $tree or $help_needed or ( defined($filter_param) + defined($filter_value) == 1 ) or ( $filter_op ne '=' and $filter_op ne 'eq' and $filter_op ne 're' ) or scalar(@ARGV) > 0 ) { print STDERR "Usage: $0 --tree=NAME [options...]\n", "Options:\n", " --tree=NAME tree name\n", " --out=filename output file [".$outfile."]\n", " --param=PARAM --value=VALUE \n", " filter the output by leaves with specified value\n", " --op=OP filter operation [=|eq|re], default: [=]\n", " --verbose print extra information\n", " --help this help message\n"; exit 1; } if( $verbose ) { Torrus::Log::setLevel('verbose'); } if( not Torrus::SiteConfig::treeExists( $tree ) ) { Error('Tree ' . $tree . ' does not exist'); exit 1; } &Torrus::DB::setSafeSignalHandlers(); my $filter_match = sub {return $_[0] == $filter_value}; if(defined($filter_param)) { if( $filter_op eq 'eq' ) { $filter_match = sub {return $_[0] eq $filter_value}; } elsif( $filter_op eq 're' ) { $filter_match = sub {return $_[0] =~ $filter_value}; } } { my $config_tree = new Torrus::ConfigTree( -TreeName => $tree, -Wait => 1 ); if( not defined( $config_tree ) ) { exit 1; } my $cb = new Torrus::ConfigBuilder; $cb->addCreatorInfo( $creator ); # We don't collect views, since they are in defaults.xml which is always # included collect_monitors( $config_tree, $cb ); collect_tokensets( $config_tree, $cb ); collect_definitions( $config_tree, $cb ); collect_datasources( $config_tree, $cb ); $ok = $cb->toFile( $outfile ); if( $ok ) { Verbose('Wrote ' . $outfile); } else { Error('Cannot write ' . $outfile . ': ' . $!); } } exit($ok ? 0:1); sub collect_monitors { my $config_tree = shift; my $cb = shift; my $monitorsNode = $cb->startMonitors(); foreach my $action ( $config_tree->getActionNames() ) { &Torrus::DB::checkInterrupted(); my $params = $config_tree->getParams( $action ); $cb->addMonitorAction( $monitorsNode, $action, $params ); } foreach my $monitor ( $config_tree->getMonitorNames() ) { &Torrus::DB::checkInterrupted(); my $params = $config_tree->getParams( $monitor ); $cb->addMonitor( $monitorsNode, $monitor, $params ); } return; } sub collect_tokensets { my $config_tree = shift; my $cb = shift; my $tsetsNode = $cb->startTokensets(); foreach my $tset ( $config_tree->getTsets() ) { &Torrus::DB::checkInterrupted(); my $params = $config_tree->getParams( $tset ); my $name = $tset; $name =~ s/^S//; $cb->addTokenset( $tsetsNode, $name, $params ); } return; } sub collect_definitions { my $config_tree = shift; my $cb = shift; my $definitionsNode = $cb->startDefinitions(); foreach my $defName ( sort $config_tree->getDefinitionNames() ) { &Torrus::DB::checkInterrupted(); my $value = $config_tree->getDefinition( $defName ); $cb->addDefinition( $definitionsNode, $defName, $value ); } my $propsNode = $cb->startParamProps(); my $props = $config_tree->getParamProperties(); &Torrus::DB::checkInterrupted(); foreach my $prop ( sort keys %{$props} ) { foreach my $param ( sort keys %{$props->{$prop}} ) { $cb->addParamProp( $propsNode, $param, $prop, $props->{$prop}{$param} ); } } return; } sub collect_datasources { my $config_tree = shift; my $cb = shift; my $topNode = $cb->getTopSubtree(); my $topToken = $config_tree->token('/'); my $params = prepare_params( $config_tree, $topToken ); $cb->addParams( $topNode, $params ); if( defined($filter_param) ) { $filterTokens{$topToken} = apply_filter( $config_tree, $topToken ); } collect_subtrees( $config_tree, $cb, $topToken, $topNode ); return; } sub apply_filter { my $config_tree = shift; my $token = shift; $filterTokens{$token} = 0; foreach my $ctoken ( $config_tree->getChildren( $token ) ) { &Torrus::DB::checkInterrupted(); if( $config_tree->isSubtree( $ctoken ) ) { $filterTokens{$token} += apply_filter( $config_tree, $ctoken ); } elsif( $config_tree->isLeaf( $ctoken ) ) { my $val = $config_tree->getNodeParam( $ctoken, $filter_param ); if( defined($val) and &{$filter_match}($val) ) { $filterTokens{$ctoken} = 1; $filterTokens{$token}++; } } } return $filterTokens{$token}; } sub collect_subtrees { my $config_tree = shift; my $cb = shift; my $token = shift; my $parentNode = shift; foreach my $ctoken ( $config_tree->getChildren( $token ) ) { &Torrus::DB::checkInterrupted(); if( not defined($filter_param) or $filterTokens{$ctoken} ) { my $childName = $config_tree->nodeName( $config_tree->path($ctoken) ); my $params = prepare_params( $config_tree, $ctoken ); if( $config_tree->isSubtree( $ctoken ) ) { my $subtreeNode = $cb->addSubtree( $parentNode, $childName, $params ); collect_subtrees( $config_tree, $cb, $ctoken, $subtreeNode ); } elsif( $config_tree->isLeaf( $ctoken ) ) { $cb->addLeaf( $parentNode, $childName, $params ); } foreach my $aliasToken ( $config_tree->getAliases( $ctoken ) ) { $cb->addAlias( $parentNode, $config_tree->path( $aliasToken ) ); } } } return; } sub prepare_params { my $config_tree = shift; my $token = shift; my $params = $config_tree->getParams( $token, 1 ); # Remove linebreaks while( my( $param, $value ) = each %{$params} ) { $value =~ s/\s+/ /gm; $params->{$param} = $value; } return $params; } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/action_printemail.in0000644000175000017500000000473212413217640014531 00000000000000#!@PERL@ # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin use strict; use warnings; # We need this for $Torrus::Global::templateDirs BEGIN { require '@torrus_config_pl@'; } use Template; use Getopt::Long; require '@email_siteconfig_pl@'; if( not $ENV{'TORRUS_TREE'} ) { print STDERR ("Torrus environment variables missing. This program ", "must be run from Torrus Monitor\n"); exit 1; } my $ok = GetOptions( 'url=s' => \$Torrus::Email::url, 'template=s' => \$Torrus::Email::template ); if( not $ok ) { print STDERR ("Error parsing options\n"); exit 1; } my $tt = new Template(INCLUDE_PATH => $Torrus::Global::templateDirs); my $vars = { 'tree' => $ENV{'TORRUS_TREE'}, 'token' => $ENV{'TORRUS_TOKEN'}, 'path' => $ENV{'TORRUS_NODEPATH'}, 'nickname' => $ENV{'TORRUS_NICKNAME'}, 'url' => $Torrus::Email::url . '/' . $ENV{'TORRUS_TREE'} . '?token='.$ENV{'TORRUS_TOKEN'}, 'ncomment' => $ENV{'TORRUS_NCOMMENT'}, 'npcomment' => $ENV{'TORRUS_NPCOMMENT'}, 'event' => $ENV{'TORRUS_EVENT'}, 'escalation' => $ENV{'TORRUS_ESCALATION'}, 'monitor' => $ENV{'TORRUS_MONITOR'}, 'mcomment' => $ENV{'TORRUS_MCOMMENT'}, 'severity' => $ENV{'TORRUS_SEVERITY'}, 'timestamp' => scalar(localtime($ENV{'TORRUS_TSTAMP'})), 'value' => $ENV{'TORRUS_VALUE'}, 'dispvalue' => $ENV{'TORRUS_DISPLAY_VALUE'}, 'env' => sub { return $ENV{$_[0]} } }; my $result = $tt->process($Torrus::Email::template, $vars); if( not $result ) { print STDERR "Error while processing template: ".$tt->error()."\n"; } exit( $result ? 0:1 ); # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/Makefile.in0000644000175000017500000004516712413220736012554 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } 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 = : build_triplet = @build@ host_triplet = @host@ subdir = bin DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in 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) 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 -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgbindir)" "$(DESTDIR)$(wrapperdir)" SCRIPTS = $(pkgbin_SCRIPTS) $(wrapper_SCRIPTS) 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 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ FIND = @FIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KILL = @KILL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ 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@ PERLCRITIC = @PERLCRITIC@ PERLINC = @PERLINC@ POD2MAN = @POD2MAN@ POD2TEXT = @POD2TEXT@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SLEEP = @SLEEP@ STRIP = @STRIP@ SU = @SU@ VERSION = @VERSION@ 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__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cachedir = @cachedir@ cfgdefdir = @cfgdefdir@ datadir = @datadir@ datarootdir = @datarootdir@ dbhome = @dbhome@ defrrddir = @defrrddir@ distxmldir = @distxmldir@ docdir = @docdir@ dvidir = @dvidir@ enable_pkgonly = @enable_pkgonly@ enable_varperm = @enable_varperm@ exec_prefix = @exec_prefix@ exmpdir = @exmpdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mansec_misc = @mansec_misc@ mansec_usercmd = @mansec_usercmd@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ perlithreads = @perlithreads@ perllibdir = @perllibdir@ perllibdirs = @perllibdirs@ piddir = @piddir@ pkgbindir = @pkgbindir@ pkgdocdir = @pkgdocdir@ pkghome = @pkghome@ plugdevdisccfgdir = @plugdevdisccfgdir@ pluginsdir = @pluginsdir@ plugtorruscfgdir = @plugtorruscfgdir@ plugwrapperdir = @plugwrapperdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ reportsdir = @reportsdir@ sbindir = @sbindir@ scriptsdir = @scriptsdir@ seslockdir = @seslockdir@ sesstordir = @sesstordir@ sharedstatedir = @sharedstatedir@ siteconfdir = @siteconfdir@ sitedir = @sitedir@ sitexmldir = @sitexmldir@ srcdir = @srcdir@ supdir = @supdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tmpldir = @tmpldir@ tmpluserdir = @tmpluserdir@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ torrus_user = @torrus_user@ var_group = @var_group@ var_mode = @var_mode@ var_user = @var_user@ varprefix = @varprefix@ webplaindir = @webplaindir@ webscriptsdir = @webscriptsdir@ wrapperdir = @wrapperdir@ SUBST = @abs_top_builddir@/setup_tools/substvars.sh pkgbin_SCRIPTS = \ acledit \ action_notify \ action_printemail \ action_snmptrap \ action_snmpv1trap \ bdbinfo \ buildsearchdb \ cleanup \ clearcache \ collector \ compilexml \ configinfo \ configsnapshot \ devdiscover \ flushmonitors \ genddx \ genlist \ genreport \ install_plugin \ monitor \ nodeid \ rrddir2xml \ schedulerinfo \ snmpfailures \ srvderive \ torrus.fcgi \ ttproclist wrapper_SCRIPTS = \ torrus CLEANFILES = $(pkgbin_SCRIPTS) $(wrapper_SCRIPTS) EXTRA_DIST = \ acledit.in \ action_notify.in \ action_printemail.in \ action_snmptrap.in \ action_snmpv1trap.in \ bdbinfo.in \ buildsearchdb.in \ clearcache.in \ cleanup.in \ collector.in \ compilexml.in \ configinfo.in \ configsnapshot.in \ devdiscover.in \ flushmonitors.in \ genddx.in \ genlist.in \ genreport.in \ install_plugin.in \ monitor.in \ nodeid.in \ rrddir2xml.in \ schedulerinfo.in \ snmpfailures.in \ srvderive.in \ torrus.fcgi.in \ torrus.in \ ttproclist.in 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) --gnu bin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/Makefile .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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-pkgbinSCRIPTS: $(pkgbin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(pkgbin_SCRIPTS)'; test -n "$(pkgbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgbindir)" || 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)$(pkgbindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(pkgbindir)$$dir" || exit $$?; \ } \ ; done uninstall-pkgbinSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(pkgbin_SCRIPTS)'; test -n "$(pkgbindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(pkgbindir)'; $(am__uninstall_files_from_dir) install-wrapperSCRIPTS: $(wrapper_SCRIPTS) @$(NORMAL_INSTALL) @list='$(wrapper_SCRIPTS)'; test -n "$(wrapperdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(wrapperdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(wrapperdir)" || 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)$(wrapperdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(wrapperdir)$$dir" || exit $$?; \ } \ ; done uninstall-wrapperSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(wrapper_SCRIPTS)'; test -n "$(wrapperdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(wrapperdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(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)$(pkgbindir)" "$(DESTDIR)$(wrapperdir)"; 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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-pkgbinSCRIPTS install-wrapperSCRIPTS install-dvi: install-dvi-am install-dvi-am: install-exec-am: 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-pkgbinSCRIPTS uninstall-wrapperSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgbinSCRIPTS install-ps \ install-ps-am install-strip install-wrapperSCRIPTS \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-pkgbinSCRIPTS \ uninstall-wrapperSCRIPTS # Result of: # ls -1 | egrep '^[a-z][^.]+$' | \ # awk '{printf "%s: %s.in\n\t$(SUBST) %s.in > %s\n\n", $1, $1, $1, $1}' acledit: acledit.in $(SUBST) acledit.in > acledit action_printemail: action_printemail.in $(SUBST) action_printemail.in > action_printemail action_notify: action_notify.in $(SUBST) action_notify.in > action_notify action_snmptrap: action_snmptrap.in $(SUBST) action_snmptrap.in > action_snmptrap action_snmpv1trap: action_snmpv1trap.in $(SUBST) action_snmpv1trap.in > action_snmpv1trap buildsearchdb: buildsearchdb.in $(SUBST) buildsearchdb.in > buildsearchdb bdbinfo: bdbinfo.in $(SUBST) bdbinfo.in > bdbinfo cleanup: cleanup.in $(SUBST) cleanup.in > cleanup clearcache: clearcache.in $(SUBST) clearcache.in > clearcache collector: collector.in $(SUBST) collector.in > collector compilexml: compilexml.in $(SUBST) compilexml.in > compilexml configinfo: configinfo.in $(SUBST) configinfo.in > configinfo configsnapshot: configsnapshot.in $(SUBST) configsnapshot.in > configsnapshot devdiscover: devdiscover.in $(SUBST) devdiscover.in > devdiscover flushmonitors: flushmonitors.in $(SUBST) flushmonitors.in > flushmonitors genddx: genddx.in $(SUBST) genddx.in > genddx genlist: genlist.in $(SUBST) genlist.in > genlist genreport: genreport.in $(SUBST) genreport.in > genreport install_plugin: install_plugin.in $(SUBST) install_plugin.in > install_plugin monitor: monitor.in $(SUBST) monitor.in > monitor nodeid: nodeid.in $(SUBST) nodeid.in > nodeid rrddir2xml: rrddir2xml.in $(SUBST) rrddir2xml.in > rrddir2xml schedulerinfo: schedulerinfo.in $(SUBST) schedulerinfo.in > schedulerinfo snmpfailures: snmpfailures.in $(SUBST) snmpfailures.in > snmpfailures srvderive: srvderive.in $(SUBST) srvderive.in > srvderive torrus: torrus.in $(SUBST) torrus.in > torrus torrus.fcgi: torrus.fcgi.in $(SUBST) torrus.fcgi.in > torrus.fcgi ttproclist: ttproclist.in $(SUBST) ttproclist.in > ttproclist # 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: torrus-2.08/bin/cleanup.in0000644000175000017500000000217411661302716012460 00000000000000#!@SHELL@ # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # disable Perl::Critic because this is not a Perl script ## no critic # How soon the sessions expire EXPIRE=60 @FIND@ @sesstordir@ -type f -mtime +$EXPIRE -exec @RM@ '{}' ';' @FIND@ @seslockdir@ -type f -mtime +$EXPIRE -exec @RM@ '{}' ';' # Local Variables: # mode: shell-script # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/genlist.in0000644000175000017500000001261111661302716012473 00000000000000#!@PERL@ # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use Getopt::Long; use Torrus::Log; use Torrus::ConfigTree; use Torrus::SiteConfig; exit(1) unless Torrus::SiteConfig::verify(); my $tree; my $initPath = '/'; my $listWhat = 'rrdfiles'; my $selectType = 'all'; my $help_needed; my %listingsSupported = ( 'rrdfiles' => { 'collector' => 1, 'readonly' => 1, 'all' => 1, }, 'snmphosts' => { 'collector' => 1, }, ); my $ok = GetOptions ('tree=s' => \$tree, 'path=s' => \$initPath, 'what=s' => \$listWhat, 'type=s' => \$selectType, 'help' => \$help_needed); if( not $ok or not $tree or $help_needed or not $listingsSupported{$listWhat}{$selectType} or scalar(@ARGV) > 0 ) { print STDERR "Usage: $0 --tree=NAME [options...]\n", "Options:\n", " --tree=NAME tree name\n", " --path=/PATH [".$initPath."] subtree name\n", " --what=WHAT [".$listWhat."] what to list\n", " Supported listings:\n", " rrdfiles List RRD file paths\n", " snmphosts List SNMP hosts\n", " --type=TYPE [".$selectType."] selection type\n", " Supported types:\n", " collector Collector leaves\n", " readonly Read-only leaves\n", " all All of above\n", " --help this help message\n"; exit 1; } if( not Torrus::SiteConfig::treeExists( $tree ) ) { Error('Tree ' . $tree . ' does not exist'); exit 1; } &Torrus::DB::setSafeSignalHandlers(); { my $config_tree = new Torrus::ConfigTree( -TreeName => $tree, -Wait => 1 ); if( not defined( $config_tree ) ) { exit 1; } my $initToken = $config_tree->token( $initPath ); if( not defined( $initToken ) ) { Error('No such subtree: ' . $initPath); exit 1; } my $listing = {}; my $listParams = {}; if( $selectType eq 'all' ) { foreach my $type ( keys %{$listingsSupported{$listWhat}} ) { if( $type ne 'all' ) { $listParams->{$type} = 1; } } } else { $listParams->{$selectType} = 1; } pickup_data( $config_tree, $initToken, $listing, $listParams ); foreach my $item ( sort keys %{$listing} ) { print $item, "\n"; } } exit 0; sub pickup_data { my $config_tree = shift; my $token = shift; my $listing = shift; my $listParams = shift; foreach my $ctoken ( $config_tree->getChildren( $token ) ) { &Torrus::DB::checkInterrupted(); if( $config_tree->isSubtree( $ctoken ) ) { pickup_data( $config_tree, $ctoken, $listing, $listParams ); } elsif( $config_tree->isLeaf( $ctoken ) ) { if( $listWhat eq 'rrdfiles' and ( ( $listParams->{'collector'} and $config_tree->getNodeParam( $ctoken, 'ds-type' ) eq 'collector' and $config_tree->getNodeParam( $ctoken, 'storage-type' ) eq 'rrd' ) or ( $listParams->{'readonly'} and $config_tree->getNodeParam( $ctoken, 'ds-type' ) eq 'rrd-file' and $config_tree->getNodeParam( $ctoken, 'leaf-type' ) eq 'rrd-def' ) ) ) { my $datafile = $config_tree->getNodeParam( $ctoken, 'data-file' ); my $datadir = $config_tree->getNodeParam( $ctoken, 'data-dir' ); $listing->{$datadir . '/' . $datafile} = 1; } elsif( $listWhat eq 'snmphosts' and $listParams->{'collector'} and $config_tree->getNodeParam( $ctoken, 'ds-type' ) eq 'collector' ) { my $host = $config_tree->getNodeParam( $ctoken, 'snmp-host' ); my $oid = $config_tree->getNodeParam( $ctoken, 'snmp-object' ); if( defined( $host ) and length( $host ) > 0 and defined( $oid ) and length( $oid ) > 0 ) { $listing->{$host} = 1; } } } } return; } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/devdiscover.in0000644000175000017500000003660411703556537013364 00000000000000#!@PERL@ # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # Collect the router information and create the XML file use strict; use warnings; BEGIN { require '@devdiscover_config_pl@'; } use Getopt::Long; use XML::LibXML; use Torrus::Log; use Torrus::DevDiscover; use Torrus::ConfigBuilder; my @infiles; my $makedirs; my $limitre; my $forcebundle; my $fallback; my $workerThreads = 0; # Hidden parameter for debugging my $snmpdebug = 0; my $debug = 0; my $verbose = 0; my %formatsSupported = ( '1.0' => 1 ); my $creator = "Torrus version @VERSION@\n" . "This file was generated by command:\n" . $0 . " \\\n"; foreach my $arg ( @ARGV ) { if( $arg =~ /^--/ ) { $creator .= ' ' . $arg . ' '; } else { $creator .= "\'" . $arg . "\'\\\n"; } } $creator .= "\n On " . scalar(localtime(time)); my $opts_ok = GetOptions ( 'in=s' => \@infiles, 'mkdir' => \$makedirs, 'limit=s' => \$limitre, 'forcebundle' => \$forcebundle, 'fallback=i' => \$fallback, 'threads=i' => \$workerThreads, 'snmpdebug' => \$snmpdebug, 'verbose' => \$verbose, 'debug' => \$debug ); if( $opts_ok and scalar( @ARGV ) > 0 ) { push( @infiles, @ARGV ); } if( not $opts_ok or scalar(@infiles) == 0 or ($workerThreads > 1 and not $Torrus::Global::threadsEnabled ) ) { print STDERR "Usage: $0 --in=filename.ddx options... [ddx files]\n", "Options:\n", " --in=filename.ddx discovery instructions XML file(s)\n", " --mkdir create data-dir directories\n", " --limit=regexp limit the discovery by output files\n", " --forcebundle always write the bundle file\n", " --fallback=integer maximum age of XML file to fall back to\n", " --threads=integer number of parallel discovery threads\n", " --verbose print extra information\n", " --debug print debugging information\n", " --snmpdebug print SNMP protocol details\n", "\n"; if( not $Torrus::Global::threadsEnabled ) { print STDERR "Multithreading is NOT SUPPORTED by current " . "perl interpreter\n"; } exit 1; } if( $snmpdebug ) { $Net::SNMP::Transport::DEBUG = 1; $Net::SNMP::Message::DEBUG = 1; $Net::SNMP::MessageProcessing::DEBUG = 1; $Net::SNMP::Dispatcher::DEBUG = 1; } if( $debug ) { Torrus::Log::setLevel('debug'); } elsif( $verbose ) { Torrus::Log::setLevel('verbose'); } my $everythingsOk = 1; my $perOutfileHostParams = {}; my %outputBundles; foreach my $infile ( @infiles ) { if( not -r $infile ) { my $altfile = $Torrus::Global::discoveryDir . $infile; if( not -r $altfile ) { Error('Cannot find file ' . $infile . ' neither in current directory nor in ' . $Torrus::Global::discoveryDir); exit 1; } else { $infile = $altfile; } } Verbose('Processing ' . $infile); my $parser = new XML::LibXML; my $doc; if( not eval {$doc = $parser->parse_file($infile)} or $@ ) { Error("Failed to parse $infile: $@"); exit 1; } my $root = $doc->documentElement(); if( $root->nodeName() ne 'snmp-discovery' ) { Error('XML root element is not "snmp-discovery" in ' . $infile); exit 1; } my $format_version = (($root->getElementsByTagName('file-info'))[0]-> getElementsByTagName('format-version'))[0]->textContent(); $format_version =~ s/\s//g; if( not $format_version or not $formatsSupported{$format_version} ) { Error('Invalid format or format version not supported: ' . $infile); exit 1; } my $globalParams = parseParams( $root ); # Parse the body of the XML foreach my $hostNode ( $root->getChildrenByTagName('host') ) { my $hostParams = parseParams( $hostNode, $globalParams ); normalizeParams( $hostParams ); my $outfile = $hostParams->{'output-file'}; if( not exists($perOutfileHostParams->{$outfile}) ) { $perOutfileHostParams->{$outfile} = []; } push( @{$perOutfileHostParams->{$outfile}}, $hostParams ); my $outBundles = $hostParams->{'output-bundle'}; if( defined($outBundles) ) { foreach my $bundleName ( split( /\s*,\s*/, $outBundles ) ) { $bundleName = absXmlFilename( $bundleName ); $outputBundles{$bundleName}{ relXmlFilename($outfile) } = 1; } } } } # Start discovery my $jobQueue; my $bundleDeletionQueue; my $confBuildSemaphore; if( $workerThreads > 1 ) { require threads; require threads::shared; require Thread::Queue; require Thread::Semaphore; threads::shared::share( \$everythingsOk ); foreach my $callback (values %Torrus::DevDiscover::threading_init_callbacks) { &{$callback}(); } $jobQueue = new Thread::Queue; $bundleDeletionQueue = new Thread::Queue; $confBuildSemaphore = new Thread::Semaphore; # Enqueue the output filenames foreach my $outfile ( sort keys %{$perOutfileHostParams} ) { if( not matchLimitRe( $outfile ) ) { next; } $jobQueue->enqueue( $outfile ); } # Start the worker threads my @workers; foreach my $i ( 1..$workerThreads ) { push( @workers, threads->create( \&discoveryThread ) ); } # Wait for workers to finish the jobs while( my $thr = shift( @workers ) ) { my $tid = $thr->tid(); $thr->join(); Debug('Cleaning up thread #' . $tid); undef $thr; } # Process the files to be excluded from bundles if( not $everythingsOk ) { my $outfile; while( defined( $outfile = $bundleDeletionQueue->dequeue_nb() ) ) { removeFromBundle( $outfile ); } } } else { # Single-thread operation foreach my $callback (values %Torrus::DevDiscover::thread_start_callbacks) { &{$callback}(); } foreach my $outfile ( sort keys %{$perOutfileHostParams} ) { if( not matchLimitRe( $outfile ) ) { next; } if( not doDiscover( $outfile ) ) { removeFromBundle( $outfile ); } } foreach my $callback (values %Torrus::DevDiscover::thread_end_callbacks) { &{$callback}(); } } # Discovery finished, do the bundles if( scalar( keys %outputBundles ) > 0 ) { if( defined( $limitre ) ) { Warn('Cannot write bundles with --limit option specified. ' . 'Bundle files remain unchanged'); } elsif( $everythingsOk ) { foreach my $bundleName ( sort keys %outputBundles ) { my $cb = new Torrus::ConfigBuilder; $cb->addCreatorInfo( $creator ); foreach my $bundleMember ( sort keys %{$outputBundles{$bundleName}} ) { $cb->addFileInclusion( $bundleMember ); } my $ok = $cb->toFile( $bundleName ); if( $ok ) { Verbose('Wrote bundle to ' . $bundleName); } else { Error('Cannot write bundle to ' . $bundleName . ': ' . $!); $everythingsOk = 0; } } } else { Error('Skipping bundles generation because of errors'); } } exit($everythingsOk ? 0:1); sub parseParams { my $parentNode = shift; my $paramhash = shift; # Clone the parameters hash my $ret = {}; if( $paramhash ) { while( my($key, $val) = each %{$paramhash} ) { $ret->{$key} = $val; } } foreach my $paramNode ( $parentNode->getChildrenByTagName('param') ) { my $param = $paramNode->getAttribute('name'); my $value = $paramNode->getAttribute('value'); if( not $param ) { Error("Parameter without name"); exit 1; } if( not defined( $value ) ) { $value = $paramNode->textContent(); } # Remove spaces in the head and tail. $value =~ s/^\s+//o; $value =~ s/\s+$//o; # Replace linebreaks with spaces $value =~ s/\n|\r/ /mgo; $ret->{$param} = $value; } return $ret; } sub normalizeParams { my $params = shift; if( not defined( $params->{'output-file'} ) ) { Warn('output-file parameter is not defined. Using routers.xml'); $params->{'output-file'} = 'routers.xml'; } else { $params->{'output-file'} = absXmlFilename( $params->{'output-file'} ); } if( defined( $params->{'host-subtree'} ) ) { my $subtree = $params->{'host-subtree'}; if( $subtree !~ /^\/[0-9A-Za-z_\-\.\/]*$/ or $subtree =~ /\.\./ ) { Error("Invalid format for subtree name: " . $subtree); exit 1; } } if( defined( $params->{'snmp-community'} ) ) { # Remove any possible Unicode character treatment $params->{'snmp-community'} = pack( 'A*', $params->{'snmp-community'} ); } return; } # Replaces $XMLCONFIG with the XML root directory sub absXmlFilename { my $filename = shift; my $subst = '$XMLCONFIG'; my $offset = index( $filename, $subst ); if( $offset >= 0 ) { my $len = length( $subst ); substr( $filename, $offset, $len, $Torrus::Global::siteXmlDir ); } else { if( $filename !~ /^\// ) { $filename = $Torrus::Global::siteXmlDir . '/' . $filename; } } return $filename; } # Removes XML root directory from path sub relXmlFilename { my $filename = shift; my $subst = $Torrus::Global::siteXmlDir; my $len = length( $subst ); if( $filename =~ /^\// ) { my $offset = index( $filename, $subst ); if( $offset == 0 ) { $filename = substr( $filename, $len ); # we don't know if xmldir has a trailing slash $filename =~ s/^\///; } } return $filename; } sub matchLimitRe { my $filename = shift; if( defined( $limitre ) ) { $filename =~ s/^.*\///; if( $filename !~ $limitre ) { return 0; } } return 1; } # Pick up next available outfile until the job queue is empty sub discoveryThread { &Torrus::Log::setTID( threads->tid() ); Debug('Started thread no. ' . threads->tid()); foreach my $callback (values %Torrus::DevDiscover::thread_start_callbacks) { &{$callback}(); } my $outfile; while( defined( $outfile = $jobQueue->dequeue_nb() )) { if( not doDiscover( $outfile ) ) { $bundleDeletionQueue->enqueue( $outfile ); } } foreach my $callback (values %Torrus::DevDiscover::thread_end_callbacks) { &{$callback}(); } Debug('Finished thread #' . threads->tid()); return; } sub doDiscover { my $outfile = shift; Verbose('Preparing to write ' . $outfile); my $dd = new Torrus::DevDiscover; my $ok = 1; foreach my $hostParams ( @{$perOutfileHostParams->{$outfile}} ) { $ok = $dd->discover( $hostParams ); if( not $ok ) { foreach my $callback (values %Torrus::DevDiscover::discovery_failed_callbacks) { &{$callback}( $hostParams ); } Error($outfile . ' was not written because of errors'); $everythingsOk = 0; last; } } if( $ok ) { # LibXML2 is not thread-safe, so we create the XML files # one at a time if( $workerThreads > 1 ) { $confBuildSemaphore->down(); } my $cb = new Torrus::ConfigBuilder; $cb->addCreatorInfo( $creator ); $dd->buildConfig( $cb ); $cb->addRequiredFiles(); $cb->addStatistics(); $ok = $cb->toFile( $outfile ); if( $ok ) { Verbose('Wrote ' . $outfile); } else { Error('Cannot write ' . $outfile . ': ' . $!); $everythingsOk = 0; } if( $workerThreads > 1 ) { $confBuildSemaphore->up(); } } if( $makedirs ) { if( $everythingsOk ) { # Not sure if these calls are reentrant if( $workerThreads > 1 ) { $confBuildSemaphore->down(); } my ($login,$pass,$uid,$gid) = getpwnam('@torrus_user@') or die('Cannot get user details for @torrus_user@'); foreach my $dir ( $dd->listDataDirs() ) { if( not -d $dir ) { Debug('Creating directory: ' . $dir); mkdir( $dir ) or Error('Cannot create directory: ' . $dir . ': ' . $!); chown( $uid, $gid, $dir ) or Error('Cannot change ownership for ' . $dir . ': ' . $!); chmod( 02755, $dir ) or Error('Cannot chmod 02755 for ' . $dir . ': ' . $!); } } if( $workerThreads > 1 ) { $confBuildSemaphore->up(); } } else { Error('Skipping mkdir because of errors'); } } return $ok; } sub removeFromBundle { my $outfile = shift; my $relname = relXmlFilename($outfile); my $removeFromBundle = 1; if( $forcebundle ) { if( defined( $fallback ) and -e $outfile and -M $outfile <= $fallback ) { Warn('Falling back to the old version of ' . $relname); $removeFromBundle = 0; } $everythingsOk = 1; } if( $removeFromBundle ) { foreach my $bundleName ( sort keys %outputBundles ) { if( exists( $outputBundles{$bundleName}{$relname} ) ) { delete $outputBundles{$bundleName}{$relname}; Warn('Bundle ' . $bundleName . ' will not have ' . $relname . ' included because of errors'); } } } return; } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/acledit.in0000644000175000017500000003031411744744777012456 00000000000000#!@PERL@ # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use Getopt::Long; use Torrus::Log; use Torrus::ACL::Edit; use Torrus::SiteConfig; exit(1) unless Torrus::SiteConfig::verify(); our %knownPrivileges = ( 'DisplayTree' => 'tree', 'DisplayAdmInfo' => 'tree', 'DisplayReports' => 'tree', 'GlobalSearch' => 'global' ); our @addgroups; our @delgroups; our @modgroups; our @permitprivs; our @denyprivs; our @forobjects; our $adduser; our $addhost; our $deluser; our $moduser; our @addtogroups; our @delfromgroups; our $password; our $host_password; our $commonname; our $exportfile; our $exporttemplate = "aclexport.xml"; our $importfile; our $clearconf; our @showgroups; our @showusers; our $listall; our $force; our $debug; our $verbose; our $help_needed; my $ok = GetOptions ('addgroup=s' => \@addgroups, 'delgroup=s' => \@delgroups, 'modgroup=s' => \@modgroups, 'permit=s' => \@permitprivs, 'deny=s' => \@denyprivs, 'for=s' => \@forobjects, 'adduser=s' => \$adduser, 'addhost=s' => \$addhost, 'deluser=s' => \$deluser, 'moduser=s' => \$moduser, 'addtogroup=s' => \@addtogroups, 'delfromgroup=s' => \@delfromgroups, 'password=s' => \$password, 'hostpassword=s' => \$host_password, 'cn=s' => \$commonname, 'export=s' => \$exportfile, 'template=s' => \$exporttemplate, 'import=s' => \$importfile, 'clear' => \$clearconf, 'showgroup=s' => \@showgroups, 'showuser=s' => \@showusers, 'list' => \$listall, 'force' => \$force, 'debug' => \$debug, 'verbose' => \$verbose, 'help' => \$help_needed); if( not $ok or $help_needed or scalar(@ARGV) > 0 or ( @addgroups ? 1:0 ) + ( @delgroups ? 1:0 ) + ( @modgroups ? 1:0 ) > 1 or ( ( @permitprivs or @denyprivs ) and not @forobjects ) or ( $adduser ? 1:0 ) + ( $deluser ? 1:0 ) + ( $moduser ? 1:0 ) > 1 or ( ( @addtogroups or @delfromgroups or defined($password) or defined($host_password) or defined($commonname) ) and not (defined($adduser) or defined($addhost) or defined($moduser)) ) ) { print STDERR "Usage: $0 [options...]\n", "Group Options:\n", " --addgroup=GROUP add group\n", " --delgroup=GROUP delete group\n", " --modgroup=GROUP modify group\n", " --permit=PRIVILEGE add privilege to group(s)\n", " --deny=PRIVILEGE revoke privilege from group(s)\n", " --for=TREE subject of privilege or '*'\n", " --force change privilege for non-existent object\n", " --showgroup=GROUP display group details\n", "User Options:\n", " --adduser=UID add new user\n", " --deluser=UID delete user\n", " --moduser=UID modify user\n", " --addtogroup=GROUP add user to group(s)\n", " --delfromgroup=GROUP delete user from group(s)\n", " --password=PASSWORD set the user password\n", " --hostpassword=PASSWORD set the host password (UID must be a host)\n", " --cn=\"John Smith\" set the user common name\n", " --showuser=USER display user details\n", "General Options:\n", " --export=FILE export ACL config to a file\n", " --template=NAME [aclexport.xml] export template \n", " --import=FILE import ACL config from a file\n", " --clear delete ALL user and privileges configuration\n", " --list list all users and groups they belong to\n", " --debug set the log level to debug\n", " --verbose set the log level to verbose\n", " --help this help message\n\n", "Privileges:\n", " DisplayTree see the datasources for a tree\n", " DisplayAdmInfo see the administrative info for a tree\n", " DisplayReports see the administrative info for a tree\n", " GlobalSearch search globally for '*'\n"; exit 1; } if( $debug ) { Torrus::Log::setLevel('debug'); } elsif( $verbose ) { Torrus::Log::setLevel('verbose'); } # We set the signal handlers, but we actually don't react on # signals, because the acledit is a fast utility &Torrus::DB::setSafeSignalHandlers(); Verbose(sprintf("Torrus version %s", '@VERSION@')); my $aclEdit = new Torrus::ACL::Edit; if( $ok and $exportfile ) { $ok = $aclEdit->exportACL( $exportfile, $exporttemplate ) ? $ok:0; } if( $ok and $clearconf ) { $ok = $aclEdit->clearConfig() ? $ok:0; } if( @delgroups ) { $ok = $aclEdit->deleteGroups( @delgroups ) ? $ok:0; } if( @addgroups ) { $ok = $aclEdit->addGroups( @addgroups ) ? $ok:0; } if( @addgroups or @modgroups ) { my $groups = [ @addgroups, @modgroups ]; if( @permitprivs ) { $ok = setupPrivileges( $aclEdit, \@permitprivs, $groups, \@forobjects, 1 ) ? $ok:0; } if( @denyprivs ) { $ok = setupPrivileges( $aclEdit, \@denyprivs, $groups, \@forobjects, 0 ) ? $ok:0; } } my $attrValues = {}; my $uid; if( $commonname ) { $attrValues->{'cn'} = $commonname; } if( $adduser ) { $uid = $adduser; $ok = $aclEdit->addUser( $uid, $attrValues ) ? $ok:0; } elsif( $addhost ) { $uid = $addhost; $uid =~ s/\W/_/g; $ok = $aclEdit->addUser( $uid, $attrValues ) ? $ok:0; } elsif( $moduser ) { $uid = $moduser; if( scalar( keys %{$attrValues} ) ) { $ok = $aclEdit->setUserAttributes( $uid, $attrValues ) ? $ok:0; } } elsif( $deluser ) { $ok = $aclEdit->deleteUser( $deluser ) ? $ok:0; } if( $uid ) { if( $password ) { $ok = $aclEdit->setPassword( $uid, $password ) ? $ok:0; } elsif( $host_password ) { $ok = $aclEdit->setPassword( $uid, $uid . '//' . $host_password ) ? $ok:0; } } if( $uid and scalar( @addtogroups ) ) { $ok = $aclEdit->addUserToGroups( $uid, @addtogroups ) ? $ok:0; } if( $uid and scalar( @delfromgroups ) ) { $ok = $aclEdit->delUserFromGroups( $uid, @delfromgroups ) ? $ok:0; } if( $ok and $importfile ) { $ok = $aclEdit->importACL( $importfile ) ? $ok:0; } if( $listall ) { @showusers = $aclEdit->listUsers(); @showgroups = $aclEdit->listGroups(); } my %showGroupsHash; if( @showgroups ) { foreach my $group ( @showgroups ) { if( $aclEdit->groupExists( $group ) ) { $showGroupsHash{$group} = 1; } else { Error('No such group: ' . $group); $ok = 0; } } } if( @showusers ) { foreach my $uid ( sort @showusers ) { if( $aclEdit->userExists( $uid ) ) { my $cn = $aclEdit->userAttribute( $uid, 'cn' ); if( defined($cn) ) { $cn = '(' . $cn . ')'; } else { $cn = ''; } printf("User: %s %s\n", $uid, $cn ); foreach my $group ( sort $aclEdit->memberOf( $uid ) ) { printf("Member of: %s\n", $group); $showGroupsHash{$group} = 1; } if( $verbose or $debug ) { printf("Modified: %s\n", $aclEdit->userAttribute( $uid, 'modified' ) ); } printf ("\n"); } else { Error('No such user: ' . $uid); $ok = 0; } } } if( %showGroupsHash ) { foreach my $group ( sort keys %showGroupsHash ) { printf("Group: %s\n", $group); my $privs = $aclEdit->listPrivileges( $group ); foreach my $object ( sort keys %{$privs} ) { foreach my $priv ( sort keys %{$privs->{$object}} ) { printf("Has privilege \"%s\" for %s \"%s\"\n", $priv, $knownPrivileges{$priv}, $object); } } foreach my $uid ( sort @{$aclEdit->listGroupMembers( $group )} ) { printf("Member: %s\n", $uid); } if( $verbose or $debug ) { printf("Modified: %s\n", $aclEdit->groupAttribute( $group, 'modified' ) ); } printf ("\n"); } } if( not $ok ) { Warn('acledit exited with errors'); } exit( $ok ? 0:1 ); sub setupPrivileges { my $aclEdtit = shift; my $privs = shift; my $groups = shift; my $objects = shift; my $permit = shift; my $success = 1; foreach my $priv ( @{$privs} ) { if( defined( $knownPrivileges{$priv} ) ) { if( $knownPrivileges{$priv} eq 'tree' ) { foreach my $obj ( @{$objects} ) { if( $obj eq '*' or Torrus::SiteConfig::treeExists( $obj ) or $force ) { foreach my $group ( @{$groups} ) { if( $permit ) { $success = $aclEdit-> setPrivilege( $group, $obj, $priv ) ? $success:0; } else { $success = $aclEdit-> clearPrivilege( $group, $obj, $priv ) ? $success:0; } } } else { Error('No such tree: ' . $obj); $success = 0; } } } elsif( $knownPrivileges{$priv} eq 'global' ) { foreach my $obj ( @{$objects} ) { if( $obj ne '*' ) { Error("Privilege GlobalSearch should be for '*'"); $success = 0; } } if( $success ) { foreach my $group ( @{$groups} ) { if( $permit ) { $success = $aclEdit-> setPrivilege( $group, '*', $priv ) ? $success:0; } else { $success = $aclEdit-> clearPrivilege( $group, '*', $priv ) ? $success:0; } } } } } else { Error('Unknown privilege name: ' . $priv); $success = 0; } } return $success; } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/bdbinfo.in0000644000175000017500000000220611661302716012430 00000000000000#!@PERL@ -w # Copyright (C) 2002-2008 Stanislav Sinyagin # # 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. # Stanislav Sinyagin use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use BerkeleyDB; printf("MAJOR: %d\n", DB_VERSION_MAJOR); printf("MINOR: %d\n", DB_VERSION_MINOR); printf("PATCH: %d\n", DB_VERSION_PATCH); printf("STRING: %s\n", DB_VERSION_STRING); # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/torrus.fcgi.in0000644000175000017500000000346211661302716013277 00000000000000#!@PERL@ -w # Copyright (C) 2010 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # FastCGI handler # Can be used as alternative to mod_perl in Apache # Can also be used with lighttpd use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use CGI::Fast; use Torrus::Log; use Torrus::CGI; if( $Torrus::Renderer::globalDebug ) { &Torrus::Log::setLevel('debug'); } # The FCGI handler process exits after a while and lets FCGI re-spawn # the process. This way there's less chance of DB becoming corrupted # The limits are randomized, so that multiple FCGI processes don't stop # at the same time my $max_req_count = $Torrus::FCGI::maxRequests + rand($Torrus::FCGI::maxRequestsRandomFactor); my $max_time = time() + $Torrus::FCGI::maxLifetime + rand($Torrus::FCGI::maxLifetimeRandomFactor); my $req_count = 0; while( my $q = new CGI::Fast ) { Torrus::CGI->process($q); $req_count++; if( $req_count > $max_req_count or time() > $max_time ) { exit(0); } } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/schedulerinfo.in0000644000175000017500000003043011661302716013657 00000000000000#!@PERL@ -w # Copyright (C) 2003 Stanislav Sinyagin # Copyright (C) 2003 Christian Schnidrig # # 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. # Stanislav Sinyagin use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use Getopt::Long; use Torrus::ConfigTree; use Torrus::SiteConfig; use Torrus::SchedulerInfo; use Torrus::Log; exit(1) unless Torrus::SiteConfig::verify(); my $tree; my $report_config; my $report_runtime; my $clear_treestats; my $help_needed; my $ok = GetOptions('tree=s' => \$tree, 'config' => \$report_config, 'runtime' => \$report_runtime, 'clear' => \$clear_treestats, 'help' => \$help_needed); if( not $ok or not $tree or not ( $report_config or $report_runtime or $clear_treestats ) or $help_needed or scalar(@ARGV) > 0 ) { print STDERR "Usage: $0 --tree=NAME [options...]\n", "Options:\n", " --tree=NAME tree name\n", " --config report scheduler configuration\n", " --runtime report scheduler runtime statistics\n", " --clear clear scheduler statistics for specific tree\n", " --help this help message\n"; exit 1; } if( not Torrus::SiteConfig::treeExists( $tree ) ) { Error('Tree ' . $tree . ' does not exist'); exit 1; } &Torrus::DB::setSafeSignalHandlers(); if( $clear_treestats ) { my $stats = new Torrus::SchedulerInfo( -Tree => $tree, -WriteAccess => 1 ); $stats->clearAll(); print STDERR "Statistics cleared for tree $tree\n"; exit 0; } thickLine(); printf("Torrus version %s\n", '@VERSION@'); printf("Datasources tree: %s\n", $tree); printf("Date: %s\n\n", scalar( localtime( time() ) ) ); if( $report_config ) { my $config_tree = new Torrus::ConfigTree( -TreeName => $tree ); if( not defined($config_tree) ) { Error("Configuration is not ready"); exit 1; } my $stats = { 'collectorLeaves' => {}, 'monitorLeaves' => 0 }; collectStats( $config_tree, $stats ); thickLine(); printf("Scheduler configuration report\n\n"); foreach my $instance ( sort {$a<=>$b} keys %{$stats->{'collectorLeaves'}} ) { printf("Collector leaves for instance #%d: %d\n", $instance, $stats->{'collectorLeaves'}{$instance}); } printf("Total monitor leaves: %d\n\n", $stats->{'monitorLeaves'}); printf("Scheduled leaves by type:\n"); foreach my $type ( sort keys %{$stats->{'leavesPerType'}} ) { printf(" %10s %-10d\n", $type, $stats->{'leavesPerType'}{$type}); } printf("\n"); foreach my $instance ( sort {$a<=>$b} keys %{$stats->{'collectorLeaves'}} ) { if( $stats->{'collectorLeaves'}{$instance} > 0 ) { &Torrus::DB::checkInterrupted(); printf("Collector execution timeline for instance #%d:\n", $instance); reportTimeline( $stats->{'collectorSchedule'}{$instance} ); } } if( $stats->{'monitorLeaves'} > 0 ) { printf("Monitor execution timeline:\n"); reportTimeline( $stats->{'monitorSchedule'} ); } } if( $report_runtime ) { my @reportFormats = ( { 'label' => 'Running Time', 'varname' => 'RunningTime' }, { 'label' => 'Late Start', 'varname' => 'LateStart' }, { 'label' => 'Too Long', 'varname' => 'TooLong' }, { 'label' => 'RRD Queue', 'varname' => 'RRDQueue' }, { 'label' => 'Raw Queue', 'varname' => 'RawQueue' } ); my @counterFormats = ( { 'label' => 'running cycles passed', 'varname' => 'NTimesRunningTime' }, { 'label' => 'late starts', 'varname' => 'NTimesLateStart' }, { 'label' => 'too long runs', 'varname' => 'NTimesTooLong' }, { 'label' => 'overrun periods', 'varname' => 'CountOverrunPeriods' }, { 'label' => 'missed periods', 'varname' => 'CountMissedPeriods' } ); my $sInfo = new Torrus::SchedulerInfo( '-Tree' => $tree ); exit(1) if not defined( $sInfo ); my $stats = $sInfo->readStats(); thickLine(); printf("Scheduler runtime report\n\n"); my $periodicTasks = {}; foreach my $taskId ( keys %{$stats} ) { my ($type, $taskName, $instance, $period, $offset) = split( ':', $taskId ); if( $type eq 'P' ) { $periodicTasks->{$taskName}{$instance}{$period}{$offset} = $taskId; } } foreach my $taskName ( sort keys %{$periodicTasks} ) { foreach my $instance ( sort {$a<=>$b} keys %{$periodicTasks->{$taskName}} ) { foreach my $period ( sort {$a<=>$b} keys %{$periodicTasks->{$taskName}{$instance}} ) { foreach my $offset ( sort {$a<=>$b} keys %{$periodicTasks->{$taskName}{$instance}{$period}} ) { &Torrus::DB::checkInterrupted(); my $taskId = $periodicTasks->{$taskName}{$instance}{ $period}{$offset}; my $ref = $stats->{$taskId}; printf("Task: %s, Instance: %d, " . "Period: %d seconds, Offset: %d seconds\n", $taskName, $instance, $period, $offset); foreach my $format ( @counterFormats ) { if( defined( $ref->{$format->{'varname'}} ) ) { printf("%5d %s\n", $ref->{$format->{'varname'}}, $format->{'label'} ); } } thinLine(); printf("%-15s%-10s%-10s%-10s%-10s\n", '', 'Min', 'Max', 'Average', 'Exp Average'); foreach my $format ( @reportFormats ) { my $varname = $format->{'varname'}; if( defined( $ref->{'Min' . $varname} ) ) { printf("%-15s%-10d%-10d%-10.1f%-10.1f\n", $format->{'label'}, $ref->{'Min' . $varname}, $ref->{'Max' . $varname}, $ref->{'Avg' . $varname}, $ref->{'ExpAvg' . $varname}); } } thinLine(); printf("\n"); } } } } } thickLine(); exit 0; sub collectStats { my $config_tree = shift; my $stats = shift; my $token = shift; if( not defined( $token ) ) { $token = $config_tree->token('/'); } my @children = $config_tree->getChildren( $token ); foreach my $ctoken ( @children ) { &Torrus::DB::checkInterrupted(); if( $config_tree->isSubtree( $ctoken ) ) { collectStats( $config_tree, $stats, $ctoken ); } elsif( $config_tree->isLeaf( $ctoken ) ) { if( $config_tree->getNodeParam( $ctoken, 'ds-type' ) eq 'collector' ) { my $instance = $config_tree->getNodeParam ( $ctoken, 'collector-instance' ); $stats->{'collectorLeaves'}{$instance}++; my $type = 'c:' . $config_tree->getNodeParam( $ctoken, 'collector-type' ); my $period = $config_tree->getNodeParam( $ctoken, 'collector-period' ); $period = int( $period ); # make sure we're talking integers my $offset = $config_tree-> getNodeParam( $ctoken, 'collector-timeoffset' ); $stats->{'leavesPerType'}{$type}++; $stats->{'collectorSchedule'}{$instance}{$period}{ $offset}{$type}++; } if( defined( $config_tree->getNodeParam( $ctoken, 'monitor' ) ) ) { $stats->{'monitorLeaves'}++; my $type = 'monitor'; my $period = $config_tree->getNodeParam( $ctoken, 'monitor-period' ); $period = int( $period ); # make sure we're talking integers my $offset = $config_tree-> getNodeParam( $ctoken, 'monitor-timeoffset' ); $offset = int($offset) % $period; $stats->{'leavesPerType'}{$type}++; $stats->{'monitorSchedule'}{$period}{$offset}{$type}++; } } } return; } # caluclate and print the schedule sub reportTimeline { my $schedule = shift; # calculate the common period length (least common multiple) my $lcm = 0; foreach my $period ( keys %{$schedule} ) { my $x = $period; my $y = $lcm; my $z; if( $y == 0 ) { $lcm = $x; } else { if( $x < $y ) { my $tmp = $y; $y = $x; $x = $tmp; } while( $y != 0 ) { $z = $x % $y; $x = $y; $y = $z; } $lcm = $lcm * $period / $x; } } printf("Least common period: %d seconds\n", $lcm); # populate the common period my %cp; my $chunks = 0; foreach my $period ( keys %{$schedule} ) { foreach my $offset ( keys %{$schedule->{$period}} ) { $chunks++; foreach my $type ( keys %{$schedule->{$period}{$offset}} ) { for( my $i = 0; $i < ($lcm / $period); $i++ ) { $cp{$i * $period + $offset}{'col'}{$type} += $schedule->{$period}{$offset}{$type}; } } } } printf("Number of chunks: %d \n\n", $chunks ); # calculate interval lengths my $previous; my $first; foreach my $time ( sort { $a <=> $b } keys %cp ) { if( not defined($first) ) { $first = $time; } else { $cp{$previous}{'endtime'} = $time; } $previous = $time; } $cp{$previous}{'endtime'} = $lcm + $first; # print results thinLine(); printf("%-10s%-10s%-20s%-10s\n", 'Offset', 'Interval', 'Type', 'Data'); printf("%-10s%-10s%-20s%-10s\n", '(sec)', '(sec)', '', 'sources'); thinLine(); foreach my $time ( sort { $a <=> $b } keys %cp ) { foreach my $type ( keys %{$cp{$time}{'col'}} ) { printf("%-10d%-10d%-20s%-10d\n", $time, $cp{$time}{'endtime'} - $time, $type, $cp{$time}{'col'}{$type} ); } } thinLine(); printf("\n"); return; } sub thickLine { foreach my $i ( 1..75 ) { print '='; } print "\n"; return; } sub thinLine { foreach my $i ( 1..70 ) { print '-'; } print "\n"; return; } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/flushmonitors.in0000644000175000017500000000725712413217640013751 00000000000000#!@PERL@ -w # Copyright (C) 2010 Stanislav Sinyagin # # 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. # Stanislav Sinyagin use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use Getopt::Long; use Torrus::SiteConfig; use Torrus::ConfigTree; use Torrus::Log; exit(1) unless Torrus::SiteConfig::verify(); our @trees; our $all_trees; our $debug; our $verbose; our $help_needed; my $ok = GetOptions ('tree=s' => \@trees, 'all' => \$all_trees, 'debug' => \$debug, 'verbose' => \$verbose, 'help' => \$help_needed); if( not $ok or not (scalar(@trees) or $all_trees) or $help_needed or scalar(@ARGV) > 0 ) { print STDERR "Usage: $0 --tree=NAME [options...]\n", "The utility flushes all monitor alarms and dynamic tokenset members\n", "Options:\n", " --tree=NAME tree name(s) to flush\n", " --all flush all trees\n", " --debug set the log level to debug\n", " --verbose set the log level to info\n", " --help this help message\n"; exit 1; } if( $all_trees ) { @trees = Torrus::SiteConfig::listTreeNames(); } if( $debug ) { Torrus::Log::setLevel('debug'); } elsif( $verbose ) { Torrus::Log::setLevel('verbose'); } &Torrus::DB::setSafeSignalHandlers(); Verbose(sprintf('Torrus version %s', '@VERSION@')); foreach my $tree ( @trees ) { if( not Torrus::SiteConfig::treeExists( $tree ) ) { Error("Tree named \"" . $tree . "\" does not exist"); exit(1); } &Torrus::DB::checkInterrupted(); Verbose("Flushing alarms and tokensets for the tree: $tree"); my $config_tree = new Torrus::ConfigTree( -TreeName => $tree, -Wait => 1 ); if( not defined( $config_tree ) ) { next; } my $db = new Torrus::DB('monitor_alarms', -Subdir => $tree, -WriteAccess => 1); my $cursor = $db->cursor(-Write => 1); while( my ($key, $timers) = $db->next($cursor) ) { Debug('Deleting alarm: ' . $key); $db->c_del( $cursor ); } $db->c_close($cursor); undef $cursor; undef $db; &Torrus::DB::checkInterrupted(); foreach my $ts ( $config_tree->getTsets() ) { Debug('Processing tokenset: ' . $ts); foreach my $member ( $config_tree->tsetMembers( $ts ) ) { my $origin = $config_tree->tsetMemberOrigin( $ts, $member ); if( not defined( $origin ) or $origin ne 'static' ) { my $path = $config_tree->path($member); $config_tree->tsetDelMember($ts, $member); Verbose('deleted ' . $path . ' from tokenset: ' . $ts); } } } undef $config_tree; &Torrus::DB::cleanupEnvironment(); } exit; # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/clearcache.in0000644000175000017500000000221211661302716013074 00000000000000#!@PERL@ # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use Torrus::Log; use Torrus::Renderer; &Torrus::DB::setSafeSignalHandlers(); my $renderer = new Torrus::Renderer; $renderer->clearcache(); undef $renderer; Info('Renderer cache cleared'); exit 0; # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/genreport.in0000644000175000017500000001103511661302716013032 00000000000000#!@PERL@ # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # Collect the router information and create the XML file use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use Getopt::Long; use Torrus::Log; use Torrus::ReportOutput::HTML; use Torrus::SiteConfig; my $report; my $date; my $time = '00:00'; my $genhtml; my @trees; my $all2tree; my $debug = 0; my $verbose = 0; my $ok = GetOptions( 'report=s' => \$report, 'date=s' => \$date, 'time=s' => \$time, 'genhtml' => \$genhtml, 'tree=s' => \@trees, 'all2tree=s' => \$all2tree, 'verbose' => \$verbose, 'debug' => \$debug ); if( $report and not defined($Torrus::ReportGenerator::modules{$report}) ) { print STDERR "Unknown report name: ", $report, "\n\n"; $ok = 0; } if( not $ok or (not $report and not $genhtml) or ($report and not $date) or ($genhtml and scalar(@trees) > 0 and $all2tree) or scalar( @ARGV ) > 0 ) { print STDERR "Usage: $0 --report=ReportName --date=YYYY-MM-DD | ", "--genhtml options...\n"; print STDERR "Options:\n", " --report=ReportName Report name.\n", " --date=YYYY-MM-DD Report start date. ", "For monthly reports, 1st day in a month.\n", " --time=hh:mm Report start time. Ignored for monthly reports\n", " --genhtml Generate HTML output from the database\n", " --tree=TREE Generate HTML for a given tree only\n", " --all2tree=TREE Generate reports for all service IDs and place\n", " into the given tree (excludes the option --tree)\n", " --verbose print extra information\n", " --debug print debugging information\n", "\n", "Report names supported:\n"; foreach my $rep ( sort keys %Torrus::ReportGenerator::modules ) { print STDERR " ", $rep, "\n"; } print STDERR "\n"; exit 1; } if( $debug ) { Torrus::Log::setLevel('debug'); } elsif( $verbose ) { Torrus::Log::setLevel('verbose'); } &Torrus::DB::setSafeSignalHandlers(); if( $report ) { my $class = $Torrus::ReportGenerator::modules{$report}; if( not eval('require ' . $class) or $@ ) { die($@ . "\n"); } my $generator = $class->new({ 'Name' => $report, 'Date' => $date, 'Time' => $time}); if( defined( $generator ) ) { $generator->generate(); } else { $ok = 0; } } if( $genhtml ) { if( $all2tree ) { push( @trees, $all2tree ); } if( scalar( @trees ) == 0 ) { @trees = Torrus::SiteConfig::listTreeNames(); } else { foreach my $tree ( @trees ) { if( not Torrus::SiteConfig::treeExists( $tree ) ) { Error('Tree ' . $tree . ' does not exist'); $ok = 0; } } } if( $ok ) { foreach my $tree ( @trees ) { &Torrus::DB::checkInterrupted(); Verbose('Generating HTML report for tree ' . $tree); my $options = {'Tree' => $tree}; if( length( $all2tree ) > 0 ) { $options->{'All_Service_IDs'} = 1; } my $out = new Torrus::ReportOutput::HTML( $options ); if( $out->init() ) { $ok = $out->generate() ? $ok:0; } else { $ok = 0; } } } } exit($ok ? 0:1); # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/action_snmptrap.in0000644000175000017500000001251712107464645014242 00000000000000#!@PERL@ # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # SNMP v2c trap # See Torrus-MIB.txt for reference use strict; use warnings; use Net::SNMP qw(:ALL); use Getopt::Long; require '@snmptrap_siteconfig_pl@'; if( not $ENV{'TORRUS_TOKEN'} ) { print STDERR ("Torrus environment variables missing. This program ", "must be run from Torrus Monitor\n"); exit 1; } my @hosts; my $severity = $ENV{'TORRUS_SEVERITY'}; $severity = 0 unless defined($severity); my $ok = GetOptions( 'host=s' => \@hosts, 'community=s' => \$Torrus::Snmptrap::community, 'port=i' => \$Torrus::Snmptrap::port, 'severity=i' => \$severity ); if( not $ok ) { print STDERR ("Error parsing options\n"); exit 1; } if( scalar(@hosts) > 0 ) { @Torrus::Snmptrap::hosts = @hosts; } my $oid_prefix = '.1.3.6.1.4.1.14697.1.1.1'; my %event_type = ( 'set' => 1, 'repeat' => 2, 'clear' => 3, 'forget' => 4 ); my @varbindlist = ( $oid_prefix . '.1', INTEGER32, 1, $oid_prefix . '.2', OCTET_STRING, $ENV{'TORRUS_TOKEN'}, $oid_prefix . '.3', OCTET_STRING, $ENV{'TORRUS_MONITOR'}, $oid_prefix . '.4', INTEGER, $event_type{$ENV{'TORRUS_EVENT'}}, $oid_prefix . '.5', OCTET_STRING, $ENV{'TORRUS_NODEPATH'}, $oid_prefix . '.6', OCTET_STRING, snmp_dateandtime( $ENV{'TORRUS_TSTAMP'} ), $oid_prefix . '.7', OCTET_STRING, $ENV{'TORRUS_TREE'}, $oid_prefix . '.8', INTEGER32, $severity, $oid_prefix . '.9', OCTET_STRING, $ENV{'TORRUS_MCOMMENT'} ); foreach my $host ( @Torrus::Snmptrap::hosts ) { my( $session, $error ) = Net::SNMP->session( -hostname => $host, -community => $Torrus::Snmptrap::community, -port => $Torrus::Snmptrap::port, -version => 2 ); if( not defined($session) ) { printf STDERR ("Error opening SNMP trap session: %s.\n", $error); exit 1; } my $result = $session->snmpv2_trap( -varbindlist => \@varbindlist ); if( not $result ) { printf STDERR ("Error sending SNMP trap: %s.\n", $session->error()); } $session->close(); } # Converts UNIX time to DateAndTime from SNMPv2-TC # Currently timezone is not handled. # DateAndTime ::= TEXTUAL-CONVENTION # DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d" # STATUS current # DESCRIPTION # "A date-time specification. # # field octets contents range # ----- ------ -------- ----- # 1 1-2 year* 0..65536 # 2 3 month 1..12 # 3 4 day 1..31 # 4 5 hour 0..23 # 5 6 minutes 0..59 # 6 7 seconds 0..60 # (use 60 for leap-second) # 7 8 deci-seconds 0..9 # 8 9 direction from UTC '+' / '-' # 9 10 hours from UTC* 0..13 # 10 11 minutes from UTC 0..59 # # * Notes: # - the value of year is in network-byte order # - daylight saving time in New Zealand is +13 # # For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be # displayed as: # # 1992-5-26,13:30:15.0,-4:0 # # Note that if only local time is known, then timezone # information (fields 8-10) is not present." # SYNTAX OCTET STRING (SIZE (8 | 11)) sub snmp_dateandtime { my $thetime = shift; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime( $thetime ); my $result = pack('nC6', $year + 1900, $mon + 1, $mday, $hour, $min, $sec, 0); return $result; } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/collector.in0000644000175000017500000001245311661512640013017 00000000000000#!@PERL@ # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # we cannot report a failure of STDERR reopening, as we are already a # forked child, so this Perl::Critic warning is disabled. ## no critic (InputOutput::RequireCheckedOpen) use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use IO::File; use Proc::Daemon; use Getopt::Long; use Torrus::Log; use Torrus::ConfigTree; use Torrus::Collector; use Torrus::CollectorScheduler; use Torrus::SiteConfig; exit(1) unless Torrus::SiteConfig::verify(); my $tree; my $instance; my $nodaemon; my $runonce; my $runalways; my $debug; my $verbose; my $help_needed; # Derive the process name from the command line my $process_name = $0; $process_name =~ s/^.*\/([^\/]+)$/$1/; $process_name .= ' ' . join(' ', @ARGV); my $ok = GetOptions ('tree=s' => \$tree, 'instance=i' => \$instance, 'nodaemon' => \$nodaemon, 'runonce' => \$runonce, 'runalways' => \$runalways, 'debug' => \$debug, 'verbose' => \$verbose, 'help' => \$help_needed); if( not $ok or not $tree or $help_needed or scalar(@ARGV) > 0 ) { print STDERR "Usage: $0 --tree=NAME [options...]\n", "Options:\n", " --tree=NAME tree name\n", " --instance=N instance number for multiple collectors per tree\n", " --nodaemon do not fork daemon and log to STDERR\n", " --runonce run one time and exit. Implies --nodaemon\n", " --runalways continue running if no collectors defined\n", " --debug set the log level to debug\n", " --verbose set the log level to info\n", " --help this help message\n"; exit 1; } if( not Torrus::SiteConfig::mayRunCollector( $tree ) ) { Error('Tree ' . $tree . ' is not configured to run collector'); exit 1; } my $nInstances = Torrus::SiteConfig::collectorInstances( $tree ); if( $nInstances > 1 and not defined( $instance ) ) { Error('--instance option is missing'); exit 1; } if( not defined( $instance ) ) { $instance = 0; } if( $instance >= $nInstances ) { Error('Invalid instance number. Allowed from 0 to ' . ($nInstances-1)); exit 1; } if( $debug ) { Torrus::Log::setLevel('debug'); } elsif( $verbose ) { Torrus::Log::setLevel('verbose'); } my $pidfile; if( not $nodaemon and not $runonce ) { my $pidfilename = $Torrus::Global::pidDir . '/collector.' . $tree . '_' . $instance . '.pid'; if( -r $pidfilename ) { my $oldpid; my $fh = IO::File->new($pidfilename, 'r'); if( defined($fh) ) { $oldpid = $fh->getline(); } $fh->close(); $oldpid = 'unknown' unless defined($oldpid); Error('Another collector daemon is running, pid=', $oldpid); exit 1; } &Proc::Daemon::Init(); umask 0017; # Proc::Daemon::Init sets the mask to all-writable # now we're forked, save the PID file for the END block $pidfile = $pidfilename; if( $Torrus::Collector::useSyslog ) { Torrus::Log::enableSyslog('torrus/collector_' . $tree . '_' . $instance); } else { my $logfile = $Torrus::Global::logDir . '/collector.' . $tree . '_' . $instance . '.log'; # At this point, we cannot tell anyone if "open" fails open(STDERR, '>>', $logfile); *STDERR->autoflush(); } my $fh = IO::File->new($pidfile, 'w'); if( defined($fh) ) { $fh->printf('%d', $$); $fh->close(); } else { Error("Cannot open $pidfile for writing: $!"); } } Torrus::Collector::initThreads(); &Torrus::DB::setSafeSignalHandlers(); Info(sprintf("Torrus version %s", '@VERSION@')); Info(sprintf("%s started for tree %s, instance #%d", $0, $tree, $instance)); Info(sprintf("Process ID %d", $$)); my %options = ( '-ProcessName' => $process_name, '-Tree' => $tree, '-Instance' => $instance ); if( $runonce ) { $options{'-RunOnce'} = 1; } if( $runalways ) { $options{'-RunAlways'} = 1; } my $scheduler = new Torrus::CollectorScheduler( %options ); $scheduler->run(); if( not $options{'-RunOnce'} ) { Error("Collector process exited: nothing to collect"); } exit; END { if( defined($pidfile) and -r $pidfile ) { unlink $pidfile; } } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/srvderive.in0000644000175000017500000002140211661302716013035 00000000000000#!@PERL@ # Copyright (C) 2008 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # Combine SUM or MAX from several service IDs and create a new one use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use POSIX qw(floor); use Getopt::Long; use Date::Parse; use Date::Format; use Math::BigFloat; use Torrus::Log; use Torrus::ServiceID; use Torrus::SQL::SrvExport; my $startdate; my $enddate; my $onemonth; my $function; my @input; my $output; my $step = 300; my $debug; my $verbose; my $help_needed; my %known_functions = ('MAX' => \&function_max, 'SUM' => \&function_sum); my $ok = GetOptions( 'start=s' => \$startdate, 'end=s' => \$enddate, 'month' => \$onemonth, 'func=s' => \$function, 'in=s' => \@input, 'out=s' => \$output, 'step=i' => \$step, 'verbose' => \$verbose, 'debug' => \$debug, 'help' => \$help_needed, ); if( $help_needed or not $ok or (not $startdate) or (defined($enddate) + defined($onemonth) != 1) or not $function or (scalar(@input) < 2 and scalar( @ARGV ) < 2) or not $output ) { print STDERR "Usage: $0 TIMESPAN OUTPUT FUNCTION SOURCES...\n\n", "TIMESPAN:\n", " --start=YYYY-MM-DD [mandatory] Start date\n", " --month [optional] Calendar month timespan\n", " --end=YYYY-MM-DD [optional] Next day after the timespan end\n", " Either --month or --end option must be defined\n\n", "OUTPUT:\n", " --out=SERVICEID [mandatory] Output Service ID\n\n", "FUNCTION:\n", " --func=MAX|SUM [mandatory] Aggregation function\n\n", "SOURCES:\n", " Either --in=SERVICEID, or Service ID names as command line ", "arguments.\n", " Minimum 2 sources required\n\n", "Options:\n", " --step=N [300] service data interval\n", " --verbose print extra information\n", " --debug print debugging information\n", " --help print usage information\n", "\n"; exit 1; } push(@input, @ARGV); if( not defined($known_functions{$function}) ) { printf STDERR ("Unknown function: %s. Must be onne of: %s\n", $function, join(', ', sort keys %known_functions)); exit 1; } if( $debug ) { Torrus::Log::setLevel('debug'); } elsif( $verbose ) { Torrus::Log::setLevel('verbose'); } my $starttime = str2time( $startdate ); if( not defined($starttime) ) { Error('Cannot parse start date: ' . $startdate); exit 1; } # Canonize the date $startdate = time2str('%Y-%m-%d', $starttime); my $endtime; if( defined($enddate) ) { $endtime = str2time( $enddate ); if( not defined($endtime) ) { Error('Cannot parse end date: ' . $enddate); exit 1; } if( $endtime < $starttime ) { Error('End date is earlier than start date'); exit 1; } } else { # Calculate +1 calendar month my ($ss,$mm,$hh,$day,$month,$year,$zone) = strptime( $startdate ); $year += 1900; $month++; $day++; my $endyear = $year; my $endmonth = $month + 1; if( $endmonth > 12 ) { $endmonth = 1; $endyear++; } $endtime = str2time( sprintf('%.4d-%.2d-%.2d', $endyear, $endmonth, $day) ); if( not defined($endtime) ) { # oops, it was past the end of the month $day++; $endmonth++; if( $endmonth > 12 ) { $endmonth = 1; $endyear++; } $endtime = str2time( sprintf('%.4d-%.2d-%.2d', $endyear, $endmonth, $day) ); if( not defined($endtime) ) { Error('Cannot determine the end date'); exit 1; } } } # Canonize the date $enddate = time2str('%Y-%m-%d', $endtime); Verbose('Start time: ', scalar(localtime($starttime))); Verbose('End time: ', scalar(localtime($endtime))); my $srvExp = Torrus::SQL::SrvExport->new(); if( not defined( $srvExp ) ) { Error('Cannot connect to the SQL database'); exit 1; } my $srvIDs = $srvExp->getServiceIDs(); foreach my $serviceid ( @input ) { if( not grep {$serviceid eq $_} @{$srvIDs} ) { Error('Input service ID not found in the database: ' . $serviceid); exit 1; } } &Torrus::DB::setSafeSignalHandlers(); # Check if the output ServiceID exists in the local database # The database contains only IDs generated from datasource trees. my $srvIDParams = new Torrus::ServiceID(); if( $srvIDParams->idExists( $output ) ) { Error('Output service ID was previously created from Torrus ' . 'datasource tree. Cannot override it: ' . $output); exit 1; } &Torrus::DB::cleanupEnvironment(); &Torrus::DB::setUnsafeSignalHandlers(); my %in_data; foreach my $serviceid ( @input ) { $in_data{$serviceid} = $srvExp->getIntervalData( $startdate, $enddate, $serviceid ); Verbose(sprintf('Loaded %d rows of data for %s', scalar( @{$in_data{$serviceid}} ), $serviceid)); } my $n_points = floor( ($endtime - $starttime) / $step ); my %aligned_data; foreach my $serviceid ( @input ) { my @aligned = (); $#aligned = $n_points; # Fill in the aligned array. For each interval by modulo(step), # we take the sum of values that get into that interval foreach my $row ( @{$in_data{$serviceid}} ) { my $rowtime = str2time( $row->{'srv_date'} . 'T' . $row->{'srv_time'} ); my $pos = floor( ($rowtime - $starttime) / $step ); my $value = Math::BigFloat->new( $row->{'value'} ); if( $value->is_nan() ) { $value->bzero(); } if( not defined($aligned[$pos])) { $aligned[$pos] = $value; } else { $aligned[$pos]->badd($value); } } $aligned_data{$serviceid} = \@aligned; } Verbose(sprintf('Aligned data into %d intervals', $n_points)); # Store the derived data my $dbh = Torrus::SQL::SrvExport->dbh(); if( not defined( $dbh ) ) { Error('Lost SQL connection'); exit 1; } my $sth = $dbh->prepare( Torrus::SQL::SrvExport->sqlInsertStatement() ); if( not defined( $sth ) ) { Error('Error preparing the SQL statement: ' . $dbh->errstr); } for( my $pos = 0; $pos < $n_points; $pos++ ) { my @args; foreach my $serviceid ( @input ) { my $val = $aligned_data{$serviceid}->[$pos]; if( defined( $val ) ) { push( @args, $val ); } } if( scalar( @args ) > 0 ) { my $value = &{$known_functions{$function}}(@args); my $timestamp = $starttime + $pos * $step; my $datestr = time2str('%Y-%m-%d', $timestamp); my $timestr = time2str('%H:%M:%S', $timestamp); if( isDebug() ) { Debug('Updating SQL database: ' . join(', ', $datestr, $timestr, $output, $value, $step )); } if( not $sth->execute( $datestr, $timestr, $output, $value, $step ) ) { Error('Error executing SQL: ' . $dbh->errstr); exit 1; } } } $dbh->commit() or Error('Error committing to SQL database: ' . $dbh->errstr); $dbh->disconnect(); Verbose('Database update finished'); exit($ok ? 0:1); sub function_max { my $value = Math::BigFloat->new(); $value->binf('-'); foreach my $a ( @_ ) { if( $value->bcmp($a) < 0 ) { $value = Math::BigFloat->new($a); } } return $value; } sub function_sum { my $value = Math::BigFloat->new(0); foreach my $a ( @_ ) { $value->badd($a); } return $value; } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/snmpfailures.in0000644000175000017500000000443711661302716013545 00000000000000#!@PERL@ -w # Copyright (C) 2010 Stanislav Sinyagin # # 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. # Stanislav Sinyagin use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use Getopt::Long; use JSON; use Torrus::SiteConfig; use Torrus::DB; use Torrus::Log; use Torrus::SNMP_Failures; exit(1) unless Torrus::SiteConfig::verify(); my $tree; my $print_details; my $help_needed; my $ok = GetOptions('tree=s' => \$tree, 'details' => \$print_details, 'help' => \$help_needed); if( not $ok or not $tree or $help_needed or scalar(@ARGV) > 0 ) { print STDERR "Usage: $0 --tree=NAME [options...]\n", "Options:\n", " --tree=NAME tree name\n", " --details print failure details\n", " --help this help message\n"; exit 1; } if( not Torrus::SiteConfig::treeExists( $tree ) ) { Error('Tree ' . $tree . ' does not exist'); exit 1; } my $out = {}; &Torrus::DB::setSafeSignalHandlers(); my $nInstances = Torrus::SiteConfig::collectorInstances( $tree ); for( my $instance = 0; $instance < $nInstances; $instance++ ) { my $db_failures = new Torrus::SNMP_Failures( -Tree => $tree, -Instance => $instance ); if( not defined( $db_failures ) ) { exit(1); } $db_failures->read( $out, -details => $print_details ); undef $db_failures; } my $json = new JSON; $json->canonical(); $json->pretty(); print $json->encode($out); exit(0); # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/nodeid.in0000644000175000017500000001447211661302716012277 00000000000000#!@PERL@ -w # Copyright (C) 2010 Stanislav Sinyagin # # 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. # Stanislav Sinyagin use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use Getopt::Long; use JSON; use File::Copy; use Torrus::ConfigTree; use Torrus::SiteConfig; use Torrus::Renderer; use Torrus::Log; exit(1) unless Torrus::SiteConfig::verify(); my %commands = ('info' => \&do_info, 'search' => \&do_search, 'render' => \&do_render); my $tree; my $cmd; my $nodeid; my $print_details; my $search_prefix; my $search_substring; my $render_view; my $render_out; my $help_needed; my $ok = GetOptions('tree=s' => \$tree, 'cmd=s' => \$cmd, 'nodeid=s' => \$nodeid, 'details' => \$print_details, 'prefix=s' => \$search_prefix, 'substring=s' => \$search_substring, 'view=s' => \$render_view, 'out=s' => \$render_out, 'help' => \$help_needed); if( not $ok or not $tree or not $cmd or not $commands{$cmd} or ( ($cmd eq 'info' or $cmd eq 'render') and not $nodeid ) or ( $cmd eq 'search' and not ($search_prefix or $search_substring) ) or $help_needed or scalar(@ARGV) > 0 ) { print STDERR "Usage: $0 --tree=NAME --cmd=CMD [options...]\n", "Options:\n", " --tree=NAME tree name\n", " --cmd=CMD Command (info|search|render)\n", " --nodeid=NODEID nodeid (mandatory for info and render)\n", " --details print nodeid details (valid with info and search)\n", " --prefix=STR search prefix\n", " --substring=STR search substring\n", " --view=VIEW render view (optional)\n", " --out=FILE render output\n", " --help this help message\n"; exit 1; } if( not Torrus::SiteConfig::treeExists( $tree ) ) { Error('Tree ' . $tree . ' does not exist'); exit 1; } &Torrus::DB::setSafeSignalHandlers(); { my $config_tree = new Torrus::ConfigTree( -TreeName => $tree ); if( not defined($config_tree) ) { Error("Configuration is not ready"); exit 1; } if( $cmd eq 'info' or $cmd eq 'render' ) { my $token = $config_tree->getNodeByNodeid($nodeid); if( not defined( $token ) ) { Error('nodeid not found: ' . $nodeid); exit(1); } if( $cmd eq 'info' ) { print_nodeid($config_tree, [$token], $print_details); } else { render_node($config_tree, $token, $render_view, $render_out); } } elsif( $cmd eq 'search' ) { my $results; if( defined($search_prefix) ) { $results = $config_tree->searchNodeidPrefix($search_prefix); } else { $results = $config_tree->searchNodeidSubstring($search_substring); } if( defined( $results ) and scalar(@{$results}) > 0 ) { my $tokens = []; # results are pairs [nodeid,token] foreach my $res ( @{$results} ) { push(@{$tokens}, $res->[1]); } print_nodeid($config_tree, $tokens, $print_details); } else { print STDERR "Nothing found\n"; exit(1); } } else { printf STDERR ("Unknown command: %s\n", $cmd); exit(1); } } exit(0); sub print_nodeid { my $config_tree = shift; my $tokens = shift; my $details = shift; my $json = new JSON; $json->pretty(); $json->canonical(); my @all; foreach my $token ( @{$tokens} ) { my $info = { 'nodeid' => $config_tree->getNodeParam($token, 'nodeid', 1), }; if( $details ) { $info->{'path'} = $config_tree->path($token); $info->{'is_leaf'} = $config_tree->isLeaf($token) ? 1:0; $info->{'tree'} = $config_tree->treeName(); if( $info->{'is_leaf'} ) { my $dsType = $config_tree->getNodeParam( $token, 'ds-type' ); $info->{'param:ds-type'} = $dsType; if( $dsType eq 'collector' ) { foreach my $param ('collector-type', 'collector-period', 'storage-type', 'data-file', 'data-dir', 'rrd-ds', 'ext-service-id', 'snmp-host', 'domain-name', 'snmp-object') { my $val = $config_tree->getNodeParam($token, $param); if( defined( $val ) ) { $info->{'param:' . $param} = $val; } } } } } push(@all, $info); } print $json->encode(\@all); return; } sub render_node { my $config_tree = shift; my $token = shift; my $view = shift; my $out = shift; my $r = new Torrus::Renderer; my($fname, $mimetype) = $r->render($config_tree, $token, $view); if( defined($out) ) { if( not copy( $fname, $out ) ) { printf STDERR ("Failed to write to %s: %s\n", $out, $!); exit(1); } $fname = $out; } my $json = new JSON; $json->pretty(); print $json->encode({'Content-type' => $mimetype, 'Filename' => $fname}); return; } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/rrddir2xml.in0000644000175000017500000001726611661302716013132 00000000000000#!@PERL@ # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # Generate Torrus XML configuration from a directory containing RRD files # use strict; use warnings; BEGIN { require '@devdiscover_config_pl@'; } use Getopt::Long; use IO::Dir; use Fcntl qw(:mode); use RRDs; use Torrus::ConfigBuilder; use Torrus::Log; my $creator = "Torrus version @VERSION@\n" . "This file was generated by command:\n" . $0 . " \\\n"; foreach my $arg ( @ARGV ) { if( $arg =~ /^--/ ) { $creator .= ' ' . $arg . ' '; } else { $creator .= "\'" . $arg . "\'\\\n"; } } $creator .= "\nOn " . scalar(localtime(time)); my $start_dir; my $recursive = 0; my $filter = '.*'; my $outfile = 'rrddir.xml'; my $topsubtree = '/'; my $splitexpr = '_+'; my $levels = 2; my $hwpredict = 0; my $comment; my $debug = 0; my $verbose = 0; my $ok = GetOptions( 'dir=s' => \$start_dir, 'recursive' => \$recursive, 'filter=s' => \$filter, 'out=s' => \$outfile, 'subtree=s' => \$topsubtree, 'split=s' => \$splitexpr, 'levels=i' => \$levels, 'comment=s' => \$comment, 'holtwinters' => \$hwpredict, 'verbose' => \$verbose, 'debug' => \$debug ); if( not $ok or not $start_dir or scalar( @ARGV ) > 0 ) { print STDERR "Generate Torrus XML configuration from a directory with RRD files\n"; print STDERR "Usage: $0 --dir=path options...\n", "Options:\n", " --dir=path directory to read RRD files from\n", " --recursive read the directories recursively\n", " --filter=re filter RE for file and directory names\n", " --out=filename output file [".$outfile."]\n", " --subtree=subtree XML config subtree [".$topsubtree."]\n", " --split=regexp regexp to split file names [".$splitexpr."]\n", " --levels=integer no. of subtree levels [".$levels."]\n", " --comment=text top subtree comment\n", " --holtwinters enable Holt-Winters boundaries diaplay\n", " --verbose print extra information\n", " --debug print debugging information\n"; exit 1; } if( $debug ) { Torrus::Log::setLevel('debug'); } elsif( $verbose ) { Torrus::Log::setLevel('verbose'); } if( not -d $start_dir ) { Error('No such directory: ' . $start_dir); exit 1; } if( $start_dir !~ /^\// ) { Error('Input directory must be an absolute path: ' . $start_dir); exit 1; } # remove trailing slash from $start_dir $start_dir =~ s/\/$//; if( $topsubtree !~ /^\/[0-9A-Za-z_\-\.\/]*$/ or $topsubtree =~ /\.\./ ) { Error("Invalid format for subtree name: " . $topsubtree); exit 1; } if( $outfile !~ /^\// ) { $outfile = $Torrus::Global::siteXmlDir . '/' . $outfile; } my %rrdinfos; read_rrd_dir( \%rrdinfos, $start_dir ); Verbose(sprintf('Found %d RRD files', scalar( keys( %rrdinfos ) ) )); my $cb = new Torrus::ConfigBuilder; $cb->addCreatorInfo( $creator ); # Chop the first and last slashes my $path = $topsubtree; $path =~ s/^\///; $path =~ s/\/$//; # generate subtree path XML my $topSubtreeNode = undef; foreach my $subtreeName ( split( '/', $path ) ) { $topSubtreeNode = $cb->addSubtree( $topSubtreeNode, $subtreeName ); } if( defined($comment) ) { $cb->addParam( $topSubtreeNode, 'comment', $comment ); } foreach my $rrdfile ( sort keys %rrdinfos ) { my @nameparts = split( $splitexpr, $rrdfile, $levels ); my $subtreeNode = $topSubtreeNode; foreach my $subtreeName ( @nameparts ) { $subtreeNode = $cb->addSubtree( $subtreeNode, $subtreeName ); } my $info = $rrdinfos{$rrdfile}; my $legend = 'Directory:' . $info->{'dir'} . ';' . 'File:' . $rrdfile . ';'; $cb->addParam( $subtreeNode, 'legend', $legend ); my %dsnames; my $this_rrd_hwpredict = 0; foreach my $prop ( keys %{$info->{'rrdinfo'}} ) { if( $prop =~ /^ds\[(\S+)\]\./o ) { $dsnames{$1} = 1; } else { if( $prop =~ /^rra\[\d+\]\.cf/o and $info->{'rrdinfo'}->{$prop} eq 'FAILURES' ) { $this_rrd_hwpredict = 1; } } } if( not $hwpredict ) { $this_rrd_hwpredict = 0; } foreach my $dsname ( sort keys %dsnames ) { my $dslegend = $legend . 'DS:' . $dsname . ';Type:' . $info->{'rrdinfo'}->{'ds['.$dsname.'].type'}; my $params = { 'legend' => $dslegend, 'ds-type' => 'rrd-file', 'leaf-type' => 'rrd-def', 'rrd-cf' => 'AVERAGE', 'data-file' => $rrdfile, 'data-dir' => $info->{'dir'}, 'rrd-ds' => $dsname, 'rrd-hwpredict' => ($this_rrd_hwpredict ? 'enabled':'disabled') }; $cb->addLeaf( $subtreeNode, $dsname, $params ); } } $ok = $cb->toFile( $outfile ); if( $ok ) { Verbose('Wrote ' . $outfile); } else { Error('Cannot write ' . $outfile . ': ' . $!); } exit( $ok ? 0:1); sub read_rrd_dir { my $infos = shift; my $indir = shift; Debug('Reading directory: ' . $indir); my @subdirs; my %dir; tie( %dir, 'IO::Dir', $indir ); foreach my $file ( keys %dir ) { if( $file =~ /^\./ or $file !~ $filter ) { Debug('Skipping ' . $file); next; } my $mode = $dir{$file}->mode(); if( S_ISDIR( $mode ) ) { Debug($file . ' is a directory'); push( @subdirs, $file ); } elsif( S_ISREG( $mode ) ) { Debug($file . ' is a regular file'); if( defined( $infos->{$file} ) ) { Warn("Duplicate file name: $file"); } else { my $fullname = $indir . '/' . $file; my $rrdinfo = RRDs::info( $fullname ); my $err = RRDs::error(); if( $err ) { Verbose($fullname . ' is not an RRD file'); } else { Debug('Found RRD file: ' . $file); $infos->{$file}->{'fullname'} = $fullname; $infos->{$file}->{'dir'} = $indir; $infos->{$file}->{'rrdinfo'} = $rrdinfo; } } } } untie %dir; if( $recursive and scalar( @subdirs ) > 0 ) { foreach my $subdir ( @subdirs ) { read_rrd_dir( $infos, $indir . '/' . $subdir ); } } return; } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/torrus.in0000644000175000017500000000460411661302716012367 00000000000000#!@SHELL@ # Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # disable Perl::Critic because this is not a Perl script ## no critic # CLI wrapper for Torrus utilities cmd=$1 commands="acl=acledit acledit=acledit \ bs=buildsearchdb buildsearchdb=buildsearchdb \ cleanup=cleanup \ clc=clearcache clearcache=clearcache \ collector=collector \ compile=compilexml compilexml=compilexml \ configinfo=configinfo ci=configinfo \ snapshot=configsnapshot configsnapshot=configsnapshot \ dd=devdiscover discover=devdiscover devdiscover=devdiscover \ fm=flushmonitors flushmonitors=flushmonitors \ genddx=genddx \ genlist=genlist \ genreport=genreport report=genreport \ install_plugin=install_plugin \ monitor=monitor \ nodeid=nodeid ni=nodeid \ rrddir=rrddir2xml rrddir2xml=rrddir2xml \ schedulerinfo=schedulerinfo si=schedulerinfo \ snmpfailures=snmpfailures failures=snmpfailures \ srvderive=srvderive derive=srvderive \ ttproclist=ttproclist" for f in `ls -1 @plugwrapperdir@`; do . @plugwrapperdir@/${f} done for pair in ${commands}; do eval execcmd_${pair} done eval expanded_cmd='${execcmd_'${cmd}'}' if test ${expanded_cmd:-no} = no; then echo "Usage: $0 cmd [options...]" 1>&2 echo " cmd is one of:" 1>&2 for pair in ${commands}; do eval `echo ${pair} | sed -e 's/=.*//' -e 's/^/a=/'` echo " "${a} done else shift @pkgbindir@/${expanded_cmd} "$@" fi # Local Variables: # mode: shell-script # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/compilexml.in0000644000175000017500000001355711661302716013211 00000000000000#!@PERL@ -w # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use Getopt::Long; use Torrus::ConfigTree::XMLCompiler; use Torrus::SiteConfig; use Torrus::Log; exit(1) unless Torrus::SiteConfig::verify(); our @trees; our $all_trees; our $no_ds; our $no_validation; our $force; our $debug; our $verbose; our $help_needed; my $opts_ok = GetOptions ('tree=s' => \@trees, 'all' => \$all_trees, 'nods' => \$no_ds, 'noval' => \$no_validation, 'force' => \$force, 'debug' => \$debug, 'verbose' => \$verbose, 'help' => \$help_needed); if( not $opts_ok or not (scalar(@trees) or $all_trees) or $help_needed or scalar(@ARGV) > 0 ) { print STDERR "Usage: $0 --tree=NAME [options...]\n", "Options:\n", " --tree=NAME tree name(s) to compile\n", " --all compile all trees\n", " --nods compile non-datasource configuration only\n", " --noval disable parameter validation\n", " --force force the compiler even if anoother " . "compiler process is probably running\n", " --debug set the log level to debug\n", " --verbose set the log level to info\n", " --help this help message\n"; exit 1; } if( $all_trees ) { @trees = Torrus::SiteConfig::listTreeNames(); } if( $debug ) { Torrus::Log::setLevel('debug'); } elsif( $verbose ) { Torrus::Log::setLevel('verbose'); } &Torrus::DB::setSafeSignalHandlers(); Verbose(sprintf('Torrus version %s', '@VERSION@')); our $global_ok = 1; foreach my $tree ( @trees ) { if( not Torrus::SiteConfig::treeExists( $tree ) ) { Error("Tree named \"" . $tree . "\" does not exist"); exit(1); } &Torrus::DB::checkInterrupted(); Verbose("Compiling tree: $tree"); my $ok = 1; my $compiler = new Torrus::ConfigTree::XMLCompiler( -TreeName => $tree, -NoDSRebuild => $no_ds, -ForceWriter => $force ); if( not defined( $compiler ) ) { Error('Cannot initialize compiler for tree ' . $tree . '. Exiting'); Error('If you are sure there are no other compiler processes ' . 'running, use the --force option'); $global_ok = 0; last; } my @xmlFiles = @Torrus::Global::xmlAlwaysIncludeFirst; push( @xmlFiles, Torrus::SiteConfig::listXmlFiles( $tree ) ); push( @xmlFiles, @Torrus::Global::xmlAlwaysIncludeLast ); foreach my $xmlfile ( @xmlFiles ) { if( not $compiler->compile( $xmlfile ) ) { Error($xmlfile . ' compiled with errors'); $ok = 0; } } if( not $ok ) { Error("Errors found during XML compilation in the tree named \"" . $tree . "\""); $global_ok = 0; last; } Verbose('Data post-processing...'); if( not $compiler->postProcess() ) { Error('Errors found during post-processing'); $ok = 0; } if( $no_validation ) { Verbose('Skipping data validation...'); } else { Verbose('Data validation...'); if( not $compiler->validate() ) { Error('Errors found during validation process'); $ok = 0; } } &Torrus::DB::checkInterrupted(); # Preserve the dynamic tokenset members if( not $compiler->{'first_time_created'} ) { my $oldConfig = new Torrus::ConfigTree( -TreeName => $tree ); if( defined( $oldConfig ) ) { foreach my $ts ( $oldConfig->getTsets() ) { if( $compiler->tsetExists( $ts ) ) { foreach my $member ( $oldConfig->tsetMembers( $ts ) ) { my $origin = $oldConfig->tsetMemberOrigin( $ts, $member ); if( defined( $origin ) and $origin ne 'static' ) { my $path = $oldConfig->path($member); if( $compiler->nodeExists( $path ) ) { my $token = $compiler->token( $path ); $compiler->tsetAddMember ( $ts, $token, $origin ); Verbose('Preserved dynamic tokenset member: ' . $path . ' in ' . $ts); } } } } } } undef $oldConfig; } &Torrus::DB::checkInterrupted(); $compiler->finalize( $ok ); undef $compiler; &Torrus::DB::cleanupEnvironment(); $global_ok = $ok ? $global_ok:0; } exit($global_ok ? 0:1); # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/ttproclist.in0000644000175000017500000000622511661302716013241 00000000000000#!@PERL@ # Copyright (C) 2005 Stanislav Sinyagin # # 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. # Stanislav Sinyagin use strict; use warnings; use Template; use Getopt::Long; use IO::File; my $template; my $outfile; my $nodelist; my $parameters; my $creator = "Torrus version @VERSION@\n" . "This file was generated by command:\n" . $0 . " \\\n"; foreach my $arg ( @ARGV ) { if( $arg =~ /^--/ ) { $creator .= ' ' . $arg . ' '; } else { $creator .= "\'" . $arg . "\'\\\n"; } } $creator .= "\nOn " . scalar(localtime(time)); my $ok = GetOptions( 'tmpl=s' => \$template, 'out=s' => \$outfile, 'nodes=s' => \$nodelist, 'param=s' => \$parameters ); if( not $ok or not $template or not $outfile or not $nodelist) { print STDERR "Process a template with a nodelist\n\n"; print STDERR "Usage: $0 options...\n", "Mandatory options:\n", " --tmpl=filename template file name\n", " --out=filename output file\n", " --nodes=filename file with nodes\n", "Options:\n", " --param=NAME:VALUE,NAME:VALUE... parameters passed to template\n"; exit 1; } my @rawnodes; my $nodesfh = IO::File->new($nodelist, 'r'); if( not defined($nodesfh) ) { print STDERR "Cannot open $nodelist: $!\n"; exit 1; } while(<$nodesfh>) { s/^\s+//; s/\s+$//; push( @rawnodes, split( /\s+/ ) ); } $nodesfh->close(); my %nodes; foreach my $node ( @rawnodes ) { my $symname = $node; if( $node =~ /([^:]+):(.+)/ ) { $node = $1; $symname = $2; } $nodes{$node} = $symname; } my %params; if( defined( $parameters ) ) { foreach my $pair ( split( '\s*,\s*', $parameters ) ) { my ($name, $val) = split( '\s*:\s*', $pair ); $params{$name} = $val; } } my $tt = new Template( INCLUDE_PATH => '@tmpluserdir@', ABSOLUTE => 1, RELATIVE => 1, TRIM => 1 ); my $vars = { 'nodes' => \%nodes, 'param' => \%params, 'nodesfile' => $nodelist, 'creator' => $creator, 'lc' => sub{ return lc $_[0] }, 'uc' => sub{ return uc $_[0] } }; my $result = $tt->process($template, $vars, $outfile); if( not $result ) { print STDERR "Error while processing template: ".$tt->error()."\n"; } exit( $result ? 0:1 ); # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/action_snmpv1trap.in0000644000175000017500000000772412107464645014515 00000000000000#!@PERL@ # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # Obsoleted and not used SNMP v1 trap script. # Version 2c is preferred one. use strict; use warnings; use Net::SNMP qw(:ALL); use Getopt::Long; require '@snmptrap_siteconfig_pl@'; # SNMP Enterprise. Needed for SNMP v1 trap. # See http://www.iana.org/assignments/enterprise-numbers for reference $Torrus::Snmptrap::enterprise = '1.3.6.1.4.1.14697.1.1.1'; if( not $ENV{'TORRUS_TOKEN'} ) { print STDERR ("Torrus environment variables missing. This program ", "must be run from Torrus Monitor\n"); exit 1; } my @hosts; my $severity = $ENV{'TORRUS_SEVERITY'}; $severity = 0 unless defined($severity); my $ok = GetOptions( 'host=s' => \@hosts, 'community=s' => \$Torrus::Snmptrap::community, 'port=i' => \$Torrus::Snmptrap::port, 'enterprise' => \$Torrus::Snmptrap::enterprise, 'severity=i' => \$severity ); if( not $ok ) { print STDERR ("Error parsing options\n"); exit 1; } if( scalar(@hosts) > 0 ) { @Torrus::Snmptrap::hosts = @hosts; } my %specifictrap = ( 'set' => 1, 'repeat' => 2, 'clear' => 3, 'forget' => 4 ); my @varbindlist = ( $Torrus::Snmptrap::enterprise . '.2', OCTET_STRING, $ENV{'TORRUS_TOKEN'}, $Torrus::Snmptrap::enterprise . '.5', OCTET_STRING, $ENV{'TORRUS_NODEPATH'}, $Torrus::Snmptrap::enterprise . '.3', OCTET_STRING, $ENV{'TORRUS_MONITOR'}, $Torrus::Snmptrap::enterprise . '.4', OCTET_STRING, $ENV{'TORRUS_EVENT'}, $Torrus::Snmptrap::enterprise . '.6', OCTET_STRING, scalar(localtime($ENV{'TORRUS_TSTAMP'})), $Torrus::Snmptrap::enterprise . '.7', OCTET_STRING, $ENV{'TORRUS_TREE'}, $Torrus::Snmptrap::enterprise . '.8', INTEGER32, $severity, $Torrus::Snmptrap::enterprise . '.9', OCTET_STRING, $ENV{'TORRUS_MCOMMENT'} ); foreach my $host ( @Torrus::Snmptrap::hosts ) { my( $session, $error ) = Net::SNMP->session( -hostname => $host, -community => $Torrus::Snmptrap::community, -port => $Torrus::Snmptrap::port ); if( not defined($session) ) { printf STDERR ("Error opening SNMP trap session: %s.\n", $error); exit 1; } my $result = $session->trap( -enterprise => $Torrus::Snmptrap::enterprise, -generictrap => ENTERPRISE_SPECIFIC, -specifictrap => $specifictrap{$ENV{'TORRUS_EVENT'}}, -timestamp => $ENV{'TORRUS_UPTIME'} * 100, -varbindlist => \@varbindlist ); if( not $result ) { printf STDERR ("Error sending SNMP trap: %s.\n", $session->error()); } $session->close(); } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/action_notify.in0000644000175000017500000000552011703556537013705 00000000000000#!@PERL@ # Copyright (C) 2006 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # We need this for $Torrus::Global::templateDirs use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use Date::Format; use Data::Dumper; use Torrus::Log; require '@notify_siteconfig_pl@'; if( not $ENV{'TORRUS_TREE'} ) { print STDERR ("Torrus environment variables missing. This program ", "must be run from Torrus Monitor\n"); exit 1; } our $now = time(); our $nowHour = time2str('%H', $now); our $nowWeekday = time2str('%w', $now); if( isDebug() ) { Debug("action_notify launched with the following environment: " . Dumper(\%ENV)); } my $severity = $ENV{'TORRUS_SEVERITY'}; $severity = 0 unless defined($severity); my $ok = 1; foreach my $policy ( keys %Torrus::Notify::policies ) { if( &{$Torrus::Notify::policies{$policy}{'match'}} ) { Debug('Notification policy matched: ' . $policy); my @targets = (); my $levels = $Torrus::Notify::policies{$policy}{'severity'}; foreach my $level ( sort {$a <=>$b} keys %{$levels} ) { if( $severity >= $level ) { push( @targets, @{$levels->{$level}} ); } } if( isDebug() ) { Debug('Selected notification targets: ' . join(' ', @targets)); } foreach my $target ( @targets ) { my($protocol, $arg) = split(':', $target); if( defined( $Torrus::Notify::programs{$protocol} ) ) { local $ENV{'ARG1'} = $arg; my $prog = $Torrus::Notify::programs{$protocol}; Debug("Executing command: " . $prog); my $status = system( $prog ); if( $status != 0 ) { Error('The command "' . $prog . '" returned error code ' . $status); $ok = 0; } } } } } exit( $ok ? 0:1 ); # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/monitor.in0000644000175000017500000001114611703556537012530 00000000000000#!@PERL@ # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # we cannot report a failure of STDERR reopening, as we are already a # forked child, so this Perl::Critic warning is disabled. ## no critic (InputOutput::RequireCheckedOpen) use strict; use warnings; BEGIN { require '@torrus_config_pl@'; } use IO::File; use Proc::Daemon; use Getopt::Long; use Torrus::Log; use Torrus::Monitor; use Torrus::MonitorScheduler; use Torrus::SiteConfig; exit(1) unless Torrus::SiteConfig::verify(); our $tree; our $nodaemon; our $runonce; our $delay = 0; our $debug; our $verbose; our $help_needed; # Derive the process name from the command line our $process_name = $0; $process_name =~ s/^.*\/([^\/]+)$/$1/; $process_name .= ' ' . join(' ', @ARGV); my $ok = GetOptions ('tree=s' => \$tree, 'nodaemon' => \$nodaemon, 'runonce' => \$runonce, 'delay=i' => \$delay, 'debug' => \$debug, 'verbose' => \$verbose, 'help' => \$help_needed); if( not $ok or not $tree or $help_needed or scalar(@ARGV) > 0 ) { print STDERR "Usage: $0 --tree=NAME [options...]\n", "Options:\n", " --tree=NAME tree name\n", " --nodaemon do not fork daemon and log to STDERR\n", " --runonce run one time and exit. Implies --nodaemon\n", " --delay delay the start of the first cycle, minutes\n", " --debug set the log level to debug\n", " --verbose set the log level to info\n", " --help this help message\n"; exit 1; } if( not Torrus::SiteConfig::mayRunMonitor( $tree ) ) { Error('Tree ' . $tree . ' is not configured to run monitor'); exit 1; } if( $debug ) { Torrus::Log::setLevel('debug'); } elsif( $verbose ) { Torrus::Log::setLevel('verbose'); } my $pidfile; if( not $nodaemon and not $runonce ) { my $pidfilename = $Torrus::Global::pidDir . '/monitor.' . $tree . '.pid'; if( -r $pidfilename ) { my $oldpid; my $fh = IO::File->new($pidfilename, 'r'); if( defined($fh) ) { $oldpid = $fh->getline(); } $fh->close(); $oldpid = 'unknown' unless defined($oldpid); Error('Another monitor daemon is running, pid=', $oldpid); exit 1; } &Proc::Daemon::Init(); umask 0017; # Proc::Daemon::Init sets the mask to all-writable # now we're forked, save the PID file for the END block $pidfile = $pidfilename; if( $Torrus::Monitor::useSyslog ) { Torrus::Log::enableSyslog('torrus/monitor_' . $tree); } else { my $logfile = $Torrus::Global::logDir . '/monitor.' . $tree . '.log'; # At this point, we cannot tell anyone if "open" fails open(STDERR, '>>', $logfile); *STDERR->autoflush(); } my $fh = IO::File->new($pidfile, 'w'); if( defined($fh) ) { $fh->printf('%d', $$); $fh->close(); } else { Error("Cannot open $pidfile for writing: $!"); } } Info(sprintf("Torrus version %s", '@VERSION@')); Info(sprintf("%s started for tree %s", $0, $tree)); Info(sprintf("Process ID %d", $$)); if( $delay > 0 ) { Info(sprintf('Delaying for %d minutes', $delay)); sleep($delay * 60); } &Torrus::DB::setSafeSignalHandlers(); my %options = ( '-ProcessName' => $process_name, '-Tree' => $tree, ); if( $runonce ) { $options{'-RunOnce'} = 1; } my $scheduler = new Torrus::MonitorScheduler( %options ); $scheduler->run(); if( not $options{'-RunOnce'} ) { Error('Monitor process exited: ' . 'there is no datasource where monitoring is enabled'); } exit; END { if( defined($pidfile) and -r $pidfile ) { unlink $pidfile; } } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/bin/Makefile.am0000644000175000017500000000763611661302716012545 00000000000000 # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # SUBST = @abs_top_builddir@/setup_tools/substvars.sh pkgbindir = @pkgbindir@ pkgbin_SCRIPTS = \ acledit \ action_notify \ action_printemail \ action_snmptrap \ action_snmpv1trap \ bdbinfo \ buildsearchdb \ cleanup \ clearcache \ collector \ compilexml \ configinfo \ configsnapshot \ devdiscover \ flushmonitors \ genddx \ genlist \ genreport \ install_plugin \ monitor \ nodeid \ rrddir2xml \ schedulerinfo \ snmpfailures \ srvderive \ torrus.fcgi \ ttproclist wrapperdir = @wrapperdir@ wrapper_SCRIPTS = \ torrus CLEANFILES = $(pkgbin_SCRIPTS) $(wrapper_SCRIPTS) EXTRA_DIST = \ acledit.in \ action_notify.in \ action_printemail.in \ action_snmptrap.in \ action_snmpv1trap.in \ bdbinfo.in \ buildsearchdb.in \ clearcache.in \ cleanup.in \ collector.in \ compilexml.in \ configinfo.in \ configsnapshot.in \ devdiscover.in \ flushmonitors.in \ genddx.in \ genlist.in \ genreport.in \ install_plugin.in \ monitor.in \ nodeid.in \ rrddir2xml.in \ schedulerinfo.in \ snmpfailures.in \ srvderive.in \ torrus.fcgi.in \ torrus.in \ ttproclist.in # Result of: # ls -1 | egrep '^[a-z][^.]+$' | \ # awk '{printf "%s: %s.in\n\t$(SUBST) %s.in > %s\n\n", $1, $1, $1, $1}' acledit: acledit.in $(SUBST) acledit.in > acledit action_printemail: action_printemail.in $(SUBST) action_printemail.in > action_printemail action_notify: action_notify.in $(SUBST) action_notify.in > action_notify action_snmptrap: action_snmptrap.in $(SUBST) action_snmptrap.in > action_snmptrap action_snmpv1trap: action_snmpv1trap.in $(SUBST) action_snmpv1trap.in > action_snmpv1trap buildsearchdb: buildsearchdb.in $(SUBST) buildsearchdb.in > buildsearchdb bdbinfo: bdbinfo.in $(SUBST) bdbinfo.in > bdbinfo cleanup: cleanup.in $(SUBST) cleanup.in > cleanup clearcache: clearcache.in $(SUBST) clearcache.in > clearcache collector: collector.in $(SUBST) collector.in > collector compilexml: compilexml.in $(SUBST) compilexml.in > compilexml configinfo: configinfo.in $(SUBST) configinfo.in > configinfo configsnapshot: configsnapshot.in $(SUBST) configsnapshot.in > configsnapshot devdiscover: devdiscover.in $(SUBST) devdiscover.in > devdiscover flushmonitors: flushmonitors.in $(SUBST) flushmonitors.in > flushmonitors genddx: genddx.in $(SUBST) genddx.in > genddx genlist: genlist.in $(SUBST) genlist.in > genlist genreport: genreport.in $(SUBST) genreport.in > genreport install_plugin: install_plugin.in $(SUBST) install_plugin.in > install_plugin monitor: monitor.in $(SUBST) monitor.in > monitor nodeid: nodeid.in $(SUBST) nodeid.in > nodeid rrddir2xml: rrddir2xml.in $(SUBST) rrddir2xml.in > rrddir2xml schedulerinfo: schedulerinfo.in $(SUBST) schedulerinfo.in > schedulerinfo snmpfailures: snmpfailures.in $(SUBST) snmpfailures.in > snmpfailures srvderive: srvderive.in $(SUBST) srvderive.in > srvderive torrus: torrus.in $(SUBST) torrus.in > torrus torrus.fcgi: torrus.fcgi.in $(SUBST) torrus.fcgi.in > torrus.fcgi ttproclist: ttproclist.in $(SUBST) ttproclist.in > ttproclist torrus-2.08/bin/genddx.in0000644000175000017500000001536211661302716012305 00000000000000#!@PERL@ # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # Generate the SNMP discovery instructions XML file out of plaintext # list of hosts. use strict; use warnings; BEGIN { require '@devdiscover_config_pl@'; } use Getopt::Long; use XML::LibXML; use IO::File; use Torrus::Log; our $outFormatVersion = '1.0'; our @hosts = (); our $hostfile; our %globalParams = ( 'output-file' => 'routers.xml', 'domain-name' => '', 'host-subtree' => '/Routers', 'snmp-port' => '161', 'snmp-community' => 'public', 'snmp-version' => '2c', 'snmp-timeout' => 10, 'snmp-retries' => 2, 'rrd-hwpredict' => 0, 'data-dir' => '@defrrddir@', ); our $outfile = 'routers.ddx'; my $creator = "Torrus version @VERSION@\n" . "This file was generated by command:\n" . $0 . " \\\n"; foreach my $arg ( @ARGV ) { if( $arg =~ /^--/ ) { $creator .= ' ' . $arg . ' '; } else { $creator .= "\'" . $arg . "\'\\\n"; } } $creator .= "\nOn " . scalar(localtime(time)); my $ok = GetOptions( 'host=s' => \@hosts, 'hostfile=s' => \$hostfile, 'out=s' => \$outfile, 'discout=s' => \$globalParams{'output-file'}, 'domain=s' => \$globalParams{'domain-name'}, 'version=s' => \$globalParams{'snmp-version'}, 'community=s' => \$globalParams{'snmp-community'}, 'port=i' => \$globalParams{'snmp-port'}, 'timeout=i' => \$globalParams{'snmp-timeout'}, 'retries=i' => \$globalParams{'snmp-retries'}, 'subtree=s' => \$globalParams{'host-subtree'}, 'holtwinters' => \$globalParams{'rrd-hwpredict'}, 'datadir=s' => \$globalParams{'data-dir'}, ); if( not $ok or ( not $hostfile and scalar(@hosts) == 0 ) or scalar( @ARGV ) > 0 ) { print STDERR "Generate devdiscover XML configuration\n"; print STDERR "Usage: $0 options...\n", "Options:\n", " --host=hostname device hostname\n", " --hostfile=filename space-separated device hostnames file\n", " --out=filename output file [".$outfile."]\n", " --discout=filename discovery output file\n", " [", $globalParams{'output-file'}, "]\n", " --domain=domain optional DNS domain name\n", " --version=v SNMP version [", $globalParams{'snmp-version'}, "]\n", " --community=string SNMP read community [", $globalParams{'snmp-community'}, "]\n", " --port=number SNMP port [", $globalParams{'snmp-port'}, "]\n", " --retries=number SNMP retries [", $globalParams{'snmp-retries'}, "]\n", " --timeout=number SNMP timeout [", $globalParams{'snmp-timeout'}, "]\n", " --subtree=string Subtree name [", $globalParams{'host-subtree'}, "]\n", " --datadir=path data-dir parameter [", $globalParams{'data-dir'}, "]\n", " --holtwinters Enable Holt-Winters analysis\n", "\n", "Host names may be of form \"host:devname\" where devname is a symbolic\n", "device name.\n", "Output file is placed into " . $Torrus::Global::discoveryDir, "\n if no path is given.\n"; exit 1; } # Place the output file in discovery directory if the path is not given if( $outfile !~ /\// ) { $outfile = $Torrus::Global::discoveryDir . '/' . $outfile; } # Convert flags from true/false to yes/no foreach my $param ( 'rrd-hwpredict' ) { if( $globalParams{$param} ) { $globalParams{$param} = 'yes'; } else { $globalParams{$param} = 'no'; } } if( $globalParams{'host-subtree'} !~ /^\/[0-9A-Za-z_\-\.\/]*$/ or $globalParams{'host-subtree'} =~ /\.\./ ) { Error("Invalid format for subtree name: " . $globalParams{'host-subtree'}); exit 1; } if( defined $hostfile ) { my $fh = IO::File->new($hostfile, 'r'); if( not defined($fh) ) { print STDERR "Cannot open $hostfile: $!"; exit 1; } while(<$fh>) { s/^\s+//; s/\s+$//; push( @hosts, split( /\s+/ ) ); } $fh->close() } # Create XML DOM my $doc = XML::LibXML->createDocument( "1.0", "UTF-8" ); my $root = $doc->createElement('snmp-discovery'); $doc->setDocumentElement( $root ); { my $fileInfoNode = $doc->createElement('file-info'); $root->appendChild( $fileInfoNode ); my $formatNode = $doc->createElement('format-version'); $formatNode->appendText( $outFormatVersion ); $fileInfoNode->appendChild( $formatNode ); } { my $creatorNode = $doc->createElement('creator-info'); $creatorNode->appendText( $creator ); $root->appendChild( $creatorNode ); } createParamsDom( \%globalParams, $doc, $root ); foreach my $host ( @hosts ) { my $devname = $host; if( $host =~ /([^:]+):(.+)/ ) { $host = $1; $devname = $2; } my $hostNode = $doc->createElement('host'); $root->appendChild( $hostNode ); my %hostParams = ( 'snmp-host' => $host ); if( $devname ne $host ) { $hostParams{'symbolic-name'} = $devname; } createParamsDom( \%hostParams, $doc, $hostNode ); } $ok = $doc->toFile( $outfile, 2 ); if( $ok ) { print STDERR ("Wrote $outfile\n"); } else { print STDERR ("Cannot write $outfile: $!\n"); } exit($ok ? 0:1); sub createParamsDom { my $params = shift; my $document = shift; my $parentNode = shift; foreach my $param ( sort keys %{$params} ) { my $paramNode = $document->createElement('param'); $paramNode->setAttribute( 'name', $param ); $paramNode->setAttribute( 'value', $params->{$param} ); $parentNode->appendChild( $paramNode ); } return; } # Local Variables: # mode: perl # indent-tabs-mode: nil # perl-indent-level: 4 # End: torrus-2.08/AUTHORS0000644000175000017500000000243611545711243011002 00000000000000*************************************************** Stanislav Sinyagin Senior System Engineer, CCIE #5478 K-Open GmbH Switzerland Tel. +41 79 407 0224 ssinyagin@yahoo.com http://www.k-open.com *************************************************** CREDITS: Chris Amley Xylan switches SNMP discovery Scott Brooks Atmel wireless devices SNMP discovery Aaron Bush APC and HP vendor templates. Shawn Ferry Many contributions in various parts. Marc Haber Lots of bug reports and architecture ideas. Roman Hochuli Bug reports and new feature ideas. Vendor templates for Ascend and DOCSIS. Ian Holsman http://holsman.net Adapted the bluerobot.com HTML layout design for Torrus. Gord Philpott Numerous bug reports. Christian Schnidrig Architecture ideas, interface improvements, other contributions. Jurij Smakov Contributed in manpages creation. Maintainer of Debian port. Jon Nistor Bug reports and contributions for JunOS, Cisco SCE and other vendors discovery. torrus-2.08/sup/0000755000175000017500000000000012413221023010577 500000000000000torrus-2.08/sup/Makefile.in0000644000175000017500000004122412413220736012601 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } 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 = : build_triplet = @build@ host_triplet = @host@ subdir = sup DIST_COMMON = $(dist_dtd_DATA) $(dist_mibs_DATA) $(dist_styl_DATA) \ $(dist_webplain_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in 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) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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__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 -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(dtddir)" "$(DESTDIR)$(mibsdir)" \ "$(DESTDIR)$(styldir)" "$(DESTDIR)$(webplaindir)" DATA = $(dist_dtd_DATA) $(dist_mibs_DATA) $(dist_styl_DATA) \ $(dist_webplain_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ FIND = @FIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KILL = @KILL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ 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@ PERLCRITIC = @PERLCRITIC@ PERLINC = @PERLINC@ POD2MAN = @POD2MAN@ POD2TEXT = @POD2TEXT@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SLEEP = @SLEEP@ STRIP = @STRIP@ SU = @SU@ VERSION = @VERSION@ 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__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cachedir = @cachedir@ cfgdefdir = @cfgdefdir@ datadir = @datadir@ datarootdir = @datarootdir@ dbhome = @dbhome@ defrrddir = @defrrddir@ distxmldir = @distxmldir@ docdir = @docdir@ dvidir = @dvidir@ enable_pkgonly = @enable_pkgonly@ enable_varperm = @enable_varperm@ exec_prefix = @exec_prefix@ exmpdir = @exmpdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mansec_misc = @mansec_misc@ mansec_usercmd = @mansec_usercmd@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ perlithreads = @perlithreads@ perllibdir = @perllibdir@ perllibdirs = @perllibdirs@ piddir = @piddir@ pkgbindir = @pkgbindir@ pkgdocdir = @pkgdocdir@ pkghome = @pkghome@ plugdevdisccfgdir = @plugdevdisccfgdir@ pluginsdir = @pluginsdir@ plugtorruscfgdir = @plugtorruscfgdir@ plugwrapperdir = @plugwrapperdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ reportsdir = @reportsdir@ sbindir = @sbindir@ scriptsdir = @scriptsdir@ seslockdir = @seslockdir@ sesstordir = @sesstordir@ sharedstatedir = @sharedstatedir@ siteconfdir = @siteconfdir@ sitedir = @sitedir@ sitexmldir = @sitexmldir@ srcdir = @srcdir@ supdir = @supdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tmpldir = @tmpldir@ tmpluserdir = @tmpluserdir@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ torrus_user = @torrus_user@ var_group = @var_group@ var_mode = @var_mode@ var_user = @var_user@ varprefix = @varprefix@ webplaindir = @webplaindir@ webscriptsdir = @webscriptsdir@ wrapperdir = @wrapperdir@ dtddir = $(supdir)/dtd dist_dtd_DATA = dtd/snmp-discovery.dtd dtd/torrus-config.dtd mibsdir = $(supdir)/mibs dist_mibs_DATA = mibs/RRDTOOL-SMI.txt \ mibs/TORRUS-MIB.txt styldir = $(supdir)/styling dist_styl_DATA = \ styling/colornames.pl \ styling/rainbow-schema.pl \ styling/torrus-schema.pl dist_webplain_DATA = \ webplain/explain-rrdgraph.html \ webplain/torrus.css \ webplain/torrus-printer.css \ webplain/torrus-report.css 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) --gnu sup/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu sup/Makefile .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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_dtdDATA: $(dist_dtd_DATA) @$(NORMAL_INSTALL) @list='$(dist_dtd_DATA)'; test -n "$(dtddir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(dtddir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dtddir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dtddir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dtddir)" || exit $$?; \ done uninstall-dist_dtdDATA: @$(NORMAL_UNINSTALL) @list='$(dist_dtd_DATA)'; test -n "$(dtddir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(dtddir)'; $(am__uninstall_files_from_dir) install-dist_mibsDATA: $(dist_mibs_DATA) @$(NORMAL_INSTALL) @list='$(dist_mibs_DATA)'; test -n "$(mibsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(mibsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(mibsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(mibsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(mibsdir)" || exit $$?; \ done uninstall-dist_mibsDATA: @$(NORMAL_UNINSTALL) @list='$(dist_mibs_DATA)'; test -n "$(mibsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(mibsdir)'; $(am__uninstall_files_from_dir) install-dist_stylDATA: $(dist_styl_DATA) @$(NORMAL_INSTALL) @list='$(dist_styl_DATA)'; test -n "$(styldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(styldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(styldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(styldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(styldir)" || exit $$?; \ done uninstall-dist_stylDATA: @$(NORMAL_UNINSTALL) @list='$(dist_styl_DATA)'; test -n "$(styldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(styldir)'; $(am__uninstall_files_from_dir) install-dist_webplainDATA: $(dist_webplain_DATA) @$(NORMAL_INSTALL) @list='$(dist_webplain_DATA)'; test -n "$(webplaindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(webplaindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(webplaindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(webplaindir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(webplaindir)" || exit $$?; \ done uninstall-dist_webplainDATA: @$(NORMAL_UNINSTALL) @list='$(dist_webplain_DATA)'; test -n "$(webplaindir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(webplaindir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(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 $(DATA) installdirs: for dir in "$(DESTDIR)$(dtddir)" "$(DESTDIR)$(mibsdir)" "$(DESTDIR)$(styldir)" "$(DESTDIR)$(webplaindir)"; 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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-data-local install-dist_dtdDATA \ install-dist_mibsDATA install-dist_stylDATA \ install-dist_webplainDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: 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_dtdDATA uninstall-dist_mibsDATA \ uninstall-dist_stylDATA uninstall-dist_webplainDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-local install-dist_dtdDATA install-dist_mibsDATA \ install-dist_stylDATA install-dist_webplainDATA install-dvi \ install-dvi-am install-exec install-exec-am 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 uninstall uninstall-am \ uninstall-dist_dtdDATA uninstall-dist_mibsDATA \ uninstall-dist_stylDATA uninstall-dist_webplainDATA install-data-local: $(mkinstalldirs) $(DESTDIR)$(webscriptsdir) # 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: torrus-2.08/sup/dtd/0000755000175000017500000000000012413221023011352 500000000000000torrus-2.08/sup/dtd/snmp-discovery.dtd0000644000175000017500000000224711545711242014772 00000000000000 torrus-2.08/sup/dtd/torrus-config.dtd0000644000175000017500000000560211545711242014607 00000000000000 torrus-2.08/sup/webplain/0000755000175000017500000000000012413221023012400 500000000000000torrus-2.08/sup/webplain/torrus.css0000644000175000017500000001670111545711242014411 00000000000000/* Torrus Renderer stylesheet. Designed by BlueRobot.com Modified by Ian Holsman Optimised by Stanislav Sinyagin $Id$ */ BODY { background-color : white; color : #333; font-family : verdana, arial, helvetica, sans-serif; font-size : 11px; margin : 0; padding-bottom : 0; padding-left : 0; padding-right : 0; padding-top : 0; voice-family : inherit, male; } H1, H2, H3, P { background-color : inherit; margin : 0 0 15px; padding-bottom : 0; padding-left : 0; padding-right : 0; padding-top : 0; } H1, H2 { color : #ccc; } H1 { font-size : 28px; font-weight : 900; line-height : 28px; } H2 { font-size : 20px; font-weight : 700; line-height : 20px; } H3 { color : #333; font-size : 18px; line-height : 18px; } P { clear : both; /* needed for Opera 6.12 */ color : #333; float : none; font-size : 11px; line-height : 20px; } A { background-color : inherit; color : #09c; font-weight : 600; text-decoration : none; } A:link, A:visited { background-color : inherit; color : #09c; } A:hover { background-color : #eee; color : inherit; } DIV.CurrentPath A:hover { background-color : #ccc; color : inherit; } *.Header { background-color : #eee; border-bottom : 1px solid black; border-left : 0 solid black; border-right : 0 solid black; border-top : 1px solid black; color : inherit; margin : 1em 0 1em; padding-bottom : 0; padding-left : 20px; padding-right : 0; padding-top : 17px; } *.Header A:hover { background-color : #ccc; color : inherit; } DIV.LoginInfo { position : absolute; right : 1em; top : 1.5em; font-size : 9px; text-align : right; } DIV.LoginInfo SPAN.UserName { display : block; } DIV.LoginInfo SPAN.Logout { display : block; } SPAN.Logout A { font-size : 9px; } DIV.CurrentTime { float: right; font-size : 9px; padding-right: 1em; text-align: right; } *.Content, *.SingleColumnContent { display : block; float : left; margin-bottom : 20px; margin-left : 0px; margin-right : 0px; margin-top : 0; padding-bottom : 10px; padding-left : 10px; padding-right : 10px; padding-top : 10px; } *.SingleColumnContent { padding-right : 0px; width : 100%; } *.Content { padding-right : 0px; width : 70%; } DIV.PathMenu { background-color : #eee; border-bottom : 1px dashed #999; border-left : 1px dashed #999; border-right : 1px dashed #999; border-top : 1px dashed #999; color : inherit; float : left; line-height : 17px; margin-left : 5px; padding-bottom : 10px; padding-left : 10px; padding-right : 10px; padding-top : 10px; position : relative; min-width : 15%; /* does not work in IE6 */ } SPAN.PathElement { display : block; } SPAN.TreeName { font-weight : bold; } *.PathMenu DIV.CurrentTree { font-size : 10px; overflow : hidden; width : 150px; /* compensate unsupported min-width in IE6 */ } *.PathMenuHeader { font-size : 10px; } *.SingleColumnContent DIV.CurrentTree { padding-bottom : 5px; } *.SingleColumnContent DIV.CurrentTree { color : inherit; font-size : 10px; } DIV.Legend { background-color : #eee; color : inherit; clear : both; float : none; font-size : 10px; margin-bottom : 10px; position : relative; width : 90%; } DIV.LegendRow { clear : both; float : none; margin-bottom: 2px; } DIV.LegendRow SPAN.LegendName { font-weight : bold; text-align : left; padding-right : 5px; } DIV.LegendRow SPAN.LegendValue { text-align : left; } P.Variables SPAN.VariableName { font-weight : bold; } DIV.Monitors { clear : both; float : none; font-size : 10px; margin-bottom : 10px; position : relative; width : 90%; } SPAN.MonitorName { padding-left: 20px; padding-right: 20px; } DIV.Listing { clear : both; float : none; font-size : 11px; margin-bottom : 10px; width : 90%; } *.ListRow, *.ListRowEven { clear : both; margin-top : 3px; } *.ListRowEven { background-color : #eee; } *.ListRowEven A:hover { background-color : #ccc; color : inherit; } DIV.Listing *.NodeName { display : block; font-weight : bold; padding-left : 10px; text-align : left; } DIV.Listing *.NodeDescr, DIV.Listing *.TokensetDescr { display : block; padding-left : 30px; } *.RecursiveListRow { clear : both; margin-top : 3px; margin-left : 20px; margin-right : 2px; padding-bottom: 2px; border: 1px solid #eee; } DIV.ShortGraph *.NodeDescr { font-weight : 600; padding-left : 10px; } DIV.Graph, DIV.ShortGraph { clear : left; float : left; margin-bottom : 10px; margin-top : 15px; position : relative; width : 100%; } DIV.ShortGraph *.NodeName, DIV.ShortGraph *.NodeDescr { clear : both; float : none; font-size : 11px; width : 100%; } DIV.ShortGraph IMG { border-width : 0; border-color : transparent; clear : both; float : left; } /* In tokenset display, short graphs are placed in two columns: left and right */ DIV.ShortLeft, DIV.ShortRight { margin-bottom : 5px; page-break-inside : avoid; position : relative; width : 50%; } DIV.ShortLeft { clear : left; float : left; } DIV.ShortRight { clear : right; float : right; } FORM.LoginForm { color : #333; font-size : 11px; line-height : 20px; width : 50%; } SPAN.LoginTitle { float : left; width : 20%; } SPAN.LoginInput INPUT { width : 30%; } SPAN.LoginInput INPUT.Remember { width : auto; } *.BottomShortcuts { clear : both; float : none; font-size : 11px; height : 15px; margin : 25px 0 20px; padding-bottom : 0; padding-left : 0; padding-right : 0; padding-top : 0; position : relative; } *.TopMenu { font-size : 9px; padding-left : 1em; } *.BottomMenu { clear : both; float : none; font-size : 9px; /* height : 15px; */ margin : 50px 0 0 0; padding-bottom : 0; padding-left : 1em; padding-right : 0; padding-top : 0; width : 100%; } *.TopMenu A, *.TopMenu A:link, *.TopMenu A:visited, *.BottomMenu A, *.BottomMenu A:link, *.BottomMenu A:visited { color: #5b99a5; font-size : 9px; } *.Footer { background-color : #eee; border-bottom : 1px solid black; border-left : 0 solid black; border-right : 0 solid black; border-top : 1px solid black; clear : both; color : inherit; float : none; font-size : 10px; height : 15px; line-height : 12px; margin : 0 0 10px; padding-bottom : 0; padding-left : 0; padding-right : 1em; padding-top : 0; text-align : right; } *.Footer A { font-size : 10px; } *.SiteInfo, *.TreeInfo { padding-left : 5em; } *.HelpContent { font-size: 12px; line-height: 15px; padding-bottom: 5px; padding-left: 2em; padding-right: 2em; padding-top: 5px; } *.HelpContent P { font-size: 12px; } *.HelpHeader { color : #ccc; font-size : 13px; font-weight: 800; margin : 10px 0 10px; } *.HelpFooter { position: absolute; bottom: 0; margin : 0 0 10px; } *.HelpPathHeader { font-weight: 700; margin : 10px 0 10px; } *.HelpMessage { padding-left: 2em; padding-right: 2em; } *.SetDateDialog { font-size : 9px; padding-bottom : 0; padding-left : 2em; padding-right : 2em; padding-top : 0; } *.SetDateDialog FORM { display : inline; } *.SetDateDialog INPUT { font-size : 9px; } *.SearchDialog { font-size : 9px; padding-bottom : 0; padding-left : 2em; padding-right : 2em; padding-top : 0; } *.SearchDialog FORM { display : inline; } *.SearchDialog INPUT { font-size : 9px; } *.ErrorMessage { color : red; height : 15px; } torrus-2.08/sup/webplain/torrus-report.css0000644000175000017500000000517711545711242015727 00000000000000/* Torrus Renderer stylesheet. Designed by Stanislav Sinyagin $Id$ */ BODY { background-color : white; color : black; font-family : verdana, arial, helvetica, sans-serif; font-size : 10pt; margin : 0; padding-bottom : 0; padding-left : 0; padding-right : 0; padding-top : 0; voice-family : inherit, male; } H1, H2, H3 { background-color : transparent; color : black; } H1 { font-size : 18pt; font-weight : 900; line-height : 20pt; } H2 { font-size : 16pt; font-weight : 700; line-height : 18pt; } H3 { font-size : 14pt; line-height : 16pt; } A, A:link, A:visited { background-color : transparent; color : black; text-decoration : none; } A:hover { background-color : #eee; color : inherit; } *.Header { background-color : transparent; border-bottom : 0.5pt solid black; border-left : 0 solid black; border-right : 0 solid black; border-top : 0.5pt solid black; color : black; font-size : 9pt; font-weight : 700; margin : 5pt 0 10pt; padding-bottom : 0; padding-left : 10pt; padding-right : 0; padding-top : 10pt; } DIV.CurrentTime { float: right; font-size : 9px; text-align: right; } *.Content, *.SingleColumnContent { margin-bottom : 0; margin-left : 5pt; margin-right : 5pt; margin-top : 0; padding-bottom : 10pt; padding-left : 10pt; padding-right : 10pt; padding-top : 10pt; } DIV.CurrentTree { background-color : transparent; margin-bottom : 4pt; } TABLE.ReportTable { font-size : 9pt; border-collapse : collapse; } CAPTION.ReportTable { font-size : 14pt; font-weight : 700; caption-side: top; padding-bottom : 7pt; padding-top : 10pt; } TR.ReportHeadRow { background-color : #999; } TR.ReportEvenRow { background-color : #ccc; } TD { border : solid 1px #aaa; padding-bottom : 1pt; padding-top : 3pt; padding-left : 2pt; padding-right : 2pt; width : 10%; } TD.ReportHeadCell { font-weight : 700; text-align : center; } TD.ReportCell { text-align : right; padding-left : 7pt; } TD.ReportFirstCell { text-align : left; font-weight : 600; } DIV.ReportLegend { margin-top: 60pt; margin-left: 10pt; font-size : 7pt; } SPAN.ReportLegendTerm { font-weight : 700; padding-right : 2pt; } *.Footer { background-color : transparent; border-bottom : 0 solid black; border-left : 0 solid black; border-right : 0 solid black; border-top : 0.75pt solid black; color : black; font-size : 6pt; margin : 0 0 10pt; padding-bottom : 0; padding-left : 0; padding-right : 0; padding-top : 0; text-align : right; width : 100%; } *.SiteInfo, *.TreeInfo { padding-left : 5em; } torrus-2.08/sup/webplain/explain-rrdgraph.html0000644000175000017500000000454611545711242016502 00000000000000 RRD Graph Description

RRD Graph Description

The graphs in Torrus are drawn by RRDtool, a powerful instrument for data aggregation and graphing.

The horizontal axis displays the time at which the data has been collected. The rightmost point corresponds to the most recent moment.

The date and time of the graph can be easily changed by using the Set date checkbox at the bottom of the page. When the checkbox is checked, the date/time string in the text field is interpreted after clicking the submit button. It is then reflected in the Report date informational line at the page displaying the graphs. The date format is quite flexible. It understands such input as "July 13 5:00", or "01/13/2003 5:00", etc.

The vertical axis scales automatically to fit the data values. The meaning of the values depends on the nature of the datasource, and is usually described in the graph legend, comments, and the help text.

Usually the legend of the vertical axis specifies the meaning of the values:

  • Bps: bytes per second counter
  • bps: bits per second counter
  • pps: pakets per second counter
Other legends correspond mostly to gauges, such as temperature, load percentage, or disk space.

The graphing engine automatically chooses the best units for scaling the values. The scaling magnitude is displayed alongside the numerical value, with the following meaning:

  • a: 10e-18 Atto
  • f: 10e-15 Femto
  • p: 10e-12 Pico
  • n: 10e-9 Nano
  • u: 10e-6 Micro
  • m: 10e-3 Milli
  • k: 10e+3 Kilo
  • M: 10e+6 Mega
  • G: 10e+9 Giga
  • T: 10e+12 Tera
  • P: 10e+15 Peta
  • E: 10e+18 Exa
Memory usage is scaled with the base of 1024.

torrus-2.08/sup/webplain/torrus-printer.css0000644000175000017500000001003311545711242016062 00000000000000/* Torrus Renderer stylesheet. Designed by Stanislav Sinyagin $Id$ */ BODY { background-color : white; color : black; font-family : verdana, arial, helvetica, sans-serif; font-size : 10pt; margin : 0; padding-bottom : 0; padding-left : 0; padding-right : 0; padding-top : 0; voice-family : inherit, male; } H1, H2, H3 { background-color : transparent; color : black; } H1 { font-size : 18pt; font-weight : 900; line-height : 20pt; } H2 { font-size : 16pt; font-weight : 700; line-height : 18pt; } H3 { font-size : 14pt; line-height : 16pt; } P { background-color : transparent; color : black; line-height : 18pt; text-decoration : none; padding-bottom : 0; padding-left : 0; padding-right : 0; padding-top : 0; } A, A:link, A:visited { background-color : transparent; color : black; text-decoration : none; } *.Header { background-color : transparent; border-bottom : 0.5pt solid black; border-left : 0 solid black; border-right : 0 solid black; border-top : 0.5pt solid black; color : black; font-size : 9pt; font-weight : 700; margin : 5pt 0 10pt; padding-bottom : 0; padding-left : 10pt; padding-right : 0; padding-top : 10pt; } DIV.LoginInfo { position : absolute; right : 0; top : 8px; font-size : 9px; text-align : right; } DIV.LoginInfo SPAN.UserName { display : block; } DIV.LoginInfo SPAN.Logout { display : none; } DIV.CurrentTime { float: right; font-size : 9px; text-align: right; } *.Content, *.SingleColumnContent { margin-bottom : 0; margin-left : 5pt; margin-right : 5pt; margin-top : 0; padding-bottom : 10pt; padding-left : 10pt; padding-right : 10pt; padding-top : 10pt; } DIV.CurrentPath { background-color : transparent; } *.PathURLs { font-size : 9px; } DIV.CurrentTree { background-color : transparent; } DIV.Legend { background-color : transparent; color : black; font-size : 8pt; margin-bottom : 10pt; margin-top : 10pt; } DIV.LegendRow { clear : both; height : 9pt; width : 100%; margin-bottom : 3pt; } *.LegendRow *.LegendName { font-weight : bold; padding-right : 5pt; text-align : left; } *.LegendRow *.LegendValue { text-align : left; } P.Variables SPAN.VariableName { font-weight : bold; } DIV.Monitors { clear : both; float : none; font-size : 8pt; margin-bottom : 10pt; position : relative; width : 90%; } SPAN.MonitorName { padding-left: 20pt; padding-right: 20pt; } DIV.Listing { margin-bottom : 10pt; margin-left : 20pt; margin-right : 20pt; } *.ListRow, *.ListRowEven { border-bottom : 0.5pt solid gray; clear : both; font-size : 8pt; line-height : 12pt; padding-top : 3pt; width : 100%; } *.Listing *.NodeName { display : block; font-weight : bold; padding-right : 5pt; padding-left : 5pt; text-align : left; } *.Listing *.NodeDescr { display : block; padding-left : 30pt; padding-right : 5pt; text-align : left; } DIV.Graph, DIV.ShortGraph { border-bottom : 0.5pt solid gray; margin-bottom : 10pt; margin-left : 20pt; margin-right : 20pt; margin-top : 15pt; page-break-inside : avoid; } DIV.ShortGraph *.NodeName { font-weight : bold; width : 100%; } DIV.ShortGraph *.NodeDescr { margin-bottom : 5pt; width : 100%; } *.GraphImage { text-align: center; } *.GraphImage IMG { border-width : 0; border-color : transparent; float : none; } /* In tokenset display, short graphs are placed in two columns on the screen, but one column on printer */ DIV.ShortLeft, DIV.ShortRight { width : 100%; } *.BottomShortcuts { display : none; } *.TopMenu, *.BottomMenu { display : none; } *.Footer { background-color : transparent; border-bottom : 0 solid black; border-left : 0 solid black; border-right : 0 solid black; border-top : 0.75pt solid black; color : black; font-size : 6pt; margin : 0 0 10pt; padding-bottom : 0; padding-left : 0; padding-right : 0; padding-top : 0; text-align : right; width : 100%; } *.SiteInfo, *.TreeInfo { padding-left : 5em; } torrus-2.08/sup/mibs/0000755000175000017500000000000012413221023011531 500000000000000torrus-2.08/sup/mibs/TORRUS-MIB.txt0000644000175000017500000001244211545711242013674 00000000000000TORRUS-MIB DEFINITIONS ::= BEGIN IMPORTS MODULE-IDENTITY, OBJECT-IDENTITY, NOTIFICATION-TYPE, Integer32 FROM SNMPv2-SMI DateAndTime FROM SNMPv2-TC rrdtool FROM RRDTOOL-SMI; torrus MODULE-IDENTITY LAST-UPDATED "200506210000Z" ORGANIZATION "Round Robin Database Framework project" CONTACT-INFO "Round Robin Database Framework project Project description and documentation: http://torrus.org Administrative contact for MIB module: Stanislav Sinyagin Tel. +41 79 407 02 24 E-mail: ssinyagin@yahoo.com" DESCRIPTION "The MIB module for SNMP variables specific to Torrus project" ::= { rrdtool 1 } EventType ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "Defines the event type: set -- The monitor condition is first time met repeat -- The monitor condition is met again on the consequtive monitorin cycle clear -- The monitor condition is not met the first time after event type set or repeat forget -- The monitor condition was not met during the expiration period since the last event type clear" SYNTAX INTEGER { set(1), repeat(2), clear(3), forget(4) } TreeName ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "Torrus system operates with several datasource trees identified by names" SYNTAX OCTET STRING (SIZE (1..512)) Token ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "Token is a short ID for the leaf or subtree of the Torrus datasources hierarchy" SYNTAX OCTET STRING (SIZE (5..10)) Path ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "Path is the full name of the Torrus datasource, containing its parent nodes separated by slashes" SYNTAX OCTET STRING (SIZE (1..512)) MonitorEventsEntry ::= SEQUENCE { torrusEventIndex Integer32, torrusToken Token, torrusMonitorName OCTET STRING, torrusEventType EventType, torrusPath Path, torrusTimestamp DateAndTime, torrusSeverity Integer32, torrusMonitorDesc OCTET STRING } torrusMonitorEventsTable OBJECT-TYPE SYNTAX SEQUENCE OF MonitorEventsEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "Table of current monitor events" ::= { torrus 1 } torrusMonitorEventsEntry OBJECT-TYPE SYNTAX MonitorEventsEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "Each monitor event is characterized by the datasource token and monitor name" INDEX { torrusEventIndex } ::= { torrusMonitorEventsTable 1 } torrusEventIndex OBJECT-TYPE SYNTAX Integer32 (1..65535) MAX-ACCESS not-accessible STATUS current DESCRIPTION "The value of this object uniquely identifies this event entry." ::= { torrusMonitorEventsEntry 1 } torrusToken OBJECT-TYPE SYNTAX Token MAX-ACCESS not-accessible STATUS current DESCRIPTION "Token is a short ID for the leaf or subtree of the Torrus datasources hierarchy" ::= { torrusMonitorEventsEntry 2 } torrusMonitorName OBJECT-TYPE SYNTAX OCTET STRING MAX-ACCESS not-accessible STATUS current DESCRIPTION "Each monitor instance is identified by unique name" ::= { torrusMonitorEventsEntry 3 } torrusEventType OBJECT-TYPE SYNTAX EventType MAX-ACCESS not-accessible STATUS current DESCRIPTION "The type of the event: set(1), repeat(2), clear(3), forget(4)" ::= { torrusMonitorEventsEntry 4 } torrusPath OBJECT-TYPE SYNTAX Path MAX-ACCESS not-accessible STATUS current DESCRIPTION "The full name of the Torrus datasource, containing its parent nodes separated by slashes" ::= { torrusMonitorEventsEntry 5 } torrusTimestamp OBJECT-TYPE SYNTAX DateAndTime MAX-ACCESS not-accessible STATUS current DESCRIPTION "Timestamp of the event, in SNMPv2 format, e.g. 1992-5-26,13:30:15.0,-4:0" ::= { torrusMonitorEventsEntry 6 } torrusTreeName OBJECT-TYPE SYNTAX TreeName MAX-ACCESS not-accessible STATUS current DESCRIPTION "Name of the datasource tree" ::= { torrusMonitorEventsEntry 7 } torrusSeverity OBJECT-TYPE SYNTAX Integer32 (1..65535) MAX-ACCESS not-accessible STATUS current DESCRIPTION "Optional severity level" ::= { torrusMonitorEventsEntry 8 } torrusMonitorDesc OBJECT-TYPE SYNTAX OCTET STRING MAX-ACCESS not-accessible STATUS current DESCRIPTION "Human readable monitor comment" ::= { torrusMonitorEventsEntry 9 } torrusAlarm NOTIFICATION-TYPE OBJECTS { torrusToken, torrusMonitorName, torrusEventType, torrusPath, torrusTimestamp } STATUS current DESCRIPTION "The SNMP trap that is generated when an Torrus monitor condition is changed for the leaf being monitored" ::= { torrus 2 } END torrus-2.08/sup/mibs/RRDTOOL-SMI.txt0000644000175000017500000000152311545711242014002 00000000000000RRDTOOL-SMI DEFINITIONS ::= BEGIN IMPORTS MODULE-IDENTITY, OBJECT-IDENTITY, enterprises FROM SNMPv2-SMI; rrdtool MODULE-IDENTITY LAST-UPDATED "200209150000Z" ORGANIZATION "RRD Tool" CONTACT-INFO " Tobi Oetiker Postal: ETZ J97, ETH 8092 Zurich Switzerland Telephone: +41 1 632-5286 E-mail: oetiker@ee.ethz.ch RRD Tool Information: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ " DESCRIPTION "The Structure of RRDTool fellow projects" ::= { enterprises 14697 } -- assigned by IANA torrus OBJECT-IDENTITY STATUS current DESCRIPTION "Round Robin Database Framework. http://torrus.sourceforge.net/ " ::= { rrdtool 1 } -- more to come if necessary. END torrus-2.08/sup/Makefile.am0000644000175000017500000000250211661302716012567 00000000000000 # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # dtddir = $(supdir)/dtd dist_dtd_DATA = dtd/snmp-discovery.dtd dtd/torrus-config.dtd mibsdir = $(supdir)/mibs dist_mibs_DATA = mibs/RRDTOOL-SMI.txt \ mibs/TORRUS-MIB.txt styldir = $(supdir)/styling dist_styl_DATA = \ styling/colornames.pl \ styling/rainbow-schema.pl \ styling/torrus-schema.pl webplaindir = @webplaindir@ dist_webplain_DATA = \ webplain/explain-rrdgraph.html \ webplain/torrus.css \ webplain/torrus-printer.css \ webplain/torrus-report.css install-data-local: $(mkinstalldirs) $(DESTDIR)$(webscriptsdir) torrus-2.08/sup/styling/0000755000175000017500000000000012413221023012270 500000000000000torrus-2.08/sup/styling/colornames.pl0000644000175000017500000002227511661302716014734 00000000000000# Symbolic Color names # Stanislav Sinyagin # Shawn Ferry my %colorNames = ( # Taken from the tt2 example file 'black' => {'color' => '#000000'}, 'grey25' => {'color' => '#404040'}, 'grey50' => {'color' => '#808080'}, 'grey75' => {'color' => '#c0c0c0'}, 'white' => {'color' => '#ffffff'}, 'red' => {'color' => '#ff0000'}, 'red25' => {'color' => '#400000'}, 'red50' => {'color' => '#800000'}, 'red75' => {'color' => '#c00000'}, 'green' => {'color' => '#00ff00'}, 'green25' => {'color' => '#004000'}, 'green50' => {'color' => '#008000'}, 'green75' => {'color' => '#00c000'}, 'blue' => {'color' => '#0000ff'}, 'blue25' => {'color' => '#000040'}, 'blue50' => {'color' => '#000080'}, 'blue75' => {'color' => '#0000c0'}, 'blood' => {'color' => '#800000'}, 'scarlet' => {'color' => '#c04040'}, 'rose' => {'color' => '#f08080'}, 'orange' => {'color' => '#fe7202'}, 'leaf' => {'color' => '#006400'}, 'bud' => {'color' => '#66aa66'}, 'mint' => {'color' => '#aaffaa'}, 'marine' => {'color' => '#0066cc'}, 'sky' => {'color' => '#66ccff'}, 'mauve' => {'color' => '#6666cc'}, 'lilac' => {'color' => '#9797ff'}, # http://www.mandarindesign.com/color.html#namedcolors # http://www.w3schools.com/html/html_colornames.asp # http://www.oreilly.com/catalog/wdnut/excerpt/color_names.html 'aliceblue' => {'color' => '#F0F8FF'}, 'antiquewhite' => {'color' => '#FAEBD7'}, 'aqua' => {'color' => '#00FFFF'}, 'aquamarine' => {'color' => '#7FFFD4'}, 'azure' => {'color' => '#F0FFFF'}, 'beige' => {'color' => '#F5F5DC'}, 'bisque' => {'color' => '#FFE4C4'}, 'blanchedalmond' => {'color' => '#FFEBCD'}, 'blueviolet' => {'color' => '#8A2BE2'}, 'brown' => {'color' => '#A52A2A'}, 'burlywood' => {'color' => '#DEB887'}, 'cadetblue' => {'color' => '#5F9EA0'}, 'chartreuse' => {'color' => '#7FFF00'}, 'chocolate' => {'color' => '#D2691E'}, 'coral' => {'color' => '#FF7F50'}, 'cornflowerblue' => {'color' => '#6495ED'}, 'cornsilk' => {'color' => '#FFF8DC'}, 'crimson' => {'color' => '#DC143C'}, 'cyan' => {'color' => '#00FFFF'}, 'darkblue' => {'color' => '#00008B'}, 'darkcyan' => {'color' => '#008B8B'}, 'darkgoldenrod' => {'color' => '#B8860B'}, 'darkgray' => {'color' => '#A9A9A9'}, 'darkgreen' => {'color' => '#006400'}, 'darkkhaki' => {'color' => '#BDB76B'}, 'darkmagenta' => {'color' => '#8B008B'}, 'darkolivegreen' => {'color' => '#556B2F'}, 'darkorange' => {'color' => '#FF8C00'}, 'darkorchid' => {'color' => '#9932CC'}, 'darkred' => {'color' => '#8B0000'}, 'darksalmon' => {'color' => '#E9967A'}, 'darkseagreen' => {'color' => '#8FBC8B'}, 'darkslateblue' => {'color' => '#483D8B'}, 'darkslategray' => {'color' => '#2F4F4F'}, 'darkturquoise' => {'color' => '#00CED1'}, 'darkviolet' => {'color' => '#9400D3'}, 'deeppink' => {'color' => '#FF1493'}, 'deepskyblue' => {'color' => '#00BFFF'}, 'dimgray' => {'color' => '#696969'}, 'dodgerblue' => {'color' => '#1E90FF'}, 'firebrick' => {'color' => '#B22222'}, 'floralwhite' => {'color' => '#FFFAF0'}, 'forestgreen' => {'color' => '#228B22'}, 'fuchsia' => {'color' => '#FF00FF'}, 'gainsboro' => {'color' => '#DCDCDC'}, 'ghostwhite' => {'color' => '#F8F8FF'}, 'gold' => {'color' => '#FFD700'}, 'goldenrod' => {'color' => '#DAA520'}, 'gray' => {'color' => '#808080'}, 'greenyellow' => {'color' => '#ADFF2F'}, 'honeydew' => {'color' => '#F0FFF0'}, 'hotpink' => {'color' => '#FF69B4'}, 'indianred' => {'color' => '#CD5C5C'}, 'indigo' => {'color' => '#4B0082'}, 'ivory' => {'color' => '#FFFFF0'}, 'khaki' => {'color' => '#F0E68C'}, 'lavender' => {'color' => '#E6E6FA'}, 'lavenderblush' => {'color' => '#FFF0F5'}, 'lawngreen' => {'color' => '#7CFC00'}, 'lemonchiffon' => {'color' => '#FFFACD'}, 'lightblue' => {'color' => '#ADD8E6'}, 'lightcoral' => {'color' => '#F08080'}, 'lightcyan' => {'color' => '#E0FFFF'}, 'lightgoldenrodyellow' => {'color' => '#FAFAD2'}, 'lightgreen' => {'color' => '#90EE90'}, 'lightgrey' => {'color' => '#D3D3D3'}, 'lightpink' => {'color' => '#FFB6C1'}, 'lightsalmon' => {'color' => '#FFA07A'}, 'lightseagreen' => {'color' => '#20B2AA'}, 'lightskyblue' => {'color' => '#87CEFA'}, 'lightslategray' => {'color' => '#778899'}, 'lightsteelblue' => {'color' => '#B0C4DE'}, 'lightyellow' => {'color' => '#FFFFE0'}, 'lime' => {'color' => '#00FF00'}, 'limegreen' => {'color' => '#32CD32'}, 'linen' => {'color' => '#FAF0E6'}, 'magenta' => {'color' => '#FF00FF'}, 'maroon' => {'color' => '#800000'}, 'mediumaquamarine' => {'color' => '#66CDAA'}, 'mediumblue' => {'color' => '#0000CD'}, 'mediumorchid' => {'color' => '#BA55D3'}, 'mediumpurple' => {'color' => '#9370DB'}, 'mediumseagreen' => {'color' => '#3CB371'}, 'mediumslateblue' => {'color' => '#7B68EE'}, 'mediumspringgreen' => {'color' => '#00FA9A'}, 'mediumturquoise' => {'color' => '#48D1CC'}, 'mediumvioletred' => {'color' => '#C71585'}, 'midnightblue' => {'color' => '#191970'}, 'mintcream' => {'color' => '#F5FFFA'}, 'mistyrose' => {'color' => '#FFE4E1'}, 'moccasin' => {'color' => '#FFE4B5'}, 'navajowhite' => {'color' => '#FFDEAD'}, 'navy' => {'color' => '#000080'}, 'oldlace' => {'color' => '#FDF5E6'}, 'olive' => {'color' => '#808000'}, 'olivedrab' => {'color' => '#6B8E23'}, 'orangered' => {'color' => '#FF4500'}, 'orchid' => {'color' => '#DA70D6'}, 'palegoldenrod' => {'color' => '#EEE8AA'}, 'palegreen' => {'color' => '#98FB98'}, 'paleturquoise' => {'color' => '#AFEEEE'}, 'palevioletred' => {'color' => '#DB7093'}, 'papayawhip' => {'color' => '#FFEFD5'}, 'peachpuff' => {'color' => '#FFDAB9'}, 'peru' => {'color' => '#CD853F'}, 'pink' => {'color' => '#FFC0CB'}, 'plum' => {'color' => '#DDA0DD'}, 'powderblue' => {'color' => '#B0E0E6'}, 'purple' => {'color' => '#800080'}, 'rosybrown' => {'color' => '#BC8F8F'}, 'royalblue' => {'color' => '#4169E1'}, 'saddlebrown' => {'color' => '#8B4513'}, 'salmon' => {'color' => '#FA8072'}, 'sandybrown' => {'color' => '#F4A460'}, 'seagreen' => {'color' => '#2E8B57'}, 'seashell' => {'color' => '#FFF5EE'}, 'sienna' => {'color' => '#A0522D'}, 'silver' => {'color' => '#C0C0C0'}, 'skyblue' => {'color' => '#87CEEB'}, 'slateblue' => {'color' => '#6A5ACD'}, 'slategray' => {'color' => '#708090'}, 'snow' => {'color' => '#FFFAFA'}, 'springgreen' => {'color' => '#00FF7F'}, 'steelblue' => {'color' => '#4682B4'}, 'tan' => {'color' => '#D2B48C'}, 'teal' => {'color' => '#008080'}, 'thistle' => {'color' => '#D8BFD8'}, 'tomato' => {'color' => '#FF6347'}, 'turquoise' => {'color' => '#40E0D0'}, 'violet' => {'color' => '#EE82EE'}, 'wheat' => {'color' => '#F5DEB3'}, 'whitesmoke' => {'color' => '#F5F5F5'}, 'yellow' => {'color' => '#FFFF00'}, 'yellowgreen' => {'color' => '#9ACD32'}, ); while( my($style, $def) = each( %colorNames ) ) { $Torrus::Renderer::graphStyles{$style} = $def; } 1; torrus-2.08/sup/styling/torrus-schema.pl0000644000175000017500000001271311703556537015373 00000000000000# RRDtool graph Colors and Lines Profile. # You are encouraged to create your own copy and reference it # with $Torrus::Renderer::stylingProfile in your torrus-siteconfig.pl # or better define your amendments in Torrus::Renderer::stylingProfileOverlay # Stanislav Sinyagin # Shawn Ferry %Torrus::Renderer::graphStyles = ( 'SingleGraph' => { 'color' => '##blue', 'line' => 'LINE2' }, 'SingleGraphMax' => { # MAX value graph on top of the Average 'color' => '##cornflowerblue', 'line' => 'LINE1' }, 'HWBoundary' => { 'color' => '##red', 'line' => 'LINE1' }, 'HWFailure' => { 'color' => '##moccasin' }, 'HruleMin' => { 'color' => '##darkmagenta' }, 'HruleNormal' => { 'color' => '##seagreen' }, 'HruleMax' => { 'color' => '##darkmagenta' }, 'BpsIn' => { 'color' => '#01ca00', 'line' => 'AREA' }, 'BpsOut' => { 'color' => '##blue', 'line' => 'LINE2' }, 'BpsInMax' => { 'color' => '#b7ea8c', 'line' => 'AREA' }, 'BpsOutMax' => { 'color' => '#017eb5', 'line' => 'LINE1' }, 'BusinessDay' => { 'color' => '##white', 'line' => 'AREA' }, 'Evening' => { 'color' => '##mintcream', 'line' => 'AREA' }, 'Night' => { 'color' => '##lavender', 'line' => 'AREA' }, # Common Definitions # Using generic names allows the "generic" value to be # changed without editing every instance 'in' => { 'color' => '##green', 'line' => 'AREA' }, 'out' => { 'color' => '##blue', 'line' => 'LINE2' }, 'nearend' => { 'color' => '##green', 'line' => 'LINE2' }, 'farend' => { 'color' => '##blue', 'line' => 'LINE2' }, 'maxvalue' => { 'color' => '##darkseagreen', 'line' => 'AREA' }, 'currvalue' => { 'color' => '##blue', 'line' => 'LINE2' }, 'totalresource' => { 'color' => '##palegreen', 'line' => 'AREA' }, 'resourceusage' => { 'color' => '##blue', 'line' => 'AREA' }, 'resourcepartusage' => { 'color' => '##crimson', 'line' => 'AREA' }, # convenient definitions one - ten, colors that # "work" in a single graph 'one' => {'color' => '##green'}, 'two' => {'color' => '##blue'}, 'three' => {'color' => '##red'}, 'four' => {'color' => '##gold'}, 'five' => {'color' => '##seagreen'}, 'six' => {'color' => '##cornflowerblue'}, 'seven' => {'color' => '##crimson'}, 'eight' => {'color' => '##darkorange'}, 'nine' => {'color' => '##darkmagenta'}, 'ten' => {'color' => '##orangered'}, # Numbered palette to make dynamically assembled stacked charts # dark28 and accent8 color schemes, from # http://bloodgate.com/perl/graph/manual/att_colors.html 'clr1' => {'color' => '#1b9e77'}, 'clr2' => {'color' => '#d95f02'}, 'clr3' => {'color' => '#7570b3'}, 'clr4' => {'color' => '#e7298a'}, 'clr5' => {'color' => '#66a61e'}, 'clr6' => {'color' => '#e6ab02'}, 'clr7' => {'color' => '#a6761d'}, 'clr8' => {'color' => '#666666'}, 'clr9' => {'color' => '#7fc97f'}, 'clr10' => {'color' => '#beaed4'}, 'clr11' => {'color' => '#fdc086'}, 'clr12' => {'color' => '#ffd92f'}, 'clr13' => {'color' => '#386cb0'}, 'clr14' => {'color' => '#f0027f'}, 'clr15' => {'color' => '#bf5b17'}, # definitions for combinatorial graphing #RED 'red1' => { 'color' => '##red', 'line' => 'AREA', }, 'red2' => { 'color' => '##red25', 'line' => 'STACK', }, 'red3' => { 'color' => '##red50', 'line' => 'STACK', }, 'red4' => { 'color' => '##red75', 'line' => 'STACK', }, #GREEN 'green1' => { 'color' => '##green', 'line' => 'AREA', }, 'green2' => { 'color' => '##green25', 'line' => 'STACK', }, 'green3' => { 'color' => '##green50', 'line' => 'STACK', }, 'green4' => { 'color' => '##green75', 'line' => 'STACK', }, #BLUE 'blue1' => { 'color' => '##blue', 'line' => 'AREA', }, 'blue2' => { 'color' => '##blue25', 'line' => 'STACK', }, 'blue3' => { 'color' => '##blue50', 'line' => 'STACK', }, 'blue4' => { 'color' => '##blue75', 'line' => 'STACK', }, ); # Place for extra RRDtool graph arguments # Example: ( '--color', 'BACK#D0D0FF', '--color', 'GRID#A0A0FF' ); @Torrus::Renderer::graphExtraArgs = (); 1; torrus-2.08/sup/styling/rainbow-schema.pl0000644000175000017500000000222311545711242015457 00000000000000# Example of alternate style # rougly the traditional colors in a rainbow. # Shawn Ferry # # This file should be referenced using the # $Torrus::Renderer::stylingProfileOverlay option: # $Torrus::Renderer::stylingProfileOverlay = "rainbow-schema"; $Torrus::Renderer::graphStyles{'one'}{'color'} = '##darkred'; $Torrus::Renderer::graphStyles{'two'}{'color'} = '##red'; $Torrus::Renderer::graphStyles{'three'}{'color'} = '##yellow'; $Torrus::Renderer::graphStyles{'four'}{'color'} = '##deeppink'; $Torrus::Renderer::graphStyles{'five'}{'color'} = '##forestgreen'; $Torrus::Renderer::graphStyles{'six'}{'color'} = '##orange'; $Torrus::Renderer::graphStyles{'seven'}{'color'} = '##indigo'; $Torrus::Renderer::graphStyles{'eight'}{'color'} = '##blueviolet'; $Torrus::Renderer::graphStyles{'nine'}{'color'} = '##blue'; $Torrus::Renderer::graphStyles{'ten'}{'color'} = '##deepskyblue'; # slightly off white background with gold grid lines push( @Torrus::Renderer::graphExtraArgs, '--color=CANVAS#DCDCDC', #light grey '--color=BACK#808080', # darker grey '--color=GRID#FFD700' ); # gold 1; torrus-2.08/ChangeLog0000644000175000017500000025566312413217640011515 000000000000002014-10-02 Stanislav Sinyagin * NEWS: Torrus release 2.08 2014-09-30 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS.pm: Bugfix in discovery sequence. This bug was invisible up to perl v5.18.0. Now Perl randomizes hash keys on every loop. 2014-08-22 Stanislav Sinyagin * perllib/Torrus/Renderer/RPC.pm: new RPC method: TIMESERIES 2014-07-11 Stanislav Sinyagin * perllib/Torrus/DevDiscover/UcdSnmp.pm: Loopback interfaces filtered out 2014-05-30 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC4293_IP_MIB.pm: New params: RFC4293_IP_MIB::tokenset-members, RFC4293_IP_MIB::ipv4-external-serviceid, RFC4293_IP_MIB::ipv6-external-serviceid, New selector action: TokensetMember 2014-05-16 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: Improved interface indexing for unknown devices. New parameters: RFC2863_IF_MIB::name-hint RFC2863_IF_MIB::comment-hint 2014-05-13 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS.pm: new discovery parameter: CiscoIOS::ifindex-persist 2014-04-28 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC4293_IP_MIB.pm: new discovery module for IPv4/IPv6 traffic stats 2014-02-28 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoGeneric.pm (discover): 64-bit gauges for Cisco memory pools 2014-02-17 Stanislav Sinyagin * perllib/Torrus/ConfigTree/Writer.pm (initRoot): new parameter: tree-name automatically inserted to the top of the tree 2013-04-29 Stanislav Sinyagin * NEWS: Release 2.07 2013-02-15 Stanislav Sinyagin * NEWS: Release 2.06 * perllib/Torrus/Collector/SNMP.pm (isMapReady): new function: isMapReady(), removed function: activeMappingSessions() 2012-10-28 Stanislav Sinyagin * bin/action_snmpv1trap.in, bin/action_snmptrap.in: $ENV{'TORRUS_SEVERITY'} is now treated properly 2012-10-14 Stanislav Sinyagin * perllib/Torrus/DevDiscover/F5BigIp.pm: New implementation for F5 BigIP support 2012-10-07 Stanislav Sinyagin * NEWS: Release 2.05 * Removed support for F5 BigIP version 4.x because it's end of life and outdated. Support for Version 11 is in development. 2012-09-11 Stanislav Sinyagin * perllib/Torrus/DevDiscover/APC_PowerNet.pm: added support for Modular Environmental Manager (MEM) 2012-08-16 Stanislav Sinyagin * NEWS: Release 2.04 2012-08-16 Stanislav Sinyagin * perllib/Torrus/DevDiscover/EmpireSystemedge.pm: CA eHealth SystemEDGE support is significantly refactored by Roman Hochuli 2012-07-17 Stanislav Sinyagin * configs/torrus-config.pl: default value for $Torrus::Collector::SNMP::unreachableTimeout is set to 0 instead of 6 hours (never give up on unreachable hosts) 2012-07-08 Stanislav Sinyagin * perllib/Torrus/DevDiscover/ComtechEFData.pm: new discovery module for Comtech EF Data satellite modems 2012-07-04 Stanislav Sinyagin * xmlconfig/defaults.xml: new graph view: embedded-small * perllib/Torrus/Renderer/RRDtool.pm (rrd_make_graph_opts): new view parameter 'graph-colors' and URL variable Gcolors 2012-07-03 Stanislav Sinyagin * perllib/Torrus/Renderer/RRDtool.pm: new RRD graph parameter: border 2012-04-22 Stanislav Sinyagin * NEWS: Release 2.03 (bugfix release) 2012-03-20 Stanislav Sinyagin * NEWS: Release 2.02 2012-03-13 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: new parameter RFC2863_IF_MIB::sort-by-name 2012-03-07 Stanislav Sinyagin * Monitor*.pm, Collector*.pm: undef $hash{$key} is deprecated, replaced with delete 2012-02-16 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm: rrd-create-rra is added to the list of copied parameters. 2011-12-27 Stanislav Sinyagin * perllib/Torrus/ConfigTree.pm (getRelative): now leaves can be referred to as [[nodeid]] in RPN. * perllib/Torrus/DevDiscover/RFC2670_DOCS_IF.pm (discover): new discovery parameter: RFC2670_DOCS_IF::suppress-all-cable-stats 2011-12-06 Stanislav Sinyagin * sup/styling/torrus-schema.pl: BpsIn now uses a slightly darker green, so that maxline can have a better contrast. * perllib/Torrus/Renderer/RRDtool.pm: MAX lines can now be displayed in graphs. New URL variables: Gmaxline, Gmaxlinestep. New multigraphs parameters: maxline-style-XX, maxline-color-XX. * perllib/Torrus/DevDiscover/APC_PowerNet.pm: new discovery module 2011-11-24 Stanislav Sinyagin * perllib/Torrus/Collector/SNMP.pm, perllib/Torrus/DevDiscover.pm: new SNMP parameter: "snmp-maxrepetitions". The default value is 10. Previously Net::SNMP was setting it to 25. 2011-11-18 Stanislav Sinyagin * perllib/Torrus/DevDiscover/NetBotz.pm: added selector actions: Monitor, TokensetMember 2011-11-15 Stanislav Sinyagin * perllib/Torrus/Log.pm (enableSyslog): new config variable: $Torrus::Log::syslogSockOpt 2011-11-14 Stanislav Sinyagin * perllib/Torrus/DevDiscover/DevDetails.pm: The following methods are deprecated and will be phased out: storeSnmpVars(), hasOID(), snmpVar(), getSnmpIndices(). $dd->walkSnmpTable() should be used instead. 2011-11-12 Stanislav Sinyagin * configs/torrus-config.pl: New config variables for Syslog: $Torrus::Log::syslogFacility = 'local0'; $Torrus::Collector::useSyslog = 1; $Torrus::Monitor::useSyslog = 1; * bin/monitor.in: disabled log rotation on SIGHUP. Syslog logging enabled by default. * bin/collector.in: disabled log rotation on SIGHUP. Syslog logging enabled by default. * perllib/Torrus/Log.pm: Syslog logging for daemons. 2011-10-14 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: ifSpeed monitoring is triggered by $interface->{'ifSpeedMonitoring'}. The bandwidth usage templates are updated accordingly. 2011-10-12 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC4319_HDSL2_SHDSL_LINE_MIB.pm: new discovery module for HDSL2-SHDSL-LINE-MIB * xmlconfig/generic/rfc2863.if-mib.xml: added templates for ifSpeed and ifHighSpeed 2011-10-03 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoFirewall.pm: interface filter that removes TunnelN interfaces. 2011-09-04 Stanislav Sinyagin * NEWS: Torrus release 2.01 2011-06-26 Stanislav Sinyagin * xmlconfig/snmp-defs.xml: RRA for SNMP reachability is separately defined. New discovery parameter: snmp-reachability-rra. 2011-06-07 Stanislav Sinyagin * perllib/Torrus/Collector.pm (beforeRun): Collector initialization exclusive lock is enabled by $Torrus::Collector::exclusiveStartupLock in torrus-siteconfig.pl * perllib/Torrus/Renderer/RPC.pm: new RPC method: SEARCH_NODEID 2011-06-03 Stanislav Sinyagin * perllib/Torrus/Renderer/RPC.pm: New RPC method: AGGREGATE_DS 2011-06-02 Stanislav Sinyagin * perllib/Torrus/Scheduler.pm, perllib/Torrus/Collector.pm: repeat immediately 3 collector cycles at start 2011-06-01 Stanislav Sinyagin * perllib/Torrus/Collector/RRDStorage.pm (updateRRD): suppress inserting NaN when no data is available for the whole RRD file * xmlconfig/snmp-defs.xml: default rrd-create-heartbeat changed from 500 to 720 2011-05-30 Stanislav Sinyagin * perllib/Torrus/Renderer/RRDtool.pm: "imgformat" is now a configurable view parameter * xmlconfig/defaults.xml: new view: "embedded" for external GUI systems 2011-05-26 Stanislav Sinyagin * perllib/Torrus/Collector.pm (beforeRun): Collector initialization is done with an exclusive lock on collector_lock.db. This avoids the concurrent config slurping at collector startup and minimizes the I/O delays. 2011-05-24 Stanislav Sinyagin * perllib/Torrus/Renderer/HTML.pm (makeURL): All navigation is now done with persistent URLs. Tokens are removed from GUI wnenever possible. 2011-05-23 Stanislav Sinyagin * perllib/Torrus/DevDiscover/Patton.pm: new discovery module for Patton devices * perllib/Torrus/DevDiscover/NexComm.pm: new discovery module for NexComm xDSL gateways * perllib/Torrus/DevDiscover/Actelis.pm: new discovery module for Actelis xDSL gateways * perllib/Torrus/DevDiscover/Thomson_xDSL.pm: new discovery module for Technicolor/Thomson xDSL gateways 2011-05-20 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm: removed uptime from the legend, as it was always confusing * templates/iframe-rrd.html: new RRD leaf view: "iframe-rrd" for portal integration * perllib/Torrus/DevDiscover/CCOM.pm: new discovery module for C-COM CAPSPAN devices 2011-05-15 Stanislav Sinyagin * Makefile.am (dist-hook): DIST_REVISION now displays Git branch information * bin/torrus.fcgi.in: Let FCGI handler re-spawn every 5000 requests or 48 hours for better DB stability 2011-05-10 Stanislav Sinyagin * BDB cursor destructors are explicitly controlled for better stability 2011-05-01 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm: SNMP reachability stats are disabled when "only-devtypes" is in use, and can be forced by "enable-reachability-stats" 2011-04-11 Stanislav Sinyagin * xmlconfig/snmp-defs.xml: new host-level template: snmp-reachability * perllib/Torrus/Collector/SNMP.pm: new collector type: 'snmp-reachable' 2011-04-09 Stanislav Sinyagin * perllib/Torrus/SNMP_Failures.pm (mib_error): bugfix - now all MIB errors are registered, not just one * perllib/Torrus/Collector/SNMP.pm: API change: replaced getHostname() with getHostHash() 2011-03-22 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2790_HOST_RESOURCES.pm: added CPU Load graphs. Still some problems with persistent indexing and naming. * perllib/Torrus/DevDiscover/MicrosoftWindows.pm: added to interface filter: PPP, Tunnel, WAN Miniport, and QoS Packet Scheduler virtual interfaces interface-level nodeid is now dependent on MAC address 2011-01-27 Stanislav Sinyagin * perllib/Torrus/Renderer/HTML.pm (makeURL): Now nodeid is used in HTML whenever available 2010-12-24 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (discover): new discovery parameter: RFC2863_IF_MIB::ifnick-from-ifname provides backwards compatibility with devices which have non-unique ifName values * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (discover): ifDescr and ifName are checked for uniqueness before being used for default interface indexing 2010-12-21 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS.pm: added Port QoS stats (ME3400) 2010-12-19 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2662_ADSL_LINE.pm: re-organized the templates for Cisco 837 compatibility 2010-12-04 Stanislav Sinyagin * sup/webplain/torrus.css: slightly darker top and bottom shortcuts * perllib/Torrus/DevDiscover.pm (discover): New discovery parameter: X-tokenset-rrgraph-view * templates/default-tset.html: New view parameter: rrgraph-view 2010-11-24 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS.pm: New discovery parameter: CiscoIOS::enable-dialer-interfaces 2010-11-25 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: bugfix: RFC2863_IF_MIB::nodeid-hint=ifIndex did not really work 2010-11-23 Stanislav Sinyagin * perllib/Torrus/CGI.pm (do_process): added extra DB cleaninup 2010-11-18 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS.pm: Added CISCO-WAN-3G-MIB support 2010-11-17 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoWLC.pm: new discovery parameter: CiscoWLC::only-ssid 2010-11-05 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): New selector action: AddTemplates 2010-10-24 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoWLC.pm: new discovery module * NEWS: Release 1.0.9 2010-10-12 Stanislav Sinyagin * perllib/Torrus/CGI.pm: New URL parameter: 'v' is a synonym for 'view' 2010-10-06 Stanislav Sinyagin * templates/html-incblocks.txt: 'cssoverlay' now must point to an absolute URL 2010-09-23 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS.pm (checkdevtype): New discovery parameter: CiscoIOS::enable-unrouted-vlan-interfaces 2010-09-20 Stanislav Sinyagin * perllib/Torrus/DevDiscover/Jacarta.pm: New discovery module for Jacarta iMeter (thanks to Roman Hochuli) 2010-09-17 Stanislav Sinyagin * perllib/Torrus/Collector/SNMP.pm (initCollectorGlobals): Refresh the SNMP maps after a configuration re-compile 2010-08-31 Stanislav Sinyagin * performance optimizations: XML compiler runs 15-20% faster 2010-08-16 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: Selector actions split: discards moved from NoErrorCounters to NoDiscardCounters; and from InErrorsMonitor/OutErrorsMonitor to InDiscardsMonitor/OutDiscardsMonitor * perllib/Torrus/Collector.pm: collector_tokens database now depends on DS configuration instance 2010-08-13 Stanislav Sinyagin * perllib/Torrus/CGI.pm: Added host-based authentication 2010-08-09 Stanislav Sinyagin * Updated discovery modules for Net::SNMP 6.0.0 compatibility 2010-08-03 Stanislav Sinyagin * init.d/torrus.in: bugfix in RHEL compatibility. Do "chkconfig --del torrus", install the new version into /etc/init.d, then "chkconfig --add torrus", then "service torrus restart" 2010-07-21 Stanislav Sinyagin * bin/snmpfailures.in: new utility for SNMP failures reporting * perllib/Torrus/Collector/SNMP.pm: SNMP failures stored in a database 2010-06-12 Stanislav Sinyagin * bin/genlist.in: Added a list of all SNMP hosts 2010-05-14 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CasaCMTS.pm: new discovery module 2010-05-09 Stanislav Sinyagin * bin/nodeid.in: new command-line utility * configure.ac: new Perl module dependency: JSON 2010-04-11 Stanislav Sinyagin * configs/torrus-config.pl: replaced $Torrus::ApacheHandler::authorizeUsers with $Torrus::CGI::authorizeUsers. 2010-04-08 Jon Nistor * perllib/Torrus/DevDiscover/Arbor_E.pm: New parameter: Arbor_E::disable-e100-policymgmt, disable-e100-submgmt Added policy management and subscriber information 2010-04-07 Jon Nistor * perllib/Torrus/DevDiscover/Arbor_E.pm: New parameter: Arbor_E::disable-e100-mem Added memory usage per CPU for the e100 series devices 2010-04-04 Stanislav Sinyagin * perllib/Torrus/ConfigTree.pm, perllib/Torrus/ConfigTree/Writer.pm, perllib/Torrus/CGI.pm: New parameter: nodeid. It defines a new way of referring to subtrees and leaves. Also IF-MIB and Foundry discovery is updated. 2010-03-30 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm: Default snmp-max-msg-size is set back to 1470 * perllib/Torrus/DevDiscover/Foundry.pm: new discovery module 2010-03-23 Stanislav Sinyagin * xmlconfig/generic/rfc2790.host-resources.xml: [Bernhard Schmidt] Simplify the Uptime graph to display only Days * xmlconfig/vendor/ucd.ucd-snmp.xml: [Bernhard Schmidt] make Block I/O datasources a COUNTER correct display units for Memory * perllib/Torrus/DevDiscover/UcdSnmp.pm: [Bernhard Schmidt] added ssCpuRawSoftIRQ 2010-03-07 Stanislav Sinyagin * bin/torrus.fcgi.in: FastCGI support * templates/default-login.html: Added "remember me" * perllib/Torrus/ApacheHandler.pm: Changed to Torrus::CGI * perllib/Torrus/Apache2Handler.pm: Changed to Torrus::CGI. Now incompatible with "SetHandler modperl" * perllib/Torrus/CGI.pm: New HTTP handler instead of two different Apache handlers. 2010-03-05 Stanislav Sinyagin * bin/flushmonitors.in: new utility * bin/compilexml.in: Dynamic tokenset members are preserved between compilations * perllib/Torrus/ConfigTree.pm (tsetAddMember): Tokenset members have now an indicated origin (monitor/static) * perllib/Torrus/Monitor.pm: Alarms are now persistent between config re-compilations 2010-02-21 Stanislav Sinyagin * perllib/Torrus/Renderer/HTML.pm: New parameter: node-display-name. Now interface names are not underscored 2010-02-18 Stanislav Sinyagin * perllib/Torrus/Renderer/RRDtool.pm (rrd_make_multigraph): new multigraph parameters: line-stack-X, line-alpha-X 2010-02-10 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm (discover): Default snmp-max-msg-size is set to 65535 for SNMP v1 and v2 2010-02-07 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): new selector action: NotifyPolicy 2010-02-02 Stanislav Sinyagin * perllib/Torrus/DevDiscover/ALU_Timetra.pm: new discovery parameter: ALU_Timetra::full-ifdescr 2010-01-27 Stanislav Sinyagin * perllib/Torrus/DevDiscover/ALU_Timetra.pm: new discovery module 2010-01-24 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm (discover): snmp-max-msg-size is used now in discivery, not only in collector 2009-10-28 Jon Nistor * perllib/Torrus/DevDiscover/Arista.pm (discover): New discovery module: Arista Networks 2009-05-31 Stanislav Sinyagin * perllib/Torrus/Renderer/RRDtool.pm: new view parameters: disable-legend, disable-title, disable-vertical-label 2009-05-26 Jon Nistor * perllib/Torrus/DevDiscover/Arbor_E.pm (discover): New discovery parameter: Arbor_E::disable-e30-hdd-logs, Arbor_E::enable-e30-mempool 2009-05-11 Stanislav Sinyagin * perllib/Torrus/DevDiscover/NetBotz.pm (discover): Discovery parameters: NetBotz::temp-max, NetBotz::humi-max, NetBotz::dew-max 2009-05-10 Stanislav Sinyagin * perllib/Torrus/DevDiscover/NetBotz.pm: new discovery module for NetBotz modular sensors 2009-05-07 Jon Nistor * perllib/Torrus/DevDiscover/FTOS.pm New discovery module for Force10 Networks devices 2009-04-05 Stanislav Sinyagin * NEWS: Release 1.0.8 2008-11-29 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS.pm (discover): New discovery parameter: CiscoIOS::short-device-comment 2008-11-06 Stanislav Sinyagin * perllib/Torrus/Collector/SNMP.pm (runCollector): Number of SNMP sessions per snmp_dispatcher is limited to 100 because of some strange bugs (found on SPARC/Solaris platform) 2008-10-28 Jon Nistor * perllib/Torrus/DevDiscover/Liebert.pm: New discovery module for Liebert HVAC systems 2008-10-26 Stanislav Sinyagin * bin/srvderive.in: new utility that combines several services and combines them as MAX or SUM (sponsored by nexellent ag, www.nexellent.ch) 2008-09-25 Stanislav Sinyagin * Added safe signal handlers to all components. Also Apache handlers close the BDB environment at the end of each execution. BDB should now be much more stable. 2008-09-16 Jon Nistor * perllib/Torrus/DevDiscover/Arbor_E.pm: New discovery module for Arbor E series devices 2008-09-15 Stanislav Sinyagin * perllib/Torrus/Collector.pm: Now the collector cache is filled by the compiler. This optimizes the collector startup. Need to re-compile after upgrade. 2008-09-13 Stanislav Sinyagin * bin/configsnapshot.in: Bugfix in root subtree parameters * bin/configsnapshot.in: added parameter filtering option 2008-09-10 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS.pm: Filtered out EOBC and FIFO virtual interfaces * xmlconfig/vendor/cisco.ios.mac-accounting.xml: Bugfix in the RRD filename 2008-08-07 Stanislav Sinyagin * perllib/Torrus/Renderer/RRDtool.pm (rrd_make_opts): View parameters can be overridden with URL variables "Gstart", "Gend" and so on. 2008-08-05 Stanislav Sinyagin * NEWS: Release 1.0.7 2008-08-04 Jon Nistor * perllib/Torrus/DevDiscover/CiscoIOS.pm (discover): new discovery parameter: CiscoIOS::disable-vpdn-stats 2008-07-23 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2670_DOCS_IF.pm (discover): new discovery parameter: RFC2670_DOCS_IF::upstreams-only 2008-06-20 Stanislav Sinyagin * Tree names can be specified in the External Storage (Billing reports) 2008-06-07 Stanislav Sinyagin * perllib/Torrus/Collector/SNMP.pm: New parameter: snmp-ignore-mib-errors * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): New parameter generated by IF-MIB: interface-comment 2008-06-01 Stanislav Sinyagin * IPv6 support in devdiscover and in SNMP collector 2008-05-22 Stanislav Sinyagin * bin/bdbinfo.in: BerkeleyDB version info utility 2008-03-29 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): RFC2863_IF_MIB::external-serviceid now accepts host/interface notation 2008-03-28 Stanislav Sinyagin * perllib/Torrus/SQL/Reports.pm (finalize): added SQL commit 2008-03-16 Stanislav Sinyagin * bin/collector.in: Threads are now always initialized, not only in daemon mode * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: New selectors: InBytesParameters, OutBytesParameters * perllib/Torrus/DevDiscover.pm (buildConfig): New discovery parameter: include-files 2008-01-12 Stanislav Sinyagin * perllib/Torrus/DevDiscover/JunOS.pm: Added interface filter to exclude service interfaces * perllib/Torrus/DevDiscover.pm, perllib/Torrus/Collector/SNMP.pm: snmp-max-msg-size, new parameter for SNMP session 2007-12-09 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoSCE.pm: New discovery parameters: CiscoSCE::disable-*** (Jon Nistor) 2007-11-30 Stanislav Sinyagin * xmlconfig/defaults.xml: Default collector-timeoffset-step increased from 30 to 60 seconds. 30 seconds is too short for too many installations. 2007-11-08 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): New selector action: RemoveInterface 2007-09-30 Stanislav Sinyagin * perllib/Torrus/DevDiscover/JunOS.pm: Dramatic update by Jon Nistor 2007-08-23 Stanislav Sinyagin * perllib/Torrus/DevDiscover/Symmetricom.pm: New discovery module for Symmetricom NTP clock (Jon Nistor) 2007-08-10 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS.pm: Removed BGP Advertized prefixes Added the prefix limits to Accepted prefixes 2007-08-03 Stanislav Sinyagin * NEWS: Torrus release 1.0.6 2007-07-27 Stanislav Sinyagin * perllib/Torrus/Collector/SNMP.pm: removed "reptoken" and optimized the snmp arguments 2007-06-16 Stanislav Sinyagin * bin/collector.in: Now multiple collector instances can run in a single tree. Need to recompile all trees and re-start the daemons. A new copy of init.d/torrus should be copied in startup scripts directory. Also execute for every tree: torrus si --tree=TREE --clear 2007-06-15 Stanislav Sinyagin * configure.ac: Perl 5.8.8 is required for threads 2007-06-14 Stanislav Sinyagin * bin/genreport.in: New option: --all2tree * perllib/Torrus/DevDiscover/Alteon.pm: New discovery module 2007-06-04 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS.pm: Cisco CAR statistics 2007-05-05 Stanislav Sinyagin * perllib/Torrus/Collector/SNMP.pm: fixed the bug for unreachable timeout the target that receives noSuchObject is deleted from polling 2007-05-04 Stanislav Sinyagin * perllib/Torrus/Collector/CDef.pm: Imported the CDEF collector from Chrstian Schnidrig and adapted to multithreading. * perllib/Torrus/DevDiscover.pm: Adapted for global configuration. * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: New discovery parameter: RFC2863_IF_MIB::traffic-summaries Currently summaries work only within single output file. 2007-04-12 Stanislav Sinyagin * perllib/Torrus/Renderer/HTML.pm: Search engine GUI 2007-04-11 Stanislav Sinyagin * bin/buildsearchdb.in: The search DB builder (GUI is not ready yet) * perllib/Torrus/DevDiscover.pm: New discovery param: show-recursive * templates/default-dir.html: Limit recursive view to subtrees having show-recursive=yes 2007-04-10 Stanislav Sinyagin * perllib/Torrus/ConfigTree.pm: Moved the param properties to the XML config. All trees need recompilation after this change. 2007-04-05 Stanislav Sinyagin * perllib/Torrus/ConfigTree/XMLCompiler.pm (compile_subtrees): Removed support for 2007-03-23 Stanislav Sinyagin * perllib/Torrus/Renderer/RRDtool.pm (rrd_make_graphline): line-style line-color from the node params override thse in the view params 2007-03-18 Stanislav Sinyagin * perllib/Torrus/DevDiscover/JunOS.pm: Added per-CoS traffic statistics 2007-03-16 Stanislav Sinyagin * perllib/Torrus/Apache2Handler.pm, perllib/Torrus/ApacheHandler.pm: User login event in the apache error log * perllib/Torrus/DevDiscover/CiscoIOS_MacAccounting.pm: MAC accounting on subinterfaces 2007-02-14 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS.pm (discover): Replaced CiscoIOS::disable-membuf-stats with CiscoIOS::enable-membuf-stats. Now cisco buffer stats are disabled by default 2007-02-13 Stanislav Sinyagin * perllib/Torrus/Collector/SNMP.pm: SNMP maps automatic refreshing * bin/devdiscover.in: Devdiscover now accepts multiple input files 2007-02-09 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm: New discovery param: template-registry-overlays 2007-02-02 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoSCE.pm: Added service counters and queue utilization 2007-01-25 Stanislav Sinyagin * NEWS: Release 1.0.5 2007-01-23 Stanislav Sinyagin * configure.ac: Synchronized with Autoconf 2.60. Now 2.60 is the minimum required version. Changed docdir to pkgdocdir 2007-01-10 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS.pm (checkdevtype): IOS XR support 2007-01-05 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS.pm (checkdevtype): New discovery parameter: CiscoIOS::enable-vlan-interfaces (discover): added Cisco BGP statistics 2006-12-22 Stanislav Sinyagin * perllib/Torrus/DevDiscover/JunOS.pm: New discovery module for Juniper 2006-12-21 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS_MacAccounting.pm (discover): New discovery parameter: CiscoIOS_MacAccounting::tokenset-members 2006-12-05 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (discover): New discovery parameter: RFC2863_IF_MIB::exclude-down-interfaces * bin/configinfo.in: Added the tree compilation timestamp 2006-12-03 Stanislav Sinyagin * perllib/Torrus/Collector/SNMP.pm: SNMP mapping lookups are now asynchronous. PDUs are rescheduled with delays Not compatible with old cbQos plugin, needs tp-cisco-cbqos-1.4d 2006-11-26 Stanislav Sinyagin * perllib/Torrus/Collector/SNMP.pm: new SNMP parameters: snmp-localaddr and snmp-localport 2006-11-23 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS_MacAccounting.pm: New discovery parameter: CiscoIOS_MacAccounting::external-serviceid 2006-10-14 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: new discovery parameters: RFC2863_IF_MIB::bandwidth-usage RFC2863_IF_MIB::bandwidth-limits 2006-10-08 Stanislav Sinyagin * perllib/Torrus/ConfigTree.pm (new): exclusivity lock: only one compiler can run for a tree 2006-09-29 Stanislav Sinyagin * xmlconfig/generic/rfc2863.if-mib.xml: added an overvew shortcut for interface errors * perllib/Torrus/RPN.pm: IF accepts UNKN values 2006-09-28 Stanislav Sinyagin * configure.ac: theads module version must be 1.41 or higher, and threads::shared 1.03 or higher. 2006-09-27 Stanislav Sinyagin * bin/rrddir2xml.in: New option: --filter * xmlconfig/generic/rfc2670.docsis-if.xml: Added Frequency to upstream statictics monitoring. Old upstream stats will be lost!! The old templates file is in xmlconfig/old/rfc2670.docsis-if.old.1.0.4.xml 2006-09-26 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoSCE.pm: New discovery module * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: Improvements for persistent interface indexes * perllib/Torrus/DevDiscover/MotorolaBSR.pm: New discovery module for Motorola CMTS (Riverdelta) 2006-09-10 Stanislav Sinyagin * perllib/Torrus/Collector/RRDStorage.pm (storeData): RRDQueue statistics are now set in the beginning of the cycle 2006-08-10 Stanislav Sinyagin * perllib/Torrus/ConfigBuilder.pm (new): encoding changed from UTF8 to UTF-8 2006-07-31 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoFirewall.pm (discover): Interface names taken from ifName 2006-07-24 Stanislav Sinyagin * setup_tools/check_perlthreading.pl: Quick test of multithreading support 2006-07-21 Stanislav Sinyagin * perllib/Torrus/Collector/RRDStorage.pm (updateRRD): Added threading support: a background thread for RRD updates 2006-07-20 Stanislav Sinyagin * bin/devdiscover.in: Added multithreading support * configure.ac: Multithreading checkup * NEWS: Torrus release 1.0.4 2006-05-17 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): RFC2863_IF_MIB::tokenset-members now accepts host names and can be defined at the global level. 2006-05-11 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): new discovery parameter: RFC2863_IF_MIB::noout 2006-03-09 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): New discovery parameter: RFC2863_IF_MIB::subtree-comment * perllib/Torrus/Renderer/Frontpage.pm (renderUserLogin): New config option: $Torrus::Renderer::lostPasswordURL 2006-03-01 Stanislav Sinyagin * perllib/Torrus/Renderer/HTML.pm: New config variable: $Torrus::Renderer::companyLogo to display a logo instead of text 2006-02-22 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm: 'comment' parameter is copied from DDX to the host level. 2006-02-21 Stanislav Sinyagin * perllib/Torrus/Monitor.pm: New monitor parameters: display-rpn-expr display-format (run_event_exec): New environment variable: TORRUS_DISPLAY_VALUE 2006-02-15 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm (discover): New discovery parameter: suppress-legend 2006-02-13 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: Complex matching expressions for subtree name selector * perllib/Torrus/DevDiscover/CiscoGeneric.pm (discover): Cisco power supply monitoring 2006-02-10 Stanislav Sinyagin * bin/action_notify.in: New monitor action * perllib/Torrus/Monitor.pm: New monitor parameter: "severity" * perllib/Torrus/DevDiscover/CiscoIOS.pm: Cisco Docsis bundle interfaces excluded from discovery 2006-01-06 Stanislav Sinyagin * perllib/Torrus/RPN.pm: New RPM functions: INF, NEGINF 2005-12-12 Stanislav Sinyagin * perllib/Torrus/RPN.pm: DUP and EXC accept undefined arguments now 2005-12-07 Stanislav Sinyagin * perllib/Torrus/RPN.pm: New RPN function: NUM 2005-11-28 Stanislav Sinyagin * bin/ttproclist.in: Two new functions: lc, uc 2005-11-22 Stanislav Sinyagin * perllib/Torrus/Collector/SNMP.pm: Added SNMPv3 support 2005-10-19 Stanislav Sinyagin * bin/genreport.in: Report generator utility 2005-10-17 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoVDSL.pm: New discovery module for Cisco Catalyst LRE 2005-10-14 Stanislav Sinyagin * templates/default-dir.html, templates/expanded-dir.html: Alex Ustyancev's patches for aliased leaf nodes * perllib/Torrus/SQL.pm: New module dependency: DBIx::Sequence 2005-10-06 Stanislav Sinyagin * perllib/Torrus/SQL.pm: new module dependencies: DBIx::Abstract, DBI. 2005-10-05 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoGeneric.pm: added support for dual-CPU cisco routers (7301) 2005-09-28 Stanislav Sinyagin * perllib/Torrus/DevDiscover/AlliedTelesyn_PBC18.pm: new discovery module 2005-09-02 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm: New discovery parameter: define-tokensets 2005-08-12 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (discover): Replaced $Torrus::DevDiscover::listAdminDownInterfaces with parameter RFC2863_IF_MIB::list-admindown-interfaces and $Torrus::DevDiscover::listNotPresentInterfaces with RFC2863_IF_MIB::list-notpresent-interfaces 2005-08-10 Stanislav Sinyagin * doc/extstorage.pod.in: Started documenting the External storage * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: New discovery parameter: RFC2863_IF_MIB::external-serviceid * xmlconfig/generic/rfc2863.if-mib.xml: Byte counters adapted for External storage * perllib/Torrus/Collector.pm: Multiple storage types per token * perllib/Torrus/ConfigTree/Validator.pm (validateInstanceParams): Enabled validation of list values * perllib/Torrus/Collector/ExtDBI.pm: Pluggable backend module for External storage * perllib/Torrus/Collector/ExternalStorage.pm: New collector storage type 2005-08-02 Stanislav Sinyagin * NEWS: Release 1.0.3 2005-07-29 Stanislav Sinyagin * configure.ac: Patch Level 1: PERLINC configuration variable 2005-07-27 Stanislav Sinyagin * NEWS: Release 1.0.2 2005-07-22 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm (applySelectors): Selectors format slightly changed: the type is passed into the methods 2005-07-15 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm (buildConfig): New discovery parameter: disable-snmpcollector * bin/devdiscover.in: Preventing the bundle file update when --limit is specified. * perllib/Torrus/Collector/SNMP.pm (callback): mapping reset after host unreachable * configs/torrus-config.pl: $Torrus::Collector::SNMP::unreachableTimeout set to 6 hours * perllib/Torrus/Renderer/HTML.pm: entered Date/time verification New CPAN module required: perl -MCPAN -e 'install Date::Parse' 2005-07-14 Stanislav Sinyagin * templates/html-incblocks.txt: Added date setting dialog. TODO: date format validation. 2005-07-11 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: New discovery parameter: RFC2863_IF_MIB::only-interfaces * configure.ac: Now checking if user torrus exists * perllib/Torrus/DevDiscover/AxxessIT.pm: support for WANX/LANX modules 2005-07-06 Stanislav Sinyagin * bin/rrddir2xml.in: New utility for generating XML from a directory with RRD files 2005-06-24 Stanislav Sinyagin * perllib/Torrus/Collector/SNMP.pm: [1.0.1pl2] - fixed bug with deleting unreachable targets 2005-06-21 Stanislav Sinyagin * configure.ac: 1.0.1 Patchlevel 1 * bin/action_snmpv1trap.in, bin/action_snmptrap.in: added torrusMonitorDesc * sup/mibs/TORRUS-MIB.txt: new OID: torrusMonitorDesc * NEWS: release 1.0.1 * perllib/Torrus/SiteConfig.pm (verify): $Torrus::Renderer::stylingProfileOverlay is now an absolute file name * xmlconfig/vendor/cisco.ios.docsis.xml: Added Registered modems graph. WARNING: RRD structure changed * bin/devdiscover.in: New option: --fallback * perllib/Torrus/Collector/SNMP.pm (initTargetAttributes): Target is deleted when SNMP map expansion fails 2005-06-16 Stanislav Sinyagin * perllib/Torrus/Monitor.pm: sleep --delay minutes also after recompiling * configs/torrus-config.pl: $Torrus::Collector::SNMP::unreachableTimeout increased to 1900 $Torrus::Collector::SNMP::unreachableRetryDelay increased to 600 * perllib/Torrus/Collector/SNMP.pm: Better handling of SNMP errors. Delete all tokens for a host if it is unreachable. 2005-06-09 Stanislav Sinyagin * NEWS: Torrus release 1.0.0 * bin/monitor.in: New option: --delay * init.d/torrus.in: The init script reads its options from initscript.conf and initscript.siteconf 2005-06-08 Stanislav Sinyagin * bin/devdiscover.in: new CLI option: --forcebundle * perllib/Torrus/DevDiscover.pm: monitor-period and monitor-timeoffset are now copied from DDX * bin/action_snmpv1trap.in, bin/action_snmptrap.in, sup/mibs/TORRUS-MIB.txt: Added new SNMP variable: severity 2005-06-02 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoIOS_MacAccounting.pm: New discovery module for Cisco MAC accounting 2005-05-30 Stanislav Sinyagin * perllib/Torrus/DevDiscover/BetterNetworks.pm: new discovery module * bin/collector.in: new command line option: --runalways 2005-05-27 Stanislav Sinyagin * perllib/Torrus/DevDiscover/MicrosoftWindows.pm: per-interface RRD files named by MAC addresses, not interface name 2005-05-25 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoGeneric.pm: enchanced memory pools stats (line cards and VIP memory) 2005-05-23 Stanislav Sinyagin * templates/html-incblocks.txt: has-overview-subleaves replaced with has-overview-shortcuts, with multiple overviews per subtree 2005-05-20 Stanislav Sinyagin * templates/tset-list.html: Tokensets list now displays their sizes 2005-05-18 Stanislav Sinyagin * bin/ttproclist.in: New utility for generating DDX files 2005-05-17 Stanislav Sinyagin * perllib/Torrus/DataAccess.pm: improved performance by caching 2005-05-13 Stanislav Sinyagin * xmlconfig/examples/docsis-monitors.xml: DOCSIS monitoring examples * perllib/Torrus/DevDiscover/RFC2670_DOCS_IF.pm: Added DOCSIS-specific selector actions 2005-05-12 Stanislav Sinyagin * perllib/Torrus/Collector/RRDStorage.pm (updateRRD): $Torrus::Collector::RRDStorage::moveConflictRRD -- moving RRD files with conflicting structure 2005-05-11 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2670_DOCS_IF.pm: Downstream utilization added, and the subtrees rearranged. 2005-05-10 Stanislav Sinyagin * templates/default-rrd.html: Monitor names and comments displayed on the leaf HTML 2005-05-04 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoGeneric.pm: replaced CiscoGeneric::sensor-monitor and CiscoGeneric::sensor-monitor-regexp with CiscoSensor selector * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: RFC2863_IF_MIB::errors-monitor is no longer supported. Replaced with appropriate selector action * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: Implemented IF-MIB selector actions - InBytesMonitor, OutBytesMonitor, ErrorsMonitor, HoltWinters, NoPacketCounters, NoErrorCounters, Parameters 2005-05-02 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm (applySelectors): The infrastructure for object selectors 2005-04-29 Stanislav Sinyagin * perllib/Torrus/DevDiscover/CiscoGeneric.pm: New discovery parameters: CiscoGeneric::sensor-monitor, CiscoGeneric::sensor-monitor-regexp 2005-04-28 Stanislav Sinyagin * perllib/Torrus/Collector/SNMP.pm (runCollector): SO_RCVBUF is set explicitly 2005-04-09 Stanislav Sinyagin * perllib/Torrus/Renderer/RRDtool.pm (rrd_make_hrules): hrule-legend-X is now a leaf parameter, not view * templates/default-recursivedir.html: Recursive directory view 2005-04-08 Stanislav Sinyagin * bin/schedulerinfo.in: Timeline reports separate for monitors and collectors 2005-03-30 Stanislav Sinyagin * perllib/Torrus/DevDiscover/Paradyne.pm: New discovery parameter: "Paradyne::slot-name" 2005-03-22 Stanislav Sinyagin * configure.ac: New variables: plugwrapperdir, defrrddir 2005-03-09 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm (discover): Screening coli and semicoli in legend text 2005-03-08 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (discover): New device capability: 'interfaceIndexingManaged'. New DDX parameters: 'RFC2863_IF_MIB::ifindex-map-hint' and 'RFC2863_IF_MIB::subtree-name-hint'. * xmlconfig/generic/rfc2863.if-mib.xml: Moved "ifindex-table" definition from snmp-defs to IF-MIB host template * perllib/Torrus/DevDiscover.pm (discover): In the legend, replace ':' with '=' and ';' with ',' 2005-03-05 Stanislav Sinyagin * perllib/Torrus/DevDiscover.pm (oidBaseMatch): better OID comparison 2005-02-28 Stanislav Sinyagin * perllib/Torrus/Renderer.pm (newCacheFileName): MD5 to generate unique file names 2005-02-18 Stanislav Sinyagin * configure.ac (also in all plugins): AM_INIT_AUTOMAKE(1.9) instead of 1.6. The old version conflicted with plugins. 2005-01-30 Stanislav Sinyagin * doc/Makefile.am: Variable substitution in doc files * doc/manpages/Makefile.am: Man sections configurable * perllib/Torrus/DevDiscover/CiscoIOS_Docsis.pm: New discovery module for Cisco-specific DOCSIS statistics 2005-01-21 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (discover): Moved the IF-MIB discovery from checkdevtype() to discover() 2005-01-06 Stanislav Sinyagin * perllib/Torrus/DevDiscover/AxxessIT.pm: new discovery module 2005-01-04 Stanislav Sinyagin * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (checkdevtype): Interface excluded when ifOperStatus=6 [notPresent] 2004-12-27 Stanislav Sinyagin * bin/devdiscover.in (absXmlFilename): output file is placed in siteXmlDir if the path is not absolute. $XMLCONFIG is still supported for the sake of compatibility. 2004-12-03 Stanislav Sinyagin * configure.ac: replaced --disable-modcheck with --enable-pkgonly 2004-11-22 Stanislav Sinyagin * NEWS: Release 0.1.8 * Started Torrus development 2004-11-02 Stanislav Sinyagin * lib/Torrus/ConfigTree/Validator.pm: New parameters: 'monitor-period', 'monitor-timeoffset' * lib/Torrus/Monitor.pm: Now monitor runs under standard Scheduler 2004-10-25 Stanislav Sinyagin * lib/Torrus/Collector.pm: Moved collector specific code from bin/collector.in. 2004-10-24 Stanislav Sinyagin * bin/acledit.in: New privilege added: DisplayAdmInfo * lib/Torrus/Renderer/AdmInfo.pm, templates/adminfo.html: First step to display administratove information. 2004-10-13 Stanislav Sinyagin * bin/collector.in, bin/monitor.in: Process name reflecting the commandline and status 2004-10-04 Stanislav Sinyagin * lib/Torrus/Renderer/RRDtool.pm (rrd_make_multigraph): New multigraph parameter: disable-gprint-X 2004-09-30 Stanislav Sinyagin * xmlconfig/generic/collector-periods.xml: Changed rrd-create-rra 2004-09-29 Stanislav Sinyagin * lib/Torrus/DevDiscover/NetScreen.pm: Changed the interface mapping from ifDescr to MAC address 2004-09-22 Stanislav Sinyagin * examples/rrdup_notify.sh: collector failure notification script 2004-09-20 Stanislav Sinyagin * lib/Torrus/Apache2Handler.pm: mod_perl 1.99_15 compatibility. Replaced Apache::ParseFormData with libapreq2. * templates/html-incblocks.txt: Added "Up" navigation tab 2004-09-02 Stanislav Sinyagin * lib/Torrus/Renderer/RRDtool.pm: New parameter: graph-disable-gprint 2004-08-27 Stanislav Sinyagin * templates/default-rrd.html: Added link to web/plain/explain-rrdgraph.html * templates/html-incblocks.txt: Moved Top and Help menu to the top of the page 2004-08-20 Stanislav Sinyagin * lib/Torrus/DevDiscover/CiscoIOS.pm (discover): New discovery parameter: CiscoIOS::disable-ipsec-stats 2004-08-16 Stanislav Sinyagin * templates/default-helptext.html: First draft of help window * bin/devdiscover.in: --snmpdebug option is no more hidden 2004-08-13 Stanislav Sinyagin * xmlconfig/vendor/cisco.ios.xml: reorganized leaves * xmlconfig/generic/rfc2863.if-mib.xml: Replaced the leaf names with user friendly ones. The old template is in old/rfc2863.if-mib.old-0.1.7.xml 2004-08-04 Stanislav Sinyagin * NEWS: Release 0.1.7 * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: New discovery parameter: RFC2863_IF_MIB::copy-params * lib/Torrus/DevDiscover.pm: new discovery parameter: host-copy-params 2004-07-29 Stanislav Sinyagin * lib/Torrus/DevDiscover/ATMEL.pm: New discocery module from Scott Brooks 2004-07-28 Stanislav Sinyagin * lib/Torrus/Renderer/RRDtool.pm (rrd_make_holtwinters): New global variable: $Torrus::Renderer::hwGraphLegend * Disabled Holt-Winters in system performance and interface errors 2004-07-27 Stanislav Sinyagin * Torrus Demo server opened: http://torrusdemo.tbw.ch 2004-07-26 Stanislav Sinyagin * lib/Torrus/Collector.pm (setValue): DOLLAR and MOD in transform-value 2004-07-20 Stanislav Sinyagin * bin/acledit.in: Added --force option * bin/monitor.in, bin/collector.in: umask changed to 0017 2004-07-19 Stanislav Sinyagin * doc/scalability.pod: Document finished * doc/vendorsupport.pod: Vendor and MIBs support document 2004-07-13 Stanislav Sinyagin * xmlconfig/site-global.xml: New place for global parameters. In existing installations, you need to change the line in torrus-siteconfig.pl: @Torrus::Global::xmlAlwaysIncludeFirst = ( 'defaults.xml', 'site-global.xml' ); 2004-07-12 Stanislav Sinyagin * lib/Torrus/DevDiscover/NetApp.pm: new discovery module (Shawn) 2004-07-09 Stanislav Sinyagin * lib/Torrus/DevDiscover/CiscoIOS.pm: Added CISCO-IPSEC-FLOW-MONITOR-MIB 2004-07-07 Stanislav Sinyagin * lib/Torrus/Monitor.pm (run_event_exec): New environment variable: Torrus_VALUE * xmlconfig/defaults.xml: New view parameter: description 2004-07-06 Stanislav Sinyagin * templates/default-login.html, lib/Torrus/Renderer/Frontpage.pm (renderUserLogin), lib/Torrus/Apache2Handler.pm (handler), lib/Torrus/ApacheHandler.pm (handler): URL parameters (token, path, and view) are remembered during login 2004-06-30 Stanislav Sinyagin * lib/Torrus/ACL.pm (hasPrivilege): Wildcard ACL object (*) implemented 2004-06-28 Stanislav Sinyagin * Log levels updated. Now info is always printed, and verbose means verbose. 2004-06-25 Stanislav Sinyagin * xmlconfig/defaults.xml: New view name: last24h-small 2004-06-23 Stanislav Sinyagin * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): New discovery parameter: RFC2863_IF_MIB::errors-monitor 2004-06-22 Stanislav Sinyagin * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): New discovery parameter: RFC2863_IF_MIB::exclude-interfaces New discovery parameter: RFC2863_IF_MIB::tokenset-members 2004-06-21 Stanislav Sinyagin * lib/Torrus/DevDiscover/CiscoCatOS.pm (discover): New discovery parameter: CiscoCatOS::suppress-noname-ports 2004-06-16 Stanislav Sinyagin * configure.ac: For backward compatibility with autoconf 2.57, AS_HELP_STRING is replaced with obsoleted AC_HELP_STRING. Don't forget to change it back when 2.59 or later becomes mainstream. 2004-06-15 Stanislav Sinyagin * lib/Torrus/Renderer/RRDtool.pm (rrd_make_gprint): GPRINT implemented * bin/prepviews.in, bin/rrd_getdim.in: removed because no longer needed * doc/manpages/Makefile.am: commandref.pod to be replaced by manpages (contrib from Jurij Smakov) 2004-05-26 Stanislav Sinyagin * lib/Torrus/Collector.pm (setValue): transform-value parameter is now expandable * doc/devdoc/wd.distributed.pod: New working draft document 2004-05-24 Stanislav Sinyagin * webmux2.pl: Added support for mod_perl 1.99_12 (before it was 1.99_13 only) 2004-05-19 Stanislav Sinyagin * lib/Torrus/DevDiscover.pm: New parameter: custom-host-templates 2004-05-16 Stanislav Sinyagin * lib/Torrus/Collector/SNMP.pm: New parameter: 'snmp-check-sysuptime' * bin/Makefile.am: rrd_hwreapply is moved to a separate package (RRDman) 2004-05-12 Stanislav Sinyagin * Makefile.am, bin/Makefile.am: removed mkroutercfg * templates/html-incblocks.txt: Removed image width hinting 2004-05-05 Stanislav Sinyagin * lib/Torrus/SiteConfig.pm (verify): Minus sign allowed in tree names 2004-05-03 Stanislav Sinyagin * NEWS: Release 0.1.6 * ../plugins/cbqos: first release of Cisco QoS monitoring plugin * bin/rrd_getdim.in: RRDtool 1.1.x compatibility improved 2004-04-22 Stanislav Sinyagin * examples/onmsInterfaces.sh: Gustavo Torres' contribution for OpenNMS integration 2004-04-19 Stanislav Sinyagin * lib/Torrus/ConfigTree/XMLCompiler.pm: New XML statements: setvar, iftrue, iffalse 2004-04-15 Stanislav Sinyagin * lib/Torrus/RPN.pm (translate): New RPN function: MOD * xmlconfig/generic/rfc2790.host-resources.xml: More sophysticated Uptime graph (Shawn) 2004-04-14 Stanislav Sinyagin * templates/html-incblocks.txt: New items in HTML page top: siteInfo and treeInfo. * lib/Torrus/Apache2Handler.pm: First alpha release of mod_perl 2.0 handler. * doc/webintf.pod: It is recommended to Alias /torrus/plain instead of just /torrus. 2004-04-07 Stanislav Sinyagin * bin/schedulerinfo.in: New option: --clear * lib/Torrus/SchedulerInfo.pm, lib/Torrus/Scheduler.pm: reorganized statistics collection * bin/schedulerinfo.in: Only nonzero statistics are shown in runtime report * lib/Torrus/Scheduler.pm: reorganized statistics: late start increments only when that happens. Runtime longer than period is also recorded (sferry). * bin/collector.in: more verbosity in non-verbose mode (sferry) * init.torrus.in: gracefully waits for daemons to shut down (sferry) 2004-04-06 Stanislav Sinyagin * lib/Torrus/DevDiscover/RFC1697_RDBMS.pm, lib/Torrus/DevDiscover/OracleDatabase.pm: New discovery modules (sferry) * NEWS: Bugfix release 0.1.5bf2 2004-03-31 Stanislav Sinyagin * lib/Torrus/DB.pm (cursor): Bugfix for write access cursors 2004-03-26 Stanislav Sinyagin * lib/Torrus/Renderer/RRDtool.pm (rrd_make_cdef): New @-functions in RPN references: AVERAGE MIN MAX LAST (rrd_make_multigraph): New multigraph parameter: ignore-views-X * lib/Torrus/DevDiscover/CiscoGeneric.pm (buildConfig): New discovery parameter: CiscoGeneric::file-per-sensor 2004-03-25 Stanislav Sinyagin * bin/compilexml.in: New commandline option: --noval * NEWS: Bugfix release 0.1.5bf1 2004-03-24 Stanislav Sinyagin * lib/Torrus/RPN.pm: now Math::BigFloat is always used for numbers Perl 5.8.0 or higher is required: BigFloat implementation in 5.6.1 is untested and hardly compatible * lib/Torrus/Collector.pm (run): $Torrus::Collector::needsConfigTree: a new registry for those collectors needing access to configuration. 2004-03-22 Stanislav Sinyagin * Implemented Cisco class-based QoS monitoring plugin 2004-03-20 Stanislav Sinyagin * lib/Torrus/ConfigTree.pm: More parameters to be expanded: lower-limit normal-level upper-limit 2004-03-19 Stanislav Sinyagin * bin/devdiscover.in: New option: --limit=regexp 2004-03-17 Stanislav Sinyagin * NEWS: Release 0.1.5 * lib/Torrus/DB.pm (new): Unique DB environment log file per PID. 2004-03-16 Stanislav Sinyagin * bin/devdiscover.in: new parameter: output-bundle 2004-03-12 Stanislav Sinyagin * templates/overview-subleaves.html: New parameters: overview-direct-link, overview-direct-link-view 2004-03-09 Stanislav Sinyagin * lib/Torrus/DevDiscover/UcdSnmp.pm, lib/Torrus/DevDiscover/RFC2790_HOST_RESOURCES.pm, xmlconfig/vendor/ucd.ucd-snmp.xml, xmlconfig/generic/rfc2790.host-resources.xml: Rearranged the host performance templates. Fixed bug in Interrupts RRD. You need to rm /var/snmpcollector/*ucd-context_interrupts.rrd 2004-03-04 Stanislav Sinyagin * lib/Torrus/Renderer/RRDtool.pm (render_rrgraph): New configuration option: $Torrus::Renderer::ignoreDecorations 2004-03-01 Stanislav Sinyagin * xmlconfig/generic/rfc2670.docsis-if.xml: Modified DOCSIS template to include codewords statistics (data-file changed). * bin/monitor.in, bin/collector.in: Log rotation on SIGHUP 2004-02-26 Stanislav Sinyagin * xmlconfig/generic/monitors.xml: New standard monitors and actions * xmlconfig/vendor/smokeping.xml: (Shawn) Smokeping RRD files access templates * lib/Torrus/DevDiscover/NetScreen.pm: (Shawn) new discovery module * lib/Torrus/DevDiscover/CompaqCIM.pm: (Shawn) new discovery module * lib/Torrus/DevDiscover/MicrosoftWindows.pm: (Shawn) added support for IIS HTTP and FTP stats 2004-02-24 Stanislav Sinyagin * lib/Torrus/ConfigTree/Writer.pm (postProcessNodes): Dispersed collector offset 2004-02-23 Stanislav Sinyagin * lib/Torrus/ConfigTree.pm (new), lib/Torrus/ConfigTree/Writer.pm (finalize): Dual configuration database implemented * lib/Torrus/ConfigTree.pm (setReady): ConfigurationReady flag moved to other_config.db. 2004-02-18 Stanislav Sinyagin * lib/Torrus/Renderer/RRDtool.pm: view parameter "title" removed. New node parameter: "graph-title" 2004-02-16 Stanislav Sinyagin * lib/Torrus/Renderer/RRDtool.pm (rrd_make_decorations): Implemented back- and foreground decorations (Christian's Change 7, modified) 2004-02-14 Stanislav Sinyagin * lib/Torrus/ConfigTree.pm (getNodeParam): Optimized nodepcache structure * lib/Torrus/ConfigTree/Writer.pm (newToken): Next free token is no longer stored in database 2004-02-13 Stanislav Sinyagin * lib/Torrus/DevDiscover.pm (buildConfig): New parameter: host-aliases * lib/Torrus/Collector.pm (setValue): New parameter: transform-value 2004-02-12 Stanislav Sinyagin * xmlconfig/snmp-defs.xml, xmlconfig/*/*.xml: data-file refers now to system-id, instead of snmp-host. * lib/Torrus/DevDiscover.pm (buildConfig): symbolic-name is no longer mandatory. New parameter: system-id. 2004-02-11 Stanislav Sinyagin * lib/Torrus/DB.pm (new): DB internal errors are stored in var/log/dbenv_errlog 2004-02-05 Stanislav Sinyagin * lib/Torrus/ConfigTree.pm (expandNodeParam): $Torrus::ConfigTree::nodeParamHook: hook for custom parameter processing 2004-02-03 Stanislav Sinyagin * lib/Torrus/Renderer/RRDtool.pm: Restructured the whole grapher. 2004-02-02 Stanislav Sinyagin * lib/Torrus/Renderer.pm: Split one big module into 4 smaller ones: Torrus::Renderer, Torrus::Renderer::HTML, Torrus::Renderer::RRDtool, Torrus::Renderer::Frontpage * lib/Torrus/DevDiscover.pm (discover): New discovery parameter: only-devtypes 2004-01-30 Stanislav Sinyagin * lib/Torrus/DevDiscover.pm (discover): New discovery parameter: disable-devtypes * lib/Torrus/DevDiscover.pm (discover): Better treatment for agents without "system" OIDs. 2004-01-21 Stanislav Sinyagin * lib/Torrus/DevDiscover.pm (discover): Now snmp-oids-per-pdu may be defined from discovery parameters. * bin/schedulerinfo.in: Scheduler runtime statistics report 2004-01-20 Stanislav Sinyagin * lib/Torrus/Scheduler.pm: runtime statistics stored in a database 2004-01-15 Stanislav Sinyagin * lib/Torrus/DevDiscover.pm (discover): 'collector-period' and 'collector-timeoffset' can be specified in devdiscover input * Makefile.am: Now DIST_REVISION file in the distribution package tells the distribution revision date * lib/Torrus/Collector.pm: listTargets() is replaced with listCollectorTargets() with collector type as argument 2004-01-14 Stanislav Sinyagin * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): Split iftable-errors template into input and output (some Cisco ATM aal5 interfaces dont have both in and out error counters) * doc/devdoc/wd.gprint-and-cf-plot.pod: New design draft from Christian Schnidrig * lib/Torrus/RPN.pm: Slight reorganisation and better fault control * doc/userguide.pod: New in Tips: Several Torrus instances on one server 2004-01-13 Stanislav Sinyagin * lib/Torrus/ConfigTree.pm (token), lib/Torrus/ConfigTree/Writer.pm (setAlias), lib/Torrus/DB.pm (getBestMatch): Recursive alias expansion. New database: aliases.db. configsnapshot is no more compatible with previous releases' database. 2004-01-12 Stanislav Sinyagin * lib/Torrus/ConfigTree.pm (getAliases): Improved logics for aliases. Needs database recompilation. 2004-01-09 Stanislav Sinyagin * bin/schedulerinfo.in: New utility for scheduler analysis 2004-01-08 Stanislav Sinyagin * xmlconfig/old/rfc1213.xml: Moved from xmlconfig/generic/rfc1213.xml * templates/html-incblocks.txt: cssoverlay property * bin/configsnapshot.in: Ready for tests * lib/Torrus/DevDiscover/RFC2737_ENTITY_MIB.pm (discover): Chassis desription is put into host-level comment 2004-01-07 Stanislav Sinyagin * bin/configsnapshot.in: first step towards a snapshot utility * xmlconfig/vendor/cisco.generic.xml: New template: cisco-temperature-sensor-fahrenheit * xmlconfig/generic/collector-periods.xml: Changed XFF the same way as in snmp-defs.xml. Added Holt-Winters parameters to 1-minute interval. * xmlconfig/snmp-defs.xml: Changed XFF in default RRAs: 1 missing sample is allowed in half-hour average, and 1 missing hour is allowed in daily average. * lib/Torrus/Collector/SNMP.pm (initTargetAttributes): New parameter: snmp-object-type 2004-01-06 Stanislav Sinyagin * xmlconfig/generic/rfc2662.adsl-line.xml: Reduced number of RRD files * xmlconfig/vendor/cisco.generic.xml: Moved buffer statistics into a single RRD file * xmlconfig/generic/rfc2863.if-mib.xml: Reorganized RRD data structure. Significantly reduced number of files. 2004-01-05 Stanislav Sinyagin * bin/genlist.in: New utility for data listing 2003-12-31 Stanislav Sinyagin * lib/Torrus/DevDiscover/RFC2737_ENTITY_MIB.pm: New discovery module * lib/Torrus/DevDiscover/CiscoGeneric.pm: CPU enties mapped against ENTITY-MIB names 2003-12-30 Stanislav Sinyagin * bin/devdiscover.in: $XMLCONFIG substitution 2003-12-29 Stanislav Sinyagin * xmlconfig/generic/rfc2863.if-mib.xml: Moved ifindex-map to host level 2003-12-28 Stanislav Sinyagin * lib/Torrus/DevDiscover/CiscoGeneric.pm, xmlconfig/vendor/cisco.generic.xml: Reorganized CPU and Memory pool statistics. * lib/Torrus/DevDiscover/CiscoFirewall.pm: New discovery module * lib/Torrus/DevDiscover/F5BigIp.pm: New discovery module for F5 BigIp Load Balancer 2003-12-24 Stanislav Sinyagin * xmlconfig/old/snmp-defs.old-0.1.2.xml: Moved from generic/ to old/ * xmlconfig/old/rfc2863.if-mib.old-0.1.4.xml: Saved the file from previous version. 2003-12-22 Stanislav Sinyagin * lib/Torrus/DevDiscover/Xylan.pm: New discovery module for Alcatel (Xylan) OmniSwitch * lib/Torrus/DevDiscover/AscendMax.pm: New discovery module for Ascend (Lucent) MAX 2003-12-21 Stanislav Sinyagin * lib/Torrus/DevDiscover/CiscoIOS.pm (checkdevtype): Use CISCO-IMAGE-MIB::ciscoImageTable for more strict IOS-based product detection 2003-12-18 Stanislav Sinyagin * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): Vendor templates for interface counters taken from @{$interface->{'vendor_templates'}} * lib/Torrus/DB.pm (new): Berkeley db-4.2 compatibility 2003-12-17 Stanislav Sinyagin * xmlconfig/vendor/empire.systemedge.xml: Data structure and templates changed for better flexibility and system support * bin/devdiscover.in, bin/genddx.in: Output file is now controlled from DDX parameter 'output-file'. 2003-12-15 Stanislav Sinyagin * lib/Torrus/DevDiscover/MicrosoftWindows.pm: Moved MicrosoftWindowsServer.pm to MicrosoftWindows 2003-12-14 Stanislav Sinyagin * lib/Torrus/DevDiscover/MicrosoftWindowsServer.pm: New discovery module for Windows2000/XP SNMP agent 2003-12-13 Stanislav Sinyagin * xmlconfig/generic/rfc2863.if-mib.xml: Replaced $IFIDX with %ifindex-map% Split template iftable-discards into iftable-discards-in and iftable-discards-out. For some devices, /var/snmpcollector/*_discards.rrd need to be deleted, and devdiscover re-launched 2003-12-11 Stanislav Sinyagin * templates/default-tset.html, xmlconfig/generic/rfc2863.if-mib.xml: New parameter: descriptive-nickname 2003-12-10 Stanislav Sinyagin * NEWS: Release 0.1.4 * devdiscover-config.pl: Commented out "RFC2662_ADSL_LINE" and "Paradyne" (need more testing) 2003-12-08 Stanislav Sinyagin * templates/*, web/plain/*.css: more flexible CSS layout 2003-12-04 Stanislav Sinyagin * lib/Torrus/Renderer.pm (do_render_rrdgraph): New parameter: graph-rigid-boundaries 2003-12-01 Stanislav Sinyagin * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (discover): New discovery option: RFC2863_IF_MIB::suppress-hc-counters 2003-11-28 Stanislav Sinyagin * bin/devdiscover.in: now it accepts XML input only * bin/genddx.in: New utility for next-generation devdiscover * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): interface counters moved to a separate subtree 2003-11-25 Stanislav Sinyagin * lib/Torrus/Renderer.pm (do_render_rrdgraph): New parameter: graph-logarithmic 2003-11-23 Stanislav Sinyagin * lib/Torrus/DevDiscover/EmpireSystemedge.pm: new discovery module 2003-11-22 Stanislav Sinyagin * lib/Torrus/DevDiscover.pm (clearCap): capability clearing needed for Empire Sysedge 2003-11-18 Stanislav Sinyagin * xmlconfig/generic/rfc2863.if-mib.xml: templates interface-counters and hc-interface-counters removed New templates: read-iftable-octets, read-ifxtable-hcoctets 2003-11-11 Stanislav Sinyagin * web/plain/torrus.css: Increased maximum node name length to 25 symbols * lib/Torrus/DevDiscover/CiscoGeneric.pm: moved memory, cpu, and temperature statistics to a common module, shared by IOS and CatOS * lib/Torrus/DevDiscover/CiscoCatOS.pm (discover): interface comments are now derived from CISCO-STACK-MIB::portName 2003-11-10 Stanislav Sinyagin * xmlsup/extract-skeleton.xsl: XSLT template for tree structure extraction * bin/configinfo.in: New utility * bin/devdiscover.in: New options: --retries and --timeout * lib/Torrus/DevDiscover/CiscoCatOS.pm: Interface filters for CatOS 2003-11-09 Stanislav Sinyagin * lib/Torrus/ConfigBuilder.pm (addStatistics): congfiguration statistics * lib/Torrus/DevDiscover/CiscoIOS.pm: Interface filters for IOS devices * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (discover): Implemented generic interface filtering 2003-11-07 Stanislav Sinyagin * xmlconfig/generic/rfc2863.if-mib.xml: rrd-create-max=1e15 for HC packet and octets counters * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): New interface counters: iftable-discards 2003-11-05 Stanislav Sinyagin * New devdiscover modules: "RFC2662_ADSL_LINE" and "Paradyne" 2003-11-04 Stanislav Sinyagin * lib/Torrus/Collector/SNMP.pm (initTarget): New parameter: snmp-oids-per-pdu 2003-11-03 Stanislav Sinyagin * NEWS: Release 0.1.3 * doc/, doc/devdoc/: Documentation is reorganized. Developer documentation is separated from User docs. 2003-10-31 Stanislav Sinyagin * templates/overview-subleaves.html: Replacement for InOutBps. New parameters: has-overview-subleaves, overview-subleave-name, overview-shortcut-text, overview-shortcut-title, overview-page-title 2003-10-30 Stanislav Sinyagin * lib/Torrus/DevDiscover/CiscoIOS_SAA.pm: New discovery module 2003-10-29 Stanislav Sinyagin * lib/Torrus/Renderer.pm (do_render_rrdgraph): New parameter: rrd-scaling-base (new): cache initialization optimized 2003-10-28 Stanislav Sinyagin * doc/devdiscover_devguide.pod: new Device Discovery Developer's Guide 2003-10-27 Stanislav Sinyagin * lib/Torrus/DevDiscover/RFC2790_HOST_RESOURCES.pm: New Host resources MIB discovery module 2003-10-26 Stanislav Sinyagin * examples/setmonitor.xupdate.xml: XUpdate technique to update autogenerated files. Described in userguide.pod. 2003-10-24 Stanislav Sinyagin * xmlconfig/generic/rfc2863.if-mib.xml: New names for interace counter RRD files: host_intf_octets.rrd, host_intf_packets.rrd, etc. * xmlconfig/snmp-defs.xml: data-file and data-dir are no longer defined in snmp-defaults. * xmlconfig/generic/rfc2863.if-mib.xml: Broke interface counter templates into smaller parts. New counters template: "iftable-errors". * xmlconfig/snmp-defs.xml: Moved interface counters to generic/rfc2863.if-mib.xml 2003-10-21 Stanislav Sinyagin * New ACL user and group attribute: "modified" 2003-10-20 Stanislav Sinyagin * lib/Torrus/DevDiscover.pm (genDataDir): data-dir hash implemented * bin/devdiscover.in: Default subtree is now /Routers. Alternative device names may be given as host:devname * xmlconfig/: Vendor and generic templates from Shawn Ferry 2003-10-19 Stanislav Sinyagin * Shawn Ferry's contribution on styling profiles, with recursive color references 2003-10-18 Stanislav Sinyagin * lib/Torrus/ConfigTree/XMLCompiler.pm (compile): directives are now processed recursively, before any other processing. 2003-10-17 Stanislav Sinyagin * xmlconfig/snmp-defs.xml: Replaced subtree /SNMP with template Moved old version to generic/snmp-defs.old-0.1.2.xml 2003-10-15 Stanislav Sinyagin * bin/devdiscover.in: First proof of concept version of a new modular device discovery tool 2003-10-14 Stanislav Sinyagin * NEWS: Release 0.1.2 * lib/Torrus/ConfigTree/Writer.pm (addChild): Nodes longer than 20 characters are reported with warning. 2003-10-13 Stanislav Sinyagin * xmlconfig: New vendor files: vendor/ascend.max.xml, examples/ascend.max.xml, generic/rfc2670.docsis-if.xml * doc/userguide.pod, xmlconfig/examples/servers.data, xmlconfig/examples/servers.tmpl: New approach in automatic config generation. 2003-10-12 Stanislav Sinyagin * bin/mkroutercfg.in (retrieveSnmpData): VLAN interfaces are excluded from the list of discovered interfaces. 2003-10-09 Stanislav Sinyagin * lib/Torrus/ConfigTree/Writer.pm (propagateViewParams): Moved view parameter inheritance from XML compiler to Writer post-processing 2003-10-07 Stanislav Sinyagin * lib/Torrus/Renderer.pm (do_render_rrdgraph): New view parameters: ignore-limits, ignore-lower-limit, ignore-upper-limit * bin/cleanup.in: Cronjob for cleaning up diskspace. * lib/Torrus/Renderer.pm (do_render_rrdgraph): New parameters: graph-lower-limit, graph-upper-limit 2003-10-06 Stanislav Sinyagin * styling/torrus-original.pl: Styling profiles implemented 2003-10-04 Stanislav Sinyagin * lib/Torrus/Renderer.pm: New parameter: vertical-label 2003-09-30 Stanislav Sinyagin * lib/Torrus/Renderer.pm (do_render_rrdgraph): Added HRULE handling 2003-09-29 Stanislav Sinyagin * lib/Torrus/Renderer.pm (render_html): Added current time in HTML output 2003-09-18 Stanislav Sinyagin * lib/Torrus/Scheduler.pm: VmWare clock support 2003-09-17 Stanislav Sinyagin * lib/Torrus/Monitor.pm (setAlarm): New parameter: monitor-action-target 2003-09-14 Stanislav Sinyagin * NEWS: Release 0.1.1 2003-09-13 Stanislav Sinyagin * lib/Torrus/ConfigTree.pm: %Torrus::ConfigTree::expand_params now contains parameters for expansion * lib/Torrus/ConfigTree/Writer.pm: %Torrus::ConfigTree::Writer::remove_space now contains parameters for space removal * lib/Torrus/Collector.pm (addTarget): New parameter: value-map * configure.ac: New configure variable: torrus_user. torrus_var default value changed from root to torrus 2003-09-09 Stanislav Sinyagin * init.torrus.in: New launcher for multi-tree support. FreeBSD 5.1 gives weird error without "&" in launching command. Needs testing on other systems. 2003-09-07 Stanislav Sinyagin * Monitor event "throw" changed to "set" 2003-09-05 Stanislav Sinyagin * lib/Torrus/ACL/Import.pm, lib/Torrus/ACL/Export.pm: ACL import/export utilities * bin/aclfixup.in: Temporary utility to convert ACL database to the new format. * lib/Torrus/ACL/Edit.pm: ACL Database structure changed: added "uA:" lists 2003-09-03 Stanislav Sinyagin * lib/Torrus/RPN.pm: Got use of use Math::BigFloat, as suggested by Christian. * xmlconfig/snmp-defs.xml: Changed xff to 0.5, as recommended by rodrigo.cunha at corp.vodafone.pt * lib/Torrus/DB.pm: Database handles are held in a pool and reused 2003-09-02 Stanislav Sinyagin * Added user authentication: lib/Torrus/ACL*, bin/acledit, Apache handler * Multiple trees support as described in Requirements 0.1 2003-08-26 Stanislav Sinyagin * lib/Torrus/Collector/SNMP.pm: Moved the validator parameters to a separate module 2003-08-07 Stanislav Sinyagin * xmlconfig/defaults.xml: Tokenset views expiry time changed from 300 to 60 * lib/Torrus/Renderer.pm (checkAndClearCache): Renderer cache is cleared at least once a day * webmux.pl: New Apache init script. DB environment is now correctly destroyed 2003-08-06 Stanislav Sinyagin * mibs/Torrus-MIB.txt: Added DS tree name to Monitor action exec and helper programs * web/plain/torrus.css: Replaced
with display:block in current path * height-hint parameter is removed. * templates/routercfg.xml: Fixed the subtree deepness bug for temperature sensors. * First steps towards version 0.1: Multiple trees and database split are implemented. 2003-08-04 Stanislav Sinyagin * NEWS: Release 0.0.20 2003-07-31 Stanislav Sinyagin * lib/Torrus/Renderer.pm: added $Torrus::Renderer::rendererURL and $Torrus::Renderer::plainURL 2003-07-29 Stanislav Sinyagin * templates/html-incblocks.txt: Absolute URL for CSS stylesheet * lib/Torrus/Collector/SNMP.pm: multiple ports and SNMP communities per IP address. 2003-07-23 Stanislav Sinyagin * templates/routercfg.xml: moved snmp-community and other parameters to a host-level subtree 2003-07-17 Stanislav Sinyagin * SNMP Agent reload and unavailable handling 2003-07-15 Stanislav Sinyagin * bin/mkroutercfg.in, templates/*, lib/Torrus/Renderer.pm: Bugs item #747893 resolved. 2003-07-02 Stanislav Sinyagin * bin/mkroutercfg.in (reportResults), templates/routercfg.xml: Legend is now XML-escaped 2003-07-01 Stanislav Sinyagin * NEWS: Release 0.0.19 2003-06-26 Stanislav Sinyagin * xmlconfig/snmp-defs.xml, lib/Torrus/Collector/RRDStorage.pm, lib/Torrus/ConfigTree/Validator.pm: typo fixed: rrd-create-heartbit changed to rrd-create-heartbeat * xmlconfig/snmp-defs.xml: as proposed by Christian Schnidrig, rrd-create-heartbeat changed from 1800 to 500 2003-06-10 Stanislav Sinyagin * bin/mkroutercfg.in (reportResults), templates/routercfg.xml: SNMP version bugfix * configure.ac: Now most of the directory names are configurable 2003-05-18 Stanislav Sinyagin * lib/Torrus/Renderer.pm (render): Bug #735753 (Christian Schnidrig) fixed * bin/mkroutercfg.in, templates/routercfg.xml: Marc Haber's patch for deeper subtrees * torrus-config.pl: added @Torrus::ConfigTree::XMLCompiler::listparams 2003-05-01 Stanislav Sinyagin * lib/Torrus/Collector/SNMP.pm: SNMP-specific config validator is now within the module. * lib/Torrus/ConfigTree/Validator.pm: Additional validation parameters are read from @Torrus::Validator::loadLeafValidators * lib/Torrus/Collector.pm: Collector modules are loaded from @Torrus::Collector::loadModules 2003-04-02 Stanislav Sinyagin * NEWS: Release 0.0.18 2003-03-31 Stanislav Sinyagin * xmlconfig/defaults.xml: New parameter: rrgraph-views 2003-03-30 * xmlconfig/Makefile.am: Added Cisco MAC accounting 2003-03-27 Stanislav Sinyagin * lib/Torrus/Renderer.pm and temlates: reorganized Holt-Winters views 2003-03-25 Stanislav Sinyagin * torrus-config.pl: Moved monitor parameters from siteconfig to default config. 2003-03-21 Stanislav Sinyagin * NEWS: Release 0.0.17 * web/plain/torrus-printer.css: Finalized the printer-friendly layout 2003-03-17 Stanislav Sinyagin * init.torrus.in: now running under user "torrus" 2003-03-15 Stanislav Sinyagin * configure.ac: Changed the group to "torrus"; init.torrus is more universal 2003-03-15 Stanislav Sinyagin * lib/Torrus/Renderer.pm, lib/Torrus/ApacheHandler.pm: optimized Renderer to reuse Template processor in mod_perl 2003-03-15 Stanislav Sinyagin * web/plain/torrus.css: New HTML layout 2003-03-11 Stanislav Sinyagin * xmlconfig/Makefile.am (dist_examples_DATA): Moved apcups-example.xml to apc-ups.xml. Added hpux.xml * bin/rrd_getdim.in, bin/prepviews.in, xmlconfig/Makefile.am: "make install prefix=/some/path" now works correctly. * lib/Bundle/Torrus.pm: Perl bundle for easy installation 2003-03-04 Stanislav Sinyagin * NEWS: Release 0.0.16 * lib/Torrus/Renderer.pm (do_render_rrdgraph): Fixed TICK bug * xmlconfig/vendor/hp.hpux.xml: New definitions file from Aaron Bush * xmlconfig/vendor/apc.ups.xml: * xmlconfig/examples/apcups-example.xml: Merged the several templates into one. 2003-03-03 Stanislav Sinyagin * Makefile.am: added torrus-config.dtd to distribution * xmlsup/torrus-config.dtd: The configuration DTD first cut 2003-03-02 * Makefile.am (dist_mibs_DATA): Moved mibs from lib to share 2003-03-01 Stanislav Sinyagin * bin/mkroutercfg.in (reportResults): Added vendor/cisco.ios.xml chekup * xmlconfig/examples/apcups-defs.xml: moved to xmlconfig/vendor/apc.ups.xml * xmlconfig/examples/snmp-view.xml: moved contents into xmlconfig/vendor/cisco.ios.xml * xmlconfig/snmp-defs.xml: Moved Cisco specifics to xmlconfig/vendor/cisco.ios.xml * xmlconfig/Makefile.am: snmp-defs.xml is not any more preserved * configure.ac, Makefile.am: added plugin functionality 2003-02-27 Stanislav Sinyagin * lib/Torrus/Renderer.pm (render_html), lib/Torrus/ApacheHandler.pm (handler), web/grapher.cgi.in: Fixed the non-ASCII display problem. Also XML-LibXML-1.54_3 is required. 2003-02-26 Stanislav Sinyagin * NEWS: Release 0.0.15 * xmlconfig/examples/apcups-defs.xml: * xmlconfig/examples/apcups-example.xml: Added APC UPS example configurations * lib/Torrus/Collector/RRDStorage.pm (updateRRD): Reverted to a more promiscious code, because the memory problem persists with perl 5.8. 2003-02-20 Stanislav Sinyagin * NEWS: Release 0.0.14 2003-02-10 Stanislav Sinyagin * lib/Torrus/ConfigTree/Writer.pm: fixed bug with parameter cache 2003-01-29 Stanislav Sinyagin * bin/mkroutercfg.in: fixed the exit code bug 2003-01-24 Stanislav Sinyagin * xmlconfig/Makefile.am: added xmlconfig/examples/snmp-view.xml * lib/Torrus/ConfigTree/XMLCompiler.pm, bin/compilexml.in: added XML statement 2003-01-20 Stanislav Sinyagin * NEWS: Release 0.0.13 * bin/compilexml.in, bin/collector.in, bin/monitor.in: Added signal handlers for more graceful database closing. 2003-01-13 Stanislav Sinyagin * lib/Torrus/ConfigTree.pm: Now compiler waits for readers to finish. 2003-01-08 Stanislav Sinyagin * lib/Torrus/ConfigTree.pm: implemented ConfigurationReady checkup * lib/Torrus/ApacheHandler.pm, web/grapher.cgi.in: more user friendly error reporting 2003-01-05 Stanislav Sinyagin * xmlconfig/snmp-defs.xml: Added InOutBps leaf to the templates. Affected files: xmlconfig/defaults.xml, templates/routercfg.xml, templates/default-dir.html, templates/inout-leaves.html 2003-01-03 Stanislav Sinyagin * xmlconfig/snmp-defs.xml: Added graph-legend parameters 2003-01-02 Stanislav Sinyagin * xmlconfig/Makefile.am: moved XML examples to a separate directory * implemented 'rrd-multigraph' * changed ds-type RRDfile to rrd-file 2002-09-10 Stanislav Sinyagin * Release 0.0.5 published. Everything except SNMP data collector is ready to run. 2002-08-12 Stanislav Sinyagin * Reorganized a lot of things. First cut of monitor is runnable. 2002-07-19 Stanislav Sinyagin * Implemented Holt-Winters support 2002-07-18 Stanislav Sinyagin * Reorganized ConfigTree and implemented tokens torrus-2.08/doc/0000755000175000017500000000000012413221022010534 500000000000000torrus-2.08/doc/rpnexpr.pod.in0000644000175000017500000000672312413217640013306 00000000000000# rpnexpr.pod - Torrus RPN expressions guide # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 RPN expressions in Torrus In Torrus framework, RPN expressions are the superset of those in RRDtool version 1.0. See the C manual at Ehttp://oss.oetiker.ch/rrdtool/doc/rrdgraph_rpn.en.htmlE. =head2 New functions added =over 4 =item * NE Pops two arguments from stack, and pushes 0 if the arguments are equal, and 1 otherwise. =item * AND, OR These functions pop two arguments from stack, and push back the result of logical operation. Unlike C operators, =item * NOT Pops one value from stack and pushes 0 if the argument is nonzero, otherwise 1. =item * ABS Pops one value from stack and pushes the absolute value of it. =item * NOW Pushes the current time, in seconds since Epoch. =item * TOD Pushes the time-of-day value: the number of seconds since midnight in th ecurrent time zone. =item * WDAY Pushes the day of the week number (0=Sunday). =item * MOFRI Pushes 1 if today is Monday to Friday, or 0 otherwise. =item * MOD Equivalent of C<%>, the modulo operator. In Torrus parameter value, percent sign is reserved for parameter substitution. =item * NUM Returns zero if the argument is undefined, and the argument's numeric value otherwise =item * INF, NEGINF Returns the positive or negative infinity. =back =head2 Data access In certain context, the values of the datasources can be evaluated into RPN expression. The general format for data access is following: {FUNC@PATH(-OFFSET)} C specifies a special function to be performed on the data being accessed. For monitor expressions, C returns the timestamp of the data source. For C leaf types and for C datasource types, the following functions affect the graph shape: C, C, C, and C. They cause the corresponding Consolidation Function being used when creating a graph. C specifies the relative name for the data source. If omitted, the current leaf value is taken. If starts with C, the path is considered as absolute. Path starting with letter denotes the child of the parent subtree. Double dot (C<../>) in the beginning of the path is interpreted as current parent's parent subtree. If C starts with a string enclosed in double square brackets (C<[[> and C<]]>), the string is interpreted as a NodeID value for referring to the node in the datasource tree. C<(OFFSET)> determines the time reference, as described in C manual. In addition, the word C refers to the latest data timestamp available. C<(OFFSET)> is currently supported in Monitor expressions only. =head1 Author Copyright (c) 2002-2004 Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/snmpdiscovery.pod.in0000644000175000017500000013232312413217640014511 00000000000000# Copyright (C) 2002-2014 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 Torrus SNMP Discovery User Guide =head2 Introduction In many (but not only) cases Torrus is used for SNMP monitoring. It provides powerful tools which automate the process of devices' MIB discovery. The discovery tools consist of two programs: C performs the SNMP discovery, based on the discovery instructions XML file. The result of its work is a new Torrus datasource configuration file. Another utility, C, is a program that generates the basic discovery instructions file based on a set of commandline options. The device discovery XML, or as we call them DDX files, are usually resided in F<@siteconfdir@/discovery/> directory. This is the default path to search for them when the absolute path is not given. =head2 C: Discovery instructions generator Usage: torrus genddx options... Options: --host=hostname router hostname --hostfile=filename space-separated router hostnames file --out=outfile output file. [routers.ddx] --discout=filename discovery output file [routers.xml] --domain=domain optional DNS domain name --version=v SNMP version [2c] --community=string SNMP read community [public] --port=number SNMP port [161] --retries=number SNMP retries [2] --timeout=number SNMP timeout [10] --subtree=string Subtree name [/Routers] --datadir=path data-dir parameter [@defrrddir@] --holtwinters Enable Holt-Winters analysis This utility generates C instructions XML file (DDX) based on commandline options and a plain list of SNMP agents' hostnames. Hostnames are specified with one or many C<--host=hostname> options, or a plain text file with space-separated hostnames. Each host may have a symbolic name. This symbolic name is used as the host-level subtree name. The symbolic name follows the hostname with a semicolon. By default, the devices are placed into C subtree hierarchy. You may change the subtree name with the I<--subtree> option. Single slash as subtree name would cause host-level subtrees placed at the top of the datasources tree. By default, C specifies the discovery output file as , and it would be placed in site XML configuration directory. You most probably will change this by using the C<--discout> option. Examples: torrus genddx --out=ch-langenthal.ddx \ --discout=ch-langenthal.xml \ --host=192.168.34.35:Langenthal_PE1 \ --host=192.168.34.36:Langenthal_PE2 \ --host=192.168.34.37:Langenthal_CE_Stadtverwaltung \ --community=blahBlah \ --subtree=/MPLS/CH/Bern/Langenthal torrus devdiscover --in=ch-langenthal.ddx B C is designed as a one-time utility. You may run it to create a typical discovery file with basic set of options. Then the discovery configuration XML would be the primary source of information, and it should be maintained by manual editing, or by some other automated means. Alternatively you may use C utility and generate highly customized discovery instruction files based on static templates and lists of SNMP nodes. See L manpage for more details and examples. =head2 C: SNMP discovery tool Usage: torrus devdiscover --in=filename.ddx options... [ddx files] Options: --in=filename.ddx discovery instructions XML file(s) --mkdir create data-dir directories --limit=regexp limit the discovery by output files --forcebundle always write the bundle file --fallback=integer maximum age of XML file to fall back to --threads=integer number of parallel discovery threads --verbose print extra information --debug print debugging information --snmpdebug print SNMP protocol details This utility performs the SNMP discovery of devices listed in the input DDX file. The output XML file is the Torrus datasources configuration. Output file name is taken from C parameter in the DDX. If the output file is not an absolute path, the file is placed in the site XML configuration directory (F<@sitexmldir@>). C is accompanied by a number of MIB- or vendor-specific modules, each responsible for finding specific SNMP variables in the SNMP device, and for generating a piece of Torrus configuration XML file responsible for that specific MIB. The list of supported generic MIBs and vendors is constantly growing. It is quite easy to create new discovery modules, and the internals are documented in I. The output file automatically includes all required prerequisite generic and vendor template definition files. Behaviour of C is controlled by variables in F<@siteconfdir@/devdiscover-siteconfig.pl> file. Default values for those variables reside in F<@cfgdefdir@/devdiscover-config.pl>. For large installations, it is recommended to place RRD files into a hashed directory structure. You can enable this feature by setting $Torrus::DevDiscover::hashDataDirEnabled = 1; in your F file. Then launching C with C<--mkdir> option would automatically create the subdirectories inside C. The XML files produced by C may be automatically changed with some local site-specific scripts. See XUpdate usage example in I. =head2 DDX, the discovery instructions file The input file for C is an XML file. Its DTD is available in Torrus distribution in F. A typical place to store the discovery XML is F<@siteconfdir@/discovery/>. Example: 1.0 Manually edited by Vassisuali Poupkine RRA:AVERAGE:0:1:57600 RRA:AVERAGE:0.25:20:8640 RRA:MAX:0.25:20:8640 RRA:AVERAGE:0:1:105408 RRA:AVERAGE:0.34:12:4560 RRA:MAX:0.34:12:4560 RRA:AVERAGE:0.25:288:732 RRA:MAX:0.25:288:732 =head3 XML elements =over 4 =item * C Mandatory. The top-level element. =item * C Mandatory. It must contain the element C. =item * C Mandatory. It must contain a format version currently supported by devdiscover. Currently supported version is C<1.0>. =item * C Optional. May contain the information about the file creator: a human author name, or a program. =item * C Some parameters are mandatory. This element defines a global or host-specific parameter. Mandatory attribute C identifies the parameter, and the value is taken eother from C attribute, or from the textual content of the element. C element should be the child element of C for global parameters or C for host-level parameters. Host-level parameters override the values of global parameters. These parameters are for C only. They are not Torrus configuration parameters, although some of them are directly copied into the generated configuration file. =item * C Mandatory. Defines a host to run SNMP discovery. =back =head3 Common parameters =over 4 =item * C, C, C, C, C, C, C, C Optional. When defined, these parameters override those from C template in F. =item * C Mandatory. Specifies the output filename for generated Torrus configuration. If it's a relative path, the file is placed in F<@sitexmldir@> directory. =item * C Optional. Specifies a comma-separated list of XML file names for bundle output. Each bundle file will contain EincludeE statement for each corresponding C. =item * C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C Mandatory SNMP session parameters. Authentication parameters depend on the SNMP version used. See the I for details. These parameters define the SNMP agent properties and are copied one-to-one to the output configuration. =item * C Optional. Defines a DNS domain name to be appended to C. =item * C and C Optional parameters specifying the local socket binding address and port. =item * C Mandatory. Defines the directory path where RRD files for this host are stored. In case if hashed directories are enabled, C specifies the base path under which the hashed subdirectories are created. =item * C Optional. Determines the host-specific subtree name. If not specified, the subtree is named by C, or by C if system ID is not defined. =item * C Optional. If defined, it overrides the default value of system ID, which is equal to the value of C. =item * C Optional. Defines the host-specific reference for I. Default value is equal to C. =item * C Optional. When defined, these parameters overwrites the value from the template and vendor-specific discovery modules. =item * C Optional. Default: C. Devdiscover sets this parameter to C when it finds SNMPv2-MIB::sysUpTime variable unavailable in the device. =item * C Optional. If defined, it sets the SNMP maximum message size different from default. The default value is 1470 (defined in Net::SNMP). =item * C Optional. If defined, it sets the maximum number of objects to return in SNMP getBulkRequest. The default value is 10. =item * C Optional. Defines the datasourse tree path under which the host-specific subtree is created. =item * C Optional. Valid values: C, C. Determines if Holt-Winters forecasting should be enabled for the given host. =item * C Optional. Comma-separated list of discovery device types that need to be excluded from discovery process. For example, ATMEL appliances conflict with Empire SystemEdge MIBs, and you need to disable C module in order to run the discovery on those appliances. =item * C Optional comma-separated list of device types. If defined, only the specified types will be used for device probing. Also it automatically disables the SNMP reachability statistics unless C is set to C. =item * C Optional comma-separated list of alias paths for a given host. Aliases must be unique for each host. =item * C Optional comma-separated list of template names that will be applied to the resulting XML configuration at the host level. =item * C Optional comma-separated list of XML files that will be listed in C statements in the resulting XML output. =item * C Optional comma-separated list of parameter names that should be copied from the discovery configuration file to the generated Torrus configuration at the host level. =item * C Optional comma-separated list of object selectors. They are explained in more detail below. =item * C When set to C, this parameter disables SNMP collection for this host. It is useful for creating custom views, in conjunction with C parameter. =item * C If set to C, the device reachability statistics are not enabled for this host. =item * C If C parameter is specified, the SNMP reachability statistics are disabled by default. If C is set to C, the reachability statistics are actvated in any case. =item * C This parameter defines the monitor name which will be applied to device reachability statistics. =item * C This parameter overrides the default round-robin array definition for collector statistics. By default, we keep 5-minute details for 2 weeks, 30-minute average and maximum details for 6 weeks, and 1-day aggregated stats for 2 years. =item * C This parameter overrides the round-robin array definitions for SNMP reachability statistics. By default, 5-minute data is stored for 3 months, and daily averages are stored for 3 years. =item * C Semicolon-separated (;) list of pairs of tokenset names and descriptions. Each tokenset name is followed by colon (:) and the description text: important-graphs: Important Graphs; unimportant-graphs: Unimportant Graphs =item * C For a tokenset XXX, specifies the value of C parameter. It defines the view name that is used to display graphs inside the tokenset. =item * C if set to C, the legend is not shown. It usually has uptime, software version, and contact information for the SNMP device. =item * C Sets the comment string for the host. =item * C Default: C. When set to C, the link to the recursive view at the host level is omitted. =item * C If defined, this should be a comma-separated list of template registry entries that override the default template references. The overlaying templates should be referred in C<%Torrus::DevDiscover::templateOverlays>. For example, we want to redefine the interface counter template. Then in the DDX file, we set Then in F we set %Torrus::DevDiscover::templateOverlays = { 'my_ifcounters' => { 'RFC2863_IF_MIB::iftable-octets' => { 'name' => 'my-iftable-octets', 'source' => 'mycustom-rfc2863.if-mib.xml' }, 'RFC2863_IF_MIB::ifxtable-hcoctets' => { 'name' => 'my-ifxtable-hcoctets', 'source' => 'mycustom-rfc2863.if-mib.xml' }, }}; =back =head3 Parameters for C This discovery module is responsible for agent's interfaces table and interface counters. Recognized optional parameters are: =over 4 =item * C Some agents do not implement 64-bit counters correctly. When this parameter is set to C, 64-bit interface counters are not used for the host. For Cisco IOS devices, the C discovery module tries to detect such situation automatically. =item * C Defines the child subtree name within host-level subtree where interface counters are located. Default: C. =item * C Defines the comment string for interface counters subtree. Default: I. =item * C If set to C, interfaces with ifAdminStatus set to other than up(1) are included in the discovery results. By default, such interfaces are not listed. =item * C If set to C, the interfaces with ifOperStatus status set to notPresent(6) are included in the discovery results. By default, such interfaces are not listed. =item * C If set to C, the interfaces with ifOperStatus equal to down(2) are excluded from the discovery results. =item * C Comma-separated list of interface names which should be excluded from configuration. Spaces are allowed between the names and commas. The names should be the ones that are used for interface subtrees. =item * C If defined, this parameter specifies the list of interfaces that will be included in the discovery results. The names should match the interface subtree names. Caution: if specified incorrectly, this parameter may disable discovery for all interfaces on a device. =item * C This parameter defines which interfaces' C leaves to add to which tokensets. The value is a semicolon-separated (;) list of entries of form I, where I is a name of the tokenset, and the I is the subtree name of the corresponding interface. The token sets must be defined elsewhere in Torrus configuration. Example: clusters: 10_1, 10_2; uplinks: 1_1, 1_2 Alternatively, this parameter can be defined at the global level, and then each interface should be pretended by the SNMP host name (the same as in C parameter) and slash sign (/): clusters: RTR01/Ethernet0_0, RTR01/FastEthernet2_1; =item * C Optional comma-separated list of parameter names that would be copied to the output Torrus configuration at interface level. For each parameter I, the value for a particular interface I will be taken from parameter C::I> in the discovery configuration file. Example: =item * C Optional. For a device that doesn't have a corresponding vendor-specific discovery module, this parameter would advice C how to build C index mapping. By default, the interfaces are mapped by C values if they are unique, or C otherwise. If C is non-unique, C is taken as interface reference. For many vendors, this would not give reliable or convenient mapping. Valid values for the hint are: C, C, and C. The first two suggest the mapping by corresponding SNMP variables, and the third one should be used for devices with fixed C layout: in this case, the C values are recorded as they are at the moment of discovery. This option is ignored if the device is supported by a vendor specific discovery module. =item * C Optional. Before Torrus version 1.0.10, C parameter was derived from C values, even if they were non-unique. Now this interface nick is based on C only if it contains unique values. This discovery parameter, if set to C, restores the old behavior. =item * C Optional. By default, per-interface subtrees are named after the values of C SNMP variables. If this option is set to C, this SNMP variable would be used for subtree naming. This option is ignored if the device is supported by a vendor specific discovery module. If C entries are non-unique on the device, but you still want to use them for subtree names, you need to specify this parameter explicitly with C as a value. =item * C Optional. By default, human-readable interface names are taken from C SNMP values. It can be changed with this parameter. =item * C Optional. By default, interface descriptions are taken from C SNMP values. It can be changed with this parameter. =item * C Optional. By default, per-interface I is derived from C. This parameter can change the reference table for nodeid. Valid values are: C, C, C, C. =item * C Optional. By default, interfaces are ordered by their ifindex, which can lead to not being ordered at all on devices where interfaces can come and go. Setting this parameter to C drops the auto-generated I values and makes Torrus sort the interfaces alphabetically. =item * C If set to C, all the interface statistics are skipped from the XML configuration output. Still the interface table is examined and the results may be used by other discovery modules. =item * C If set to C, the bandwidth usage percentage will be shown for those interfaces where two parameters are defined (in megabits per second): C and C. These interface parameters may be set by C discovery parameter, or by selectors with the action C, or by setting C. =item * C Defines the values (in megabits per second) for C and C interface parameters. Semicolon-separated list of (I:I:I) values, for example: ethernet0_0:10:10; ethernet0_1:20:20; =item * C, C, C, C Defines traffic summary graphs. A summary graph presents a sum of traffic from several interfaces. The interfaces can belong to different hosts, but then these hosts should have the same C parameter value. C defines a list of summary names, C specifies the full path in the datasource tree to display the graph, optional C defines a descriptive comment for the graph, and C lists the interfaces that comprise this sum. The interfaces can be defined at the host level in the form C or at the global level in the form C. Example: =back =head3 Other generic MIB parameters =over 4 =item * C Defines the child subtree name within host-level subtree where system CPU and memory statistics are located. Default: C. =item * C If set to C, only the DOCSIS upstream statistics are enabled, and downstream and MAC layer stats are skipped. =item * C If set to C, all DOCSIS interfaces are excluded from any cable or interface statistics. =item * C, C If set to C, IP-MIB statistics for the corresponding IP protocol version are included in discovery. =item * C, C, C These parameters work for IP-MIB statistics the same way as corresponding parameters in RFC2863_IF_MIB. =back =head3 Vendor parameters =over 4 =item * C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C When set to C, the corresponding statistics are included or excluded from the graphs. =item * C When set to C, the data will be written to filenames based on the name bundle instead of by the ID of the bundle. =item * C When set to C, wireless client machines are not tracked. =item * C Set this to C if the router is configured with C command. There is no way to verify via SNMP if this option is configured on the router, so it should be used with care. When enabled, this option enables ifIndex-based indexing of router interfaces, and the collector does not have to retrieve interface names from the device. =item * C When set to C, Cisco CPU usage statistics are excluded from discovery. =item * C When set to C, Cisco memory pool usage statistics are excluded from discovery. For Cisco series 7500, see the note in the I. =item * C When set to C, Cisco temperature sensors are excluded from discovery. =item * C When set to C, Cisco temperature sensors are recorded and displayed in degrees Fahrenheit. =item * C When set to C, Cisco temperature sensor values are stored in a separate RRD file per sensor ID. This is useful for modular big routers like Cisco GSR. =item * C if set to C, Cisco power supply statistics are not collected. =item * C Name of the power supply monitor for Cisco devices. =item * C When set to C, Cisco memory buffer statistics are included to the discovery. Many IOS releases report faulty information, thus these stats are disabled by default. =item * C When set to C, IPSec statistics are excluded from discovery. =item * C If set to C, BGP statistics are not included. =item * C When set to C, the interfaces VlanXXX are added to statistics. By default they are not included, because some hardware platforms give irrelevant counter statistics. =item * C When set to C, the interfaces "unrouted Vlan XXX" are added to statistics. By default they are not included, because some hardware platforms provide no statistics for such interfaces. =item * C If set to C, DialerX interfaces are included in discovery results. =item * C When set to C, only those Catalyst ports are included in configuration which have a port name (set up by C command). =item * C When set to C, Cisco MAC accounting statistics will be enabled for those MACs which correspond to BGP peers only. =item * C Specifies a description for an autonomous system number. Currently it's used with Cisco MAC accounting and Cisco BGP statistics only. =item * C Specifies a description for a peer by its IP address. Dots in IP address should be replaced with underscores. Currently it's used with Cisco MAC accounting and Cisco BGP statistics only. =item * C Works the same way as C and assigns MAC accounting peers to tokensets. =item * C When set to C, the Committed Access Rate statistics are disabled from discovery. =item * C When set to C, the VPDN (Virtual Private Dial-up Network) statistics are disabled from discovery. =item * C If set to C, ME3400 Port QoS statistics are disabled. =item * C If set to C, the Hw Serial and Revision strings are not shown in device comment. =item * C, C, C, C, C, C If set to C, the corresponding statistics are excluded from Cisco SCE graphs. =item * C Comma-separated list of SSID which are only allowed for discovery. By default, all SSID are allowed. =item * C, C, C When set to C, disables the corresponding statistics category. =item * C, C When set to C, enables the user of fahrenheit temperature, or writes multiple rrd files. =item * C, C, C, C, C, C When set to C, disables the corresponding statistics category for JunOS devices. =item * C, C, C, C When set to C, disable the corresponding statistics category for Liebert devices. =item * C When set to C, the temperature readings will be in fahrenheit. =item * C, C, C Set a numeric value for the maximum temperature, humidity, or dew point on NetBotz sensor graphs. The maximum is displayed with a dark red line. =item * C Mandatory for Paradyne DSLAM devices. It should uniquely identify the slot within the device. Any sequence of word characters is allowed. =back See also: I for the list of supported MIBs and vendors. =head2 Object selectors Selectors are a common mechanism for applying customizations to some discovery objects. For example, you may want to apply a monitor to byte counters of interfaces that have a special word in the description. Or apply Holt-Winters prediction to a certain subset of interfaces. Selectors are defined in a DDX file as regular parameters. The parameter C defines a list of selector names. Each selector is identifed by its name and type. The type of selector defines which objects will be searched: IF-MIB interfaces, or Cisco temperature sensors, or something else. The parameters are described below. =over 4 =item * C Comma-separated list of selector names. Further below we use C as selector name, C as attribute name, and C as action name. =item * C Type of objects to be selected. Supported values are: C, C, C, C, C, C =item * C An RPN (reverse Polish notation) expression that defines the object attributes to be checked and relation between them. Attribute names should be specified in curly braces ({}). The rest of the syntax is described in I guide. The attribute names are specific to the selector type and are described below. =item * C For a given selector name C and attribute name C, this parameter defines the attribute value that should be compared to the object's properties. In most cases it defines a regular expression that should match the value of a corresponding object's property. =item * C For a given selector name C, this parameter defines a comma-separated list of actions to be applied for objects where C returns true. The action names are specific to the selector type and are described below. =item * C For a given selector C and action C, this parameter defines an argument that should be passed to the action. Each action defines its own meaning of the argument. =back =head3 RFC2863_IF_MIB selector This type of selector selects the network interfaces on a SNMP device. The following attribute names are supported: =over 4 =item * C, C, ... Interface-level subtree name as you see it in the discovery results. You can compose a complex expression of subtree matches, by createing attributes with different numbers at the end. =item * C Comment string that is defined in C parameter. It is usually derived from an interface description. =item * C Numeric IANA interface type, as returned by C SNMP variable. =back C is compared numerically. C and C are regular expressions. C accepts multiple expressions separated by space, and the selector matches if any of these expressions matches the subtree name. The following actions are supported: =over 4 =item * C, C The argument defines the monitor name to be applied to the input or output bytes counter. =item * C, C, C, C The argument defines the monitor name to be applied to discard and error counters that are discovered for a given interface. =item * C The argument defines the value for C parameter. See the manual for F for more details. =item * C No argument needed. This action enables Holt-Winters prediction for given interface's counters. =item * C, C, C No argument needed. The action disables the packet, discard or error counters for a given interface to be collected. =item * C The argument is a comma-separated list of tokenset names where C graphs would be added. This action complements C. =item * C The argument defines additional configuration parameters to be placed at the interface level. The value should be one or several C pairs separated by semicolon (;). Parameters defined in C may override the ones defined in this action. =item * C, C Analagous to C, but the parameters are applied to InBytes and OutBytes leaves of the selected interface. =item * C The argument is a comma-separated list of template names to add at the interface level. If a template is not seen in the DevDiscover's template registry, it produces a warning. See C for more details about a proper way of adding custom templates. =item * C This action excludes the matched interface from discovery results. No arguments needed. =item * C For a DOCSIS CMTS, this action assigns a new monitor to the upstream Signal/Noise ratio gauge, instead of the default monitor. =item * C For a DOCSIS CMTS, this action adds the Signal/Noise ratio graph to a specified tokenset. =item * C For a DOCSIS CMTS, this action assigns a monitor to the C counter of the upstream FEC statistics. =item * C For a DOCSIS CMTS, this action assigns a monitor to the C counter of the upstream FEC statistics. =item * C For a DOCSIS CMTS, this action assigns a monitor to the downstream C counter. =item * C For Cisco uBR, this action assigns a monitor to the C gauge in the MAC layer stats. =item * C, C For Cisco uBR, this action assigns a monitor to upstream utilization and free contention timeslots gauges correspondingly. =back =head3 CiscoCPU selector A selector of this type selects CPU statistics Cisco router or switch. The attributes supported are: C and C, and their values are regular expressions that should match the CPU name or description, as discovered by C. The action supported is C, and its argument specifies the tokenset where to place the CPU statistics graph. =head3 CiscoSensor selector A selector of this type selects temperature sensors on a Cisco router or switch. The only attribute supported is C, and its value is a regular expression that should match the sensor description, as discovered by C. Actions supported: C, C. =head3 ALU_SAP selector This selector type is designed for SAP entries in Alcatel-Lucent ESS and SR routers. Attributes supported: C (regexp), C (regexp), C (exact match), C (exact match). Actions supported: C (excludes a selected SAP from the datasources). =head3 NetBotzSensor selector A selector of this type selects sensors on a NetBotz environment monitoring appliances. Attributes supported: C, C, C. Arguments are matched as regular expressions. Actions supported: C, C. =head3 RFC2662_ADSL_LINE selector This type of selector applies to ADSL line statistics. Attributes supported: C. Actions supported: C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C. =head3 RFC4293_IP_MIB_v4 and RFC4293_IP_MIB_v6 selectors These selectors apply to the IP-MIB statistics if they are present on the device and their discovery is activated by C or C parameters. Attributes supported: C. Actions supported: C, C, C, C, C =head3 Examples The following example applies a monitor called C to all inlet sensors on a Cisco device: The following example enables Holt-Winters prediction and specifies some parameters to all FastEthernet interfaces which have the string "SRV-ID" in their descriptions: The following example sets up the monitors defined in F: DocsisUpSNRMonitor, DocsisUpFECCorMonitor, DocsisUpFECUncorMonitor, DocsisDownUtilMonitor, DocsisMacModemsMonitor, DocsisUpUtilMonitor, DocsisUpSlotsMonitor, InErrorsMonitor, OutErrorsMonitor This example excludes all non-Gigabit ports from discovery results: The following example sets the SNR monitoring on ADSL line statistics: AtucSnrMonitor, AturSnrMonitor =head1 Author Copyright (c) 2002-2011 Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/reporting_setup.pod.in0000644000175000017500000003350411661302716015041 00000000000000# webintf.pod - Torrus web interface reference # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 Torrus Reporting Setup Guide In version 1.0.4, Torrus introduces a new and important functionality. Now it is able to produce reports that may be used in billing or resource planning. The reports are meant to be text output, telling the bandwidth usage or volume: no graphs so far. By default, the reporting functionality is not enabled, and the steps required are described below. =head2 Terminology The basic term in Torrus reporting is the B. It denotes a single datasource that is represented by a single number. For example, if you want to count input and output interface traffic, this would make two different service IDs. Do not assign service IDs to each and every interface in your network, as it would degrade the performance of your Torrus installation significantly. This functionality is designed for use with important datasources, such as your customers' connection links or and ISP's upstream channels. Each service ID must be B across the whole Torrus installation, and across the database that stores them (it is possible to use several Torrus installations with the same database). B, the SNMP discovery engine, allows now to assign service IDs to network interfaces of your SNMP-enabled devices. However, this does not prevent you from assigning them to other Torrus datasources, as it's done by simple configuration parameters. B, when generated, is presented by a set of numeric values in the SQL database. Torrus provides also tools for rendering these values into HTML B. In the future, other output formats will be implemented. You can also build your own infrastructure that reads the values from the reports database. The produced reports may, and are primarily developed for using in B process. As it is stated in the GNU General Public License text, this program is provided "as is" and B. It is up to the users of Torrus software to rely or not to rely on the generated numeric data, and the Torrus software developers disclaim any responsibility for the data accuracy and usability. B You can assign the list of trees where the reports should be generated and shown. B after changing the destination tree, the compiler may complain about I. Then you need to stop all the torrus processes, including Apache, and then remove the file F from Torrus database directory, then recompile the trees and start the processes. =head2 Install Perl modules Install the following Perl modules from CPAN: DBI DBD::mysql or other RDBMS driver DBIx::Abstract DBIx::Sequence On many platforms, DBI is already pre-installed. You need to make sure that appropriate DBD driver is installed for your database engine. The setup was tested with MySQL, SQL syntax is compatible with Postgres, and in theory it should run also with Oracle and probably Sybase or DB2. No idea about MSSQL - if you're brave enough, let me know if it works :) =head2 Enable the External Storage and specify the SQL connection In F, add the following lines. The first one tells the collector to use the module for storing the collector results in SQL database. Next lines define the database connection. By default, it refers to the MySQL database named C on C, with username and password set to C. push(@Torrus::Collector::loadModules, 'Torrus::Collector::ExternalStorage'); $Torrus::SQL::connections{'Default'}{'dsn'} = 'DBI:mysql:database=torrus;host=dbhost.example.com'; $Torrus::SQL::connections{'Default'}{'username'} = 'torrus'; $Torrus::SQL::connections{'Default'}{'password'} = 'imiF1oih'; In addition to the default connection, you can specify different connections for different data structures: for example, keep 5-minutes samples on a bulky storage server, and store the reports on a high-availability cluster. See the comments in F for more details. =head2 Create SQL tables With your RDBMS client, create the following tables. We assume here that the same database is used for all tables. The SQL syntax is verified with MySQL 4.x and Postgres 8.x. It is brought as much as possible to the standard and platform-independent SQL syntax. Please let me know if it causes problems with your RDBMS. /* Collector export table. It usually grows at several megabytes per month, and is updated every 5 minutes */ CREATE TABLE srvexport ( srv_date DATE NOT NULL, /* date and time of the data sample */ srv_time TIME NOT NULL, serviceid VARCHAR(64) NOT NULL, /* unique service ID per counter */ value DOUBLE PRECISION NOT NULL, /* collected rate or gauge value */ intvl INTEGER NOT NULL /* collection interval - for counter volume calculation */ ); CREATE INDEX srvexp_date ON srvexport (srv_date); CREATE INDEX srvexp_srvid ON srvexport (serviceid); /* Tables for (currently monthly only) report contents. These are updated usually once per month, and read at the moment of rendering the report output (HTML now, PDF or XML or Excel or whatever in the future) */ /* DBIx::Sequence backend, theplatform-independent inplementation of sequences */ CREATE TABLE dbix_sequence_state ( dataset varchar(50) NOT NULL, state_id INTEGER NOT NULL, CONSTRAINT pk_dbix_sequence PRIMARY KEY (dataset, state_id) ); CREATE TABLE dbix_sequence_release ( dataset varchar(50) NOT NULL, released_id INTEGER NOT NULL, CONSTRAINT pk_dbi_release PRIMARY KEY (dataset, released_id) ); /* Each report is characterized by name, date and time. Monthly reports are automatically assigned 00:00 of the 1st day in the month. The report contains fields for every service ID defined across all datasource trees. */ CREATE TABLE reports ( id INTEGER PRIMARY KEY, rep_date DATE NOT NULL, /* Start date of the report */ rep_time TIME NOT NULL, /* Start time of the report */ reportname VARCHAR(64) NOT NULL, /* Report name, such as MonthlyUsage */ iscomplete INTEGER NOT NULL, /* 0 when the report is in progress, */ /* 1 when it is ready */ UNIQUE(rep_date, rep_time, reportname) ); CREATE INDEX rep_date_idx ON reports (rep_date); /* Each report contains fields. For each service ID, the report may contain several fields for various statistics. Each field contains information about the units of the value it contains */ CREATE TABLE reportfields ( id INTEGER PRIMARY KEY, rep_id INTEGER, name VARCHAR(64) NOT NULL, /* name of the field, such as AVG or MAX */ serviceid VARCHAR(64) NOT NULL, /* service ID */ value DOUBLE PRECISION NOT NULL, /* Numeric value */ units VARCHAR(64) NOT NULL DEFAULT '', /* Units, such as bytes or Mbps */ UNIQUE (rep_id, name, serviceid) ); =head2 Devdiscover parameters Currently devdiscover allows you to assign service IDs to network interfaces' input and output traffic counters. Other types of datasources may be implemented in the future. =over 4 =item * C This discovery parameter specifies which service IDs are assigned to which interface names. The interface names whould be specified in the form of their subtree names in Torrus configuration. The example below is typical for a Cisco IOS router. The value of the parameter consists of comma-separated strings. The values in each string are separated by colons, and they correspond to the service ID, interface name, counter type, and optional destination tree names separated by the pipe symbol (|). The interface name can be prefixed by hostname and slash (/), the same way as in C. All strings are case-sensitive. Three counter types are supported: C, C, and C. When set to C, the service ID is appended with C<_IN> or C<_OUT> postfix accordingly, for input and output byte counters. CUSTOMERONE:nyc01br01/GigabitEthernet9_2_1:Both, CUSTOMERTWO:wdc01br02/GigabitEthernet6_3_1:Both, UPSTREAM1_IN:FastEthernet0_0_0:In:upstreams, UPSTREAM1_OUT:FastEthernet0_0_0:Out:upstreams, UPSTREAM2:GigabitEthernet0_1_1:Both:upstreams, CUST1:GigabitEthernet0_2_2:Both:customers|cust1, =item * C The same format as for the parameter listed above, but instead of interface names, you can specify the MAC accounting peer, in one of the following formats: AS number (I), IP address, or peer's MAC address (I<0x0003319c4200>). =back =head2 Torrus XML configuration parameters You can skip this section if Devdiscover provides all desired functionality. It explains parameters additional to those described in I. The collector's ExternalStorage module is designed for storing the data to a generic external storage, and the default external storage is the SQL database. =over 4 =item * C Mandatory parameter for datasource type C. Comma-separated list of storage types. The collected value is duplicated on every storage listed. Supported values are: C, C. For C (external storage), see the I. =item * C Mandatory datasource type to be used in external storage. Accepted values are: C, C, C. =item * C Mandatory service ID for the external storage. =item * C Optional units for the collected value. The only supported value is C. =item * C (B) Optional list of comma-separated tree names. If specified, the report generator will produce report in corresponding trees. By default it's the tree which runs the collector process. =back =head2 Enable displaying of the reports in the web interface First, enable the reports displaying in : $Torrus::Renderer::displayReports = 1; Second, configure the ACL for your users that are allowed to see the reports in the web interface: torrus acl --modgroup=admin --permit=DisplayReports --for=mytree In this example, members of the group C will be prompted with the C<[Reports]> shortcut in the web interface's bottom of the page for a given tree. For easier setup, the tree name may be replaced with asterisk (*) to allow this option for all trees. =head2 Generate reports Report generation is usually a CPU-intensive task. A monthly report calculation for one service ID may take several dozens of seconds of CPU time. This uit's recommended to use the C command to lower the process priority. The C (or simply C) command-line utility is designed for two different tasks: calculation of a single report for the period chosen, and generation of output HTML for all reports available. The example below generates the monthly usage report for September 2005: nice torrus report --report=MonthlyUsage --date=2005-09-01 --debug The next example generates HTML output for all reports that are found in the database: nice torrus report --genhtml --tree=customers It makes sence to set up a monthly cron job and generate the reports on the first day of every month, with the command like follows: nice torrus report --report=MonthlyUsage \ --date=`perl -e 'use Date::Format; print time2str("%Y-%m-%d", time()-1728000)'` The HTML output is optimized for printing, and is quite easy to navigate. The overview page provides the list of years. Clicking to the year leads you into the list of monthly reports available. Each monthly report consists of a table for each report name. For C, the data is organized in five columns: the service ID, average monthly rate, 95th percentile of the rates, maximum rate throughout the month, unavailable samples (how many 5-minutes intervals are missed in the collected data), and monthly volume (which is roughly less than the actual volume by the percentage of missed samples). Also clicking a service ID leads to its monthly report throughout the year. =head2 Getting the sum or maximum value from several service IDs A new utility has been sponsored by nexellent ag (www.nexellent.ch), a managed hosting solution provider near Zurich. The utility C can be used to generate a new service ID which would contain sum or maximum of values of other service IDs. You would usually run this utlity monthly, just before generating the monthly reports: torrus srvderive --verbose --start=20080801 --month \ --out=JSMITH_SUM_OUT --func=SUM JSMITH01_OUT JSMITH02_OUT torrus srvderive --verbose --start=20080801 --month \ --out=JSMITH_SUM_IN --func=SUM JSMITH01_IN JSMITH02_IN Copyright (c) 2005-2008 Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/vendorsupport.pod.in0000644000175000017500000001433512034264722014542 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 Torrus Vendor Support List =head2 Introduction This document provides a listing of vendor devices and generic MIBs that are suppported by Torrus'es SNMP discovery utilities and/or templates and other supporting files. All SNMP MIBs described below are supported through C, the SNMP discovery utility. Where possible, the system contact, location, and interface descriptions are copied to the generated Torrus configuration. =head2 Generic SNMP MIBs =over 4 =item * RFC1628 (UPS-MIB) Generic statistics covered by most UPS manufactures, including input, output, and bypass group information. =item * RFC1697 (RDBMS-MIB) Provides the database engine performance statistics. Tested with Oracle only. =item * RFC2662 (ADSL-LINE-MIB) ADSL DSLAM statitics and line status. Tested with Paradyne DSLAM. =item * RFC2670 (DOCS-IF-MIB) DOCSIS cable status and statistics. Tested with Cisco uBR. =item * RFC2737 (ENTITY-MIB) Used to retrieve information about chassis and temperature sensors in Cisco devices. =item * RFC2790 (HOST-RESOURCES-MIB) Server CPU, memory, and disk statistics. Tested with net-snmp and MS Windows. =item * RFC2863 (IF-MIB) Generic network interface statistics from C and C. Most servers and network devices support this MIB. Featuring custom vendor-dependent indexing and interface type/name filtering. Tested with many different vendors. =back =head2 Vendor-specific SNMP monitoring =over =item * Alcatel-Lucent ESS 7450: full support for SAP, Services and Customer for VPLS services. ISAM: line termination statistics for various LT boards. The module is only available under NDA because of Alcatel-Lucent MIB privacy policy. =item * Alteon content switches Application switching and performance statistics. =item * Allied Telesyn PBC18 Media converter Reports the line status for the manageable modular media converter. =item * Arbor Networks Provide statistics for Arbor eSeries devices. (e30, e100) =item * APC PowerNet and NetBotz Prvide statistics for various environment sensors and power meters. =item * Ascend MAX Provides statistics for analog and ISDN interfaces, and the total number of lines used. =item * Atmel wireless access points and bridges Privides link quality and traffic statistics for wireless devices. The discovery process would run very slow unless you specify the following parameter in the discovery instructions XML: =item * AxxessIT Ethernet over SDH switches (aka Cisco ONS 15300) The module arranges the Ethernet interface statistics with such information as slot/port mapping and interface descriptions. =item * BetterNetworks EthernetBox The discovery module detects active sensors in an EthernetBox sensor module. =item * Brocade (Foundry) A variety of Foundry switches and routers is supported for memory, CPU, and temperature statistics. =item * CASA Systems CMTS Modem quantities per upstream, downstream, MAC domain. =item * Cisco CatOS Memory, CPU, and temperature information. Per-interface statistics may be limited to the ports with description only. =item * Cisco IOS Provides per-interface traffic statistics; CPU, memory, and temperature information; I/O buffer statistics; IPSec traffic information; SAA agents statistics; cbQoS monitoring (implemented in a separate plugin); DOCSIS uBR-specific variables (modem quantities and channel utilization); CISCO-ENHANCED-MEMPOOL-MIB (linecards and VIP modules memory, see notes below); MAC accounting statistics (associated with BGP AS numbers when applicable); LRE and VDSL line statistics; BGP prefix counts (http://tinyurl.com/y3ganv); CAR statistics; VPDN Statistics; 3G cellular statistics. B On Cisco 7500, IOS version 12.0(26)S2 or 12.0(26)S3, CISCO-ENHANCED-MEMPOOL-MIB polling causes memory leak and leads to the router crash (Bug ID CSCef53395). The problem is fixed in IOS versions 12.0(26)S5, 12.0(27)S3, 12.0(28)S2, and 12.0(30)S. =item * Cisco PIX Firewall Firewall performance statistics. =item * Cisco SCE Service Control Engine performance statistics. =item * Compaq Insite Manager Temperature and memory health information statistics for Compaq servers. =item * Comtech EF Data Satellite modem statistics. =item * Empire (Concord) SystemEDGE Provides lots of statistics and information that a SystemEDGE agent may provide about the server health and performance. =item * Force10 Networks CPU, Temperature and Power supply statistics. =item * Jacarta iMeter Humidity, Temperature, Electric current meters. =item * Juniper JunOS Class of service, firewall, operating environment, reverse path forwarding, and interface statistics. =item * Liebert HVAC systems Temperature, humidity and system state sensors =item * Microsoft Windows 2000/XP Sets up proper interface indexing and provides FTP and HTTP server statistics. =item * Motorola BSR CMTS (ex-Riverdelta) Displays modem quantities. =item * NetApp.com storage products Storage arrays performance and health information. =item * NetScreen Firewall Firewall performance statistics. =item * Oracle Database engine statistics. =item * Paradyne GranDSLAM xDSL statistics and line status. =item * Symmetricom NTP appliance NTP clock statistics =item * UCD SNMP and Net-SNMP Memory, CPU, and disk usage information. =item * Xylan ethernet switches Port indexing for OmniSwitch and OmniStack ethernet switches. =back =head1 Author Copyright (c) 2004-2005 Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/Makefile.in0000644000175000017500000005600712413220736012544 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } 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 = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(dist_devdoc_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in 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) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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 -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(devdocdir)" "$(DESTDIR)$(pkgdocdir)" DATA = $(dist_devdoc_DATA) $(nodist_pkgdoc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ FIND = @FIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KILL = @KILL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ 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@ PERLCRITIC = @PERLCRITIC@ PERLINC = @PERLINC@ POD2MAN = @POD2MAN@ POD2TEXT = @POD2TEXT@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SLEEP = @SLEEP@ STRIP = @STRIP@ SU = @SU@ VERSION = @VERSION@ 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__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cachedir = @cachedir@ cfgdefdir = @cfgdefdir@ datadir = @datadir@ datarootdir = @datarootdir@ dbhome = @dbhome@ defrrddir = @defrrddir@ distxmldir = @distxmldir@ docdir = @docdir@ dvidir = @dvidir@ enable_pkgonly = @enable_pkgonly@ enable_varperm = @enable_varperm@ exec_prefix = @exec_prefix@ exmpdir = @exmpdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mansec_misc = @mansec_misc@ mansec_usercmd = @mansec_usercmd@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ perlithreads = @perlithreads@ perllibdir = @perllibdir@ perllibdirs = @perllibdirs@ piddir = @piddir@ pkgbindir = @pkgbindir@ pkgdocdir = @pkgdocdir@ pkghome = @pkghome@ plugdevdisccfgdir = @plugdevdisccfgdir@ pluginsdir = @pluginsdir@ plugtorruscfgdir = @plugtorruscfgdir@ plugwrapperdir = @plugwrapperdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ reportsdir = @reportsdir@ sbindir = @sbindir@ scriptsdir = @scriptsdir@ seslockdir = @seslockdir@ sesstordir = @sesstordir@ sharedstatedir = @sharedstatedir@ siteconfdir = @siteconfdir@ sitedir = @sitedir@ sitexmldir = @sitexmldir@ srcdir = @srcdir@ supdir = @supdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tmpldir = @tmpldir@ tmpluserdir = @tmpluserdir@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ torrus_user = @torrus_user@ var_group = @var_group@ var_mode = @var_mode@ var_user = @var_user@ varprefix = @varprefix@ webplaindir = @webplaindir@ webscriptsdir = @webscriptsdir@ wrapperdir = @wrapperdir@ SUBDIRS = . manpages SUBST = @abs_top_builddir@/setup_tools/substvars.sh CLEANFILES = $(POD_FILES) $(nodist_pkgdoc_DATA) EXTRA_DIST = $(SRCPOD) SRCPOD = \ install.pod.in \ nodeid_usage.pod.in \ reporting_setup.pod.in \ rpnexpr.pod.in \ rrfw_torrus_migration.pod.in \ scalability.pod.in \ snmpdiscovery.pod.in \ stylingprofile.pod.in \ userguide.pod.in \ vendorsupport.pod.in \ webintf.pod.in \ xmlconfig.pod.in POD_FILES = \ install.pod \ nodeid_usage.pod \ reporting_setup.pod \ rpnexpr.pod \ rrfw_torrus_migration.pod \ scalability.pod \ snmpdiscovery.pod \ stylingprofile.pod \ userguide.pod \ vendorsupport.pod \ webintf.pod \ xmlconfig.pod @POD2TEXT_PRESENT_TRUE@nodist_pkgdoc_DATA = \ @POD2TEXT_PRESENT_TRUE@ install.txt \ @POD2TEXT_PRESENT_TRUE@ nodeid_usage.txt \ @POD2TEXT_PRESENT_TRUE@ reporting_setup.txt \ @POD2TEXT_PRESENT_TRUE@ rpnexpr.txt \ @POD2TEXT_PRESENT_TRUE@ rrfw_torrus_migration.txt \ @POD2TEXT_PRESENT_TRUE@ scalability.txt \ @POD2TEXT_PRESENT_TRUE@ snmpdiscovery.txt \ @POD2TEXT_PRESENT_TRUE@ stylingprofile.txt \ @POD2TEXT_PRESENT_TRUE@ userguide.txt \ @POD2TEXT_PRESENT_TRUE@ vendorsupport.txt \ @POD2TEXT_PRESENT_TRUE@ webintf.txt \ @POD2TEXT_PRESENT_TRUE@ xmlconfig.txt devdocdir = $(pkgdocdir)/devdoc dist_devdoc_DATA = \ devdoc/architecture.pod \ devdoc/devdiscover.pod \ devdoc/progstyle.pod \ devdoc/reqs.0.0.pod \ devdoc/reqs.0.1.pod \ devdoc/torrus_roadmap.pod SUFFIXES = .pod.in .pod .txt all: all-recursive .SUFFIXES: .SUFFIXES: .pod.in .pod .txt $(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) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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_devdocDATA: $(dist_devdoc_DATA) @$(NORMAL_INSTALL) @list='$(dist_devdoc_DATA)'; test -n "$(devdocdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(devdocdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(devdocdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(devdocdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(devdocdir)" || exit $$?; \ done uninstall-dist_devdocDATA: @$(NORMAL_UNINSTALL) @list='$(dist_devdoc_DATA)'; test -n "$(devdocdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(devdocdir)'; $(am__uninstall_files_from_dir) install-nodist_pkgdocDATA: $(nodist_pkgdoc_DATA) @$(NORMAL_INSTALL) @list='$(nodist_pkgdoc_DATA)'; test -n "$(pkgdocdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdocdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdocdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdocdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdocdir)" || exit $$?; \ done uninstall-nodist_pkgdocDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_pkgdoc_DATA)'; test -n "$(pkgdocdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgdocdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(devdocdir)" "$(DESTDIR)$(pkgdocdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dist_devdocDATA install-nodist_pkgdocDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-dist_devdocDATA uninstall-nodist_pkgdocDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic ctags \ ctags-recursive distclean distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am \ install-dist_devdocDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-nodist_pkgdocDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-dist_devdocDATA uninstall-nodist_pkgdocDATA .PRECIOUS: $(POD_FILES) .pod.in.pod: $(SUBST) $< > $@ @POD2TEXT_PRESENT_TRUE@.pod.txt: @POD2TEXT_PRESENT_TRUE@ $(POD2TEXT) $< > $@ htdocs: $(POD_FILES) cd manpages; make pods HTMLDIR=@abs_top_builddir@/../htdocs $(SHELL) mkhtdocs.sh # 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: torrus-2.08/doc/webintf.pod.in0000644000175000017500000002651712413217640013251 00000000000000# webintf.pod - Torrus web interface reference # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 Torrus Web Interface Reference B This documentation is relevant to Torrus version 1.0.9. It is incompatible with previous versions. =head2 HTTP Server configuration Torrus WebUI supports mod_perl and FastCGI as server engines. FastCGI was introduced in Torrus version 1.0.9, and it is the preferred way of setting up Torrus user interface. =head3 lighttpd with FastCGI handler Install FastCGI on your server, and also F Perl module from CPAN. Add user "lighttpd" to group "torrus" (this depends on the user name that is used for lighttpd in your OS). The following configuration creates a virtual host, so that any URL which starts with "tor" would result in Torrus display: # Uncomment mod_redirect and mod_fastcgi. Other modules might be needed too. server.modules = ( "mod_redirect", "mod_fastcgi", ) # virtual server configuration $HTTP["host"] =~ "^tor" { url.redirect = ( "^/$" => "/torrus" ) fastcgi.server = ( "/torrus" => ( "Torrus" => ( "socket" => "/tmp/Torrus_FCGI.socket", "check-local" => "disable", "bin-path" => "@pkgbindir@/torrus.fcgi", "max-procs" => 2, ) ) ) } =head3 Apache 2.0.x with FastCGI handler As of version 1.0.9, Torrus supports the FastCGI server module. It is also often used together with B HTTP server. The following is an example of a virtual host with four FastCGI child processes DocumentRoot "/var/www/vhosts/test01.torrus.net" ServerName test01.torrus.net AddHandler fastcgi-script fcgi FastCgiServer @pkgbindir@/torrus.fcgi \ -processes 4 ScriptAlias /torrus "@pkgbindir@/torrus.fcgi" Order Allow,Deny Allow from all =head3 mod_perl 1.0 handler: Torrus::ApacheHandler For more documentation, see Ehttp://perl.apache.org/E. The whole output generation is performed by the C class. However, you still need access to the F directory where your CSS resides. Typical Apache configuration would look like follows. Make sure your configuration does not contain tab characters: PerlRequire "@cfgdefdir@/webmux.pl" SetHandler perl-script PerlHandler Torrus::ApacheHandler =head3 mod_perl 2.0 handler: Torrus::Apache2Handler Make sure you use C and C in your configuration. C directive should give better performance than C. Both Perl handlers work the same way with Torrus. Typical Apache 2.0 configuration follows: PerlRequire "@cfgdefdir@/webmux2.pl" SetHandler perl-script PerlResponseHandler Torrus::Apache2Handler =head2 CSS Stylesheets Additional user-defined stylesheet files may be used with Torrus WebUI. The global configuration variable C<%Torrus::Renderer::styling> defines the stylesheets for various output media ('default', 'printer' for printer-friendly output, and 'report' for monthly traffic HTML reports). By editing F, additional stylesheets can be added as C values. An absolute URI pointing to the additional CSS file is required, for example: $Torrus::Renderer::styling{'default'}{'cssoverlay'} = '/mystyle.css'; =head2 Cache files All generated HTML and graphical images are cached twice: first on the server, and then in your browser. Thus, if you change somehow the HTML appearance of your Torrus installation, you need to clean both caches. The command C would clean the Torrus cache. In addition, you may need to clean your browser's cache. =head2 Site configuration options The following variables can be set in your F<@siteconfdir@/torrus-siteconfig.pl> file: =over 4 =item * C<$Torrus::Renderer::companyName> The text that you specify here will appear in the top left corner of all HTML pages. =item * C<$Torrus::Renderer::companyURL> The company name text will be clickable with the URL specified in this variable. =item * C<$Torrus::Renderer::rendererURL> Default: C<'/torrus'>. A URL that points to Torrus renderer. =item * C<$Torrus::Renderer::plainURL> Default: C<'/torrus/plain'>. A URL that points to Torrus plain files directory. Normally CSS stylesheet files are resided there. =item * C<$Torrus::CGI::authorizeUsers> Default: C<1>. When true, the web interface users are required to log in. =back =head2 Known CGI parameters The following CGI parameters are recognized by mod_perl handler: =over 4 =item token Optional. Each configuration tree element is referenced by a I, a short unique identifier. If not given, the root of the tree (C) is displayed. =item path Optional. Alternatively to token reference, the full path of the tree element may be referenced. =item nodeid Optional. A subtree which has a unique I can be referred with this parameter. =item view Optional. Specifies the C name for displaying the tree element. If not specified, the defaul view is used. =item v Optional. Synonym for C parameter. =item hostauth Mandatory for host-based authentication. The value is treated as a password and the user name is the client's IP address with non-alphanumerics replaced with underscores. =item TZ Optional. If given, specifies the timezone that you want the graphs to be displayed for. This must be the URL-encoded zone name which is understood by your server system. You may use zdump(8) for testing. =item NOW Optional. If given, presents the output for the given moment, instead of the current time. Must be of the form understood by C (see RRDTool manuals). =item Gstart, Gend, Gwidth, Gheight, Gimgformat, Gborder Optional vaiables that override the ones defined in the view. Gborder is only supported in RRDtool version 1.3.9 or higher. =item Gmaxline If set to a true value, the renderer tries to draw the maximum value alongside with the average. The aggregation period is 1 day unless specified by C. Single-line graphs are all displayed immediately with the maximum line. Multigraphs require C and C parameters to be defined in order for the maximum line to be properly displayed. =item Gmaxlinestep Aggregation period, in seconds, for the maximum line. If the variable is not specified, the line displays daily maximums. =item Gcolors Graph colors, overriding the C view parameter. This variable defines the values for the C<--color> options in RRD Graph command. The value is an even number of color tags and color values, separated by colon (:). For example, "BACK:00FFFF:FONT:AA55DD" corresponds to an ugly cyan background and magenta text. =item DEBUG Optional. If true, turns on the debug level of logging. The debug messages are sent to HTTP server's error log. =item SHOWHIDDEN Optional. If true, makes the grapher display those subtree and leaves which have C parameter set to C. =item NOHW Optional. If true, disables the displaying of Holt-Winters boundaries and failures. =item LOGOUT Optional. When user authorization is enabled, causes the current user session to log out. =back All other parameters whose name starts with capital letter, are passed to the HTML template as-is, and may be used for your custom purposes. =head2 RPC interface The RPC interface is designed for external systems to retrieve Torrus data. The RPC calls are done via URL parameters, and the returned data is in JSON format. The resulting data size cannot exceed the security limit (by default, 100 items). The view C is responsible for returning RPC data. The following CGI parameters are recognized: =over 4 =item * RPCCALL The RPC call to execute. This is a mandatory parameter. Below see the list of supported values. =item * GET_PARAMS Optional comma-separated list of datasource leaf parameters that are going to be retrieved from the configuration tree. C<@Torrus::Renderer::RPC::default_leaf_params> in F defines the list of parameters that are always queried, and GET_PATAMS would add parameter names to that list. Several parameter names, such as I, are blacklisted because of security concern. =item * PRETTY Optional. If set to 1, the resulting JSON data is sorted and formatted for human reading. =back The following RPC calls are supported: =over 4 =item * WALK_LEAVES This RPC call walks down the tree from the node specified by the URL, and returns all the leaves with their respective parameters. In addition to parameters, the entry C presents the path information in the datasource tree. =item * AGGREGATE_DS This RPC call is applicable to any datasource leaf with "leaf-type" set to "rrd-def". It fetches the average and maximum values for a given period. The URL parameters C and C are used to define the time interval. Returned data is a map of the following keys and values: =over 8 =item * START, END Unix timestamps of the calculated time interval. =item * AVG, MAX Average and maximum values calculated for the given interval. =item * AVAIL Percentage of time for which the data is not NaN. Accuracy of this value depends on the time interval and RRA's being used to produce the value. Consolidated RRA's may already screen out some unavailable data samples. =back =item * TIMESERIES This RPC call retrieves the numerical data for a leaf, and returns it in tabular form. In addition to standard URL parameters, C and C are supported as described in I manual page. The returned data contains also "rrgraph_args" map element, which presents the arguments for RRD Tool rrgraph command. =item * SEARCH_NODEID This RPC call performs a prefix search for I values among all leaves in the tree. The prefix string is expected in C CGI argument. The call returns the same data format as WALK_LEAVES. =back The return data is a JSON map with the following keys: =over 4 =item * success If the value is nonzero, the RPC call was successful. =item * error In case of a failure, this value returns athe error string. =item * data This is a map of objects, with datasource tokens as keys. Each object represents the data as specified by the RPC call. =back =head1 Author Copyright (c) 2002-2011 Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/userguide.pod.in0000644000175000017500000010167511642656034013615 00000000000000# userguide.pod - Torrus user guide # Copyright (C) 2003 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 Torrus User Guide =head2 Quick start guide The steps below will explain you how to make the thing running. B. Follow the I document, all prerequisits and necessary steps are described there. B. The executables reside in F<@pkgbindir@/>. You normally don't need to access this directory, because the commandline wrapper, C, is installed in a usual execution path (F<@bindir@>). All site-specific behaviour is controlled by configuration files in F<@siteconfdir@/>. Usually you need to change F only. In this file, you must list your XML configuration sources. The datasource trees configuration is read out of XML files. They are searched in several directories, normally F<@distxmldir@/> and F<@sitexmldir@/>. The first one contains files that come with Torrus distribution, and the second one is for your local site-specific XML files. Global site-specific XML configuration parameters may be defined in F. XML configuration is compiled into internal database representation by C command. The database itself is resided in F<@dbhome@/>, and must be writable by your Apache server (normally the installer takes care of it). It is safe to re-compile the configuration while the Torrus daemons are running. B. Torrus configuration consists of a number of I. Each tree is independent from the others. A tree may run one Collector and one Monitor process. Also the web interface access control lists differentiate the user rights by datasource trees. B. A tree defines the hierarchy of Torrus datasources. The structure of the tree is solely defined by XML configuration files. The tree consists of I, each being either a I or a I. Subtrees contain child subtrees and/or leaves. The leaf represents a datasource: normally this is a numerical value that changes over time. The leaf is the entity that may be presented as a graph. There are leaves of special type: I. They are not numerical values, and are designed for drawing several values in one graph. Each node has I, a string that consists of slashes and node names, and uniquely identifies this node. The path of a subtree always ends with slash, and the root of the tree has the path consisting of a single slash. B. The trees are defined in F. See I for a basic example of tree configuration. B. Currently only one type of data storage is supported: Round-robin database (RRD) files. See I manuals for more details. Each leaf represents a datasource stored in an RRD file. Of course, several leaves may refer to different datasources within the same RRD file. Even more, more than one leaf may refer to the same datasource within an RRD file. RRD files are created and updated either by C, or by some other external programs. B. If you only want to collect SNMP counters from some network devices' interfaces, there's a couple of tools called C and C. The first one creates a basic discovery instructions file, and the second one uses the discovery instructions to explore the SNMP device capabilities and information: interface names, input/output counters, CPU and memory usage, temperature sensors (for Cisco devices), and many other vendor-specific statistics sources. Torrus is much more than just an SNMP collector. So, when you decide to use it in a more advanced way, you will have to read the whole bit of this guide, and also I and probably some other documents too. B. By default, C will put all your devices into one hierarchy: ChostnameE/...>. The subtree name, C, may be changed with a command line option of C. This program may also read the device names (or IP addresses in case if you don't use DNS) from space-delimited text files. torrus genddx \ --hostfile=myrouters.txt \ --domain=example.net \ --community=MySecretSNMPCommunity \ --out=myrouters.ddx \ --discout=myrouters.xml \ --subtree=/My_Routers \ --datadir=/data1/torrus/collector_rrd torrus genddx \ --hostfile=myswitches.txt \ --domain=example.net \ --community=MySecretSNMPCommunity \ --out=myswitches.ddx \ --discout=myswitches.xml \ --subtree=/My_Switches \ --datadir=/data1/torrus/collector_rrd torrus devdiscover --in=myrouters.ddx torrus devdiscover --in=myswitches.ddx In the example above, the routers' and switches' names are read from F and F in the user's current directory. They form a hierarchy with two subtrees: C and C. C creates the discovery instruction XML files into F and F accordingly. By default, you would find them in F<@sitedir@/discovery/>. The result of C is the Torrus configuration files: F and F, placed into F<@sitexmldir@/>. The C will place the RRD files into F. Make sure that this directory exists, has enough free space, and is writable by C user. B the C utility is designed as a one-time helper, so that you create your basic discovery instructions files from scratch. Further on, the discovery files should be maintained separately. Another useful utility is called C. It can be used to generate a DDX file from a template and a list of SNMP hosts. It is very useful if you want to monitor many devices of similar type or function. You can also define a I file in your DDX file. C will create it after all devices would discovered, and it will contain EincludeE statements for all XML files. This makes it practical to use one XML file per SNMP host, and use the bundle file for inclusion in the tree configuration. B. For each tree, F<@siteconfdir@/torrus-siteconfig.pl> lists the XML files that have to be compiled for it. In the example above, you would add F and F into C array in the tree configuration. See I for more details on how C and C interact and how you can customize the discovery process. B: in most cases, your hierarchy division will be different. It might be arranged by geographical locations, or by customer names. There is a configuration statement that allows you to include other XML files into configuration, thus giving you a big flexibility in building the data hierarchies. B. After the XML configuration is prepared, you need to execute the compiler: torrus compile --tree=treename --verbose For most of the processes that you run within Torrus, you need to specify the tree name with C<--tree> option. Some programs accept C<--all> option, which causes them to process all existing trees. With C<--verbose> option, the compiler tells you about the files being processed, and about some other actions that may take quite a long time. It will also tell you if there's any error in your configuration. B. The search database is updated by executing the following command: torrus bs --global --verbose For users that are allowed to display all the trees, you can enable the global search across all trees: torrus acledit --addgroup=staff --permit=GlobalSearch --for='*' B. Assuming that compilation went smoothly, you may now launch the data collector: torrus collector --tree=treename Without additional options, the collector will fork as a daemon process, and write only error messages in its log file, F<@logdir@/collector.treename.log>. There is a file that is created by C<./configure>, called F. You may place it into a directory where your system looks for startup scripts (F on Solaris and some Linuxes, F on FreeBSD). Probably you need to rename and edit the script before using. Note that it also executes another daemon, C. The C daemon is used for monitoring the thresholds in the data files. For more details, see the I, in the section about monitor definitions. B. By default, user authentication is enabled in the web interface. You can change this by setting C<$Torrus::CGI::authorizeUsers = 0> in your F. In order to get use of user authentication, you need to create I and I accounts. Each user belongs to one or more groups, and each group has access to a set of datasource trees. See I for a basic example. B. Provided that you followed the installation guide to the end, and your HTTP server is running, your Torrus hierarchy must be visible with your favorite web browser. =head2 Configuration guidelines In complete detail, the XML configuration is described in I. The guidelines below will help you to read that document. B. The tree structure is defined by the structure of CsubtreeE> and CleafE> XML elements. The rule is simple: child XML elements of a CsubtreeE> element define the child nodes in the configuration tree. B. Each node has a number of parameters. They are defined by CparamE> XML element. Parameters are inherited: the child node has all its parent's parameters, some of which may be overridden. B. The whole XML configuration is additive. It means that you may define your subtree several times across your XML configuration, and the new parameters and child nodes will be added to previously defined ones. B. Some pieces of configuration may be written as templates, and then re-used in multiple places. The C utility generates one large XML file back from the compiled configuration. Its main purpose is backup of the configuration, but it can also be used for studying the relationships between templates and input files. =head2 Handling SNMP errors During SNMP discovery process, some SNMP devices may not be reachable. By default, C reports the error, and does not write the output XML file containing that device. It also skips writing the bundle files that contain the output file affected. When C is executed with C<--forcebundle> option, the bundle files are written, and the output files related to the unreachable devices are skipped from the bundles. This ensures that we always get a configuration that may compile and run the collector. Another option, C<--fallback=DAYS>, if given together with C<--forcebundle>, tells the discovery engine to reuse old XML files if the related SNMP devices are not reachable and the files are not older than DAYS. If an SNMP device is unreachable by the moment of the collector initialization, the collector reports the error and waits for a period of time specified in C<$Torrus::Collector::SNMP::unreachableRetryDelay>, which is 10 minutes by default. It then tries to reach the device with the specified retry interval during some period of time, defined in C<$Torrus::Collector::SNMP::unreachableTimeout>, by default 6 hours. If the device is not available within the specified timeout, it is excluded from collection. It would be tried again on collector initialization only (at the collector process start or after recompiling the configuration). If a device is not reachable during the normal collector running cycle, it is retried in every collector's cycle (usually every 5 minutes), during the period defined in C<$Torrus::Collector::SNMP::unreachableTimeout>. It will be then excluded from configuration after the timeout. If a device hardware configuration changes after the C execution, the collector may not find some values in SNMP tables, such as interface names in ifTable. It then excludes such datasources from collection immediately. =head2 Tips and tricks =head3 Comments, descriptions, and legends C will extract some useful information from your SNMP devices, and place it in the XML configuration: =over 4 =item * Interface descriptions The value of the SNMP variable C (C<1.3.6.1.2.1.31.1.1.1.18>) will be used as interface comment. In Cisco IOS, this is controlled by C interface configuration command. =item * Location and contact Two other SNMP values: C (C<1.3.6.1.2.1.1.6.0>) and C (C<1.3.6.1.2.1.1.4.0>) will be used in the legend text for each device. In Cisco IOS, their values are controlled by C and C global configuration commands. =back =head3 Grouping the datasources alternatively In most cases, you would want to have several different groupings of your datasources. For instance, the default C gives only one level of freedom: the subtree name above the host level. It's reasonable to use this name for grouping by geographical location . Thus, the hierarchy would be characterised as C. Let's say you would like to have alternative grouping, such as: =over 4 =item * by customer connection: Each customer is identified by name, and you'd like to see statistics for all interfaces connected to a given customer; =item * by service: Your network is designed to provide various services, and you'd like to group your devices or interfaces by service; =item * by customer and location: For each customer, group the connection by geographical location. =back Torrus provides three different ways for organising your datasources: =over 4 =item * Aliases. With CaliasE> statement, you can add symbolic names to your nodes. If the new alias is defined as a reference to non-existing subtree, the new subtrees are created. Alias is only a symbolic link: when you click to the alias name in your browser, Torrus redirects it to the real datasource in its normal subtree. See the example in I. =item * ds-type=rrd-file You can create a leaf in some arbitrary place of your hierarchy that points to an existing RRD file. This RRD file may be updated by other datasource in your hierarchy. The advantage of such approach is that this leaf may have its own I and I parameters, alternative view parameters, etc. Switch name: rtr01; Interface: Fa0/1; In the example above, this leaf is defined somewhere in the hierarchy. It refers to the RRD file updated by Torrus SNMP collector. For more examples, see the template I in F. =item * Tokensets Tokenset is an arbitrary collection of datasource leaves. It is characterised by its name and description. There are two ways to add a leaf to a tokenset: by the parameter I, or by defining a monitor action. A tokenset is normally displayed in compact form: by default, 6-hour graphs are put by two in a row. =back =head3 Amending autogenerated XML files with XUpdate Sometimes there is a need to modify the configuration generated by C. Modifying the generated XML files by hand would not be a good option: it would need some manual work every time you update your hardware setup. A better approach would be to have the tools that would automate such configuration update. One of the possibilities for such automation would be XSLT Ehttp://www.w3.org/TR/xsltE. But it's rather complicated task to use XSLT for slight changes in XML files. A good approach has been made by XUpdate Working Group Ehttp://www.xmldb.org/xupdate/E. Their Working Draft document describes a language for XML editing commands. It allows to perform small updates to an existing XML document, like insertion of elements, updating of existing elements, or deleting. The only drawback is that the specification hasn't been updated since September 2000, and it contains some unclear statements, which make it difficult to implement compatible applications. In addition, there has been not enough efforts to adopt XUpdate as a W3C standard. However, this is the only kind-of-a-standard language for such tasks as XML editing commands. Thanks to Petr Pajas, there is an XUpdate implementaytion in Perl. C module is available at CPAN, and it installs a small commandline utility, C. In addition, Petr has created a set of utilities integrated into a single shell wrapper: Ehttp://xsh.sourceforge.netE. It is very useful for many different things, such as XPath expressions testing, and many others. A typical XUpdate instructions file would looke like follows: This file was modified with XUpdate script setmonitor.xupdate.xml ifErrors This example is part of Torrus distribution, and the file is named F. Your commands to apply these XUpdate instructions would be like torrus devdiscover --in=routers.ddx --out=routers.xml cd @sitexmldir@ xupdate -j @exmpdir@/setmonitor.xupdate.xml \ routers.xml > routers1.xml More XUpdate examples will be included in the future. =head3 Extracting the configuration skeleton Another aproach to amending the autogenerated confguration is as follows. Torrus distribution has a special-purpose XSLT template, F, designed to strip all parameters and template applications from a given XML configuration, and leave the tree structure only. Given that F is some autogenerated configuration, you may run xsltproc @scriptsdir@/xml/extract-skeleton.xsl routers.xml | \ xmllint --format --output routers-skeleton.xml - You can add your changes to the new file, F, and add it to your Torrus configuration. These changes may be performed manually or by means of XUpdate technique described above. =head3 Automating XML generation It is quite common task that you want Torrus to monitor certain set of devices, and C does not (yet) support them. Of course, it's quite a pain to maintain a manually written XML file, especially if the there are more than one devices of the same type. In such case you may benefit from the approach suggested by Christian Schnidrig: Imagine you have 50 I which are able to speak SNMP and which you would like to put into some Torrus tree structure. A good designer's approach would be to keep the data and the presentation separately. In addition, changing the presentation once would produce 50 changes accordingly. To do that, let's create two files: F and F. The first one would contain data about our devices: [% gizmos = [ { name => 'atwork' color => 'blue', location => 'Javastrasse 2, 8604 Hegnau' description => 'My gizmo @ Sun' community => 'blabla', hands => [ {name => 'Left'} {name => 'Right'} ], } { name => 'athome' color => 'gray', location => 'Riedstrasse 120, 8604 Hegnau' description => 'My gizmo @ Home' community => 'blabla', hands => [ {name => 'Upper'} {name => 'Lower'} ], } ] %] Then F would contain the XML template that would produce the Torrus configuration file: [% PROCESS $data %] [% FOREACH g = gizmos %] /ByName/[% g.name %]/ Description: [% g.description %] Location: [% g.location %] [% FOREACH h=$g.hands %] [% END %] See F and F for a more useful example of the described approach. At the end, you will generate the Torrus config with the C utility, which is the standard part of Template-Toolkit package: tpage --define data=gizmos.data gizmos.tmpl > gizmos.xml =head3 Several Torrus instances on one server Sometimes it is necessary to have a separate instance of Torrus for testing purposes on the same server as the production installation. In the example below, a completely autonomous installation of Torrus is installed in F directory on a FreeBSD system. =over 4 =item * Directory structure All files are located in subdirectories of F. No other directories are affected. This ensures that deinstallation would be easy and safe. Four subdirectories are created: =over 8 =item * F This directory contains Apache HTTP daemon configuration and logs. Create 3 subdirectories here: F, F, and F. =item * F This is the installation directory of Torrus. =item * F Directory for configuration files. =item * F Directory for logs, database and PID files. =item * F Collector will store RRD files here. =item * F Distribution files will be stored and unpacked here. =back =item * Installation procedure cd /usr/testtorrus/src gzip -dc torrus-1.0.0.tar.gz | tar xvf - cd torrus-1.0.0 ./configure pkghome=/usr/testtorrus/home \ sitedir=/usr/testtorrus/etc \ logdir=/usr/testtorrus/var/log \ piddir=/usr/testtorrus/var/run \ varprefix=/usr/testtorrus/var \ wrapperdir=/usr/testtorrus make install =item * Devdiscover configuration Use devdiscover as usual. Place your discovery instruction files in F, and make sure that C is set to F. =item * Apache configuration We reuse the same binaries and libraries as the main installation of Apache, but the daemon is launched with our special configuration. We assume that Apache is pre-configured for mod_perl. SSL support is not included in this example, but it's quite straightforward to implement if you need it. Create a copy of F and place it in F. With a text editor, replace the configutration options with the values given below: # Leave server root as it was in the original config. Apache uses # it for modules loading ServerRoot "/usr/local" # make sure that everything that apache writes # goes into our directories PidFile /usr/testtorrus/apache/var/httpd.pid ScoreBoardFile /usr/testtorrus/apache/var/httpd.scoreboard # Optional: limit the memory and CPU impact MinSpareServers 2 MaxSpareServers 5 StartServers 3 MaxClients 10 # We open our HTTP service on TCP port 8123. Choose other # port if this one is occupied Port 8123 # Not really necessary, but you might want to use it someday DocumentRoot "/usr/testtorrus/apache/htdocs" # Find the Directory options for the old htdocs, and # replace the path if you changed DocumentRoot above ... some default stuff here ... # Make sure the logs are written where we expect them to. ErrorLog /usr/testtorrus/apache/var/httpd-error.log CustomLog /usr/testtorrus/apache/var/httpd-access.log combined # TCP port number as above NameVirtualHost *:8123 # Quite standard virtual server configuration. Replace fake # domain names with your real ones. ServerAdmin root@myserver.com DocumentRoot /usr/testtorrus/home/web ServerName torrus.myserver.com CustomLog /usr/testtorrus/apache/var/torrus.myserver.com.log "combined" PerlModule Apache::PerlRun PerlRequire "/usr/testtorrus/home/conf_defaults/webmux.pl" Alias /plain/ "/usr/testtorrus/home/sup/webplain" SetHandler perl-script PerlHandler Torrus::ApacheHandler SetHandler default-handler Options None =item * Apache startup script Save the following script as F: #!/bin/sh case "$1" in start) /usr/local/sbin/httpd -f /usr/testtorrus/apache/etc/httpd.conf && \ echo 'apache started' ;; stop) [ -r /usr/testtorrus/apache/var/httpd.pid ] && \ kill `cat /usr/testtorrus/apache/var/httpd.pid` && \ echo 'apache stopped' ;; *) echo "Usage: `basename $0` {start|stop}" >&2 ;; esac exit 0 =back =head3 Changing the default short graph The default small graph in overviews and tokenset listings shows last 6 hours of data. It might be more convenient for you to graph last 24 hours, or even longer. To do so, you only need to change one parameter, C. You may change it on the top of the datasource tree, or even only for some parts of the tree. In F, there's a view defiition called C. It is exactly the same size as the 6-hours' C view, but it shows 24-hour graph. Somewhere in Torrus configuration, you may have: last24h-small,last24h,lastweek,lastmonth,lastyear The best place for this would be F. =head3 Watching the collector failures There is a script in Torrus distribution in F, which provides a simple way of telling if the collector runs right: it checks the modification time of RRD files, and if any file is older than given threshold, it sends an e-mail warning. Copy the script file to some place in your system and edit it so that it fits your requirements: you might want to change the maximum age parameter (default is 1 hour), the notification e-mail address, and the directory paths where to look for RRD files. Then I it so that it's executable, and add it to I. Depending on your operation requirements, it might run every hour, or few times a day, or even at business hours only. The script writes the number of aged files in the e-mail subject, and lists the file names in the body. In case of relatively large installation, you might want to amend the script, in order to avoid too large email messages. =head3 Viewing external RRD files Some external program may create its own RRD files, and you may want to display and monitor them in Torrus. Also some collector-generated RRDs may become outdated -- for example, after a module is removed from a router, and the interface counters not being updated any more. The easiest way to use such files would be to utilize the C command. It generates the XML configuration file that represents all RRD files found in a given directory. It can also scan the directory recursively. See also few examples in Torrus distribution. There are some templates for use with Smokeping, OpenNMS, and Flowscan. =head2 Torrus usage scenarios =head3 Scenario 1. Netflow Traffic Analyser Cisco routers are capable of exporting the traffic statistics data in I UDP packets. A I or I daemon collects Netflow packets into flow files. I software analyses the flow files and stores the statistics into numerous RRD files. Torrus is used to monitor the thresholds and diplay the graphs in convenient form. =head3 Scenario 2. Backbone Traffic Statistics I or I software is used to provide the list of all devices in the network. Torrus's C buids the XML configuration to monitor the router interfaces, CPU and memory usage, and temperature sensors. Data importing scripts generate configuration for alternative grouping of the datasources: by location; by customer connection; by device type; by service type; etc... =head2 Troubleshooting guidelines =head3 SNMP Error: Received tooBig(1) For some devices, the collector may issue the following error messages: [27-May-2004 10:15:17*] SNMP Error for XX.XX.XX.XX:161:public: Received tooBig(1) error-status at error-index 0 For better performance, SNMP collector sends several SNMP requests in one UDP datagram. The SNMP agent then tries to send the reply to all requests in a single datagram, and this error indicates the failure. In most cases, this is caused by the agent software limitations or bugs. The number of requests per datagram is controlled by the parameter C, and it may be set in the discovery input XML or in Torrus configuration XML. The default value is 40, and setting it to 10 generally works. =head3 Database lock troubleshooting It may happen sometimes, that a process accessing Torrus database terminates incorrectly, and the database becomes blocked. A typical symptom of this is that the command C does not print anything and stays running forever, occupying zero percent of CPU. The nice, and the preferred way to solve the problem is to use C utility from BerkeleyDB package. The brutal way is just to remove the databases and re-compile all the configuration. I The ACL database is not automatically backed up, and you need to take care of its backup before deleting the contents of the database. ## The nice way uses BerkeleyDB db_recover ## (might be located in /usr/local/BerkeleyDB.4.1/bin/) /etc/init.d/apache stop /etc/init.d/torrus stop db_recover -h @dbhome@ torrus compilexml --verbose --all /etc/init.d/torrus start /etc/init.d/apache start ## The brutal way /etc/init.d/apache stop /etc/init.d/torrus stop cd @dbhome@ rm -r * torrus compilexml --verbose /etc/init.d/torrus start /etc/init.d/apache start =head3 Gaps in the graphs after re-compiling the tree Starting from Torrus release 1.0.9, the collector tries to refresh its SNMP name-to-index mappings soon after the re-compilation of the tree. This is done in order to catch up faster with new physical or logical interfaces on the network devices. By default, the collector schedules the refresh of its maps randomly within 1800 seconds (controlled by C<$Torrus::Collector::SNMP::mapsUpdateInterval>). In some occasions, this period is too short and needs an increase in F. Possible causes are: =over 4 =item * longer collecting period (15 minutes instead of 5) =item * too many devices in the tree =item * devices are too slow-responding or network latency is too big =back =head1 Author Copyright (c) 2002-2011 Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/0000755000175000017500000000000012413221022012327 500000000000000torrus-2.08/doc/manpages/torrus_genreport.pod.in0000644000175000017500000000432511661302716017025 00000000000000# Copyright (C) 2007 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME genreport - Generate the Usage Report =head1 SYNOPSIS B --report=I --date=I [I] B --genhtml [I] =head1 DESCRIPTION When the Torrus Reporting engine is set up, this command is used to generate the reports from the collected data. See I for more information. =head1 OPTIONS =over 4 =item B<--report>=I The name of the report that is to be generated. Currently supported: C. =item B<--date>=I Specifies the start date of the reported period. For the monthly report, this should be any day within the calendar month. =item B<--time>=I Specifies the start time of the reported period. This option is ignored for the monthly reports. =item B<--genhtml> Instructs the report engine to build the HTML output from the generated reports. =item B<--tree=TREE> When used with C<--genhtml>, generates the HTML reports only for the specified tree. =item B<--all2tree=TREE> When used with C<--genhtml>, generates the HTML reports only for all available service IDs in the specified tree. =item B<--verbose> Prints extra informatgion. =item B<--debug> Prints debugging information. =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_configsnapshot.pod.in0000644000175000017500000000753211661302716020050 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME configsnapshot - Generates a configuration snapshot for a Torrus tree. =head1 SYNOPSIS B --tree=I [I] =head1 DESCRIPTION This command generates a configuration snapshot from current datasources for tree I. The output is an XML file, ready for compilation, representing all datasources, monitors and tokensets of a given tree. The snapshot does not include view definitions. Templates and file patterns are expanded inside the file. It does not require any other XML configuration files, except for F and your custom view definitions. B C from RRFW release 0.1.5 will not work correctly with databases from previous releases. Use RRFW release C<0.1.4bf2> instead. C utility from RRFW release 0.1.4bf2 does not preserve aliases. This utility is useful in Torrus upgrade process. In case when RRD files structure is changing in Torrus default templates, and user(s) demand to preserve the historical data, the following steps could be done: =over 4 =item * Stop the collector and monitor processes. =item * Install newest Torrus software and do not run C immediately. =item * Create snapshots of the trees that you want to preserve for historical reasons: torrus configsnapshot --tree=myrouters \ --out=@sitexmldir@/myrouters-snapshot.xml =item * If needed, move the existing RRD files into different directory. Then change the C parameters in the snapshot XML accordingly. =item * Create a new tree with only the snapshot file in it. Compile the tree. =item * At this stage, it is up to the user to decide wether to continue running the collector and monitor daemons for this new tree. The old data may be preserved for historical reference, and collector may be run with the newest tree structure and definitions. =back =head1 OPTIONS =over 4 =item B<--tree>=I Mandatory parameter specifying the tree name. =item B<--out>=I Sets the output file to I. Default is F. =item B<--param>=I B<--value>=I Sets the filter on datasource leaves that have to be included in the snapshot. I specifies the name of the datasource parameter, and I sets the matching value. By default the numeric comparison is performed. =item B<--op>=I Sets the fiter comparison operator. Accepted values: B<=> (numeric), B (text string comparison), and B (regular expression match). Default is numeric comparison. =item B<--verbose> Displays some extra information. =item B<--help> Displays a help message. =back =head1 FILES =over 4 =item F<@distxmldir@/defaults.xml> XML configuration file with default settings for the datasources and tokensets, as well as default view definitions. =item F Default B output file. =back =head1 SEE ALSO L, L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/Makefile.in0000644000175000017500000003464612413220736014344 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } 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 = : build_triplet = @build@ host_triplet = @host@ subdir = doc/manpages DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in 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) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ FIND = @FIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KILL = @KILL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ 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@ PERLCRITIC = @PERLCRITIC@ PERLINC = @PERLINC@ POD2MAN = @POD2MAN@ POD2TEXT = @POD2TEXT@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SLEEP = @SLEEP@ STRIP = @STRIP@ SU = @SU@ VERSION = @VERSION@ 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__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cachedir = @cachedir@ cfgdefdir = @cfgdefdir@ datadir = @datadir@ datarootdir = @datarootdir@ dbhome = @dbhome@ defrrddir = @defrrddir@ distxmldir = @distxmldir@ docdir = @docdir@ dvidir = @dvidir@ enable_pkgonly = @enable_pkgonly@ enable_varperm = @enable_varperm@ exec_prefix = @exec_prefix@ exmpdir = @exmpdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mansec_misc = @mansec_misc@ mansec_usercmd = @mansec_usercmd@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ perlithreads = @perlithreads@ perllibdir = @perllibdir@ perllibdirs = @perllibdirs@ piddir = @piddir@ pkgbindir = @pkgbindir@ pkgdocdir = @pkgdocdir@ pkghome = @pkghome@ plugdevdisccfgdir = @plugdevdisccfgdir@ pluginsdir = @pluginsdir@ plugtorruscfgdir = @plugtorruscfgdir@ plugwrapperdir = @plugwrapperdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ reportsdir = @reportsdir@ sbindir = @sbindir@ scriptsdir = @scriptsdir@ seslockdir = @seslockdir@ sesstordir = @sesstordir@ sharedstatedir = @sharedstatedir@ siteconfdir = @siteconfdir@ sitedir = @sitedir@ sitexmldir = @sitexmldir@ srcdir = @srcdir@ supdir = @supdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tmpldir = @tmpldir@ tmpluserdir = @tmpluserdir@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ torrus_user = @torrus_user@ var_group = @var_group@ var_mode = @var_mode@ var_user = @var_user@ varprefix = @varprefix@ webplaindir = @webplaindir@ webscriptsdir = @webscriptsdir@ wrapperdir = @wrapperdir@ SUBST = @abs_top_builddir@/setup_tools/substvars.sh EXTRA_DIST = $(SRCPOD) CLEANFILES = $(PODMAN) $(POD_FILES) SRCPOD = \ torrus.pod.in \ torrus_acledit.pod.in \ torrus_action_notify.pod.in \ torrus_action_printemail.pod.in \ torrus_action_snmptrap.pod.in \ torrus_buildsearchdb.pod.in \ torrus_cleanup.pod.in \ torrus_clearcache.pod.in \ torrus_collector.pod.in \ torrus_compilexml.pod.in \ torrus_configinfo.pod.in \ torrus_configsnapshot.pod.in \ torrus_devdiscover.pod.in \ torrus_flushmonitors.pod.in \ torrus_genddx.pod.in \ torrus_genlist.pod.in \ torrus_genreport.pod.in \ torrus_install_plugin.pod.in \ torrus_monitor.pod.in \ torrus_nodeid.pod.in \ torrus_rrddir2xml.pod.in \ torrus_schedulerinfo.pod.in \ torrus_snmpfailures.pod.in \ torrus_srvderive.pod.in \ torrus_ttproclist.pod.in POD_FILES = \ torrus.pod \ torrus_acledit.pod \ torrus_action_notify.pod \ torrus_action_printemail.pod \ torrus_action_snmptrap.pod \ torrus_buildsearchdb.pod \ torrus_cleanup.pod \ torrus_clearcache.pod \ torrus_collector.pod \ torrus_compilexml.pod \ torrus_configinfo.pod \ torrus_configsnapshot.pod \ torrus_devdiscover.pod \ torrus_flushmonitors.pod \ torrus_genddx.pod \ torrus_genlist.pod \ torrus_genreport.pod \ torrus_install_plugin.pod \ torrus_monitor.pod \ torrus_nodeid.pod \ torrus_rrddir2xml.pod \ torrus_schedulerinfo.pod \ torrus_snmpfailures.pod \ torrus_srvderive.pod \ torrus_ttproclist.pod PODMAN = \ torrus.@mansec_usercmd@ \ torrus_acledit.@mansec_usercmd@ \ torrus_action_notify.@mansec_misc@ \ torrus_action_printemail.@mansec_misc@ \ torrus_action_snmptrap.@mansec_misc@ \ torrus_buildsearchdb.@mansec_usercmd@ \ torrus_cleanup.@mansec_usercmd@ \ torrus_clearcache.@mansec_usercmd@ \ torrus_collector.@mansec_usercmd@ \ torrus_compilexml.@mansec_usercmd@ \ torrus_configinfo.@mansec_usercmd@ \ torrus_configsnapshot.@mansec_usercmd@ \ torrus_devdiscover.@mansec_usercmd@ \ torrus_flushmonitors.@mansec_usercmd@ \ torrus_genddx.@mansec_usercmd@ \ torrus_genlist.@mansec_usercmd@ \ torrus_genreport.@mansec_usercmd@ \ torrus_install_plugin.@mansec_misc@ \ torrus_monitor.@mansec_usercmd@ \ torrus_nodeid.@mansec_usercmd@ \ torrus_rrddir2xml.@mansec_usercmd@ \ torrus_schedulerinfo.@mansec_usercmd@ \ torrus_snmpfailures.@mansec_usercmd@ \ torrus_srvderive.@mansec_usercmd@ \ torrus_ttproclist.@mansec_usercmd@ SUFFIXES = .pod.in .pod all: all-am .SUFFIXES: .SUFFIXES: .pod.in .pod $(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) --gnu doc/manpages/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/manpages/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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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): tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(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 installdirs: 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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." @POD2MAN_PRESENT_FALSE@install-data-local: 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-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: 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: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am 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 uninstall uninstall-am @POD2MAN_PRESENT_TRUE@install-data-local: $(POD_FILES) @POD2MAN_PRESENT_TRUE@ for f in $(PODMAN); do \ @POD2MAN_PRESENT_TRUE@ base=`echo $$f | sed -e 's/\\.[0-9a-zA-Z]*$$//'`; \ @POD2MAN_PRESENT_TRUE@ ext=`echo $$f | sed -e 's/^.*\\.//'`; \ @POD2MAN_PRESENT_TRUE@ instdir=$(DESTDIR)$(mandir)/man$$ext; \ @POD2MAN_PRESENT_TRUE@ echo BASE=$$base EXT=$$ext INSTDIR=$$instdir; \ @POD2MAN_PRESENT_TRUE@ $(POD2MAN) --section=$$ext \ @POD2MAN_PRESENT_TRUE@ --release="$(PACKAGE_STRING)" --center=torrus \ @POD2MAN_PRESENT_TRUE@ $$base.pod > $$f || exit 1; \ @POD2MAN_PRESENT_TRUE@ test -d $$instdir || $(mkinstalldirs) $$instdir || exit 1; \ @POD2MAN_PRESENT_TRUE@ $(INSTALL_DATA) $$f $$instdir; \ @POD2MAN_PRESENT_TRUE@ rm $$f; \ @POD2MAN_PRESENT_TRUE@ done .PRECIOUS: $(POD_FILES) .pod.in.pod: $(SUBST) $< > $@ pods: $(POD_FILES) # 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: torrus-2.08/doc/manpages/torrus_compilexml.pod.in0000644000175000017500000000457611661302716017201 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME compilexml - Torrus XML configuration (re)compiler. =head1 SYNOPSIS B --tree=I [I] =head1 DESCRIPTION This command compiles the Torrus's XML configuration for the tree I. It does not require any other processes to be restarted after the configuration is changed. Renderer's cache is automatically flushed on on the next Renderer's run. Monitor automatically resets on the next monitoring cycle. All dynamic tokensets in the given tree are emptied. =head1 OPTIONS =over 4 =item B<--all> Instructs to compile configuration for all trees. =item B<--nods> Instructs to compile non-datasource configuration only. =item B<--noval> Disables all validation of the XML configuration. This speeds up the compilation up to 2 times, while adding a risk to end up with an unusable configuration. In addition, the first initialization cycle of Collector and Monitor in this case would be much longer. =item B<--force> Normally the compiler would fail to start if another compiler process is already running for the specific tree. In case of abnormal function, the running status of the previous pcompiler may stay in the database. This option forces the compiler to continue even if if sees the presence of another process. =item B<--debug> Sets the log level to debug. =item B<--verbose> Sets the debug level to info. =item B<--help> Displays a help message. =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_acledit.pod.in0000644000175000017500000001200611661302716016420 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME acledit - Manage Torrus access control lists (ACLs). =head1 SYNOPSIS B [I] =head1 DESCRIPTION This command manages the Torrus access control lists. Each user is identified by user ID, and has a set of attributes. Currently supported attributes are C (common name) and C (MD5 digest of the user's password). Each user belongs to one or several groups. Each group has its own set of privileges. A privilege is identified by privilege name and object name. Currently only one privilege name is supported: C, and the object name is the name of the tree that this group is allowed to browse. User authorization in the web interface is controlled by the C<$Torrus::CGI::authorizeUsers> variable in F. =head1 GROUP MANAGEMENT OPTIONS =over 4 =item B<--addgroup>=I Creates a new group with the given name. =item B<--delgroup>=I Deletes the group with the given name. =item B<--modgroup>=I Modifies the given group. =item B<--permit>=I Grants privilege to group(s). Currently supported privileges are: C for displaying a datasource tree, and C for displaying the administrative information (all significant parameters for a given datasource leaf). =item B<--deny>=I Revokes group(s) privilege. =item B<--for>=I Object for which privileges are granted or revoked. Currently it must be the name of the tree for which the C and C privilegs are granted or revoked. The asterisk (*) instead of the object name assigns the privilege for all objects. =back =head1 USER MANAGEMENT OPTIONS =over 4 =item B<--adduser>=I Creates a new user with the given user ID. =item B<--addhost>=I Creates a new user for host-based authentication. I should be an IPv4 or IPv6 address of the HTTP client. The new username is the address with all non-alphanumeric characters replaced with underscores. Host password is changed by <--hostpassword> option. =item B<--deluser>=I Deletes user with the given user ID. =item B<--moduser>=I Modifies the user attributes for the given user ID. =item B<--addtogroup>=I Adds user to the given group. =item B<--delfromgroup>=I Deletes user from the given group. =item B<--password>=I Sets user's password. =item B<--hostpassword>=I Sets the password for host-based authentication. The HTTP client should add C parameter with the password as a value. =item B<--cn>=I Sets user's common name. =item B<--showuser>=I Displays information for a given user. =back =head1 GENERAL OPTIONS =over 4 =item B<--export>=I Exports ACL configuration to a given file. =item B<--template>=I Uses the given template file when exporting. Default value is F. =item B<--import>=I Imports ACL configuration from the given file. =item B<--clear> Deletes all user and privileges configuration. =item B<--list> Lists all users and groups they belong to. =item B<--debug> Sets the log level to debug. =item B<--verbose> Sets the log level to info. =item B<--help> Displays a help message. =back =head1 EXAMPLES torrus acledit --addgroup=staff --permit=DisplayTree \ --for=main --for=thecustomer torrus acledit --adduser=jsmith --password=mysecretpassword \ --cn="John Smith" --addtogroup=staff torrus acledit --addgroup=admin --permit=DisplayTree --for='*' This example creates a group I and gives all its members the permission to browse the datasource trees I
and I. The next command creates a user I and addts it to this group. The user name will be displayed as I, and it will be let in with the given password. The third command creates a group I which is allowed o browse all existing trees. =head1 FILES =over 4 =item F<@siteconfdir@/torrus-siteconfig.pl> Torrus site configuration script. =item F<@tmpldir@/aclexport.xml> Default template for the exports of ACL configuration. =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_buildsearchdb.pod.in0000644000175000017500000000353711661302716017617 00000000000000# Copyright (C) 2007 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME buildsearchdb - Build the search database =head1 SYNOPSIS B I =head1 DESCRIPTION This command indexes the Torrus configuration objects and builds the search index database. One of the three options B<--tree>, B<--all> or B<--global> is required. =head1 OPTIONS =over 4 =item B<--tree>=I Build the indexes for a given tree. =item B<--all> Builds the tree indexes for all trees. =item B<--global> Builds the global index for all trees and also the tree indexes for every tree. In order to use the global search database, the web user should have the permission to display all trees and also it should have the permission for GlobalSearch for all trees, for example: torrus acledit --addgroup=staff --permit=GlobalSearch --for='*' =item B<--verbose> Prints extra information =item B<--help> Displays a help message. =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_snmpfailures.pod.in0000644000175000017500000001005011661302716017520 00000000000000# Copyright (C) 2010 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME snmpfailures - Displays SNMP collector failures. =head1 SYNOPSIS B --tree=I [I] =head1 OPTIONS =over 4 =item B<--details> In addition to failure counters, list the failed SNMP hosts and the time stamps of failure events. =item B<--help> Displays a help message. =back =head1 DESCRIPTION This utility prints the SNMP collector failure information in JSON format. Without B<--details> option, it prints only the failure counters. Upon collector startup or after the tree re-compilation, the failure counters are reset to zero. The output is very convenient for further automatic processing in any scripting language. The top level of the output is a JSON object with the following name/value pairs: =over 4 =item B: NUMBER Displays the number SNMP hosts that are currently unreachable. The number adds up across multiple collector instances for a given tree. If a host becomes reachable again, the number is decreased. =item B: NUMBER Displays the number SNMP hosts that are completely removed from SNMP collection for the life cycle of the collector process. This happens when a host is unreachable for too long time and the collector gives up to reach it again. The number adds up across multiple collector instances for a given tree. =item B: NUMBER Displays the number of MIB errors (I, I, and I) during the collector life cycle. The number adds up across multiple collector instances for a given tree. =item B: OBJECT, B: OBJECT If the option B<--details> is specified, these objects contain the host names and timestamps of the failures. The keys are contactenations of SNMP host, UDP port, and SNMP community separated by "|". The values are objects representing the UNIX timestamp and a human-readable time string. =item B: OBJECT If the option B<--details> is specified, this object displays the MIB error details: for each SNMP host, it lists the datasource leaves which had these errors and the event timestamps. =back =head1 EXAMPLES The following example illustrates an SNMP host unreachable: torrus failures --tree=main --details { "detail_deleted" : {}, "detail_mib_errors" : {}, "detail_unreachable" : { "217.101.101.101|161|public" : { "time" : "Fri Jul 23 14:15:10 2010", "timestamp" : 1279887310 } }, "total_deleted" : 0, "total_mib_errors" : 0, "total_unreachable" : 1 } The following example illustrates a MIB error: torrus failures --tree=main --details { "detail_deleted" : {}, "detail_mib_errors" : { "217.101.102.102|161|public" : { "count" : 1, "nodes" : { "/Routers/CMTS3/Temperature_Sensors/sensor_01" : { "time" : "Fri Jul 23 15:26:14 2010", "timestamp" : 1279891574 } } } }, "detail_unreachable" : {}, "total_deleted" : 0, "total_mib_errors" : 1, "total_unreachable" : 0 } =head1 SEE ALSO L, =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_action_snmptrap.pod.in0000644000175000017500000000511411661302716020216 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME action_snmptrap, action_snmpv1trap - Scripts for sending SNMP traps (version 2c and 1 respectively) from monitor action. C is obsolete as the preferred SNMP version is 2c. =head1 SYNOPSIS =head1 DESCRIPTION This program is designed for usage from a monitor action only. It takes the arguments from environment variables, as described in action-type C in B. In addition, some values may be supplied via command-line arguments (see section OPTIONS below). Site-specific variables must be specified in the file F. Default values are installed by the first run of C. Subsequent runs of C do not override this file. =head1 OPTIONS =over 4 =item B<--host>=I Sets the hostname of the destination host. =item B<--community>=I Sets the community string to use when sending the trap. =item B<--port>=I Sets the destination UDP port. =item B<--enterprise>=I Sets the C field of the SNMPv1 trap to a given OID (see RFC 1157 for more details). This option is only available for C and will be ignored for C. =item B<--severity>=I Sets the optional severity SNMP variable to some integer value. =back =head1 FILES =over 4 =item F<@siteconfdir@/snmptrap-siteconfig.pl> Torrus site configuration script for SNMP traps. =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_nodeid.pod.in0000644000175000017500000000555111661302716016264 00000000000000# Copyright (C) 2010 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME nodeid - Torrus utility =head1 SYNOPSIS B --tree=I --cmd=CMD I =head1 DESCRIPTION This command provides a way to integrate Torrus with external OSS systems. It operates with I, a unique identifier for Torrus datasource subtrees and leaves. The command prints the data on the standard output in JSON data format. =head1 OPTIONS =over 4 =item B<--tree=TREE> [Mandatory] Defines the datasouerce tree. =item B<--cmd=CMD> [Mandatory] Defines the action command. The following commands are supported: =over 8 =item * info Prints information about the nodeid. Requires B<--nodeid>. =item * search Performs a prefix or substring search on node IDs and prints the results. Requires B<--prefix> or B<--substring>. =item * render Renders a specified datasource node and prints the resulting MIME type and the file name. Requires B<--nodeid> and B<--view>. Optional B<--out> defines a file name to copy the output to. =back =item B<--nodeid=NODEID> Specifies the Node ID string for the commands I and I. =item B<--details> Toggles verbose output for the commands I and I. =item B<--prefix=STR> Specifies the prefix search string for the command I. =item B<--substring=STR> Specifies the search substring for the command I. =item B<--view=VIEW> Specifies the view name for the command I. The following views are defined by standard Torrus XML files and render a PNG graph: C, C, C, C, C, C. The following views are printing the datasource value in a text format: C, C. =item B<--out=FILE> If defined, instructs the utility to copy the rendered data into a specified file. Otherwise the file is created in the standard renderer's cache directory. =item B<--help> Displays a help message. =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus.pod.in0000644000175000017500000000424511661302716014741 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME torrus - Commandline wrapper for Torrus utilities =head1 SYNOPSIS B I [I] =head1 DESCRIPTION All Torrus utilities use this common command-line wrapper, which simply passes all arguments to the appropriate utility. Accepted commands: =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back =head1 OPTIONS Refer to approproate manpages for options for each Torrus command. =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_ttproclist.pod.in0000644000175000017500000001055411661302716017230 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME ttproclist - Process a template with a nodelist =head1 SYNOPSIS B --tmpl=I --out=I --nodes=I [I] =head1 DESCRIPTION This command takes a Template-Toolkit template and a list of nodes (usually SNMP devices) as input. The output file is a result of template substitution, according to the specified options. Command-line options B<--tmpl>, B<--out> and B<--nodes> are mandatory. This utility can be used to generate the discovery instructions XML out of a predefined template and a dynamically generated list of devices. Alternatively, it can produce Torrus XML configuration for a given list of objects, etc. The following variables are predefined when the template is processed: =over 4 =item * C Hash array of nodes. Hash keys are the node names. Values are symbolic names. If symbolic names are not defined, values are the same as keys. =item * C Hash array of command-line parameters given in B<--param> option. =item * C, C Informative variables. They can be used to produce the creation note in the resulting files. C returns the file name of nodes, and C returns a detailed information how the file was generated, with timestamp and command line options. =back =head1 OPTIONS =over 4 =item B<--tmpl>=I The file name of the input template. Relative names are looked in the current directory and in F<@tmpluserdir@>. The file name may also be an absolute path. =item B<--out>=I Output file name. If no absolute path given, the file is written in the current directory. =item B<--nodes>=I The name of the nodes list. Nodes should be separated by space or tab character or newline. Additional information, referred to as symbolic name, can be supplied after a colon, of the form NODENAME:SYMBOLICNAME. =item B<--param>=I List of optional parameters that may be used in the template. =back =head1 EXAMPLES The following example gerenates C input file from a template. The template is as follows: >>> usual DDX parameters here, like SNMP community and data-dir >> This loop generates per-host entries [% FOREACH n = nodes.keys.sort %] [% END %] >>> Generate the bundle file, so that you need only one >>> entry in torrus-site-config.pl The following command would generate F from template file F as described above. The file F is a list of SNMP devices, one per line. Then C is launched with F as input. Note also the short form of the command line wrapper. torrus ttproclist --tmpl=MY.ddtmpl \ --nodes=MY.nodes \ --out=/usr/local/etc/torrus/discovery/MY.ddx \ --param=BUNDLE:MYNODES torrus dd --in=MY.ddx --verbose In addition, you may put some common parameters in Template BLOCK statement in a separate file, and INCLUDE it in your templates. See the Template-Toolkit documentation for more detail. =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 SEE ALSO Template-Toolkit documentation: http://template-toolkit.org/ L, L =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_schedulerinfo.pod.in0000644000175000017500000001017411661302716017651 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME schedulerinfo - Displays extended scheduler tasks information. =head1 SYNOPSIS B --tree=I [I] =head1 DESCRIPTION This utility displays the extended scheduler tasks information for tree I on standard output. This might be useful for scheduler planning and analysis. =head1 OPTIONS =over 4 =item B<--config> Reports scheduler's configuration. The values are explained below. =over 8 =item Total collector/monitor leaves: I Total number of datasources being processed by collector or monitor daemon. =item Scheduled leaves by type Torrus supports arbitrary number of collector types, and this report shows how many datasources belong to every type. Currently the monitor leaves are not divided into types. =item Least common period: I seconds The report below shows how the tasks are distributed across the time line, and the least common period shows the period of this time line. =item Tasks execution timeline This report tells which task and how many datasources are involved in each task startup event, and how these events are dispersed across the time. The column I shows the time interval from each task execution event to the next event on the timeline. =back =item B<--runtime> Reports scheduler's runtime statistics, such as running cycle times, late starts etc. The meaning of the output values is as follows. Values that have zero values are usually not printed. =over 8 =item Task: I, Period: I seconds, Offset: I seconds Each scheduler task is characterized by its name (usually Collector or Monitor), period, and timeoffset. Fore example, if period is set to 300 seconds, and offset is 14 seconds, then the task would be executed at 00:00:14, 00:05:14, 00:10:14, and so on for every hour in a day. =item I running cycles passed How many times the task was executed since last reset. The counter is normally reset after L successfully compiles the configuration. =item I late starts How many times the task has started with a delay from its normal schedule. =item I too long runs How many times the task execution time was longer than its period. =item I overrun periods How many periods have been missed because of too long executions. =item I missed periods How many periods were missed because of any reason (such as other tasks delaying). =item Min, Max, Average, Exp Average The time values are displayed in four columns: Mimimum, Maximum and Average values since last reset, and Exponential decay value, which may be interpreted as the average for last several values. With defaults defined in F, 95% of the average is calculated from last 3 values. =item Running Time How long the task executes each period. =item Late Start How long the task start was delayed. =item Too Long How much time the too long run took. =item RRD Queue In a multithreaded environment, the RRD files are writen in a background thread. This value shows the length of the RRD update queue at the beginning of each update cycle. =back =item B<--help> Displays a help message. =back =head1 SEE ALSO L, L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_action_notify.pod.in0000644000175000017500000000602411661302716017663 00000000000000# Copyright (C) 2006 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME action_notify - Generic notification handler for Torrus monitor =head1 SYNOPSIS $TORRUS_BIN/action_notify =head1 DESCRIPTION This program is designed for usage from a monitor action only. It takes the arguments from environment variables, as described in action-type C in B. The handler reads its configuration from , a small Perl file which defines the notification paths for various conditions. Example: %Torrus::Notify::programs = ( 'mailto' => '$TORRUS_BIN/action_printemail | /usr/bin/mail $ARG1', 'page' => '/usr/bin/echo $TORRUS_NODEPATH:$TORRUS_MONITOR ' . '>> /tmp/monitor.$ARG1.log' ); %Torrus::Notify::policies = ( 'CUST_A' => { 'match' => sub { $ENV{'TORRUS_P_notify_policy'} eq 'A' }, 'severity' => { '3' => [ 'mailto:aaa@domain.com', 'mailto:bbb@domain.com' ], '5' => [ 'page:1234', 'mailto:boss@domain.com' ] } } ); In this example, we define two message handlers: e-mail sender and a dummy replacement for a pager program. Then we define the notification policies. For the customer I, we define the policy so that the parameter C should match the name C. The parameter is defined in the datasource tree and marks only those leaves that belong to this customer. Then, depending on the monitor severity, different notification paths are defined. For severity values higher or equal 3, aaa@domain.com and bbb@domain.com will receive the email notifications, and for severity higher than or equal 5 all recipients will receive the notification. The C argument is a Perl subroutine, and can depend on various parameters, such as time of day or day of the week, the tree name, and so on. =head1 FILES =over 4 =item F<@siteconfdir@/notify-siteconfig.pl> Notification policies configuration =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_action_printemail.pod.in0000644000175000017500000000514211661302716020517 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME action_printemail - A script for sending email from monitor action. =head1 SYNOPSIS $TORRUS_BIN/action_printemail | mail alarms@example.com =head1 DESCRIPTION This program is designed for usage from a monitor action only. It takes the arguments from environment variables, as described in action-type C in B. In addition, some values may be supplied via command-line arguments (see section OPTIONS below). Site-specific variables must be specified in the file F. Default values are installed by the first run of C. Subsequent runs of C do not override this file. =head1 OPTIONS =over 4 =item B<--url>=I Sets the URL of the grapher CGI script. =item B<--template>=I Uses given file as a template. The template file must reside in @tmpldir@ directory. It must be a Template-toolkit file, with the following variables defined: tree Tree name token Leaf token path Leaf path url URL for browsing this leaf ncomment This leaf comment npcomment Leaf's parent comment event Event type monitor Monitor name mcomment Monitor comment timestamp Time and date of the event env(VAR) Environment variable VAR =back =head1 FILES =over 4 =item F<@siteconfdir@/email-siteconfig.pl> Torrus site email configuration script. =item F<@tmpldir@> =item F<@tmpluserdir@> Torrus template directories. =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_install_plugin.pod.in0000644000175000017500000000276111661302716020046 00000000000000# Copyright (C) 2007 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME install_plugin - Installs the Torrus plugin =head1 SYNOPSIS B I =head1 DESCRIPTION This command installs a Torrus plugin. Prior to executing this command, unpack the plugin package into some directory, and then point C to the path of the unpacked plugin distribution. The command would launch the C<./configure> script for the plugin and supply all options that specify the current Torrus installation paths. Then it would execute C and C. =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_configinfo.pod.in0000644000175000017500000000243311661302716017137 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME configinfo - Displays useful statistics for all Torrus trees. =head1 SYNOPSIS B =head1 DESCRIPTION This command displays information on all available Torrus trees, including the names of the trees, counts of leaves, subtrees, views, monitors and actions, and other information. =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_cleanup.pod.in0000644000175000017500000000251011661302716016441 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME cleanup - Cleans up Torrus web session data. =head1 SYNOPSIS B =head1 DESCRIPTION This command cleans out the expired (older than 2 days) Torrus web interface session data. =head1 FILES =over 4 =item F<@sesstordir@> Torrus session data storage directory. =item F<@seslockdir@> Torrus session data lock directory. =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_devdiscover.pod.in0000644000175000017500000000567311661302716017344 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME devdiscover - Performs SNMP discovery and generates Torrus XML configuration file. =head1 SYNOPSIS B [--in=I] [I] [I] =head1 DESCRIPTION B performs SNMP discovery using the I for the discovery instructions. It generates a corresponding Torrus XML configuration file. See B for details. The generic input file, or device discovery XML (DDX), may be generated by the B utility, and then edited and maintained manually. Multiple input files may be specified by several instances of I<--in> option, or simply as arguments. Input file name is searched in the current directory, and then in F<@sitedir@/discovery/>. =head1 OPTIONS =over 4 =item B<--mkdir> Creates C directories. =item B<--limit>=I Limits the discovery to the output files matching the regular expression I. =item B<--forcebundle> With this option enabled, C will write the bundle file even if some of the bundle members were not created because of errors. =item B<--fallback>=I Requires B<--forcebundle>. In case if an SNMP device is not available, the bundle file will include an older version of the XML output file, provided that it exists and it is not older than the specified number of days. =item B<--threads>=I If the threads are enabled in the local Perl, this option determins how many parallel discovery threads are to be executed. The discovery jobs are distributed per output files, thus it makes sence to use threads only when there are many output files defined in a single DDX file. =item B<--verbose> Prints extra information. =item B<--debug> Prints debugging information. =item B<--snmpdebug> Prints SNMP protocol details =back =head1 FILES =over 4 =item F<@siteconfdir@/devdiscover-siteconfig.pl> B site configuration file. =back =head1 SEE ALSO L, L(@mansec_usercmd@) =head1 NOTES See I for more details at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_rrddir2xml.pod.in0000644000175000017500000000600111661302716017102 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME rrddir2xml - Searches a directory for RRD files and generates Torrus XML configuration file. =head1 SYNOPSIS B --dir=I [I] =head1 DESCRIPTION B searches in a given directory for RRD files and creates Torrus XML configuration file suitable for browsing ofthose data files. With default options, it is usable for RRD files generated by Torrus' SNMP collector, where the file name starts with the host name, separated by underscore from interface name or other MIB specifics. With these defaults, it creates a subtree per each host name, and all RRD files belonging top that host name are sorted alphabetically in that subtree. =head1 OPTIONS =over 4 =item B<--dir>=I Absolute path to the directory for searching. The directory may contain also non-RRD files. Only regular files are processed, and the symlinks are ignored. =item B<--recursive> If specified, the directory will be searched recursively. All file names across all subdirectories must be unique. Symlinks to other directories are ignored. =item B<--filter>=I If the filter is specified, then B lists only those files and subdirectories whose names match the given regular expression. =item B<--out>=I Output XML file name. If relative path given, the file is placed in F<@sitexmldir@>. Default: F. =item B<--subtree>=I Top subtree path in the generted XML. Default is the top of the tree (C). =item B<--split>=I Regular expression used for splitting the file name into parts to build the subtree hierarchy. Default is a sequence of underscores (C<_+>). =item B<--levels>=I Number of levels of hierarchy to build by splitting the file names. Default is 2 levels. =item B<--comment>=I Text to put as C parameter to the top subtree. =item B<--holtwinters> If specified, Holt-Winters prediciton boundaries and failures are displayed in the graphs. =item B<--verbose> Prints extra diagnosics. =item B<--debug> Prints debugging information. =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_monitor.pod.in0000644000175000017500000000436611661302716016514 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME monitor - Torrus Monitor. =head1 SYNOPSIS B --tree=I [I] =head1 DESCRIPTION This command starts the Monitor process for the tree I. By default it forks into a daemon, sets the log output file to F<@logdir@/monitor.TREENAME.log>, performs one monitoring cycle, and sleeps until the next cycle is scheduled. In daemon mode the log file can be reopened by sending it a SIGHUP signal. =head1 OPTIONS =over 4 =item B<--nodaemon> Prevents the process from becoming a daemon and sets the log to STDERR. =item B<--runonce> Instructs the script to run once and exit. Implies B<--nodaemon>. =item B<--delay=N> Makes the daemon sleep for N minutes before starting the first cycle. This would happen on the daemon startup and also after each configuration recompilation. For example, when monitor and collector start simultaneously, the collector needs some time to retrieve the data being monitored. =item B<--debug> Sets the log level to debug. =item B<--verbose> Sets the debug level to info. =item B<--help> Displays a help message. =back =head1 FILES =over 4 =item F<@siteconfdir@/torrus-siteconfig.pl> Torrus site configuration script. =item F<@logdir@/monitor.TREENAME.log> Monitor's log for the tree I. =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_clearcache.pod.in0000644000175000017500000000226511661302716017073 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME clearcache - Clears the Torrus Renderer's cache. =head1 SYNOPSIS B =head1 DESCRIPTION This program clears Torrus Renderer's cache. It is intended for debugging purposes only. =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_genddx.pod.in0000644000175000017500000000743411661302716016275 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME genddx - Generates SNMP discovery instructions file for B =head1 SYNOPSIS B --host=I | --hostfile=I \ [I] =head1 DESCRIPTION B generates the SNMP discovery instructions file, which may be later used as input for the B utility to produce the corresponding Torrus XML configuration file. The hostname(s) of router(s) to be included in SNMP discovery must be specified either using the B<--host> (for a single router) or B<--hostfile> option. In the latter case the file I must contain a space-separated list of router hostnames. Hostnames may have the form C where C is a symbolic device name. This utility is designed to be used only once, in order to generate the discovery XML canvas, for futher manual editing. It generates only basic set of parameters, and there are much more of those that you may use to customize the discovery process. See L for a more flexible and complex DDX generator. More information is available in B. =head1 OPTIONS =over 4 =item B<--out>=I Sets the output file to I. Default is F. Without absolute path, the file will be placed in F<@sitedir@/discovery>. =item B<--discout>=I Sets the discovery output file to I. This will be the filename of the Torrus XML configuration file once the output file of the B is processed by the B utility. Default value is F. Without absolute path, the file would be resided in F<@sitexmldir@>. =item B<--domain>=I Sets the DNS domain name to I. =item B<--version>=I Sets discovery SNMP version to SNMPVERSION. Default value is C<2c>. =item B<--community>=I Sets discovery SNMP read community value to string I. Default is C. =item B<--port>=I Sets SNMP port to I. Default is 161. =item B<--retries>=I Sets number of retries to I. Default value is 2. =item B<--timeout>=I Sets SNMP timeout to I seconds. Default value is 10. =item B<--subtree>=I Sets the subtree name to I. Default is C. =item B<--datadir>=I Sets the path of the directory where SNMP data is collected to I. Default value is F<@defrrddir@>. =item B<--holtwinters> Enables Holt-Winters analysis. =back =head1 FILES =over 4 =item F<@sitedir@/discovery/routers.ddx> Default output file of genddx. =item F<@sitexmldir@/routers.xml> Default Torrus XML configuration file which will be written once the genddx output file is processed with devdiscover utility. =back =head1 SEE ALSO L, L, L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_genlist.pod.in0000644000175000017500000000326511661302716016467 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME genlist - Lists Torrus objects =head1 SYNOPSIS B --tree=I [I] =head1 DESCRIPTION This command generates a listing of objects in Torrus configuration tree I. Currently it lists the RRD files only. =head1 OPTIONS =over 4 =item B<--path>=I Sets the subtree path to I. Default values is "/". =item B<--what>=I Includes items I in the listing. Currently only "rrdfiles" is a supported item. =item B<--type>=I Sets selection type. Currently supported values are "collector" (Collector leaves), "readonly" (read-only leaves) and "all" (this also happens to be default value). =item B<--help> Displays a help message. =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_srvderive.pod.in0000644000175000017500000000540711661302716017033 00000000000000# Copyright (C) 2007 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME srvderive - Derive a new service ID from sum or maximum of other service values =head1 SYNOPSIS B I I I I... =head1 DESCRIPTION When the Torrus Reporting engine is set up, this command is used to combine several services data into a new service ID. The output data is either the maximum or the sum of input services. See I for more information. =head1 TIMESPAN Either --month or --end option must be defined =over 4 =item B<--start>=I Sets the start date of the calculation. =item B<--end>=I Sets the next day after the eond of the period. =item B<--month> Instead of setting the end data, it is convenient to use this option. It sets the end data in one calendar month after the start date. =back =head1 OUTPUT =over 4 =item B<--out>=I Sets the output service ID. This should not be a service ID used in the Torrus datasource trees. B if I command is run twice with the same arguments, the produced data is doubled for the output service ID. =back =head1 FUNCTION =over 4 =item B<--func>=C|C Sets the function to be used when combining the input service data. Currently only C and C are supportted. =back =head1 SOURCES =over 4 =item B<--in>=I ... Input service IDs are specified either by B<--in> option, or as command line arguments. At least 2 input service IDs should be specified. =back =head1 OPTIONS =over 4 =item B<--step> Default: 300. Sets the data interval for derived service ID. It is recommended to leave this option at default value. =item B<--verbose> Prints extra informatgion. =item B<--debug> Prints debugging information. =item B<--help> Prints command usage information. =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/torrus_collector.pod.in0000644000175000017500000000675611661302716017020 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME collector - Torrus data Collector. =head1 SYNOPSIS B --tree=I [I] =head1 DESCRIPTION This command starts the Collector process for the tree I. By default it forks into a daemon, sets the log output file to F<@logdir@/collector.TREENAME.log>, performs one Collector cycle, and sleeps until the next cycle is scheduled. In daemon mode the log file can be reopened by sending it a SIGHUP signal. Collector cycle scheduling is controlled by two parameters defined for each individual configuration leaf: C and C. See the B for more details. The number of OID (Object IDentifier) variable bindings sent by Collector is controlled by the datasource parameter C. It is set to a default value of 40 in F, and may be overwritten at the host level. =head1 OPTIONS =over 4 =item B<--instance>=I Defines the collector instance. A single tree can allow more than one collector instance. The number of instances is defined in C hash in the F's C<%Torrus::Global::treeConfig>. If the number of instances is more than one, this option is mandatory. The collecting job is split between the instances, and normally all instances should be started by the startup scripts. The tree should be re-compiled after the number of instances is changed in the siteconfig. In the example below the tree I will be served by three collector instances: %Torrus::Global::treeConfig = ( 'tree_A' => { 'description' => 'The First Tree', 'xmlfiles' => [qw(a1.xml a2.xml a3.xml)], 'run' => { 'collector' => 3, 'monitor' => 1 } }, ); =item B<--nodaemon> Prevents the process from becoming a daemon and sets the log to STDERR. =item B<--runonce> Instructs the collector to run once and exit. Implies B<--nodaemon>. =item B<--runalways> Instructs the collector process to continue running even if no collector datasources are defined in the tree. In this case, the process will check once per hour if the configuration has changed. =item B<--debug> Sets the log level to debug. =item B<--verbose> Sets the debug level to info. =item B<--help> Displays a help message. =back =head1 FILES =over 4 =item F<@siteconfdir@/torrus-siteconfig.pl> Torrus site configuration script. =item F<@logdir@/collector.TREENAME.log> Collector's log for the tree I. =item F<@distxmldir@/snmp-defs.xml> Basic variable definitions for the SNMP collector. =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/manpages/Makefile.am0000644000175000017500000000740511661302716014327 00000000000000 # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # SUBST = @abs_top_builddir@/setup_tools/substvars.sh EXTRA_DIST = $(SRCPOD) CLEANFILES = $(PODMAN) $(POD_FILES) SRCPOD = \ torrus.pod.in \ torrus_acledit.pod.in \ torrus_action_notify.pod.in \ torrus_action_printemail.pod.in \ torrus_action_snmptrap.pod.in \ torrus_buildsearchdb.pod.in \ torrus_cleanup.pod.in \ torrus_clearcache.pod.in \ torrus_collector.pod.in \ torrus_compilexml.pod.in \ torrus_configinfo.pod.in \ torrus_configsnapshot.pod.in \ torrus_devdiscover.pod.in \ torrus_flushmonitors.pod.in \ torrus_genddx.pod.in \ torrus_genlist.pod.in \ torrus_genreport.pod.in \ torrus_install_plugin.pod.in \ torrus_monitor.pod.in \ torrus_nodeid.pod.in \ torrus_rrddir2xml.pod.in \ torrus_schedulerinfo.pod.in \ torrus_snmpfailures.pod.in \ torrus_srvderive.pod.in \ torrus_ttproclist.pod.in POD_FILES = \ torrus.pod \ torrus_acledit.pod \ torrus_action_notify.pod \ torrus_action_printemail.pod \ torrus_action_snmptrap.pod \ torrus_buildsearchdb.pod \ torrus_cleanup.pod \ torrus_clearcache.pod \ torrus_collector.pod \ torrus_compilexml.pod \ torrus_configinfo.pod \ torrus_configsnapshot.pod \ torrus_devdiscover.pod \ torrus_flushmonitors.pod \ torrus_genddx.pod \ torrus_genlist.pod \ torrus_genreport.pod \ torrus_install_plugin.pod \ torrus_monitor.pod \ torrus_nodeid.pod \ torrus_rrddir2xml.pod \ torrus_schedulerinfo.pod \ torrus_snmpfailures.pod \ torrus_srvderive.pod \ torrus_ttproclist.pod PODMAN = \ torrus.@mansec_usercmd@ \ torrus_acledit.@mansec_usercmd@ \ torrus_action_notify.@mansec_misc@ \ torrus_action_printemail.@mansec_misc@ \ torrus_action_snmptrap.@mansec_misc@ \ torrus_buildsearchdb.@mansec_usercmd@ \ torrus_cleanup.@mansec_usercmd@ \ torrus_clearcache.@mansec_usercmd@ \ torrus_collector.@mansec_usercmd@ \ torrus_compilexml.@mansec_usercmd@ \ torrus_configinfo.@mansec_usercmd@ \ torrus_configsnapshot.@mansec_usercmd@ \ torrus_devdiscover.@mansec_usercmd@ \ torrus_flushmonitors.@mansec_usercmd@ \ torrus_genddx.@mansec_usercmd@ \ torrus_genlist.@mansec_usercmd@ \ torrus_genreport.@mansec_usercmd@ \ torrus_install_plugin.@mansec_misc@ \ torrus_monitor.@mansec_usercmd@ \ torrus_nodeid.@mansec_usercmd@ \ torrus_rrddir2xml.@mansec_usercmd@ \ torrus_schedulerinfo.@mansec_usercmd@ \ torrus_snmpfailures.@mansec_usercmd@ \ torrus_srvderive.@mansec_usercmd@ \ torrus_ttproclist.@mansec_usercmd@ if POD2MAN_PRESENT install-data-local: $(POD_FILES) for f in $(PODMAN); do \ base=`echo $$f | sed -e 's/\\.[0-9a-zA-Z]*$$//'`; \ ext=`echo $$f | sed -e 's/^.*\\.//'`; \ instdir=$(DESTDIR)$(mandir)/man$$ext; \ echo BASE=$$base EXT=$$ext INSTDIR=$$instdir; \ $(POD2MAN) --section=$$ext \ --release="$(PACKAGE_STRING)" --center=torrus \ $$base.pod > $$f || exit 1; \ test -d $$instdir || $(mkinstalldirs) $$instdir || exit 1; \ $(INSTALL_DATA) $$f $$instdir; \ rm $$f; \ done endif SUFFIXES = .pod.in .pod .PRECIOUS: $(POD_FILES) .pod.in.pod: $(SUBST) $< > $@ pods: $(POD_FILES) torrus-2.08/doc/manpages/torrus_flushmonitors.pod.in0000644000175000017500000000277111661302716017737 00000000000000# Copyright (C) 2010 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 NAME flushmonitors - Flush monitor alarms and tokenset members =head1 SYNOPSIS B --tree=I [I] =head1 DESCRIPTION This command flushes the state of all monitor alarms for a given tree, and also the tokenset members which were originated by the monitor alarms. =head1 OPTIONS =over 4 =item B<--all> Instructs to flush all trees. =item B<--debug> Sets the log level to debug. =item B<--verbose> Sets the debug level to info. =item B<--help> Displays a help message. =back =head1 SEE ALSO L =head1 NOTES See more documentation at Torrus home page: http://torrus.org =head1 AUTHOR Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/scalability.pod.in0000644000175000017500000002600611661302716014107 00000000000000# Copyright (C) 2004 Stanislav Sinyagin # Copyright (C) 2004 Christian Schnidrig # # 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. # Stanislav Sinyagin # # =head1 Torrus Scalability Guide =head2 Introduction Installing Torrus in big enterprise or carrier networks requires special planning and design measures, in order to ensure its reliable and efficient function. =head2 Hardware Platform Recommendations Hardware planning for large Torrus installations is of big importance. It is vital to understand the potential bottlenecks and performance limits before purchasing the hardware. First of all, you need to estimate the number of devices that you are going to monitor, with some room for future growth. It is a good practice first to model the situation on a test server, and then project the results to a bigger number of network devices. The utilities that would help you in assessing the requirements are C and C. The resources for planning are the server CPU, RAM, and disks. While CPU and RAM are of great importance, it is the disk subsystem that often becomes the bottleneck. =head3 CPU For large installations, CPU power is one of the critical resources. One of CPU-intensive processes is XML configuration compiler. A configuration for few hundred of nodes may take few dozens of minutes to compile. In some complicated configuration, it may require few hours to recompile the whole datasource tree. Here CPU power means literally your time while testing the configuration changes or troubleshooting a problem. The SNMP collector is quite moderate in CPU usage, still when the number of SNMP variables reaches dozens of thousands, the CPU power becomes an important resource to pay attention to. In addition, the collector process initialization time can be quite CPU-intensive. This happens every time the collector process starts, or when the configuration has been recompiled. The empiric estimation made by Christian Schnidrig is that one SNMP counter collection every 5 minutes occupies approximately 1.0e-5 of the Intel Xeon 2.8GHz time, including the OS overhead. For example, the Torrus collectors running on 60'000 counters would make the server busy at the average of 60%. =head3 Memory The collector would need RAM space to store all the counters information, and of course it's undesirable to swap. In addition, the more RAM you have available for disk cache, the faster your collector may update the data files. Each update of an RRD file consists of a number of operations: open a file, read the header, seek to the needed offset, and then write. With enough disk cache, it is possible that the read operations are made solely from RAM, and that significantly speeds up the collector running cycle. According to Christian Schnidrig's empiric estimations, 30 KB RAM per counter should be enough to hold all the neccessary data, including the disk cache. For example, for 60'000 counters this gives 1'757 MB, thus 2 GB of server RAM should be enough. In addition, Apache with mod_perl occupies 20-30 MB RAM per process, so few hundred extra megabytes of RAM would be good to have. =head3 Disk storage It is not recommended to use IDE disks. They are not designed for continuous and intensive use. As experienced by Christian Schnidrig, IDE disks don't live long under such load. It is recommended to reduce the number of RRD files by grouping the datasources. This reduces dramatically the number of read and write operations during the update process. As noted by Rodrigo Cunha, reducing the size of read-ahead in the filesystem may lead to significant optimisation of disk cache usage. RRD update process reads only a short header in the beginnin of RRD file, and the rest of readahead data is never reused. On Linux, the following command would set the readahead size to 4 KB, which equals to i386 page size: /sbin/hdparm -a 4 /dev/sda For servers with dozens of thousands RRD files, it is recommended to use hashed data directories. Then the data directories will form a structure of 256 directories, with hash function based on hostnames. See I for more details. Spreading the data files over several physical disks is also a good plus. =head2 Operating System Tuning Depending on the number of trees and processes that run on a single server, you might require to increase the maximum number of filehandles that may be opened at the same time, system-wide and per process. See the manuals for your operating system for more details. =head2 Torrus Configuration Recommendatations =head3 BerkeleyDB configuration tuniung When using lots of collectors and/or lots of HTTP processes, it is important to increase the size of BerkeleyDB lock region. The command db_stat -h @dbhome@ -c would show you the current number of locks and lockers, and their maximum quantities during the database history. The maximum numbers of lock objects and lockers can be tuned by creating the file F in the database home directory, F<@dbhome@>. The following settings would work fine with about 20 collector processes and 5 HTTP daemon processes: set_lk_max_lockers 6000 set_lk_max_locks 3000 It is also recommended to increase the cache size from default 256KB to some bigger amount. Especially if the database has to hold large Torrus trees (hundreds or thousands monitored devices). The following line in F sets the cache size to 16MB: set_cachesize 0 16777216 1 After updating F, stop all Torrus processes, including HTTP server, then run db_recover -h @dbhome@ Then start the processes again. Futher info is available at: =over 4 =item * General access method configuration (BDB Reference) http://tinyurl.com/ybymk7t =item * DB_CONFIG configuration file (BDB Reference) http://tinyurl.com/y9qjodv =item * Configuring locking: sizing the system (BDB Reference) http://tinyurl.com/ya6dtww =item * C API reference http://tinyurl.com/yczgnab =back =head3 XML compilation time For large datasource trees, XML compilation may take dozens of minutes, if not hours. Other processes are not suspended during the compilation, and they use the previous configuration version. For debugging and testing, it is recommended to create a new tree, separate from large production trees. That would save you a lot of time and would allow you to see the result of changes quickly. =head3 Collector schedule tuning The Torrus collector has a very flexible scheduling mechanism. Each data source has its own pair of scheduler parameters. These parameters are I and I. Period is usually set to default 300 seconds. The time is divided into even intervals. For the default 5-minutes period, each hour's intervals would start at 00, 05, 10, 15, etc. minutes. The timeoffset determines the moment within each interval when the data source should be collected. The default value for timeoffset is 10 seconds. This means that the collector process would try to collect the values at 00:00:10, 00:05:10, ..., 23:55:10 every day. Data sources with the same period and timeoffset values are grouped together. The SNMP collector works asynchronously, and it tries to send as many SNMP packets at the same time as possible. Due to the asynchronous architecture, the collector is able to perform thousands of queries at the same time with very small delay. Within the same collector process, a large number of datasources configured with the same schedule is usually not a problem. If you configured several datasource trees all with the same period and timeoffset values, each collector process would start flooding the SNMP packets to the network at the same time. This may lead to packet loss and collector timeouts. In addition, all collector processes would try to update the RRD files concurrently, and this would cause overall performance degradation. Therefore, it is better to assign different timeoffset values to different trees. This may be achieved by manually specifying the C parameter in discovery configuration files. In large installations, the collector schedules need thorough planning and tuning to insure maximum performance and minimize load on the network devices' CPUs. The C utility is designed to help you in this planning. It shows two types of reports: configuration report gives you the idea of how many datasources are queried at which moments in time. The runtime report gives you realtime statistics of collector schedules, including average and maximum running cycle, and statistics on missed or delayed cycles. There is a feature that eases the load in large installations. With dispersed timeoffsets enabled, the timeoffset for each datasource is evenly assigned to one of allowed values, based on the name of the host, and name of the interface. By default, these values are: 0, 30, 60, ..., 270. With thousands of datasources, this feature smoothens the CPU and disk load on Torrus server, and avoids CPU usage peaks on network devices with big number of SNMP variables per device. It is recommended to analyse the current scheduler statistics before using this feature. If you run several large datasource trees, don't forget to plan and analyse the schedules for the whole system, not just for one tree. =head2 Distributed setup =head3 NFS-based setup The following setup allows you to distribute the load among several physical servers. Several Torrus (backend) servers which run collectors and store RRD files in the local storage, shared by NFS. The frontend server runs the Web interface, and probably some monitor processes, accessing the data files by NFS. It is possible to organize the directory structure so that each data file would be seen at the same path on every server. Then you can keep identical Torrus configurations on all servers, and launch the collector process only on one of them. XML configuration files may be shared via NFS too. Be aware that BerkeleyDB database home directory cannot be NFS-mounted. See the following link for more details: http://www.sleepycat.com/docs/ref/env/remote.html Backend servers may run near the limits of their system capacities. 70-80% CPU usage should not be a problem. For the frontend machine, it is preferred that at least 50% of average CPU time is idle. =head1 Authors Copyright (c) 2004-2005 Stanislav Sinyagin Essinyagin@yahoo.comE Copyright (c) 2004 Christian Schnidrig Echristian.schnidrig@bluewin.chE torrus-2.08/doc/nodeid_usage.pod.in0000644000175000017500000002203111601705423014223 00000000000000# Copyright (C) 2010 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 Torrus/OSS integration: NodeID usage guidelines =head2 Introduction Most parts of Torrus software mentioned in this document were developed under sponsoring by the following companies: =over 4 =item * nexellent ag, Switzerland (www.nexellent.ch) NodeID concept and base implementation, host-based authentication. =item * M-net Telekommunikations GmbH, Germany (www.m-net.de) M-net plugin. =item * Fibre Noire Internet Inc, Canada (www.fibrenoire.ca) Extensions in M-Net plugin for NodeID manipulation. =item * upc cablecom GmbH (www.upc-cablecom.ch) SIAM library and its binding with Torrus and Extopus. =back This document explains the new concept of NodeID and ways of utilizing it for better integration of Torrus into an OSS environment. =head2 NodeID concept Torrus 1.0.9 introduces a new parameter for datasource tree elements: C. This parameter is not inherited from parent subtrees to child subtrees or leaves. Also the XML configuration compiler verifies uniqueness of its values across the whole tree. The purpose of C is to provide persistent identifiers to the tree elements. Unlike the token numbers, these identifiers are not changing between re-compilations of the tree. Also unlike the path string, C would stay the same if a network device changes its place in the tree topology. By default, C value is composed of SNMP host name and device component name, such as IF-MIB interface. It can also be easily adapted to contain external identifiers, such as Asset ID or Service ID from some external inventory database. Once C values are put into the XML configuration (usually SNMP discovery engine does it) and compiled into the configuration database, they can be used for accessing the Torrus graphs from external systems. The command-line utility C helps searching through existing NodeID values, and also renders the graphs on request. Another quick way to find the NodeID value is to navigate to the desired graph page and check the I shortcut at the bottom of the page. For the nodes where C is defined, the bookmark will use it instead of the path in the datasource tree. =head2 Host-based authentication Many Torrus deployments have user authentication enabled. This makes it complicated for other OSS systems to retrieve graphs from the Torrus rendering engine. Torrus 1.0.9 introduces host-based authentication: a special user is created for requestor's IP address. The requestor specifies its unique password in the URL as C parameter. Also the Torrus WebUI does not send the session cookie back to the requestor. This new feature makes it easy to display Torrus graphs inside user self-service portals without giving direct access to the Torrus server. For example, the following command adds the host 10.0.0.5 with password "654321" to the I group: torrus acl --addhost=10.0.0.5 --hostpassword=654321 --addtogroup=admin Then the following command executed from 10.0.0.5 would retrieve an InOut_bps graph for the last 24 hours for a given interface on I router: wget -O graph.png \ 'http://torrus/main?nodeid=if//rtr01//GigabitEthernet0/1//inoutbit&view=last24h&hostauth=654321' =head2 M-net plugin Details of M-net plugin are explained in the plugin documentation. The plugin interprets description strings on device network interfaces: it catches all key-value pairs of format I and performs various actions on them. Now assume there's an external inventory system, and each network interface is assigned a unique Asset ID. Our natural wish would be to use these asset IDs in NodeID strings, instead of hostnames and interfaces. This way we are secured against hardware changes and upgrades (assuming that Asset ID stays unchanged). In order to take advantage of M-Net plugin, the Asset ID values should be configured in all interface descriptions, like follows: interface GigabitEthernet0/1 description bw=200M; assetid=VPNLINK00055; ct=BC In the example above, the interface description tells that this is a 200Mbps link, connection type is Business Customer, and the unique link identifier is I. The format allows inserting extra spaces for better readability. In the corresponding Device Discovery XML (DDX) file, the following parameters would be set: As a result, after the SNMP discovery and XML compiler finish their work, we get a number of NodeID values associated with this customer connection: assetid//VPNLINK00055 assetid//VPNLINK00055//inbytes assetid//VPNLINK00055//indrops assetid//VPNLINK00055//inerr assetid//VPNLINK00055//inoutbit assetid//VPNLINK00055//inpackets assetid//VPNLINK00055//outbytes assetid//VPNLINK00055//outdrops assetid//VPNLINK00055//outerr assetid//VPNLINK00055//outpackets The first NodeID refers to the interface-level subtree in Torrus configuration, and all other values refer to the corresponding graphs for this interface. So, now the customer self-service portal would retrieve the input/output summary graph with the following URL (wget woulld be certainly replaced by a corresponding command in PHP or other Web programming language): wget -O graph.png \ 'http://torrus/main?nodeid=assetid//VPNLINK00055//inoutbit&view=last24h&hostauth=654321' Of course, a number of additional view definitions could be created, in order to create graphs of needed size and time span. Also, for example, a calendar month's graph could be generated by specifying the followiong parameters in the URL: C or C pointing to the beginning of next month, and optionally C indicating the start of the time period. =head2 Setting the host identifier Alternatively to the technique explained above, the local OSS environment could require some custom identifiers assigned to the network devices. For example, CA Spectrum software uses its internal Model Handles to refer to devices. The discovery parameter C sets the string that would be used in the host part of NodeID values: The resulting NodeID values would be based on "0xC0FFEE" string instead of "rtr02.example.com": if//0xC0FFEE//GigabitEthernet0/1//inoutbit =head2 Service-centric display: SIAM+Extopus Service Inventory Abstraction Model (SIAM) is a new Perl library available at CPAN. It is designed to be an abstraction interface between enterprise-specific inventory database and various programs, such as Torrus. SIAM is supposed to be used with an enterprise-specific driver which maps the inventory data into SIAM objects and attributes. Torrus 1.0.10 introduces a new plugin module: C. It consists of a command-line utility which generates DDX files from SIAM data, and a DevDiscover module which tries to match the IF-MIB interface names in SIAM against those on the network devices. The resulting configuration contains I values imported from SIAM, and those values would be typically based on service identifiers in the inventory database. Thus the external programs can fetch Torrus data by using the enterprise-specific service identifiers. Extopus (www.extopus.org) is a Tobi Oetiker's new software product, a universal front-end for various open-source systems. It's designed to aggregate and display data from various sources, such as network monitoring systems. Extopus contains plugin modules for SIAM and Torrus, and allows for service-centric display (opposed to Torrus' device-centric presentation). SIAM represents the inventory data in a service-centric fashion: customer contracts consist of services, and each service may contain multiple physical objects, such as device interfaces. Also the user privilege system in SIAM allows assigning visible contracts to the front-end users. Extopus allows the end-user to log in and navigate through its service hierarchy, and display the traffic graphs and summaries which are pulled and proxied from a Torrus server. =head1 Author Copyright (c) 2010-2011 Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/xmlconfig.pod.in0000644000175000017500000016073112413217640013576 00000000000000# xmlconfig.pod - Torrus configuration guide # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 Torrus XML Configuration Guide =head2 Common rules The Torrus configuration consists of several XML files. Once the XML configuration is changed, it must be compiled into the database by executing C. In addition, when I, I and I processes notice the configuration changes, they refresh their information automatically. The top-level XML element is always CconfigurationE>, with sub-elements defining various sections, like datasources or views: ... ... ... These definitions are global across all XML configuration files, and are referenced with dollar sign and the definition name, e.g.: ... =head2 Parameter properties Some parameters require special handling during the compilation or at the runtime. The parameter properties define such behaviour in the XML configuration. Currently two properties are recognized: "remspace" and "expand". ... =head2 Datasource definitions Datasources are organized into a tree hierarchy. All parameters are inherited by the subtrees and leafs from their parents, and can be overridden on lower levels. The datasources tree consists of two key types of components: I and I. A subtree can have child subtrees or leaves. A leaf can never have children. A subtree represents logical aggregation, while the leaf always represends the actual datasource. In XML configuration, a child subtree or leaf belongs to the parent element, like the following: ... ... Each subtree or a leaf is identified by a I, the symbolic notation similar to filesystem paths. In any path notation, subtree names always end with slash (/), and this trailing slash is the part of the name. In this case, any subtree is identified by a path ending with slash, while leaf paths always end with a word symbol. The top-level subtree is identified by a single slash. The other components of the datasouce definition are I and I. =head3 Templates A template is used when it's needed to define multiple different pieces of the configuration in the same way. For instance, the definition for input/output octets and bits can be specified once in a template, and then applied where appropriate. The piece of XML configuration inside the CtemplateE> element is memorized under the template name, and reproduced in every occurrence of Capply-templateE> with the corresponding template name. The template definition must be the direct child element of CconfigurationE> XML element: ... =head3 Aliases Alias is the alternative symbolic name for a subtree or a leaf. It can be even a name from a different subtree hierarchy. If that alternative hierarchy does not exist, the corresponding subtrees are created: /Netflow/ExportersByName/rtrTelehouse1/ ... =head3 Compile-time variables Compile-time variables are those defined somewhere in datasource hierarchy, and valid within a given subtree and its children. It is possible to define pieces of XML configuration which are or are not compiled, depending on the value of corresponding variable. Variables are set by C XML element, with mandatory attributes C and C. Variable values are used in C and C XML elements. Mandatory parameter C specifies the variable name. The child XML elements are compiled if the variable value is true or false, correspondingly. A true value is C or a nonzero number. Undefined variable is identified as false. Example: .... =head3 Parameter value substitution For any given leaf, some parameters may reference the other parameter values, by embracing the parameter name with percent signs: The parameter substitution is performed at runtime. The substitution formula may be defined at a higher subtree level, and the substitution itself will occur at leaf level. The parameter substitution is performed only to those paraneters which are defined with the property "expand". =head3 Common parameters =over 4 =item * C This parameter is automatically added to the root element of the tree and defines the tree name. =item * C Mandatory parameter for every datasource leaf. Currently, the following values are recongized: =over 8 =item * C The datasource is an RRD file generated by some external collector. Implies mandatory parameters: C, C, C. =item * C The datasource is generated by Torrus Collector. Implies mandatory parameters: C, C, C, C. =item * C This leaf is dedicated to displaying of multiple other datasources in one graph. It cannot be referenced for any other purpose, because there's no numeric value associated with it. =back =item * C Optional. If defined, it should contain a unique string identifying this particular leaf or subtree. =item * C Optional. If defined, it overrides the subtree or leaf name for displaying. The subtree and leaf names are not allowed to have spaces and special characters, and this parameter helps to display strings as they are, such as router interface names. =item * C Optional. This is a string of text which is displayed when browsing through the tree. =item * C Optional. This parameter is not inherited by child nodes. If defined, the user is offered a I shortcut in the given subtree or view. It allows to open a new window with the help text displayed, together with the current path. Some simple markup is allowed in the text, in a format of Template-Toolkit tool: C<[%em('some text')%]> would be displayed in italics, and C<[%strong('some text')%]> would be bold. =item * C Optional. Comma-separated list of monitor names (spaces are allowed) that must be run upon periodic runs of monitor module (see I section of this manual). Monitor schedule parameters must be defined for the monitor to run properly: C and C. =item * C, C Mandatory parameters for leaves that have C defined. They define the monitor schedule for each individual datasource. The time for execution is determined by formula: time + period - (time mod period) + timeoffset =item * C Required if one or more monitors requires the variables. In monitor's RPN expressions, the variables are referenced as C<#varname>. These variables are looked up in the leaf's C parameter. The syntax of this parameter is semicolon-delimited C pairs: =item * C Optional. Specifies a reference to an alternative leaf which will be used for the monitor action. For example, you might need to see a multigraph leaf in the tokenset instead of one single datasource. =item * C Optional. Default value: C<0>. When rendering, the subtree listing is sorted according to precedence and alphabetic order of names. The higher the precedence, the closer to the top of the list the child node is displayed. =item * C Optional. If given, produces a short listing at the top of the HTML output, with tabulated values. Format: C. Spaces around the delimiters are ignored. Example: Location:Zurich; Contact: John Smith; Telephone: 01 9911299 =item * C A horizontal string at the top of the graph. =item * C Optional. This legend text is printed inside the graph explaining the line color. =item * C Optional. Text to print along Y axsis on the graph. =item * C, C Optional. Fix the upper and lower boundaries of the graph. =item * C Optional. When set to "yes", the graph will not expand if the value is outside the lower or upper limit. =item * C Optional. Valid values are: "1000" and "1024". Default: "1000". Determines the base for kilo-, mega-, and giga- scaling factor. Normally it should be 1000 for traffic counters, and 1024 for memory or storage sizes. =item * C Optional. When set to "yes", the graph is drawn in logarithmic y-axis scale. =item * C, C These optional parameters override the corresponding ones from the view definition. =item * C, C Mandatory. Determine the default view for a leaf or subtree, correspondingly. See I section of this manual. =item * C Mandatory. Defines 5 views to display the graphs. Must contain 5 comma-delimited view names for short-period, daily, weekly, monthly, and yearly view. =item * C Optional. Adds this leaf or this subtree child leaves to the specified token sets. Tokenset names are comma-separated, and must be defined in Ctoken-setsE> part of configuration. =item * C Optional. If defined, it is used in tokenset members listing as a member identifier, instead of the leaf path. =item * C Optional. Valid values: C, C. When set to C, the leaf or subtree is not displayed in the subtree listing, unless C option is true. When C is enabled, the node name and comment are shown in italics. =item * C, C, C, C, C, C, C, C When C is set to C on a subtree level, default HTML templates expect the five parameters to be set. C is a comma-separated list of shortcut names, and for each name "X", C defines the current subtree's grandchild leaves name which would compose the overview page. When C is set to C, the URL under the graph will point to the direct child subtree, and C will define the view for that subtree. Usually this view would be C. =item * C, C, C Optional. When set to C, they make the renderer ignore C, C, or both, accordingly. In addition, C disables the C parameter. =item * C Optional. When set to C, the view C are ignored. =item * C Optional. When set to C, the view parameter C and other GPRINT-related parameters are ignored. =item * C> Optional. If a horizontal rule with the given name is defined, this parameter specifies the legend to be printed. =item * C Optional. If set to C, the corresponding subtree or leaf is included in the search database. =back =head3 RRD-related parameters =over 4 =item * C Mandatory. Specifies the filesystem directory path where the data files are resided. =item * C Mandatory. Name of the data file. =item * C Mandatory. Determines the type of RRD access. Recognized values are: =over 8 =item * C Corresponds to DEF specification in RRDgraph query. Implies two mandatory parameters: C and C, giving the DS name and consolidation function, correspondingly. =item * C Mandatory when a leaf refers to an RRD file (C in C leaves or C in C leaves). The parameter Specifies the RRD datasource name within a file. =item * C Mandatory under the same conditios as C. Defines the default consolidation function which is used when retrieving the RRD data. =item * C Supported for C only. Corresponds to CDEF specification in RRDgraph query. Implies one mandatory parameter: C, which gives the RPN expression. Other leaves' value references are specified in curly braces. These leaves can be specified as relative or absolute paths in the configuration tree. See I manual for more details. =back =item * C Optional. If defined, it specifies the minimum step in seconds that is used to draw the graph. This can be useful, for eample, if an average number of events per hour needs to be displayed. =item * C Optional. If equals to C, then this RRD datasource is expected to have HWPREDICT and all the suite of Holt-Winters consolidation functions. In case of C, C indicates that the RRD file must be created with use of Holt-Winters RRAs. =item * C Mandatory when C and C. Specifies the datasource type for RRD creation. Valid values are: C, C, C, C. =item * C Mandatory when C and C. Space-separated list of RRA definitions for RRD creation, as they are passed to RRD Create command. Example: RRA:AVERAGE:0.5:1:4032 RRA:AVERAGE:0.5:6:2016 RRA:MAX:0.5:6:2016 RRA:AVERAGE:0.5:288:732 RRA:MAX:0.5:288:732 =item * C Mandatory when C and C. Heartbeat parameter as defined in RRD Create manual page. =item * C, C Optional minimum and maximum parameters for RRD datasource. =item * C Mandatory when C and C and C. Specifies the RRA length for Holt-Winters archives. Recommended same length as main 5-minutes RRA. =item * C, C, C, C, C, C Optional Holt-Winters parameters. Default values are: season=288 alpha=0.1, beta=0.0035, gamma=0.1, window_length=9, failure_threshold=6 =back =head3 Collector-related parameters =over 4 =item * C Mandatory parameter for datasource type C. Currently supported values are: C and C. Other valid values may be added with plugins. =item * C Mandatory parameter for datasource type C. Comma-separated list of storage types. The collected value is duplicated on every storage listed. Supported values are: C, C. For C (external storage), see the I. =item * C, C Mandatory parameters for datasource type C. They define the collector schedule for each individual datasource. The time for execution is determined by formula: time + period - (time mod period) + timeoffset =item * C Optional. When set to C, C spreads the collector offsets among values determined from C, C, C, and C. =item * C, C, C Mandatory when C is set to C. They define the limits and the step for collector timeoffset dispersion. =item * C Mandatory when C is set to C. Defines the string that is used as a hash for timeoffset dispersion. =item * C Mandatory. Defines the string that is used as a hash to calculate the collector instance number for a particular leaf. By default it is defined as C<%system-id%>, so that the same collector instance deals with every remote system. =item * C Mandatiry. The parameter defines the collector instance number. This parameter is automatically calculated by the configuration compiler. =item * C Optional. Defines a piece of Perl code that will be used for value transformation. The keyword C is replaced with the dollar sign ($), and C is replaced with the percent sign (%). The initial value is supplied in C<$_>, which should be referenced as C in your Perl code. The code should return a numeric value or C for an undefined value. The returned value is then passed to the storage. The parameter substititions are performed on the value of the parameter, therefore it should not contain the percent(%) and dollar ($) signs. =item * C Optional. Collector may return values which need translation into numbers. This parameter defines the mapping for such values. The parameter value is a comma-separated list of C pairs. =item * C Optional. Specifies the translation RPN formula for the data before being passed to RRD database. Implicitly the datasource value is appended to the left of the given RPN. I the translation works I the RRDtool processes the data, so it makes sence to scale only non-COUNTER values. =item * C Mandatory for C. Valid values are C<4> and C<6>. The parameter defines the IP protocol version. If C contains a DNS name, the IP address is determined by looking up A or AAAA DNS records, according to IP version. =item * C Mandatory for C. Valid values are C and C. =item * C Mandatory when C. Specifies the hostname or IP address of the SNMP agent. =item * C Mandatory when C. Specifies the UDP port of the SNMP agent. =item * C Optional DNS domain name. If given, and if C does not contain dot symbol (.), this domain name is appended to C. =item * C and C Optional parameters specifying the local socket binding address and port. =item * C Mandatory when C. Specifies the SNMP version for the given device. Valid values are: C<1>, C<2c>, C<3>. =item * C Mandatory when C and SNMP version is C<1> or C<2c>. Specifies the SNMP community for the given device. =item * C Mandatory when C and SNMP version is C<3>. =item * C Optional SNMP context name for SNMPv3. =item * C Optional authentication key for SNMPv3. If not defined, the authentication level is set to C. If only C or C are specified, the security level is set to C. The security level is set to C if either of C or C is defined. =item * C Optional authentication password for SNMPv3. See notes for C parameter. =item * C Optional authentication protocol for SNMPv3. Valid values: C or C. Default is C. =item * C Optional privacy key for SNMPv3. If defined, C or C must be defined too. =item * C Optional privacy password for SNMPv3. If defined, C or C must be defined too. =item * C Optional privacy protocol for SNMPv3. Valid values: C, C, or C<3desede>. Default is C. =item * C Mandatory when C. Specifies the SNMP session timeout in seconds. =item * C Mandatory when C. Specifies the SNMP session retry count. =item * C Mandatory when C. Specifies the number of SNMP OIDs per one UDP packet. =item * C Mandatory when C. Specifies the SNMP OID to be polled from the agent. The object must return a single numeric value. In order to reference the dynamic instances, i.e. interface counters, two mapping types are supported: reverse mapping and variable value substitution. Reverse mapping has syntax as follows: M(baseoid, string) The result of reverse mapping is the tail of the OID which has the head C and whose value equals the string. Variable value substitution is defined by syntax: V(oid) The returned value must be a numeric value which is substituted in place of this expression. =item * C Optional. Supported values: C, C. When set to C, the SNMP variable value is treated as 64-bit integer. Not using this parameter may lead to loss of precision. =item * C Optional. Default value: C. When set to C, the collector does not query C (C<1.3.6.1.2.1.1.3.0>). By default, the uptime counter is used to detect if the agent was rebooted between the collector cycles. In this case the dynamic maps for the given host are automatically rebuilt. This parameter is needed for compatibility with some non-standard agents which don't implement this OID. =item * C Optional. If defined, it sets the SNMP maximum message size different from default 1472 octets (true for UDP/IPv4, see Net::SNMP documentation for more information). =item * C Optional. If set to C, the SNMP errors C, C, C are ignored, and no action is performed when such errors occur. =item * C Mandatory for every collector type. Default value for SNMP collector: C<%snmp-host%>. Unique identifier of the host. This parameter is used in various template definitions for C, C and C. =item * C Mandatory when C. The RPN defines an arithmetic expression that is used to create a new datasource from several other ones. For example, it may define the sum of traffic on several different interfaces. =item * C Mandatory when C. Defines the delay time in collector periods. The collector will read the data from the RPN datasources with the specified delay from the current time. F sets the default value to 0. =item * C Mandatory when C. Delay time in collector periods that the collector accepts when no recent data is available. F sets the default value to 2. =back =head3 RRD-Multigraph leaves The leaves with C are dedicated for displaying of several datasource values in one graph. Such leaves cannot be referenced for a numerical value, hence cannot be monitored. Example: Parameters: =over 4 =item * C Comma-separated list of symbolic DS names. These names are used for other DS-specific parameter names formation. In the parameter descriptions below, C stands for the DS name. =item * C Datasource leaf RPN expression. Any other parameter values may be substituted as C<%parameter_name%>. =item * C Short description text used as the graph legend. =item * C Line specification in RRD graph. May be I>, I> etc. Two hashes in the beginning and a name refer to the line style from the styling profile, e.g. C<##BpsIn>. =item * C Line color. Must have the hash symbol in the beginning, like I>. Two hashes in the beginning and a name refer to the color from the styling profile, e.g. C<##BpsIn>. =item * C Numerical order of line drawing. The lines are drawn in accending order. If omitted, the XML compiler issues warning, and Renderer conciders the order of 100. =item * C Optional. When set to C, the line is stacked on top of a previous line. Both areas and lines are stackable. =item * C Optional. If specified, must be two hexademical, uppercase digits. This parameter defines the line (or area) transparency. Value C is equivalent to solid colour. Value C<7F> gives 50% transparency which should be suitable for most applications. =item * C Optional comma-separated list of view names. The graph for this DS name will not be drawn in the views specified. The validator does not check it, so it's up to you to guarantee that at least one DS is always displayed in a multigraph. =item * C Optional. When set to C, this datasource is not included in GPRINT output. =item * C and C Optional parameters that define the style and color for the I line. The maxim line usually displays daily or hourly maximums, and the color needs to be contrast enough to be distinctively visible on the graph. =back =head2 View definitions In our context, I means any kind of object representation. The same subtree or view can be displayed in different ways and in different formats: HTML, graph image, plain text, etc. I module handles these view definitions. For any subtree or leaf, it renders the specified view, and keeps the cache of rendered files. Each subtree or leaf must have a default view. This is controlled by two parameters that may be defined in the root subtree: C and C. The set of views is flat, though they can inherit the parameters one from another. Each view is referenced by its name, and is defined by the set of parameters. Same way as with datasources, certain parameter values imply the neccessaty to define certain other parameters: Currently the view is defined by the configuration only. Probably, in the future additional parameters will be supplied dynamically. =head3 View parameters For every view, the mandatory parameters are: =over 4 =item * C Determines the processing procedure which interprets the other parameters. =item * C Gives the expiration time in seconds for the I cache. =back The following values of C are recognized: =over 4 =item * C Defines the HTML representation of subtree or a leaf. One additional parameter is required: C must contain a file name of the HTML template. Those templates are copied from F subdirectory of the installation package. We use Template-Toolkit Ehttp://www.template-toolkit.orgE for HTML processing. The template file name is defined with the parameter C. The following variables and functions are defined when the template is processed: =over 8 =item * C Returns the current node token. =item * C Returns the name of the current view. =item * C Returns the full path name of the given node token. =item * C Returns the token for the specified path. =item * C Returns true if the specified path points to a node. =item * C Returns the list of children for the given path. =item * C Returns true if the token is pointing to a leaf node. =item * C Returns the array of tokens, sorted according to C parameter. =item * C Returns the node name part of the node path. =item * C Returns the parent's token for the specified node. =item * C Returns the value of the parameter for the given node. =item * C Returns the value of the parameter for the given view, monitor, or action. =item * C Returns the URL which displays the given node using the given view. If the view is omitted, use the default view. =item * C Returns a piece of HTML code representing the path with clickable node names, each referencing the corresponding view. =item * C The specified view must be of type C. Returned is the text output produced by this view. =item * C Interprets the given text as a floating-point number and returns its representation in the "metric" scale: 1000 is translated into "k", million into "M" etc. It may be used together with C for better formatting. =item * C Returns the array of the tokenset member tokens. =item * C Returns the array of the tokenset names. =item * C Returns the relative URI to the default CSS stylesheet, as defined in C<$Torrus::Renderer::stylesheet>. =item * C Returns current Torrus package version. =back =item * C Generates the RRD Graph representation of the given I (remember, subtrees are only logical grouping of the real data). The following parameters are recognized for this kind of view: =over 8 =item * C, C, C, C, C, C These view parameters correspond to same parameters in RRD Graph command. C can also be given, it defaults to I>. The following parameters are mandatory: C, C, and C. C is only supported in RRDtool version 1.3.9 or higher. =item * C Mandatory line specification in RRD graph. May be I>, I> etc. Two hashes in the beginning and a name refer to the line style from the styling profile, e.g. C<##SingleGraph>. =item * C Mandatory line color. Must have the hash symbol in the beginning, like I>. Two hashes in the beginning and a name refer to the color from the styling profile, e.g. C<##SingleGraph>. =item * C Optional. The parameter defines the values for the C<--color> options in RRD Graph command. The value is an even number of color tags and color values, separated by colon (:). For example, "BACK:00FFFF:FONT:AA55DD" corresponds to an ugly cyan background and magenta text. =item * C Optional. If equals to C, HWPREDICT display is disabled for this view. Note that if the datasource has C parameter set to C, this emplies that the view would contain Holt-Winters boundaries and failures graph. =item * C Optional parameter, defaults to C. Specifies the line style for Holt-Winters boundaries. =item * C Optional parameter, defaults to C<#FF0000>. Specifies the color for Holt-Winters boundaries. =item * C Optional parameter, defaults to C<#FFFFA0>. Specifies the color for Holt-Winters failure ticks. =item * C, C>, C> Optional parameter C contains a comma-separated list of horizontal rule names. For each name, mandatory parameter C> defines a name of the leaf parameter that will be used as the horizontal rule value. The rule is not drawn if such parameter is not defined for the leaf. Mandatory parameter C> defines the color for the rule, of the form C<#DDDDDD>, where C corresponds to a hexademical digit. Two hashes in the beginning and a name refer to the color from the styling profile, e.g. C<##HruleMin>. Optional parameter C> defines the legend text to be displayed on the graph. The following horizontal rules are defined in F for all rrgraph views: =item * C Optional. Comma-separated list of decoration names. Decoration is an RRD pseudo-line that does not depend on any datasource. For each decoration name, the following parameters must be supplied: CnameE> determines the order of drawing. Negative order numbers correspond to the lines or areas behind the data line. CnameE> gives the RPN expression that defines the line or area. CnameE> and CnameE> define the style (AREA or LINE1..3) and the color of the drawing. Node parameter C disables the decorations. =item * C, C, C Optional. These parameters define the printing of values together with legends below the graph. C is a comma-separated list of format names, and for each format name, there should be a corresponding C parameter. C defines a string that will be printed on top of all orther lines. Example: =item * C Optional. Defines the text description of the graph. This description is usually placed as ALT HTML attribute in the generated HTML pages. =item * C Optional. Supplies additional RRDtool graph comand-line options, as one string separated by spaces. =back =item * C This view produces the text output from PRINT statement in RRD graph command. The required parameters are C and C. The first one defines the starting time. C may be also optionally specified. C specifies one or more consolidation functions, separated by comma. The result of the rendering is the text line with the output values separated by colon (:). =item * C, C, C When set to C, the corresponding elements of the graph are not displayed. =back =head3 Styling Profiles Styling profiles allow symbolic names to be used for line type and color. Two hashes in the beginning and a name refer to the line style from the styling profile, e.g. C<##BpsIn>, C<##green>, C<##one>, C<##two>. When processed the example above effectivly becomes: Schema definitions can be modified in two ways (see the I manual for available styles and override details) =over 4 =item * Create an overlay schema: Specify the overlay schema in torrus-siteconfig.pl using the $Torrus::Renderer::stylingProfileOverlay variable. =item * Create a replacement schema: Specify the replacement schema in torrus-siteconfig using the $Torrus::Renderer::stylingProfile variable. =back =head2 Token sets definitions I is a symbolic identifier for each subtree or a leaf. A I is a named list of tokens. Its contents can be rendered, and its members can be added or removed at any time. Each tokenset can have a number of parameters defined. It also inherits the parameter defined in the top Ctoken-setsE> XML element: Parameter C is mandatory for tokenset list. It defines the default view when displaying the list of tokensets. The following parameters are mandatory for tokensets: =over 4 =item * C Determines the view for displaying the tokenset contents. =item * C Specifies the name of the view that is used to display graphs inside the tokenset. If not specified, the first view in C from each leaf is used to display the graph. =item * C The text that describes this tokenset. =back =head2 Monitor definitions I is a named set of parameters that defines the behaviour of monitor module. Each leaf can be given a number of monitors via C parameter. Upon monitor module run, an I is launched if the alarm conditions of a given monitor are satisfied. =head3 Event types Should the alarm condition occur, a series of events is happening in sequentional order: =over 4 =item * C This event type occurs the first time the alarm condition is met. =item * C This event type means that the alarm condition still persists after the previous run of Monitor. =item * C If escalation times are defined with C parameter, this event is fired if the alarm condition persists for a specified time. Each escalation event is fired only once. =item * C Event of this type happens when the alarm condition stops. =item * C After the C event is fired, C is also fired for every escalation that was raised before it. =item * C Once the alarm is cleared, this event happens after the expiration time of the monitor. =back =head3 Monitor parameters =over 4 =item * C Mandatory parameter. Specifies the monitor type. The following monitor types are recognized: =over 8 =item * C Triggers the action when Holt-Winters FAILURES function gives value of 1. This requires RRDtool verion 1.1.x and aberrant behaviour parameters defined for te given RRD file. =item * C Triggers the action when given RPN expression returns nonzero. See I manual for more details. This monitor type implies that the RPN expression is specified in C parameter. The current leaf value is prepended to the given RPN. =back =item * C Optional parameter with comma-separated escalation times. Each escalation time is a period in seconds. As soon as the alarm condition persists for the specified period, an C event is fired. =item * C Mandatory for monitor type C. Defines the RPN expression to evaluate. The current leaf value is prepended to the given RPN. The expresion may reference leaf-dependent variables: the constructs of the form C<#varname> are replaced with the variable value specified in the leaf's C parameter. =item * C Optional parameter, a positive integer specifying the time span in seconds. If defined, the data source value is calculated across the defined period with the aggregation function that is defined in C parameter. If not specified, the last available value is taken. =item * C Optional parameter. If defined, it should contain a valid time zone name that is resolvable on the local server. This affects the TOD function in RPN expressions. If undefined, the local time zone is used. =item * C Mandatory parameter, comma-separated list of action names (spaces are allowed). Each action is triggered when the alarm condition is met. =item * C Mandatory parameter, the number of seconds of expiration period. After the alarm condition becomes false, this parameter determines the time of memorizing the event in monitor status reports. =item * C Optional but recommended parameter, specifies the string identifying the event that this monitor watches. =item * C Optional severity level. Used for the action type C. =item * C Optional RPN expression for transforming the datasource value. If defined, it will be applied to the value before setting C and C environment variables. =item * C Optional I format for displaying the value in C environment variable. Default is C<%.2f>. =back =head3 Action parameters =over 4 =item * C Mandatory parameter, defines the type of action. Recognized values are: =over 8 =item * C When this type of action is triggered, the leaf is added to the specified tokenset (see I section in this manual). The leaf persists in the tokenset until the event of type C. This action type implies the parameter C. =item * C This action type defines an external program to launch. Two other parameters determinate its behaviour: mandatory C and optional C. =back =item * C Mandatory for action type C. Defines the tokenset name where the leaf is added when the monitor condition is met. =item * C Optional parameter for action type C. It specifies a comma-separated list of escalation times at which the leaf would be added to the tokenset. =item * C Mandatory for action type C. Defines the external program to launch. The following strings are substituted in the parameter value: =over 8 =item * Cgt;> Relaced with C>. =item * Clt;> Relaced with C>. =back The following environment variables are passed to the child process: =over 8 =item * C<$TORRUS_HOME> C where Torrus was installed. =item * C<$TORRUS_BIN> Directory containing Torrus executables. =item * C<$TORRUS_UPTIME> Number of seconds since Monitor has started. =item * C<$TORRUS_TREE>, C<$TORRUS_TOKEN>, C<$TORRUS_NODEPATH> Tree name, token and pathname of the leaf causing the alarm. =item * C<$TORRUS_NCOMMENT>, C<$TORRUS_NPCOMMENT> C parameter of the node and its parent. Empty if the parameter is not defined for the given leaf. =item * C<$TORRUS_EVENT> Event type. =item * C<$TORRUS_ESCALATION> Escalation time. It is set to zero when the "set" event is fired. =item * C<$TORRUS_MONITOR> Monitor name =item * C<$TORRUS_MCOMMENT> Monitor's C parameter value. =item * C<$TORRUS_TSTAMP> Timestamp (in seconds since Epoch) of the event. =item * C<$TORRUS_VALUE> For expression monitor type, this returns the last read value of the datasource, possibly transformed by C expression. =item * C<$TORRUS_DISPLAY_VALUE> For expression monitor type, it contains a human-readable form of the value, possibly transformed by C expression. =item * C<$TORRUS_SEVERITY> If the C parameter is defined in the monitor, its value is passed with this variable. =back =item * C Optional for action type C. The comma-separated list of event types when the given action should be launched. If not defined, the event types C are used by default. =item * C Optional for action type C. The comma-separated list of leaf parameters which would be passed as environment variables to the child process. The environment variables are of the form C<$TORRUS_P_paramname>. Hyphens ('-') are replaced with underscores ('_') in the parameter names. =item * C Optional for action type C. Comma-separated list of C pairs. C defines the environment variable name: it is prefixed with C. C defines the action parameter name. This parameter is interpreted as RPN expression applied to the current leaf being monitored. The result of this RPN expression is passed to the action script in the environment variable. Example: /usr/local/bin/report_temperature =back =head1 Author Copyright (c) 2002-2005 Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/install.pod.in0000644000175000017500000005030511732125276013257 00000000000000# install.pod - Torrus installation instructions # Copyright (C) 2002-2011 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 Torrus Installation Instructions =head2 Required Software =over 4 =item * Operating System Torrus should easily run on any UNIX-like operation system, as long as the required components are provided. If the OS mounts F directory to a temporary filesystem, C variable must point to a path on a persistent storage. Alternatively C can point to F itself. The default path is F, and temporary filesystems do not preserve subdirectories after a system reboot. Note to B users: as recommended by Gord Philpott, Linux kernel for guest machine needs to be compiled with the following feature enabled: C Enhanced Real Time Clock Support>. For other guest operating systems (e.g. FreeBSD), in order to let the Torrus collector and monitor run properly, you need to add the following lines to your F: $Torrus::Scheduler::maxSleepTime = 15; $Torrus::Scheduler::ignoreClockSkew = 1; It is recommended to use Tobi Oetiker's SDBS tool available at Ehttps://github.com/oetiker/sdbsE. The tool compiles all Torrus prerequisites from sources, and guarantees the version compatibility. =item * Perl Perl version C<5.8.1> or higher is required. B is not recommended> because of memory access bugs and unpredictable behaviour. Perl interpreter should be in PATH environment variable when running C<./configure>, otherwise use ./configure PERL=/path/to/perl Torrus also supports Perl multithreading in Device Discovery engine and in the Collector. Minimum requirements are as follows: Perl version 5.8.8 or higher, C module version 1.41 or higher, C module version 1.03 or higher. Older versions had bugs that were leading to severe memory leaks and instability. After installing Perl 5.8.8, you need to upgrade the C and C modules manually from CPAN. If any of the requirements is not met, the installer will automatically disable the threads support in Torrus. =item * RRDtool Round Robin Database Tool is available at: Ehttp://oss.oetiker.ch/rrdtool/E. The version that is coming with Debian and Ubuntu packages has shown some instability in Torrus WebUI -- most probably because of the bugs in graphical libraries that it uses. It is recommended to compile the tested versions with SDBS instead of using precompiled packages. =item * libxml2 libxml2 is the XML parser library from Gnome project Ehttp://www.gnome.orgE, available as a standalone package. Versions C<2.4.23> and above were tested. =item * Berkeley DB version 4.2.52 or later There are two distinct packages with slightly conflicting names: The Berkeley DB from Sleepycat Software Ehttp://www.sleepycat.comE, and C Perl module available from CPAN. We will always refer the latter as I. The Berkeley DB database engine is used for all data storage. Versions C<4.2.52> and above are recommended. Older versions of Berkeley DB had problems with database integrity in concurrent usage. By default, it installs into F. Unfortunately, the BerkeleyDB Perl module cannot always find the include and library files in that directory. Thus either configure Berkeley DB with the option C<--prefix=/usr/local>, or you need to edit F in BerkeleyDB Perl module distribution. =item * HTTP Server Torrus requires an HTTP server. It is compatible with the following combinations: =over 8 =item * lighttpd, ngnix or Apache with FastCGI =item * Apache 1.3 with mod_perl 1.0 (not recommended and soon to be dropped) =item * Apache 2.x with mod_perl 2.0 (not recommended and soon to be dropped) =back FastCGI is supported in Torrus version 1.0.9 or higher. It is the preferred way of using Torrus, more stable than mod_perl. B Starting from Torrus version 1.0.9, C is no longer required. See I for details on HTTP server configuration. =item * Perl Modules The Perl modules required are listed below. They are all available at CPAN Ehttp://www.cpan.orgE. Some of them require other modules to be installed. You can install all required modules with the following command, executed from within the distribution directory: perl -I `pwd`/setup_tools -MCPAN -e 'install Bundle::Torrus' =over 8 =item * XML::LibXML This is a Perl interface for libxml2, providing DOM standards compliant interface. It is recommended that you use version C<1.54_3> or higher. =item * BerkeleyDB perl module Perl interface to the database software. Version C<0.19> or higher is required. =item * Template-Toolkit This is a powerful set of tools for text template processing. Torrus uses it for HTML files output. See also the project homepage: Ehttp://www.template-toolkit.orgE =item * Proc::Daemon Daemon invocation routines. =item * Net::SNMP SNMP queries and traps interface. Version C<4.0.3> or higher is required. I: Torrus versions prior to 1.0.9 are incompatible with Net::SNMP version 6.0.0. You may need to downgrate the module to 5.2.0. =item * URI::Escape Escape and unescape unsafe characters =item * Apache (mod_perl version 1.0) Mod_perl is a Perl runtime environment integrated into Apache HTTP server. =item * Apache::Session User session tracking helper =item * Date::Parse and Date::Format Module for parsing the user input for date and time. =item * JSON JSON data format support =back =item * HTTP Browser requirements The HTTP browser must be compatible with I and I specifications. The tests were made with the following browsers: IE 5.5, Opera 6.12B1/Solaris, Opera 7.03/Win2K, Netscape 7.02. =back =head2 Installation Procedure Create the group C and a user C. The user should be a member of this group. Add your Apache daemon user to the group C. Other users that will run any of Torrus processes must be included in this group. For example, in Solaris (you may need to specify the GID and UID numbers according to your local administration policy): groupadd torrus useradd -c 'Torrus Daemon' -d /usr/local/torrus -g torrus torrus usermod -G www,torrus www Further installation process is mostly as usual (watch out C setting, as described above): ./configure make make install The default directory layout is described below. Should you need to change it, there is a number of variables and configuration options that you may use as C<./configure> arguments. See C<./configure --help> for details. Alternatively you can utilize the script C<./setup_tools/configure_fhs>, which is designed to provide an FHS compliant setup. The script is equivalent to executing ./configure \ --prefix=/opt \ --mandir=/opt/share/man \ pkghome=/opt/torrus \ sitedir=/etc/opt/torrus Do not try to change any paths by supplying them as C variables, this would most probably break the installation. The only C variable that is supported is C. It may be used for preparing the package for further distribution. For example, the following command would install all Torrus files as if F were the root of the filesystem: make DESTDIR=/tmp/stage install The presence of prerequisite Perl modules is checked during the execution of C<./configure>. You can disable this by giving I<--enable-pkgonly> option. The installer sets up the site configuration files, but only if they don't already exist. Plugin modules should be installed separately, after the Torrus software is successfully installed. For each plugin, unpack the plugin distribution archive to some directory, and execute torrus install_plugin A number of directories is set up by default under the path C, and they must be writable by all Torrus processes, including the Apache web server. You can control these directories' access rights by setting the following environment variables: I, I, I, like follows: ./configure var_group=wwwrun Default values for operating systems other than Cygwin are: I, I, I. Setgid bit is set by default for these directories. If available, you may place these directories on a fast media, for example, a robust disk array. Changing the C variable would be generally enough, for example: ./configure varprefix=/vol1/torrus_var Attention for the systems that have F in a temporary directory. By default, Torrus installer creates a directory F to store the daemon PID files. After the server reboot, the temporary filesystems are cleaned up, and the directory would not exist any more. Use I or similar in the ./configure arguments. =head2 Logging As of Torrus version 2.02, the collector and monitor daemons send their logs to a local SYSLOG server in "local0" facility by default. The SYSLOG facility can be altered in F: $Torrus::Log::syslogFacility = 'local5'; Also the following two statements would revert to the old behavior (log files written directly by the daemons). Please not that the daemons would not rotate the logs on SIGHUP: $Torrus::Collector::useSyslog = 0; $Torrus::Monitor::useSyslog = 0; If your system policy does not allow to use the system SYSKLOG daemon, you can run your own (rsyslogd is recommended) and attach it to a UNIX socket. In this case, the following statement in siteconfig would direct all logging to an alternative SYSLOG socket: $Torrus::Log::syslogSockOpt = ['unix', '/home/jsmith/tmp/syslog.sock']; =head2 Torrus directory layout @pkghome@/ Home directory for Torrus distribution files @cfgdefdir@/ torrus-config.pl and other configuration files @pkgbindir@/ Command-line executables @docdir@/ POD and TXT documentation files @exmpdir@/ Miscelaneous example files @perllibdir@/ Perl libraries @pluginsdir@/ Plugins configuration @scriptsdir@/ Scripts @supdir@/ Supplementary files, DTDs, MIBs, color schemas, web plain files @tmpldir@/ Renderer output templates @distxmldir@/ Distrubution XML files @sitedir@/ Site configurable files @siteconfdir@/ Place for torrus-siteconfig.pl and other siteconfigs @siteconfdir@/discovery/ Devdiscover input files @tmpluserdir@/ User-defined Renderer output templates @sitexmldir@/ User XML configuration files @mandir@ Place for man pages. All articles have the prefix C @logdir@/ Daemon logfiles @piddir@ Daemon PID files @cachedir@ Renderer cache @dbhome@ Berkeley DB home @seslockdir@ @sesstordir@ Web interface session files @defrrddir@ Recommended directory for RRD files generated by collectors =head2 Configuring Torrus The datasources are configured with C<%Torrus::Global::treeConfig> hash in F. In this hash, the keys give the tree names. The values for each tree name are pointers to hashes, with the following keys and values: I points to an array of source XML file names; I points to a hash with the names of the daemons that would be automatically launched for the tree; I gives a short line describing the tree contents. Two additional arrays: C<@Torrus::Global::xmlAlwaysIncludeFirst> and C<@Torrus::Global::xmlAlwaysIncludeLast> give a list of source XML files that are included in every tree, in the beginning or in the end of the XML files list. By default, this array consists of two files: F and F. The second one is resided in the user-configurable directory, and you can use it to override any default settings. Example: @Torrus::Global::xmlAlwaysIncludeFirst = ('defaults.xml', 'site-global.xml'); %Torrus::Global::treeConfig = ( 'tree_A' => { 'description' => 'The First Tree', 'xmlfiles' => [qw(a1.xml a2.xml a3.xml)], 'run' => { 'collector' => 1, 'monitor' => 1 } }, 'tree_B' => { 'description' => 'The Second Tree', 'xmlfiles' => ['b1.xml', 'b2.xml'], 'run' => {} } ); XML files are read additively within each tree, in the order as they are listed. The XML compiler searches for the files in several directories, listed in C<@Torrus::Global::xmlDirs>. By default, this list conssists of two paths, one for Torrus distribution files, and the other for user files. Files generated by C usually contain I statements which add the vendor-specific XML files to the compilation. Below follows a short description of some XML files that come with Torrus distribution. Only F is installed in the directory for user-configurable files, all others are placed in the distribution directory. =over 4 =item * defaults.xml Default parameters for the root of the datasources tree. Default view definitions. B this file is automatically overwritten by C. =item * site-global.xml Parameters that you want to change or define for your site. This file will be compiled for every tree after F, and this is the place to override the defaults. The file that is supplied with the Torrus distribution has some useful parameters that you may simply uncomment. B this file is never overwritten by C. =item * snmp-defs.xml SNMP collector defaults. The file defines several templates used for collecting SNMP data. Do not change this file. You may redefine the needed parameters in your site-specific files and templates. =item * vendor/EvendorE.EproductE[.EsubsystemE].xml SNMP collector definitions and templates for various hardware vendors and products. C includes some of these files automatically in the configuration. =item * generic/*.xml SNMP collector definitions and templates for vendor-independent MIBs. Most files are named after corresponding RFC numbers. =back In addition, the distribution package contains several example files. For more details about XML configuration, see I and I. =head2 Site configuration options In addition to I<%Torrus::Global::treeConfig>, you may wish to set some other parameters in your site configuration file (F). See F for the complete list of varaibes that you may override in your site config. Among them, most interesting are: =over 4 =item * C<$Torrus::Renderer::companyName> The text that you specify here will appear in the top left corner of all HTML pages. =item * C<$Torrus::Renderer::companyURL> The company name text will be clickable with the URL specified in this variable. =back =head2 Apache HTTP server configuration Torrus web interface is designed to run under mod_perl environment (Ehttp://perl.apache.orgE). See the I document for detailed instructions on Apache configuration. =head2 Access Control Lists By default, Torrus web interface requires user authentication. You can disable this by changing C<$Torrus::CGI::authorizeUsers> to zero in your F. ACLs are controlled by C utility. See I for detailed description. Example: torrus acledit --addgroup=staff --permit=DisplayTree --for='*' torrus acledit --addgroup=staff --permit=GlobalSearch --for='*' torrus acledit --adduser=jsmith --password=mysecretpassword \ --cn="John Smith" --addtogroup=staff torrus acledit --addgroup=admin \ --permit=DisplayTree --permit=DisplayAdmInfo --for='*' =head2 Cron Job In order to clean old HTTP session data, it is recommended to run F script in a cron job, once per day: #min hour mday month wday who command 5 3 * * * root @pkgbindir@/cleanup =head2 Startup script The Torrus distriubution provides a startup script which you can install in the init scripts directory (/etc/init.d on most Unixes or /usr/local/etc/rc.d/ on FreeBSD). The script C is created during the installation process in the subdirectory of the distribution directory. The init script reads some parameters from F<@cfgdefdir@/initscript.conf>, and F<@siteconfdir@/initscript.siteconf> if the latter exists. By default, it makes the monitor daemons sleep for 20 minutes when they are launched simultaneously with collector daemons. =head2 Upgrade Procedure Follow these instructions when upgrading from previous Torrus release. In the previous distribution directory, look up the F file. It contains the configure options that you used in previous installation. Unpack the new release distribution. Run C<./configure> with the same options you used before. Stop the collector and monitor processes (usually by C). Stop Apache process. Run C. Start the collector and monitor processes. Start Apache process. Also it is recommended to re-compile your XML configuration. If you prefer not to do this, it's recommended that you clear the Web interface cache both in your browser and in Torrus: torrus clearcache =head2 Plugins As of Torrus version 2.01, plugins inherit a new release numbering scheme: a plugin release version is a 3-component number, where the first two numbers are the Torrus release version that is compatible with this plugin. =head2 Planning the disk space In a typical Torrus setup, there are two disk space consuming entities: the RRDtool data storage and the Berkeley DB database. RRDtool data files (or RRD's) are used to store the values that are gathered by the collector daemons. These are the most intensively updated files, so the disk speed is important here. If possible, it is better to spread the RRD files across several physical disks. Berkeley DB database is used to keep all the configuratiuon data for your datasource trees, and it also keeps some live status information. It's intensively updated during XML compilation only. During normal Torrus working cycle, there are only few updates, not very critical in time. The database is read quite intensively during collector initialization, but usually it's the CPU speed that causes more delay. For a typical Torrus installation with standard RRD creation parameters, the rough estimation is as follows: the Berkeley DB database occupies from 10 to 13 KB per collector datasource, and the RRD storage takes approximately 80 to 85 KB per datasource. For a medium-sized system, few hundred megabytes for the Berkeley DB database and several gigabytes for RRD storage would be sufficient. Larger systems require a thorough design and staging work. See I for more details. =head2 Network performance tuning In large installations, the SNMP collector experiences quite intensive input traffic bursts. Thus the UDP socket receive buffers should be adapted to sustain the load. By default, Torrus sets the UDP receiving buffer size, SO_RCVBUF, to 131071 bytes. This should fit most of installations. However, it's useful to check the network statistics if there are any UDP buffer overflows. On most systems, the commands C or C should show you these counters. The maximum buffer size is usually limited by a system kernel variable, and can be increased if needed. See C<$Torrus::Collector::SNMP::RxBuffer> and its comments in F for more details. =head1 Author Copyright (c) 2002-2012 Stanislav Sinyagin Essinyagin@yahoo.comE torrus-2.08/doc/devdoc/0000755000175000017500000000000012413221022012000 500000000000000torrus-2.08/doc/devdoc/torrus_roadmap.pod0000644000175000017500000001744611661302716015517 00000000000000# # 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. # Stanislav Sinyagin # =head1 RRFW to Torrus transition roadmap =head2 Introduction The name "RRFW" appeared to be quite difficult to remember and to pronounce. There has been a call for a new name, and recently a good suggestion came from Francois Mikus: --- Francois Mikus wrote: > Here is my humble flash, which I think may be appropriate. Which I will > explain why below... > > The name I would suggest is; > > Torrus > > Has a mythical sounding name without the actual history. Has a resonance > with Torrent, where rrfw deals with a torrent of information. A google > search comes up with near nothing, and nothing commercial. Has a > resonance with Taurus, which is mythical, astrological and has an > underlying strength connotation. > > Anyway, this is the best I could think of. And it provides an opening to > have a semi-mythical/comic style yet serious mascot. > > You have a LOT of documentation. web pages, code, etc.. But marketing is > the way to win hearts and minds, create a following and get rabid > developpers on-board! Thus the project will be renamed to Torrus, and few other structural changes will accompany the transition. =head2 Releases roadmap Version 0.1.8 will be the last of RRFW, unless some urgencies arise. The first Torrus release will be 1.0.0. =head2 Multiple XML cofiguration directories During XML compilation, the datasource configuration files will be searched in multiple directories. The list of directories and the search sequence will be configurable. This will allow not to mix the distribution XML files and the ones created locally. =head2 Separated directories for templates and configuration Perl configuration files and HTML templates will also be separated into different directories, so that user-editable files don't mix with the ones from distribution. =head2 Commandline launcher A small shell script will be installed as C, and it will pass all arguments to appropriate torrus executables. For example, torrus compile --tree=main will execute C torrus utility with the argument C<--tree=main>. =head2 New directory hierarchy Filesystem Hierarchy Standard Ehttp://www.pathname.com/fhs/E proposes to put the software add-on packages into C directory and user services data, such as database contents or RRD files, in C directory. However, FreeBSD and some other systems are not FHS-compliant, and require to install all additional software into C hierarchy. We propose that Torrus distribution will support three different directory layouts, and the system administrator will decide the most suitable one: =over 4 =item 1 Default layout based in C; =item 2 FHS compliant layout, set by running C<./configure_fhs> instead of C<./configure>; =item 3 Custom layout, tunable with standard options and variables in C<./configure>. =back =head3 Default layout Although many systems like FreeBSD discourage creation of new package-specific subdirectories in /usr/local, we find it quite a common practice, and quite convenient for keeping the files together. /usr/local/torrus/ Home directory for Torrus distribution files | +- conf_defaults/ torrus-config.pl and others | +- bin/ Command-line executables | +- doc/ POD and TXT documentation files | +- examples/ Miscelaneous example files | +- perllib/ Perl libraries | +- plugins/ Plugins configuration | +- scripts/ Scripts | +- sup/ Supplementary files, DTDs, MIBs, color schemas, | Web plain files | +- templates/ Renderer output templates | +- xmlconfig/ Distrubution XML files /usr/local/etc/torrus/ Site configurable files | +- conf/ Place for torrus-siteconfig.pl and other siteconfigs | +- discovery/ Devdiscover input files | +- templates/ User-defined Renderer output templates | +- xmlconfig/ User XML configuration files /usr/local/man/ Place for man pages. All articles will have the prefix C /var/log/torrus/ Daemon logfiles /var/run/torrus/ Daemon PID files /var/torrus/cache/ Renderer cache /var/torrus/db/ Configuration databases /var/torrus/session_data/ Web interface session files /srv/torrus/collector_rrd/ Default directory for collector generated RRD files =head3 FHS compliant layout /opt/torrus/ Home directory for Torrus distribution files | +- conf_defaults/ torrus-config.pl and others | +- bin/ Command-line executables | +- doc/ POD and TXT documentation files | +- examples/ Miscelaneous example files | +- perllib/ Perl libraries | +- plugins/ Plugins configuration | +- scripts/ Scripts | +- sup/ Supplementary files, DTDs, MIBs, color schemas | +- templates/ Renderer output templates | +- xmlconfig/ Distrubution XML files /etc/opt/torrus/ Site configurable files | +- conf/ Place for torrus-siteconfig.pl and other siteconfigs | +- discovery/ Devdiscover input files | +- xmlconfig/ User XML configuration files /opt/torrus/share/man/ Place for man pages. All articles will have the prefix C /var/log/torrus/ Daemon logfiles /var/run/torrus/ Daemon PID files /var/torrus/cache/ Renderer cache /var/torrus/session_data/ Web interface session files /srv/torrus/db/ Configuration databases /srv/torrus/collector_rrd/ Default directory for collector generated RRD files =head2 New plugins design Unlike RRFW, the plugins in Torrus will be installed independently. This will allow to easily add new plugins to an existing installation. The Torrus installer stores all important variable settings in a special file, F. Then the plugin installer is able to access the settings without accessing the Torrus distribution directory. There is a helper utility, C, which applies all I variables to the plugin configuration utility. It follows then the standard installation way: ./configure && make && make install Thus the OS-dependent package installators may follow the standard configuration procedure, while those who manually install the software, will use the helper. There are two special directories: F and F. Plugins are allowed to add Perl files there. They will be automatically I'd by F and F. =head2 Authors Copyright (c) 2004 Stanislav Sinyagin torrus-2.08/doc/devdoc/reqs.0.0.pod0000644000175000017500000001330211661302716013707 00000000000000# requirements.pod: The pre-planning document # Copyright (C) 2002 Stanislav Sinyagin # # 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. # Stanislav Sinyagin # # =head1 RRD Framework Requirements Version 0.0 Date: Jul 10 2002 This article defines some principles that a supposedly future RRD framework should have. The framework should consist of 3 independent subsystems: =over 4 =item Data Collection =item Data Monitoring =item Data Displaying =back =head2 Flexible Hierarchical Configuration Inspired by Cricket hierarchical configuration, we state here that the configuration should be hierarchical. Child nodes should inherit the properties from parents. The format of the configuration files has not to be neccessary as in Cricket. I'm not sure if it's worth keeping them in a directory structure representing the hierarchy tree, but it's definitive that multiple files should be supported. A good step ahead would be the configuration in XML format. It is also possible to have a converter from some other formats (plain text, or an SQL database) into XML which will be consumed by the framework. I leave the Data collection uncovered, since all of the existing RRD frontends do this part already. =head1 Data Monitoring Principles At the moment, the only known solution for RRD data monitoring is Cricket. Its threshold monitoring has certain limitation and drawbacks. Nevertheless, it may be used as the basis for the ideas in the further development. The major idea is to build data monitoring as a part of a bigger RRD framework, still being the independent part of the whole. The data can come from many differet sources, from RRDs produced by any of the existing and future frontends. =head2 File Naming Flexibility In most existing RRD frontends, each RRD datafile should be described individually. This is not very convenient, especially for the cases when you have several (dozens) files containing one type of data. (e.g., input traffic per source autonomous system). Also the files of same type can be created and deleted by their sourcing frontend, and it would be more convenient not having to change the monitoring configuration. Thus, we need a wildcards language which would allow to specify multiple files and derive the datasource names from thir names. =head2 Datasource Naming Each data being monitored (for RRDs, its definition specifies the Efilename, DS, RRAE triple) has to have a universal name. The name can be fully or partly qualified, depending on the configuration tree. Examples of such data reference follow: /Netflow/Exporters/63.2.3.224/if3/bps /* Interface #3 on router 63.2.3.224 */ /Netflow/Subnets/Dialin/bps /* Dial-in address pool */ /* different grouping for the rack temperature in Server Room 1 */ /Envmon/RackTemp/SR1 /SR1/Envmon/RackTemp Name aliasing should allow short or symbolic names for data sources: /* Alias for /Netflow/Exporters/63.2.3.224/if3 */ /Netflow/Upstream/FranceTelecom1 =head2 Monitoring Rules Data threshold monitoring should be described in a hierarchical manner. It would be interesting to have monitoring rules separate from the data hierarchy. On the other hand, 1) some data sources might need special and unique monitoring rules; 2) in some cases, several data sources need to be combined in order to build a threshold rule. I'm not yet sure how this must be achieved. =head2 Event Processing Once the threshold violation occurs, the monitoring system should produce the alarm event. Cricket has a good set of ways to report the alarm, and they can be taken as the basis. Also what Cricket is really missing, is displaying those data sources being alarmed. The Monitoring system should produce the instructions to the Displaying system in order to display the summary of those data sources which produce alarms within certain time. =head1 Data Displaying Principles View profiles should be configured in a hierarchical manner. Again as with data monitoring, some Views should be configured independently of the data hierarchy, but also some data should be able to define specific view profiles. There should be view profiles of different types: =over 4 =item * HTML Framework. Defines the HTML elements that should be displayed around the graphs. It also should define the child graphs. Also it should define the controls which would cause the option changes in the child graphs (e.g., enabling "Show Holt-Winters Boundaries" would produce the corresponding graph). =item * Individual Graph. Defines the way the graph should look. It should also be capable of displaying an arbitrary number of data sources. It should have tunable options, like color, size, or time period. =back The Displaying system should allow the following ways of viewing: 1) hierarchical browsing, like Cricket; 2) alarm summary display; 3) individual graph display, without HTML surrounding. The graph images should be cashed and reused whenever possible. In alarm summary browsing, these images can be generated at the moment of the event. =head1 Author Copyright (c) 2002 Stanislav Sinyagin ssinyagin@yahoo.com torrus-2.08/doc/devdoc/devdiscover.pod0000644000175000017500000002540011661302716014760 00000000000000# devdiscover.pod - Guide to devdiscover # Copyright (C) 2003 Shawn Ferry, Stanislav Sinyagin # # 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. # Shawn Ferry # Stanislav Sinyagin # =head1 Torrus SNMP Device Discovery Developer's Guide =head2 C overview C is an extensible, module based, SNMP device discovery utility. It is intended to automatically generate Torrus configuration files, based on SNMP discovery results and templates. See I for command usage and functionality overview. In general, C consists of the following files and functional parts: =over 4 =item * C This file is installed as C in Torrus installation directory, with certain variables substituted. The program provides all the commandline functionality and options processing. Once the CLI options are processed and verified, the control is passed to the C object. =item * C This Perl module is responsible for the SNMP discovery process organization: =over 8 =item * it registers the discovery modules; =item * establishes an SNMP session to the target host; =item * initiates a new C object for the target host; =item * stores the connection-specific parameters to the device object; =item * for each registered discovery module, executes C in I order; =item * for those discovery modules which paid interest in this target host, executes C in I order; =item * upon request from C, builds the configuration XML tree, by calling C in I order for each relevant discovery module for each target host. =back =item * C This Perl module is defined in F, and provides the functionality to store the results of SNMP device discovery. =item * C This module is an encapsulation wrapper for XML configuration builder. It provides methods for every element of Torrus configuration. =item * Discovery Modules These provide all the functionality for SNMP discovery. Normally one module covers one MIB, or sometimes several vendor-specific MIBs, and it is responsible for finding out the device details necessary for Torrus configuration building. Usually a discovery module refers to one or several I