Imported Upstream version 2.4.3
This commit is contained in:
commit
26fb71b504
446 changed files with 148951 additions and 0 deletions
17
conf/Makefile.am
Normal file
17
conf/Makefile.am
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Network UPS Tools: conf
|
||||
|
||||
INSTALL_0600 = $(INSTALL) -m 0600
|
||||
|
||||
SECFILES = upsmon.conf.sample upsd.conf.sample upsd.users.sample
|
||||
PUBFILES = nut.conf.sample ups.conf.sample
|
||||
CGIPUB = hosts.conf.sample upsset.conf.sample upsstats.html.sample \
|
||||
upsstats-single.html.sample
|
||||
|
||||
if WITH_CGI
|
||||
CGI_INSTALL = $(CGIPUB)
|
||||
else
|
||||
CGI_INSTALL =
|
||||
endif
|
||||
|
||||
dist_sysconf_DATA = $(SECFILES) $(PUBFILES) $(CGI_INSTALL)
|
||||
nodist_sysconf_DATA = upssched.conf.sample
|
497
conf/Makefile.in
Normal file
497
conf/Makefile.in
Normal file
|
@ -0,0 +1,497 @@
|
|||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
|
||||
|
||||
# Network UPS Tools: conf
|
||||
|
||||
VPATH = @srcdir@
|
||||
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@
|
||||
target_triplet = @target@
|
||||
subdir = conf
|
||||
DIST_COMMON = $(am__dist_sysconf_DATA_DIST) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/upssched.conf.sample.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||
$(top_srcdir)/m4/nut_check_ipv6.m4 \
|
||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
|
||||
$(top_srcdir)/m4/nut_check_libpowerman.m4 \
|
||||
$(top_srcdir)/m4/nut_check_libssl.m4 \
|
||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||
CONFIG_CLEAN_FILES = upssched.conf.sample
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__dist_sysconf_DATA_DIST = upsmon.conf.sample upsd.conf.sample \
|
||||
upsd.users.sample nut.conf.sample ups.conf.sample \
|
||||
hosts.conf.sample upsset.conf.sample upsstats.html.sample \
|
||||
upsstats-single.html.sample
|
||||
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__installdirs = "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(sysconfdir)"
|
||||
DATA = $(dist_sysconf_DATA) $(nodist_sysconf_DATA)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BINDIR = @BINDIR@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CONFPATH = @CONFPATH@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@
|
||||
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
||||
HAL_FDI_PATH = @HAL_FDI_PATH@
|
||||
HAL_USER = @HAL_USER@
|
||||
HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
||||
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
||||
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
||||
LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@
|
||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||
LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@
|
||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||
LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
||||
LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||
LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||
LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@
|
||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||
LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NETLIBS = @NETLIBS@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OS_NAME = @OS_NAME@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
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@
|
||||
RANLIB = @RANLIB@
|
||||
RUN_AS_GROUP = @RUN_AS_GROUP@
|
||||
RUN_AS_USER = @RUN_AS_USER@
|
||||
SED = @SED@
|
||||
SERLIBS = @SERLIBS@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STATEPATH = @STATEPATH@
|
||||
STRIP = @STRIP@
|
||||
SUN_LIBUSB = @SUN_LIBUSB@
|
||||
VERSION = @VERSION@
|
||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
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@
|
||||
cgiexecdir = @cgiexecdir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
driverexecdir = @driverexecdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
hotplugdir = @hotplugdir@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
udevdir = @udevdir@
|
||||
INSTALL_0600 = $(INSTALL) -m 0600
|
||||
SECFILES = upsmon.conf.sample upsd.conf.sample upsd.users.sample
|
||||
PUBFILES = nut.conf.sample ups.conf.sample
|
||||
CGIPUB = hosts.conf.sample upsset.conf.sample upsstats.html.sample \
|
||||
upsstats-single.html.sample
|
||||
|
||||
@WITH_CGI_FALSE@CGI_INSTALL =
|
||||
@WITH_CGI_TRUE@CGI_INSTALL = $(CGIPUB)
|
||||
dist_sysconf_DATA = $(SECFILES) $(PUBFILES) $(CGI_INSTALL)
|
||||
nodist_sysconf_DATA = upssched.conf.sample
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 conf/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu conf/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
upssched.conf.sample: $(top_builddir)/config.status $(srcdir)/upssched.conf.sample.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-dist_sysconfDATA: $(dist_sysconf_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)"
|
||||
@list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
|
||||
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)$(sysconfdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-dist_sysconfDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(sysconfdir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(sysconfdir)" && rm -f $$files
|
||||
install-nodist_sysconfDATA: $(nodist_sysconf_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)"
|
||||
@list='$(nodist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
|
||||
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)$(sysconfdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-nodist_sysconfDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(nodist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(sysconfdir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(sysconfdir)" && rm -f $$files
|
||||
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)$(sysconfdir)" "$(DESTDIR)$(sysconfdir)"; 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:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
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 clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-dist_sysconfDATA install-nodist_sysconfDATA
|
||||
|
||||
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 mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-dist_sysconfDATA uninstall-nodist_sysconfDATA
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dist_sysconfDATA \
|
||||
install-dvi install-dvi-am install-exec install-exec-am \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-nodist_sysconfDATA install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
|
||||
uninstall-dist_sysconfDATA uninstall-nodist_sysconfDATA
|
||||
|
||||
|
||||
# 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:
|
29
conf/hosts.conf.sample
Normal file
29
conf/hosts.conf.sample
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Network UPS Tools: example hosts.conf
|
||||
#
|
||||
# This file is used to control the CGI programs. If you have not
|
||||
# installed them, you may safely ignore or delete this file.
|
||||
#
|
||||
# -----------------------------------------------------------------------
|
||||
#
|
||||
# upsstats will use the list of MONITOR entries when displaying the
|
||||
# default template (upsstats.html). The "FOREACHUPS" directive in the
|
||||
# template will use this file to find systems running upsd.
|
||||
#
|
||||
# upsstats and upsimage also use this file to determine if a host may be
|
||||
# monitored. This keeps evil people from using your system to annoy
|
||||
# others with unintended queries.
|
||||
#
|
||||
# upsset presents a list of systems that may be viewed and controlled
|
||||
# using this file.
|
||||
#
|
||||
# -----------------------------------------------------------------------
|
||||
#
|
||||
# Usage: list systems running upsd that you want to monitor
|
||||
#
|
||||
# MONITOR <system> "<host description>"
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# MONITOR myups@localhost "Local UPS"
|
||||
# MONITOR su2200@10.64.1.1 "Finance department"
|
||||
# MONITOR matrix@shs-server.example.edu "Sierra High School data room #1"
|
28
conf/nut.conf.sample
Normal file
28
conf/nut.conf.sample
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Network UPS Tools: example nut.conf
|
||||
#
|
||||
##############################################################################
|
||||
# General section
|
||||
##############################################################################
|
||||
# The MODE determines which part of the NUT is to be started, and which
|
||||
# configuration files must be modified.
|
||||
#
|
||||
# This file try to standardize the various files being found in the field, like
|
||||
# /etc/default/nut on Debian based systems, /etc/sysconfig/ups on RedHat based
|
||||
# systems, ... Distribution's init script should source this file to see which
|
||||
# component(s) has to be started.
|
||||
#
|
||||
# The values of MODE can be:
|
||||
# - none: NUT is not configured, or use the Integrated Power Management, or use
|
||||
# some external system to startup NUT components. So nothing is to be started.
|
||||
# - standalone: This mode address a local only configuration, with 1 UPS
|
||||
# protecting the local system. This implies to start the 3 NUT layers (driver,
|
||||
# upsd and upsmon) and the matching configuration files. This mode can also
|
||||
# address UPS redundancy.
|
||||
# - netserver: same as for the standalone configuration, but also need
|
||||
# some more network access controls (firewall, tcp-wrappers) and possibly a
|
||||
# specific LISTEN directive in upsd.conf.
|
||||
# Since this MODE is opened to the network, a special care should be applied
|
||||
# to security concerns.
|
||||
# - netclient: this mode only requires upsmon.
|
||||
|
||||
MODE = none
|
104
conf/ups.conf.sample
Normal file
104
conf/ups.conf.sample
Normal file
|
@ -0,0 +1,104 @@
|
|||
# Network UPS Tools: example ups.conf
|
||||
#
|
||||
# --- SECURITY NOTE ---
|
||||
#
|
||||
# If you use snmp-ups and set a community string in here, you
|
||||
# will have to secure this file to keep other users from obtaining
|
||||
# that string. It needs to be readable by upsdrvctl and any drivers,
|
||||
# and by upsd.
|
||||
#
|
||||
# ---
|
||||
#
|
||||
# This is where you configure all the UPSes that this system will be
|
||||
# monitoring directly. These are usually attached to serial ports, but
|
||||
# USB devices and SNMP devices are also supported.
|
||||
#
|
||||
# This file is used by upsdrvctl to start and stop your driver(s), and
|
||||
# is also used by upsd to determine which drivers to monitor. The
|
||||
# drivers themselves also read this file for configuration directives.
|
||||
#
|
||||
# The general form is:
|
||||
#
|
||||
# [upsname]
|
||||
# driver = <drivername>
|
||||
# port = <portname>
|
||||
# < any other directives here >
|
||||
#
|
||||
# The section header ([upsname]) can be just about anything as long as
|
||||
# it is a single word inside brackets. upsd uses this to uniquely
|
||||
# identify a UPS on this system.
|
||||
#
|
||||
# If you have a UPS called snoopy, your section header would be "[snoopy]".
|
||||
# On a system called "doghouse", the line in your upsmon.conf to monitor
|
||||
# it would look something like this:
|
||||
#
|
||||
# MONITOR snoopy@doghouse 1 upsmonuser mypassword master
|
||||
#
|
||||
# It might look like this if monitoring in slave mode:
|
||||
#
|
||||
# MONITOR snoopy@doghouse 1 upsmonuser mypassword slave
|
||||
#
|
||||
# Configuration directives
|
||||
# ------------------------
|
||||
#
|
||||
# These directives are common to all drivers that support ups.conf:
|
||||
#
|
||||
# driver: REQUIRED. Specify the program to run to talk to this UPS.
|
||||
# apcsmart, bestups, and sec are some examples.
|
||||
#
|
||||
# port: REQUIRED. The serial port where your UPS is connected.
|
||||
# /dev/ttyS0 is usually the first port on Linux boxes, for example.
|
||||
#
|
||||
# sdorder: optional. When you have multiple UPSes on your system, you
|
||||
# usually need to turn them off in a certain order. upsdrvctl
|
||||
# shuts down all the 0s, then the 1s, 2s, and so on. To exclude
|
||||
# a UPS from the shutdown sequence, set this to -1.
|
||||
#
|
||||
# The default value for this parameter is 0.
|
||||
#
|
||||
# nolock: optional, and not recommended for use in this file.
|
||||
#
|
||||
# If you put nolock in here, the driver will not lock the
|
||||
# serial port every time it starts. This may allow other
|
||||
# processes to seize the port if you start more than one by
|
||||
# mistake.
|
||||
#
|
||||
# This is only intended to be used on systems where locking
|
||||
# absolutely must be disabled for the software to work.
|
||||
#
|
||||
# maxstartdelay: optional. This can be set as a global variable
|
||||
# above your first UPS definition and it can also be
|
||||
# set in a UPS section. This value controls how long
|
||||
# upsdrvctl will wait for the driver to finish starting.
|
||||
# This keeps your system from getting stuck due to a
|
||||
# broken driver or UPS.
|
||||
#
|
||||
# The default is 45 seconds.
|
||||
#
|
||||
#
|
||||
# Anything else is passed through to the hardware-specific part of
|
||||
# the driver.
|
||||
#
|
||||
# Examples
|
||||
# --------
|
||||
#
|
||||
# A simple example for a UPS called "powerpal" that uses the megatec
|
||||
# driver on /dev/ttyS0 is:
|
||||
#
|
||||
# [powerpal]
|
||||
# driver = megatec
|
||||
# port = /dev/ttyS0
|
||||
# desc = "Web server"
|
||||
#
|
||||
# If your UPS driver requires additional settings, you can specify them
|
||||
# here. For example, if it supports a setting of "1234" for the
|
||||
# variable "cable", it would look like this:
|
||||
#
|
||||
# [myups]
|
||||
# driver = mydriver
|
||||
# port = /dev/ttyS1
|
||||
# cable = 1234
|
||||
# desc = "Something descriptive"
|
||||
#
|
||||
# To find out if your driver supports any extra settings, start it with
|
||||
# the -h option and/or read the driver's documentation.
|
41
conf/upsd.conf.sample
Normal file
41
conf/upsd.conf.sample
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Network UPS Tools: example upsd configuration file
|
||||
#
|
||||
# This file contains access control data, you should keep it secure.
|
||||
#
|
||||
# It should only be readable by the user that upsd becomes. See the FAQ.
|
||||
|
||||
# =======================================================================
|
||||
# MAXAGE <seconds>
|
||||
# MAXAGE 15
|
||||
#
|
||||
# This defaults to 15 seconds. After a UPS driver has stopped updating
|
||||
# the data for this many seconds, upsd marks it stale and stops making
|
||||
# that information available to clients. After all, the only thing worse
|
||||
# than no data is bad data.
|
||||
#
|
||||
# You should only use this if your driver has difficulties keeping
|
||||
# the data fresh within the normal 15 second interval. Watch the syslog
|
||||
# for notifications from upsd about staleness.
|
||||
|
||||
# =======================================================================
|
||||
# LISTEN <address> [<port>]
|
||||
# LISTEN 127.0.0.1 3493
|
||||
#
|
||||
# This defaults to the localhost listening address and port 3493. You
|
||||
# may specify each interface you want upsd to listen on for connections,
|
||||
# optionally with a port number.
|
||||
#
|
||||
# You may need this if you have multiple interfaces on your machine and
|
||||
# you don't want upsd to listen to all interfaces (for instance on a
|
||||
# firewall, you may not want to listen to the external interface).
|
||||
#
|
||||
# This will only be read at startup of upsd. If you make changes here,
|
||||
# you'll need to restart upsd, reload will have no effect.
|
||||
|
||||
# =======================================================================
|
||||
# MAXCONN <connections>
|
||||
#
|
||||
# This defaults to maximum number allowed on your system. Each UPS, each
|
||||
# LISTEN address and each client count as one connection. If the server
|
||||
# runs out of connections, it will no longer accept new incoming client
|
||||
# connections. Only set this if you know exactly what you're doing.
|
64
conf/upsd.users.sample
Normal file
64
conf/upsd.users.sample
Normal file
|
@ -0,0 +1,64 @@
|
|||
# Network UPS Tools: Example upsd.users
|
||||
#
|
||||
# This file sets the permissions for upsd - the UPS network daemon.
|
||||
# Users are defined here, are given passwords, and their privileges are
|
||||
# controlled here too. Since this file will contain passwords, keep it
|
||||
# secure, with only enough permissions for upsd to read it.
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
# Each user gets a section. To start a section, put the username in
|
||||
# brackets on a line by itself. To set something for that user, specify
|
||||
# it under that section heading. The username is case-sensitive, so
|
||||
# admin and AdMiN are two different users.
|
||||
#
|
||||
# Possible settings:
|
||||
#
|
||||
# password: The user's password. This is case-sensitive.
|
||||
#
|
||||
# --------------------------------------------------------------------------
|
||||
#
|
||||
# actions: Let the user do certain things with upsd.
|
||||
#
|
||||
# Valid actions are:
|
||||
#
|
||||
# SET - change the value of certain variables in the UPS
|
||||
# FSD - set the "forced shutdown" flag in the UPS
|
||||
#
|
||||
# --------------------------------------------------------------------------
|
||||
#
|
||||
# instcmds: Let the user initiate specific instant commands. Use "ALL"
|
||||
# to grant all commands automatically. There are many possible
|
||||
# commands, so use 'upscmd -l' to see what your hardware supports. Here
|
||||
# are a few examples:
|
||||
#
|
||||
# test.panel.start - Start a front panel test
|
||||
# test.battery.start - Start battery test
|
||||
# test.battery.stop - Stop battery test
|
||||
# calibrate.start - Start calibration
|
||||
# calibrate.stop - Stop calibration
|
||||
#
|
||||
# --------------------------------------------------------------------------
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# [admin]
|
||||
# password = mypass
|
||||
# actions = SET
|
||||
# instcmds = ALL
|
||||
#
|
||||
|
||||
#
|
||||
# --- Configuring for upsmon
|
||||
#
|
||||
# To add a user for your upsmon, use this example:
|
||||
#
|
||||
# [upsmon]
|
||||
# password = pass
|
||||
# upsmon master
|
||||
# or
|
||||
# upsmon slave
|
||||
#
|
||||
# The matching MONITOR line in your upsmon.conf would look like this:
|
||||
#
|
||||
# MONITOR myups@localhost 1 upsmon pass master (or slave)
|
299
conf/upsmon.conf.sample
Normal file
299
conf/upsmon.conf.sample
Normal file
|
@ -0,0 +1,299 @@
|
|||
# Network UPS Tools: example upsmon configuration
|
||||
#
|
||||
# This file contains passwords, so keep it secure.
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# RUN_AS_USER <userid>
|
||||
#
|
||||
# By default, upsmon splits into two processes. One stays as root and
|
||||
# waits to run the SHUTDOWNCMD. The other one switches to another userid
|
||||
# and does everything else.
|
||||
#
|
||||
# The default nonprivileged user is set at compile-time with
|
||||
# 'configure --with-user=...'.
|
||||
#
|
||||
# You can override it with '-u <user>' when starting upsmon, or just
|
||||
# define it here for convenience.
|
||||
#
|
||||
# Note: if you plan to use the reload feature, this file (upsmon.conf)
|
||||
# must be readable by this user! Since it contains passwords, DO NOT
|
||||
# make it world-readable. Also, do not make it writable by the upsmon
|
||||
# user, since it creates an opportunity for an attack by changing the
|
||||
# SHUTDOWNCMD to something malicious.
|
||||
#
|
||||
# For best results, you should create a new normal user like "nutmon",
|
||||
# and make it a member of a "nut" group or similar. Then specify it
|
||||
# here and grant read access to the upsmon.conf for that group.
|
||||
#
|
||||
# This user should not have write access to upsmon.conf.
|
||||
#
|
||||
# RUN_AS_USER nutmon
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# MONITOR <system> <powervalue> <username> <password> ("master"|"slave")
|
||||
#
|
||||
# List systems you want to monitor. Not all of these may supply power
|
||||
# to the system running upsmon, but if you want to watch it, it has to
|
||||
# be in this section.
|
||||
#
|
||||
# You must have at least one of these declared.
|
||||
#
|
||||
# <system> is a UPS identifier in the form <upsname>@<hostname>[:<port>]
|
||||
# like ups@localhost, su700@mybox, etc.
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# - "su700@mybox" means a UPS called "su700" on a system called "mybox"
|
||||
#
|
||||
# - "fenton@bigbox:5678" is a UPS called "fenton" on a system called
|
||||
# "bigbox" which runs upsd on port "5678".
|
||||
#
|
||||
# The UPS names like "su700" and "fenton" are set in your ups.conf
|
||||
# in [brackets] which identify a section for a particular driver.
|
||||
#
|
||||
# If the ups.conf on host "doghouse" has a section called "snoopy", the
|
||||
# identifier for it would be "snoopy@doghouse".
|
||||
#
|
||||
# <powervalue> is an integer - the number of power supplies that this UPS
|
||||
# feeds on this system. Most computers only have one power supply, so this
|
||||
# is normally set to 1. You need a pretty big or special box to have any
|
||||
# other value here.
|
||||
#
|
||||
# You can also set this to 0 for a system that doesn't supply any power,
|
||||
# but you still want to monitor. Use this when you want to hear about
|
||||
# changes for a given UPS without shutting down when it goes critical,
|
||||
# unless <powervalue> is 0.
|
||||
#
|
||||
# <username> and <password> must match an entry in that system's
|
||||
# upsd.users. If your username is "monmaster" and your password is
|
||||
# "blah", the upsd.users would look like this:
|
||||
#
|
||||
# [monmaster]
|
||||
# password = blah
|
||||
# upsmon master (or slave)
|
||||
#
|
||||
# "master" means this system will shutdown last, allowing the slaves
|
||||
# time to shutdown first.
|
||||
#
|
||||
# "slave" means this system shuts down immediately when power goes critical.
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# MONITOR myups@bigserver 1 monmaster blah master
|
||||
# MONITOR su700@server.example.com 1 upsmon secretpass slave
|
||||
# MONITOR myups@localhost 1 upsmon pass master (or slave)
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# MINSUPPLIES <num>
|
||||
#
|
||||
# Give the number of power supplies that must be receiving power to keep
|
||||
# this system running. Most systems have one power supply, so you would
|
||||
# put "1" in this field.
|
||||
#
|
||||
# Large/expensive server type systems usually have more, and can run with
|
||||
# a few missing. The HP NetServer LH4 can run with 2 out of 4, for example,
|
||||
# so you'd set that to 2. The idea is to keep the box running as long
|
||||
# as possible, right?
|
||||
#
|
||||
# Obviously you have to put the redundant supplies on different UPS circuits
|
||||
# for this to make sense! See big-servers.txt in the docs subdirectory
|
||||
# for more information and ideas on how to use this feature.
|
||||
|
||||
MINSUPPLIES 1
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# SHUTDOWNCMD "<command>"
|
||||
#
|
||||
# upsmon runs this command when the system needs to be brought down.
|
||||
#
|
||||
# This should work just about everywhere ... if it doesn't, well, change it.
|
||||
|
||||
SHUTDOWNCMD "/sbin/shutdown -h +0"
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# NOTIFYCMD <command>
|
||||
#
|
||||
# upsmon calls this to send messages when things happen
|
||||
#
|
||||
# This command is called with the full text of the message as one argument.
|
||||
# The environment string NOTIFYTYPE will contain the type string of
|
||||
# whatever caused this event to happen.
|
||||
#
|
||||
# Note that this is only called for NOTIFY events that have EXEC set with
|
||||
# NOTIFYFLAG. See NOTIFYFLAG below for more details.
|
||||
#
|
||||
# Making this some sort of shell script might not be a bad idea. For more
|
||||
# information and ideas, see pager.txt in the docs directory.
|
||||
#
|
||||
# Example:
|
||||
# NOTIFYCMD /usr/local/ups/bin/notifyme
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# POLLFREQ <n>
|
||||
#
|
||||
# Polling frequency for normal activities, measured in seconds.
|
||||
#
|
||||
# Adjust this to keep upsmon from flooding your network, but don't make
|
||||
# it too high or it may miss certain short-lived power events.
|
||||
|
||||
POLLFREQ 5
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# POLLFREQALERT <n>
|
||||
#
|
||||
# Polling frequency in seconds while UPS on battery.
|
||||
#
|
||||
# You can make this number lower than POLLFREQ, which will make updates
|
||||
# faster when any UPS is running on battery. This is a good way to tune
|
||||
# network load if you have a lot of these things running.
|
||||
#
|
||||
# The default is 5 seconds for both this and POLLFREQ.
|
||||
|
||||
POLLFREQALERT 5
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# HOSTSYNC - How long upsmon will wait before giving up on another upsmon
|
||||
#
|
||||
# The master upsmon process uses this number when waiting for slaves to
|
||||
# disconnect once it has set the forced shutdown (FSD) flag. If they
|
||||
# don't disconnect after this many seconds, it goes on without them.
|
||||
#
|
||||
# Similarly, upsmon slave processes wait up to this interval for the
|
||||
# master upsmon to set FSD when a UPS they are monitoring goes critical -
|
||||
# that is, on battery and low battery. If the master doesn't do its job,
|
||||
# the slaves will shut down anyway to avoid damage to the file systems.
|
||||
#
|
||||
# This "wait for FSD" is done to avoid races where the status changes
|
||||
# to critical and back between polls by the master.
|
||||
|
||||
HOSTSYNC 15
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# DEADTIME - Interval to wait before declaring a stale ups "dead"
|
||||
#
|
||||
# upsmon requires a UPS to provide status information every few seconds
|
||||
# (see POLLFREQ and POLLFREQALERT) to keep things updated. If the status
|
||||
# fetch fails, the UPS is marked stale. If it stays stale for more than
|
||||
# DEADTIME seconds, the UPS is marked dead.
|
||||
#
|
||||
# A dead UPS that was last known to be on battery is assumed to have gone
|
||||
# to a low battery condition. This may force a shutdown if it is providing
|
||||
# a critical amount of power to your system.
|
||||
#
|
||||
# Note: DEADTIME should be a multiple of POLLFREQ and POLLFREQALERT.
|
||||
# Otherwise you'll have "dead" UPSes simply because upsmon isn't polling
|
||||
# them quickly enough. Rule of thumb: take the larger of the two
|
||||
# POLLFREQ values, and multiply by 3.
|
||||
|
||||
DEADTIME 15
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# POWERDOWNFLAG - Flag file for forcing UPS shutdown on the master system
|
||||
#
|
||||
# upsmon will create a file with this name in master mode when it's time
|
||||
# to shut down the load. You should check for this file's existence in
|
||||
# your shutdown scripts and run 'upsdrvctl shutdown' if it exists.
|
||||
#
|
||||
# See the shutdown.txt file in the docs subdirectory for more information.
|
||||
|
||||
POWERDOWNFLAG /etc/killpower
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# NOTIFYMSG - change messages sent by upsmon when certain events occur
|
||||
#
|
||||
# You can change the default messages to something else if you like.
|
||||
#
|
||||
# NOTIFYMSG <notify type> "message"
|
||||
#
|
||||
# NOTIFYMSG ONLINE "UPS %s on line power"
|
||||
# NOTIFYMSG ONBATT "UPS %s on battery"
|
||||
# NOTIFYMSG LOWBATT "UPS %s battery is low"
|
||||
# NOTIFYMSG FSD "UPS %s: forced shutdown in progress"
|
||||
# NOTIFYMSG COMMOK "Communications with UPS %s established"
|
||||
# NOTIFYMSG COMMBAD "Communications with UPS %s lost"
|
||||
# NOTIFYMSG SHUTDOWN "Auto logout and shutdown proceeding"
|
||||
# NOTIFYMSG REPLBATT "UPS %s battery needs to be replaced"
|
||||
# NOTIFYMSG NOCOMM "UPS %s is unavailable"
|
||||
# NOTIFYMSG NOPARENT "upsmon parent process died - shutdown impossible"
|
||||
#
|
||||
# Note that %s is replaced with the identifier of the UPS in question.
|
||||
#
|
||||
# Possible values for <notify type>:
|
||||
#
|
||||
# ONLINE : UPS is back online
|
||||
# ONBATT : UPS is on battery
|
||||
# LOWBATT : UPS has a low battery (if also on battery, it's "critical")
|
||||
# FSD : UPS is being shutdown by the master (FSD = "Forced Shutdown")
|
||||
# COMMOK : Communications established with the UPS
|
||||
# COMMBAD : Communications lost to the UPS
|
||||
# SHUTDOWN : The system is being shutdown
|
||||
# REPLBATT : The UPS battery is bad and needs to be replaced
|
||||
# NOCOMM : A UPS is unavailable (can't be contacted for monitoring)
|
||||
# NOPARENT : The process that shuts down the system has died (shutdown impossible)
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# NOTIFYFLAG - change behavior of upsmon when NOTIFY events occur
|
||||
#
|
||||
# By default, upsmon sends walls (global messages to all logged in users)
|
||||
# and writes to the syslog when things happen. You can change this.
|
||||
#
|
||||
# NOTIFYFLAG <notify type> <flag>[+<flag>][+<flag>] ...
|
||||
#
|
||||
# NOTIFYFLAG ONLINE SYSLOG+WALL
|
||||
# NOTIFYFLAG ONBATT SYSLOG+WALL
|
||||
# NOTIFYFLAG LOWBATT SYSLOG+WALL
|
||||
# NOTIFYFLAG FSD SYSLOG+WALL
|
||||
# NOTIFYFLAG COMMOK SYSLOG+WALL
|
||||
# NOTIFYFLAG COMMBAD SYSLOG+WALL
|
||||
# NOTIFYFLAG SHUTDOWN SYSLOG+WALL
|
||||
# NOTIFYFLAG REPLBATT SYSLOG+WALL
|
||||
# NOTIFYFLAG NOCOMM SYSLOG+WALL
|
||||
# NOTIFYFLAG NOPARENT SYSLOG+WALL
|
||||
#
|
||||
# Possible values for the flags:
|
||||
#
|
||||
# SYSLOG - Write the message in the syslog
|
||||
# WALL - Write the message to all users on the system
|
||||
# EXEC - Execute NOTIFYCMD (see above) with the message
|
||||
# IGNORE - Don't do anything
|
||||
#
|
||||
# If you use IGNORE, don't use any other flags on the same line.
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# RBWARNTIME - replace battery warning time in seconds
|
||||
#
|
||||
# upsmon will normally warn you about a battery that needs to be replaced
|
||||
# every 43200 seconds, which is 12 hours. It does this by triggering a
|
||||
# NOTIFY_REPLBATT which is then handled by the usual notify structure
|
||||
# you've defined above.
|
||||
#
|
||||
# If this number is not to your liking, override it here.
|
||||
|
||||
RBWARNTIME 43200
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# NOCOMMWARNTIME - no communications warning time in seconds
|
||||
#
|
||||
# upsmon will let you know through the usual notify system if it can't
|
||||
# talk to any of the UPS entries that are defined in this file. It will
|
||||
# trigger a NOTIFY_NOCOMM by default every 300 seconds unless you
|
||||
# change the interval with this directive.
|
||||
|
||||
NOCOMMWARNTIME 300
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# FINALDELAY - last sleep interval before shutting down the system
|
||||
#
|
||||
# On a master, upsmon will wait this long after sending the NOTIFY_SHUTDOWN
|
||||
# before executing your SHUTDOWNCMD. If you need to do something in between
|
||||
# those events, increase this number. Remember, at this point your UPS is
|
||||
# almost depleted, so don't make this too high.
|
||||
#
|
||||
# Alternatively, you can set this very low so you don't wait around when
|
||||
# it's time to shut down. Some UPSes don't give much warning for low
|
||||
# battery and will require a value of 0 here for a safe shutdown.
|
||||
#
|
||||
# Note: If FINALDELAY on the slave is greater than HOSTSYNC on the master,
|
||||
# the master will give up waiting for the slave to disconnect.
|
||||
|
||||
FINALDELAY 5
|
113
conf/upssched.conf.sample.in
Normal file
113
conf/upssched.conf.sample.in
Normal file
|
@ -0,0 +1,113 @@
|
|||
# Network UPS Tools - upssched.conf sample file
|
||||
#
|
||||
# ============================================================================
|
||||
#
|
||||
# CMDSCRIPT <scriptname>
|
||||
#
|
||||
# This script gets called to invoke commands for timers that trigger.
|
||||
# It is given a single argument - the <timername> in your
|
||||
# AT ... START-TIMER defines.
|
||||
#
|
||||
# *** This must be defined *before* the first AT line. Otherwise the
|
||||
# program will complain and exit without doing anything.
|
||||
#
|
||||
# A shell script with a big case..esac construct should work nicely for this.
|
||||
# An example has been provided to help you get started.
|
||||
|
||||
CMDSCRIPT @BINDIR@/upssched-cmd
|
||||
|
||||
# ============================================================================
|
||||
#
|
||||
# PIPEFN <filename>
|
||||
#
|
||||
# This sets the file name of the FIFO that will pass communications between
|
||||
# processes to start and stop timers. This should be set to some path where
|
||||
# normal users can't create the file, due to the possibility of symlinking
|
||||
# and other evil.
|
||||
#
|
||||
# Note: if you are running Solaris or similar, the permissions that
|
||||
# upssched sets on this file *are not enough* to keep you safe. If
|
||||
# your OS ignores the permissions on a FIFO, then you MUST put this in
|
||||
# a protected directory!
|
||||
#
|
||||
# Note 2: by default, upsmon will run upssched as whatever user you have
|
||||
# defined with RUN_AS_USER in upsmon.conf. Make sure that user can
|
||||
# create files and write to files in the path you use for PIPEFN and
|
||||
# LOCKFN.
|
||||
#
|
||||
# My recommendation: create a special directory for upssched, make it
|
||||
# owned by your upsmon user, then use it for both.
|
||||
#
|
||||
# This is commented out by default to make you visit this file and think
|
||||
# about how your system works before potentially opening a hole.
|
||||
#
|
||||
# PIPEFN @STATEPATH@/upssched/upssched.pipe
|
||||
|
||||
# ============================================================================
|
||||
#
|
||||
# LOCKFN <filename>
|
||||
#
|
||||
# REQUIRED. This was added after version 1.2.1.
|
||||
#
|
||||
# upssched needs to be able to create this filename in order to avoid
|
||||
# a race condition when two events are dispatched from upsmon at nearly
|
||||
# the same time. This file will only exist briefly. It must not be
|
||||
# created by any other process.
|
||||
#
|
||||
# You should put this in the same directory as PIPEFN.
|
||||
#
|
||||
# LOCKFN @STATEPATH@/upssched/upssched.lock
|
||||
|
||||
# ============================================================================
|
||||
#
|
||||
# AT <notifytype> <upsname> <command>
|
||||
#
|
||||
# Define a handler for a specific event <notifytype> on UPS <upsname>.
|
||||
#
|
||||
# <upsname> can be the special value * to apply this handler to every
|
||||
# possible value of <upsname>.
|
||||
#
|
||||
# Run the command <command> via your CMDSCRIPT when it happens.
|
||||
#
|
||||
# Note that any AT that matches both the <notifytype> and the <upsname>
|
||||
# for the current event will be used.
|
||||
|
||||
# ============================================================================
|
||||
#
|
||||
# Possible AT commands
|
||||
#
|
||||
# - START-TIMER <timername> <interval>
|
||||
#
|
||||
# Start a timer called <timername> that will trigger after <interval>
|
||||
# seconds, calling your CMDSCRIPT with <timername> as the first
|
||||
# argument.
|
||||
#
|
||||
# Example:
|
||||
# Start a timer that'll execute when any UPS (*) has been gone 10 seconds
|
||||
#
|
||||
# AT COMMBAD * START-TIMER upsgone 10
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
#
|
||||
# - CANCEL-TIMER <timername> [cmd]
|
||||
#
|
||||
# Cancel a running timer called <timername>, if possible. If the timer
|
||||
# has passed then pass the optional argument <cmd> to CMDSCRIPT.
|
||||
#
|
||||
# Example:
|
||||
# If a specific UPS (myups@localhost) comes back online, then stop the
|
||||
# timer before it triggers
|
||||
#
|
||||
# AT COMMOK myups@localhost CANCEL-TIMER upsgone
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
#
|
||||
# - EXECUTE <command>
|
||||
#
|
||||
# Immediately pass <command> as an argument to CMDSCRIPT.
|
||||
#
|
||||
# Example:
|
||||
# If any UPS (*) reverts to utility power, then execute
|
||||
# 'ups-back-on-line' via CMDSCRIPT.
|
||||
#
|
||||
# AT ONLINE * EXECUTE ups-back-on-line
|
36
conf/upsset.conf.sample
Normal file
36
conf/upsset.conf.sample
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Network UPS Tools - upsset.conf sample file
|
||||
#
|
||||
# This file is provided to ensure that you do not expose your upsd server
|
||||
# to the world upon installing the CGI programs. Specifically, it keeps
|
||||
# the upsset.cgi program from running until you have assured it that you
|
||||
# have secured your web server's CGI directory.
|
||||
#
|
||||
# By default, your web server will probably let anyone access upsset.cgi
|
||||
# once it is installed. This means that anyone could attempt to crack
|
||||
# upsd logins since they would appear to be coming from your web server,
|
||||
# rather than the outside world, slipping through any ACL/ACCESS definitions.
|
||||
#
|
||||
# For this reason, you *MUST* first secure your CGI programs before
|
||||
# enabling upsset in this configuration file. If you can't do this in
|
||||
# your web server, then you should *not* run this program.
|
||||
#
|
||||
# For Apache, the .htaccess file can be used in the directory with the
|
||||
# programs. You'll need something like this:
|
||||
#
|
||||
# <Files upsset.cgi>
|
||||
# deny from all
|
||||
# allow from your.network.addresses
|
||||
# </Files>
|
||||
#
|
||||
# You will probably have to set "AllowOverride Limit" for this directory in
|
||||
# your server-level configuration file as well.
|
||||
#
|
||||
# If this doesn't make sense, then stop reading and leave this program alone.
|
||||
#
|
||||
# Assuming you have all this done (and it works), then you may uncomment
|
||||
# the line below and start using upsset.cgi through your web browser.
|
||||
#
|
||||
|
||||
###
|
||||
### I_HAVE_SECURED_MY_CGI_DIRECTORY
|
||||
###
|
294
conf/upsstats-single.html.sample
Normal file
294
conf/upsstats-single.html.sample
Normal file
|
@ -0,0 +1,294 @@
|
|||
<!-- upsstats template file -->
|
||||
|
||||
<!--
|
||||
This is upsstats-single.html, a template for monitoring a single
|
||||
host. This mode is selected by adding "host=<host>" to the
|
||||
upsstats.cgi URL.
|
||||
|
||||
Such URLs are generated automatically when using the HOSTLINK
|
||||
command.
|
||||
|
||||
See upsstats.html(5) for more information on template files.
|
||||
-->
|
||||
|
||||
<!-- change this to TEMPF if you don't like Celsius. -->
|
||||
|
||||
@TEMPC@
|
||||
@UPSSTATSPATH upsstats.cgi@
|
||||
@UPSIMAGEPATH upsimage.cgi@
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
@REFRESH@
|
||||
<title>@HOSTDESC@ : @VAR ups.model@ on @HOST@</title>
|
||||
<!-- LINK REL="stylesheet" TYPE="text/css" HREF="http://localhost/nut/nut.css" / -->
|
||||
</head>
|
||||
<body BGCOLOR="#808080" TEXT="#00FC00" LINK="#0000EE" VLINK="#551A8B">
|
||||
|
||||
<table BORDER="1" ALIGN="CENTER" CELLSPACING="0" CELLPADDING="10" BGCOLOR="#000000">
|
||||
|
||||
<tr>
|
||||
<th COLSPAN="20">Network UPS Tools upsstats @VERSION@ - @HOSTDESC@ - @VAR ups.model@ on @HOST@</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>@DATE %a %b %d %X %Z %Y@</th>
|
||||
@IFSUPP ambient.temperature@
|
||||
<th>Ambient</th>
|
||||
@ELSE@
|
||||
@IFSUPP ambient.humidity@
|
||||
<th>Ambient</th>
|
||||
@ENDIF@
|
||||
<th>Battery</th>
|
||||
<th>Input</th>
|
||||
<th>Output</th>
|
||||
<th>Load</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td BGCOLOR="#000000" VALIGN="TOP">
|
||||
|
||||
<table BORDER="0"> <!-- table 2 -->
|
||||
|
||||
<tr>
|
||||
<th ALIGN="RIGHT">UPS Model:</th>
|
||||
<td>@VAR ups.model@</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th ALIGN="RIGHT">Status:</th>
|
||||
<td>@STATUS@</td>
|
||||
</tr>
|
||||
|
||||
@IFSUPP battery.runtime@
|
||||
<tr>
|
||||
<th ALIGN="RIGHT">Runtime:</th>
|
||||
<td>@RUNTIME@</td>
|
||||
</tr>
|
||||
@ENDIF@
|
||||
|
||||
@IFSUPP ups.temperature@
|
||||
<tr>
|
||||
<th ALIGN="RIGHT">UPS temp:</th>
|
||||
<td>@UPSTEMP@ @DEGREES@</td>
|
||||
</tr>
|
||||
@ENDIF@
|
||||
|
||||
@IFSUPP battery.voltage@
|
||||
<tr>
|
||||
<th ALIGN="RIGHT">Battery: </th>
|
||||
<td>@VAR battery.voltage@ V@IFSUPP battery.current@, @VAR battery.current@ A</td>
|
||||
@ENDIF@
|
||||
|
||||
<tr>
|
||||
<th VALIGN="TOP" ALIGN="RIGHT">Input: </th>
|
||||
|
||||
<td>
|
||||
|
||||
@IFSUPP input.L2-L3.voltage@
|
||||
@VAR input.L1-L2.voltage@ V<br>
|
||||
@VAR input.L2-L3.voltage@ V<br>
|
||||
@VAR input.L3-L1.voltage@ V<br>
|
||||
</td>
|
||||
</tr>
|
||||
@ELSE@
|
||||
@IFSUPP input.L2-N.voltage@
|
||||
@VAR input.L1-N.voltage@ V<br>
|
||||
@VAR input.L2-N.voltage@ V<br>
|
||||
@VAR input.L3-N.voltage@ V<br>
|
||||
</td>
|
||||
</tr>
|
||||
@ELSE@
|
||||
@IFSUPP input.voltage@
|
||||
@VAR input.voltage@ V<br>
|
||||
</td>
|
||||
</tr>
|
||||
@ENDIF@
|
||||
|
||||
@IFSUPP input.L2.current@
|
||||
<tr>
|
||||
<th>
|
||||
<td>
|
||||
@VAR input.L1.current@ A<br>
|
||||
@VAR input.L2.current@ A<br>
|
||||
@VAR input.L3.current@ A<br>
|
||||
</td>
|
||||
</tr>
|
||||
@ELSE@
|
||||
@IFSUPP input.current@
|
||||
<tr>
|
||||
<th>
|
||||
<td>
|
||||
@VAR input.current@ A
|
||||
</td>
|
||||
</tr>
|
||||
@ENDIF@
|
||||
|
||||
@IFSUPP input.frequency@
|
||||
<tr>
|
||||
<th>
|
||||
<td>
|
||||
@VAR input.frequency@ Hz
|
||||
</td>
|
||||
</tr>
|
||||
@ENDIF@
|
||||
|
||||
<tr>
|
||||
<th VALIGN="TOP" ALIGN="RIGHT">Output: </th>
|
||||
<td>
|
||||
|
||||
@IFSUPP output.L2-L3.voltage@
|
||||
@VAR output.L1-L2.voltage@ V<br>
|
||||
@VAR output.L2-L3.voltage@ V<br>
|
||||
@VAR output.L3-L1.voltage@ V<br>
|
||||
</td>
|
||||
</tr>
|
||||
@ELSE@
|
||||
@IFSUPP output.L2-N.voltage@
|
||||
@VAR output.L1-N.voltage@ V<br>
|
||||
@VAR output.L2-N.voltage@ V<br>
|
||||
@VAR output.L3-N.voltage@ V<br>
|
||||
</td>
|
||||
</tr>
|
||||
@ELSE@
|
||||
@IFSUPP output.voltage@
|
||||
@VAR output.voltage@ V
|
||||
</td>
|
||||
</tr>
|
||||
@ENDIF@
|
||||
|
||||
@IFSUPP output.L2.current@
|
||||
<tr>
|
||||
<th>
|
||||
<td>
|
||||
@VAR output.L1.current@ A<br>
|
||||
@VAR output.L2.current@ A<br>
|
||||
@VAR output.L3.current@ A<br>
|
||||
</td>
|
||||
</tr>
|
||||
@ELSE@
|
||||
@IFSUPP output.current@
|
||||
<tr>
|
||||
<th>
|
||||
<td>
|
||||
@VAR output.current@ A
|
||||
</td>
|
||||
</tr>
|
||||
@ENDIF@
|
||||
|
||||
@IFSUPP output.frequency@
|
||||
<tr>
|
||||
<th>
|
||||
<td>
|
||||
@VAR output.frequency@ Hz
|
||||
</td>
|
||||
</tr>
|
||||
@ENDIF@
|
||||
|
||||
</table> <!-- table 2 -->
|
||||
</td>
|
||||
|
||||
@IFSUPP ambient.temperature@
|
||||
@IFSUPP ambient.humidity@
|
||||
<td ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#000000">
|
||||
<table BORDER="0"><tr>
|
||||
<td ALIGN="CENTER">Temperature<br>@IMG ambient.temperature tempmin=0 tempmax=50 width=90@</td>
|
||||
<td ALIGN="CENTER">Humidity<br>@IMG ambient.humidity width=90@</td>
|
||||
</tr></table>
|
||||
</td>
|
||||
@ELSE@
|
||||
@IFSUPP ambient.temperature@
|
||||
<td ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#000000">
|
||||
<table BORDER="0"><tr>
|
||||
<td ALIGN="CENTER">Temperature<br>@IMG ambient.temperature tempmin=0 tempmax=50@</td>
|
||||
</tr></table>
|
||||
</td>
|
||||
@ELSE@
|
||||
@IFSUPP ambient.humidity@
|
||||
<td ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#000000">
|
||||
<table BORDER="0"><tr>
|
||||
<td ALIGN="CENTER">Humidity<br>@IMG ambient.humidity@</td>
|
||||
</tr></table>
|
||||
</td>
|
||||
@ENDIF@
|
||||
|
||||
<td ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#000000">
|
||||
<table BORDER="0"><tr>
|
||||
@IFSUPP battery.charge@
|
||||
@IFSUPP battery.voltage@
|
||||
<td ALIGN="CENTER">Charge<br>@IMG battery.charge width=90@</td>
|
||||
<td ALIGN="CENTER">Voltage<br>@IMG battery.voltage width=90@</td>
|
||||
@ELSE@
|
||||
@IFSUPP battery.charge@
|
||||
<td ALIGN="CENTER">Charge<br>@IMG battery.charge@</td>
|
||||
@ELSE@
|
||||
<td ALIGN="CENTER">Voltage<br>@IMG battery.voltage@</td>
|
||||
@ENDIF@
|
||||
</tr></table>
|
||||
</td>
|
||||
|
||||
<td ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#000000">
|
||||
<table BORDER="0"><tr>
|
||||
@IFSUPP input.L2-L3.voltage@
|
||||
<td ALIGN="CENTER">L1-L2<br>@IMG input.L1-L2.voltage width=68@</td>
|
||||
<td ALIGN="CENTER">L2-L3<br>@IMG input.L2-L3.voltage width=68@</td>
|
||||
<td ALIGN="CENTER">L3-L1<br>@IMG input.L3-L1.voltage width=68@</td>
|
||||
@ELSE@
|
||||
@IFSUPP input.L2-N.voltage@
|
||||
<td ALIGN="CENTER">L1-N<br>@IMG input.L1-N.voltage width=68@</td>
|
||||
<td ALIGN="CENTER">L2-N<br>@IMG input.L2-N.voltage width=68@</td>
|
||||
<td ALIGN="CENTER">L3-N<br>@IMG input.L3-N.voltage width=68@</td>
|
||||
@ELSE@
|
||||
<td ALIGN="CENTER"><br>@IMG input.voltage@</td>
|
||||
@ENDIF@
|
||||
</tr></table>
|
||||
</td>
|
||||
|
||||
<td ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#000000">
|
||||
<table BORDER="0"><tr>
|
||||
@IFSUPP output.L2-L3.voltage@
|
||||
<td ALIGN="CENTER">L1-L2<br>@IMG output.L1-L2.voltage width=68@</td>
|
||||
<td ALIGN="CENTER">L2-L3<br>@IMG output.L2-L3.voltage width=68@</td>
|
||||
<td ALIGN="CENTER">L3-L1<br>@IMG output.L3-L1.voltage width=68@</td>
|
||||
@ELSE@
|
||||
@IFSUPP output.L2-N.voltage@
|
||||
<td ALIGN="CENTER">L1-N<br>@IMG output.L1-N.voltage width=68@</td>
|
||||
<td ALIGN="CENTER">L2-N<br>@IMG output.L2-N.voltage width=68@</td>
|
||||
<td ALIGN="CENTER">L3-N<br>@IMG output.L3-N.voltage width=68@</td>
|
||||
@ELSE@
|
||||
<td ALIGN="CENTER"><br>@IMG output.voltage@</td>
|
||||
@ENDIF@
|
||||
</tr></table>
|
||||
</td>
|
||||
|
||||
<td ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#000000">
|
||||
<table BORDER="0"><tr>
|
||||
@IFSUPP output.L2.power.percent@
|
||||
<td ALIGN="CENTER">L1<br>@IMG output.L1.power.percent width=68@</td>
|
||||
<td ALIGN="CENTER">L2<br>@IMG output.L2.power.percent width=68@</td>
|
||||
<td ALIGN="CENTER">L3<br>@IMG output.L3.power.percent width=68@</td>
|
||||
@ELSE@
|
||||
@IFSUPP output.L2.realpower.percent@
|
||||
<td ALIGN="CENTER">L1<br>@IMG output.L1.realpower.percent width=68@</td>
|
||||
<td ALIGN="CENTER">L2<br>@IMG output.L2.realpower.percent width=68@</td>
|
||||
<td ALIGN="CENTER">L3<br>@IMG output.L3.realpower.percent width=68@</td>
|
||||
@ELSE@
|
||||
<td ALIGN="CENTER"><br>@IMG ups.load@</td>
|
||||
@ENDIF@
|
||||
</tr></table>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<a href="http://validator.w3.org/check?uri=referer"><img style="float:right"
|
||||
src="http://www.w3.org/Icons/valid-html40"
|
||||
alt="Valid HTML 4.0 Transitional" height="31" width="88"></a>
|
||||
|
||||
</body>
|
||||
</html>
|
190
conf/upsstats.html.sample
Normal file
190
conf/upsstats.html.sample
Normal file
|
@ -0,0 +1,190 @@
|
|||
<!-- upsstats template file -->
|
||||
|
||||
<!--
|
||||
This (upsstats.html) is the default template file which is used
|
||||
when upsstats.cgi is loaded with no arguments.
|
||||
|
||||
It usually contains a FOREACHUPS block to iterate through every
|
||||
UPS in the hosts.conf.
|
||||
|
||||
See upsstats.html(5) for more information on template files.
|
||||
-->
|
||||
|
||||
<!-- change this to TEMPF if you don't like Celsius. -->
|
||||
|
||||
@TEMPC@
|
||||
@UPSSTATSPATH upsstats.cgi@
|
||||
@UPSIMAGEPATH upsimage.cgi@
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
@REFRESH@
|
||||
<title>
|
||||
Network UPS Tools upsstats
|
||||
@VERSION@
|
||||
: UPS Status
|
||||
</title>
|
||||
<!-- link rel="stylesheet" type="text/css" href="nut.css" / -->
|
||||
@REFRESH@
|
||||
</head>
|
||||
<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B">
|
||||
|
||||
<table BGCOLOR="#50A0A0" ALIGN="CENTER">
|
||||
<tr><td>
|
||||
|
||||
<table CELLPADDING="5">
|
||||
<tr>
|
||||
<th COLSPAN="10" BGCOLOR="#60B0B0">
|
||||
|
||||
<font SIZE="+2">Network UPS Tools upsstats
|
||||
@VERSION@
|
||||
</font>
|
||||
|
||||
<br>
|
||||
@DATE %a %b %d %X %Z %Y@
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr BGCOLOR="#60B0B0">
|
||||
<th COLSPAN="1">System</th>
|
||||
<th COLSPAN="1">Model</th>
|
||||
<th COLSPAN="1">Status</th>
|
||||
<th COLSPAN="1">Battery</th>
|
||||
<th COLSPAN="1">Input (VAC)</th>
|
||||
<th COLSPAN="1">Output (VAC)</th>
|
||||
<th COLSPAN="1">Load (%)</th>
|
||||
<th COLSPAN="1">UPS<br>Temp</th>
|
||||
<th COLSPAN="1">Battery<br>Runtime</th>
|
||||
<th COLSPAN="1">Data<br>Tree</th>
|
||||
</tr>
|
||||
|
||||
@FOREACHUPS@
|
||||
|
||||
<tr ALIGN=CENTER>
|
||||
<td BGCOLOR="#00FFFF">
|
||||
@HOSTLINK@
|
||||
</td>
|
||||
|
||||
<td BGCOLOR="#00FFFF">
|
||||
@VAR ups.model@
|
||||
</td>
|
||||
|
||||
<td BGCOLOR="@STATUSCOLOR@">
|
||||
@STATUS@
|
||||
</td>
|
||||
|
||||
<td BGCOLOR="#00FF00">
|
||||
@IFSUPP battery.charge@
|
||||
@VAR battery.charge@
|
||||
%
|
||||
@ENDIF@
|
||||
</td>
|
||||
|
||||
@IFSUPP input.L2-L3.voltage@
|
||||
@IFBETWEEN input.transfer.low input.transfer.high input.L1-L2.voltage@
|
||||
@IFBETWEEN input.transfer.low input.transfer.high input.L2-L3.voltage@
|
||||
@IFBETWEEN input.transfer.low input.transfer.high input.L3-L1.voltage@
|
||||
<td BGCOLOR="#00FF00">
|
||||
@ELSE@
|
||||
@IFSUPP input.L2-N.voltage@
|
||||
@IFBETWEEN input.transfer.low input.transfer.high input.L1-N.voltage@
|
||||
@IFBETWEEN input.transfer.low input.transfer.high input.L2-N.voltage@
|
||||
@IFBETWEEN input.transfer.low input.transfer.high input.L3-N.voltage@
|
||||
<td BGCOLOR="#00FF00">
|
||||
@ELSE@
|
||||
@IFBETWEEN input.transfer.low input.transfer.high input.voltage@
|
||||
<td BGCOLOR="#00FF00">
|
||||
@ELSE@
|
||||
<td BGCOLOR="#FF0000">
|
||||
@ENDIF@
|
||||
|
||||
@IFSUPP input.L2-L3.voltage@
|
||||
@VAR input.L1-L2.voltage@
|
||||
@VAR input.L2-L3.voltage@
|
||||
@VAR input.L3-L1.voltage@
|
||||
@ELSE@
|
||||
@IFSUPP input.L2-N.voltage@
|
||||
@VAR input.L1-N.voltage@
|
||||
@VAR input.L2-N.voltage@
|
||||
@VAR input.L3-N.voltage@
|
||||
@ELSE@
|
||||
@IFSUPP input.voltage@
|
||||
@VAR input.voltage@
|
||||
@ENDIF@
|
||||
</td>
|
||||
|
||||
<td BGCOLOR="#00FF00">
|
||||
@IFSUPP output.L2-L3.voltage@
|
||||
@VAR output.L1-L2.voltage@
|
||||
@VAR output.L2-L3.voltage@
|
||||
@VAR output.L3-L1.voltage@
|
||||
@ELSE@
|
||||
@IFSUPP output.L2-N.voltage@
|
||||
@VAR output.L1-N.voltage@
|
||||
@VAR output.L2-N.voltage@
|
||||
@VAR output.L3-N.voltage@
|
||||
@ELSE@
|
||||
@IFSUPP output.voltage@
|
||||
@VAR output.voltage@
|
||||
@ENDIF@
|
||||
</td>
|
||||
|
||||
<td BGCOLOR="#00FF00">
|
||||
@IFSUPP output.L2.power.percent@
|
||||
@VAR output.L1.power.percent@
|
||||
@VAR output.L2.power.percent@
|
||||
@VAR output.L3.power.percent@
|
||||
@ELSE@
|
||||
@IFSUPP output.L2.realpower.percent@
|
||||
@VAR output.L1.realpower.percent@
|
||||
@VAR output.L2.realpower.percent@
|
||||
@VAR output.L3.realpower.percent@
|
||||
@ELSE@
|
||||
@IFSUPP ups.load@
|
||||
@VAR ups.load@
|
||||
%
|
||||
@ENDIF@
|
||||
</td>
|
||||
|
||||
<td BGCOLOR="#00FF00">
|
||||
@IFSUPP ups.temperature@
|
||||
@UPSTEMP@
|
||||
@DEGREES@
|
||||
@ELSE@
|
||||
@IFSUPP battery.temperature@
|
||||
@BATTTEMP@
|
||||
@DEGREES@
|
||||
@ENDIF@
|
||||
</td>
|
||||
|
||||
<td BGCOLOR="#00FF00">
|
||||
@IFSUPP battery.runtime@
|
||||
@RUNTIME@
|
||||
@ENDIF@
|
||||
</td>
|
||||
|
||||
<td BGCOLOR="#00FF00">
|
||||
@TREELINK@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ENDFOR@
|
||||
|
||||
</table>
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<hr /><div><small>
|
||||
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img style="float:right" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88"/></a>
|
||||
<a href="http://validator.w3.org/check?uri=referer"><img style="float:right"
|
||||
src="http://www.w3.org/Icons/valid-html40"
|
||||
alt="Valid HTML 4.0 Transitional" height="31" width="88"></a>
|
||||
</small></div>
|
||||
|
||||
</body></html>
|
Loading…
Add table
Add a link
Reference in a new issue