From 459aaf9392f76bc59fe6966b20c8369c5bbc59b9 Mon Sep 17 00:00:00 2001 From: "arnaud.quette@free.fr" Date: Wed, 26 Jan 2011 10:35:08 +0100 Subject: [PATCH] Imported Upstream version 2.6.0 --- AUTHORS | 5 - ChangeLog | 2269 ++++++++------ INSTALL | 638 ++-- Makefile.am | 31 +- Makefile.in | 87 +- NEWS | 61 + README | 568 ++-- docs/ideas.txt => TODO | 63 +- UPGRADING | 557 ++-- aclocal.m4 | 14 +- clients/Makefile.am | 8 +- clients/Makefile.in | 53 +- clients/upsclient.c | 74 +- clients/upsclient.h | 7 +- clients/upscmd.c | 7 + clients/upsimage.c | 2 +- clients/upsimagearg.h | 6 +- clients/upslog.c | 24 +- clients/upslog.h | 6 +- clients/upsmon.c | 72 +- clients/upsrw.c | 255 +- clients/upssched.c | 28 +- clients/upssched.h | 6 +- common/Makefile.am | 11 +- common/Makefile.in | 106 +- common/atexit.c | 22 + common/common.c | 43 +- common/setenv.c | 26 + common/snprintf.c | 914 ++++++ common/state.c | 72 +- common/strerror.c | 503 ++++ conf/Makefile.in | 27 +- conf/ups.conf.sample | 4 +- conf/upsd.conf.sample | 18 + conf/upsd.users.sample | 8 + config.guess | 58 +- config.sub | 15 +- configure | 2609 +++++++++++------ configure.in | 687 +++-- data/Makefile.am | 7 +- data/Makefile.in | 86 +- data/driver.list | 725 ----- data/driver.list.in | 761 +++++ data/epdu-managed.dev | 70 + data/{evolution500.dev => evolution500.seq} | 7 +- data/html/Makefile.in | 27 +- docs/FAQ | 822 ------ docs/FAQ.txt | 735 +++++ docs/Makefile.am | 113 +- docs/Makefile.in | 418 ++- docs/README | 9 - docs/acknowledgements.txt | 150 + docs/acpi.txt | 32 - docs/asciidoc.conf | 55 + docs/big-servers.txt | 68 - docs/cables.txt | 120 + docs/cables/ge-imv-victron.txt | 2 +- docs/cables/sms.txt | 2 +- docs/chroot.txt | 110 - docs/commands.txt | 62 - docs/config-files.txt | 64 - docs/config-notes.txt | 798 +++++ docs/configure.txt | 462 +-- docs/contact-closure.txt | 33 +- docs/data-room.txt | 54 - docs/design.txt | 40 +- docs/developer-guide.txt | 115 + docs/developers.txt | 325 +- docs/docinfo.xml | 10 + docs/documentation.txt | 70 + docs/download.txt | 117 + docs/features.txt | 239 ++ docs/hid-subdrivers.txt | 110 +- docs/history.txt | 335 +++ docs/images/advanced.png | Bin 0 -> 32046 bytes docs/images/asciidoc.png | Bin 0 -> 1807 bytes docs/images/bigbox.png | Bin 0 -> 17562 bytes docs/images/bizarre.png | Bin 0 -> 34200 bytes docs/images/blue-arrow.png | Bin 0 -> 562 bytes docs/images/cables/73-0724.png | Bin 0 -> 1954 bytes docs/images/cables/940-0024C.jpg | Bin 0 -> 15746 bytes docs/images/cables/Lansafecable.jpg | Bin 0 -> 52714 bytes docs/images/cables/SOLA-330.png | Bin 0 -> 5489 bytes .../cables/belkin-f6cx-rkm-xu-cable.jpg | Bin 0 -> 17327 bytes docs/images/cables/mac-940-0024C.png | Bin 0 -> 12516 bytes docs/images/cables/mge-66049.png | Bin 0 -> 6739 bytes docs/images/cables/mge-db9-rj12.jpg | Bin 0 -> 21454 bytes docs/images/cables/mge-db9-rj45.jpg | Bin 0 -> 17597 bytes docs/images/eaton-logo.png | Bin 0 -> 7998 bytes docs/images/note.png | Bin 0 -> 2494 bytes docs/images/nut_layering.png | Bin 0 -> 83521 bytes docs/images/old-cgi.png | Bin 0 -> 8705 bytes docs/images/simple.png | Bin 0 -> 10145 bytes docs/images/warning.png | Bin 0 -> 3214 bytes docs/macros.txt | 114 +- docs/man/Makefile.am | 452 +++ {man => docs/man}/Makefile.in | 554 +++- docs/man/apcsmart.8 | 124 + man/apcsmart.8 => docs/man/apcsmart.txt | 88 +- docs/man/asciidoc.conf | 46 + docs/man/bcmxcp.8 | 130 + docs/man/bcmxcp.txt | 88 + docs/man/bcmxcp_usb.8 | 114 + man/bcmxcp_usb.8 => docs/man/bcmxcp_usb.txt | 87 +- docs/man/belkin.8 | 68 + man/belkin.8 => docs/man/belkin.txt | 47 +- docs/man/belkinunv.8 | 352 +++ docs/man/belkinunv.txt | 344 +++ docs/man/bestfcom.8 | 56 + man/bestfcom.8 => docs/man/bestfcom.txt | 38 +- docs/man/bestfortress.8 | 65 + docs/man/bestfortress.txt | 49 + docs/man/bestuferrups.8 | 54 + docs/man/bestuferrups.txt | 42 + docs/man/bestups.8 | 105 + man/bestups.8 => docs/man/bestups.txt | 92 +- docs/man/blazer.8 | 313 ++ man/blazer.8 => docs/man/blazer.txt | 230 +- docs/man/clone.8 | 135 + man/clone.8 => docs/man/clone.txt | 114 +- docs/man/dummy-ups.8 | 145 + man/dummy-ups.8 => docs/man/dummy-ups.txt | 130 +- docs/man/etapro.8 | 50 + docs/man/etapro.txt | 35 + docs/man/everups.8 | 53 + docs/man/everups.txt | 44 + docs/man/gamatronic.8 | 50 + man/gamatronic.8 => docs/man/gamatronic.txt | 37 +- docs/man/genericups.8 | 593 ++++ man/genericups.8 => docs/man/genericups.txt | 260 +- docs/man/hosts.conf.5 | 61 + man/hosts.conf.5 => docs/man/hosts.conf.txt | 35 +- docs/man/isbmex.8 | 50 + docs/man/isbmex.txt | 39 + docs/man/ivtscd.8 | 50 + docs/man/ivtscd.txt | 34 + docs/man/libupsclient-config.1 | 70 + docs/man/libupsclient-config.txt | 46 + docs/man/liebert-esp2.8 | 55 + docs/man/liebert-esp2.txt | 40 + docs/man/liebert.8 | 52 + docs/man/liebert.txt | 49 + docs/man/masterguard.8 | 53 + docs/man/masterguard.txt | 37 + docs/man/metasys.8 | 137 + man/metasys.8 => docs/man/metasys.txt | 59 +- docs/man/mge-shut.8 | 122 + docs/man/mge-shut.txt | 94 + docs/man/mge-utalk.8 | 120 + docs/man/mge-utalk.txt | 98 + docs/man/microdowell.8 | 50 + docs/man/microdowell.txt | 40 + docs/man/netxml-ups.8 | 159 + docs/man/netxml-ups.txt | 93 + docs/man/nut.conf.5 | 169 ++ man/nut.conf.5 => docs/man/nut.conf.txt | 88 +- docs/man/nutupsdrv.8 | 175 ++ docs/man/nutupsdrv.txt | 197 ++ docs/man/oneac.8 | 82 + man/oneac.8 => docs/man/oneac.txt | 58 +- docs/man/optiups.8 | 98 + docs/man/optiups.txt | 92 + docs/man/powercom.8 | 267 ++ docs/man/powercom.txt | 205 ++ docs/man/powerman-pdu.8 | 113 + docs/man/powerman-pdu.txt | 87 + docs/man/powerpanel.8 | 172 ++ man/powerpanel.8 => docs/man/powerpanel.txt | 152 +- docs/man/rhino.8 | 154 + docs/man/rhino.txt | 59 + docs/man/richcomm_usb.8 | 55 + docs/man/richcomm_usb.txt | 50 + docs/man/safenet.8 | 135 + docs/man/safenet.txt | 101 + docs/man/skel.txt | 111 + docs/man/snmp-ups.8 | 205 ++ docs/man/snmp-ups.txt | 167 ++ docs/man/solis.8 | 123 + docs/man/solis.txt | 57 + docs/man/tripplite.8 | 71 + man/tripplite.8 => docs/man/tripplite.txt | 63 +- docs/man/tripplite_usb.8 | 272 ++ docs/man/tripplite_usb.txt | 168 ++ docs/man/tripplitesu.8 | 59 + docs/man/tripplitesu.txt | 45 + docs/man/ups.conf.5 | 155 + docs/man/ups.conf.txt | 143 + docs/man/upsc.8 | 120 + docs/man/upsc.txt | 96 + docs/man/upscli_connect.3 | 55 + docs/man/upscli_connect.txt | 45 + docs/man/upscli_disconnect.3 | 51 + docs/man/upscli_disconnect.txt | 35 + docs/man/upscli_fd.3 | 51 + docs/man/upscli_fd.txt | 35 + docs/man/upscli_get.3 | 179 ++ docs/man/upscli_get.txt | 102 + docs/man/upscli_list_next.3 | 69 + docs/man/upscli_list_next.txt | 70 + docs/man/upscli_list_start.3 | 139 + docs/man/upscli_list_start.txt | 80 + docs/man/upscli_readline.3 | 51 + docs/man/upscli_readline.txt | 39 + docs/man/upscli_sendline.3 | 51 + docs/man/upscli_sendline.txt | 39 + docs/man/upscli_splitaddr.3 | 68 + docs/man/upscli_splitaddr.txt | 54 + docs/man/upscli_splitname.3 | 70 + docs/man/upscli_splitname.txt | 55 + docs/man/upscli_ssl.3 | 49 + docs/man/upscli_ssl.txt | 36 + docs/man/upscli_strerror.3 | 49 + docs/man/upscli_strerror.txt | 36 + docs/man/upscli_upserror.3 | 53 + docs/man/upscli_upserror.txt | 40 + docs/man/upsclient.3 | 51 + docs/man/upsclient.txt | 64 + docs/man/upscmd.8 | 94 + man/upscmd.8 => docs/man/upscmd.txt | 80 +- docs/man/upscode2.8 | 180 ++ docs/man/upscode2.txt | 99 + docs/man/upsd.8 | 140 + docs/man/upsd.conf.5 | 94 + man/upsd.conf.5 => docs/man/upsd.conf.txt | 68 +- docs/man/upsd.txt | 160 + docs/man/upsd.users.5 | 133 + man/upsd.users.5 => docs/man/upsd.users.txt | 61 +- docs/man/upsdrvctl.8 | 127 + man/upsdrvctl.8 => docs/man/upsdrvctl.txt | 87 +- docs/man/upsimage.cgi.8 | 69 + docs/man/upsimage.cgi.txt | 50 + docs/man/upslog.8 | 153 + docs/man/upslog.txt | 110 + docs/man/upsmon.8 | 426 +++ docs/man/upsmon.conf.5 | 390 +++ man/upsmon.conf.5 => docs/man/upsmon.conf.txt | 260 +- man/upsmon.8 => docs/man/upsmon.txt | 281 +- docs/man/upsrw.8 | 102 + man/upsrw.8 => docs/man/upsrw.txt | 85 +- docs/man/upssched.8 | 139 + docs/man/upssched.conf.5 | 186 ++ docs/man/upssched.conf.txt | 110 + man/upssched.8 => docs/man/upssched.txt | 86 +- docs/man/upsset.cgi.8 | 104 + man/upsset.cgi.8 => docs/man/upsset.cgi.txt | 77 +- docs/man/upsset.conf.5 | 80 + man/upsset.conf.5 => docs/man/upsset.conf.txt | 44 +- docs/man/upsstats.cgi.8 | 74 + .../man/upsstats.cgi.txt | 58 +- docs/man/upsstats.html.5 | 370 +++ docs/man/upsstats.html.txt | 235 ++ docs/man/usbhid-ups.8 | 327 +++ man/usbhid-ups.8 => docs/man/usbhid-ups.txt | 178 +- docs/man/victronups.8 | 70 + docs/man/victronups.txt | 60 + docs/megatec.txt | 69 - docs/net-protocol.txt | 600 ++++ docs/new-clients.txt | 125 + docs/new-drivers.txt | 409 +-- docs/new-names.txt | 574 ---- docs/nut-names.txt | 466 +++ docs/nut-qa.txt | 112 + docs/osd-notify.txt | 86 - docs/outlets.txt | 99 + docs/packager-guide.txt | 378 +++ docs/pager.txt | 68 - docs/powersaving.txt | 135 - docs/protocol.txt | 518 ---- docs/{upssched.txt => scheduling.txt} | 141 +- docs/security.txt | 521 ++++ docs/shutdown.txt | 230 -- docs/sock-protocol.txt | 108 +- docs/ssl.txt | 251 -- docs/stable-hcl.txt | 161 + docs/support.txt | 111 + docs/user-manual.txt | 189 ++ docs/website/Makefile.am | 126 + docs/website/Makefile.in | 538 ++++ docs/website/css/ie-overrides.css | 7 + docs/website/css/web-layout.css | 136 + docs/website/css/xhtml11-quirks.css | 41 + docs/website/css/xhtml11.css | 333 +++ docs/website/faviconut.ico | Bin 0 -> 1150 bytes docs/website/faviconut.png | Bin 0 -> 814 bytes docs/website/news.txt | 9 + docs/website/projects.txt | 187 ++ docs/website/scripts/filter_png.js | 14 + docs/website/scripts/jquery.js | 19 + docs/website/scripts/nut_jquery.js | 422 +++ docs/website/scripts/toc.js | 69 + docs/website/ups-protocols.txt | 101 + docs/website/web-layout.conf | 185 ++ docs/website/website.txt | 19 + drivers/Makefile.am | 61 +- drivers/Makefile.in | 295 +- drivers/apc-hid.c | 54 +- drivers/apcsmart.c | 30 +- drivers/apcsmart.h | 14 +- drivers/bcmxcp.c | 8 +- drivers/bcmxcp.h | 4 +- drivers/bcmxcp_usb.c | 4 +- drivers/belkin-hid.c | 30 +- drivers/belkin.c | 551 ++-- drivers/belkin.h | 17 +- drivers/bestfcom.c | 4 +- drivers/bestfortress.c | 4 +- drivers/bestpower-mib.c | 80 + drivers/bestpower-mib.h | 9 + drivers/blazer.c | 13 +- drivers/cps-hid.c | 8 +- drivers/dstate-hal.c | 4 +- drivers/dstate-hal.h | 11 +- drivers/dstate.c | 44 +- drivers/dstate.h | 15 +- drivers/dummy-ups.c | 231 +- drivers/dummy-ups.h | 9 +- drivers/explore-hid.c | 6 +- drivers/gamatronic.c | 23 +- drivers/gamatronic.h | 14 +- drivers/hidparser.h | 4 + drivers/hidtypes.h | 4 + drivers/idowell-hid.c | 169 ++ drivers/idowell-hid.h | 30 + drivers/ietf-mib.c | 422 +-- drivers/ivtscd.c | 2 +- drivers/libhid.c | 6 +- drivers/libshut.c | 2 +- drivers/libshut.h | 4 +- drivers/libusb.h | 4 +- drivers/{liebertgxt2.c => liebert-esp2.c} | 113 +- drivers/liebert-hid.c | 6 +- drivers/main-hal.c | 2 +- drivers/main-hal.h | 6 +- drivers/main.c | 6 +- drivers/main.h | 12 +- drivers/megatec.c | 1036 ------- drivers/megatec.h | 42 - drivers/megatec_usb.c | 656 ----- drivers/metasys.c | 2 +- drivers/mge-hid.c | 34 +- drivers/mge-shut.c | 10 +- drivers/mge-shut.h | 12 +- drivers/mge-utalk.c | 73 +- drivers/mge-utalk.h | 8 +- drivers/mge-xml.c | 6 +- drivers/microdowell.c | 2 +- drivers/netvision-mib.c | 13 +- drivers/netxml-ups.h | 10 +- drivers/optiups.c | 2 +- drivers/powercom-hid.c | 16 +- drivers/powercom.h | 4 +- drivers/powerman-pdu.c | 4 +- drivers/powerp-bin.c | 42 +- drivers/powerp-txt.c | 20 +- drivers/powerpanel.h | 2 +- drivers/powerware-mib.c | 2 +- drivers/rhino.c | 8 +- drivers/richcomm_usb.c | 2 +- drivers/safenet.c | 2 +- drivers/serial.c | 9 +- drivers/skel.c | 1 - drivers/snmp-ups.c | 246 +- drivers/snmp-ups.h | 40 +- drivers/solis.h | 8 +- drivers/tripplite-hid.c | 71 +- drivers/tripplite.c | 2 +- drivers/tripplite_usb.c | 10 +- drivers/upscode2.c | 90 +- drivers/upsdrvctl.c | 74 +- drivers/usb-common.c | 35 +- drivers/usbhid-ups.c | 35 +- drivers/usbhid-ups.h | 25 +- include/Makefile.in | 27 +- include/common.h | 1 + include/config.h.in | 44 +- include/extstate.h | 12 +- include/nut_version.h | 2 +- include/parseconf.h | 4 + include/state.h | 45 +- install-sh | 5 +- lib/Makefile.in | 27 +- ltmain.sh | 8 +- m4/ax_compare_version.m4 | 177 ++ m4/libtool.m4 | 13 +- m4/ltversion.m4 | 10 +- m4/nut_check_asciidoc.m4 | 40 + m4/nut_check_ipv6.m4 | 27 - m4/nut_check_libgd.m4 | 47 +- m4/nut_check_libhal.m4 | 169 +- m4/nut_check_libneon.m4 | 53 +- m4/nut_check_libnetsnmp.m4 | 51 +- m4/nut_check_libpowerman.m4 | 44 +- m4/nut_check_libssl.m4 | 58 +- m4/nut_check_libusb.m4 | 65 +- m4/nut_check_libwrap.m4 | 4 +- m4/nut_check_os.m4 | 0 m4/nut_config_libhal.m4 | 102 + m4/nut_report_feature.m4 | 2 +- man/Makefile.am | 99 - man/bcmxcp.8 | 69 - man/belkinunv.8 | 327 --- man/bestfortress.8 | 35 - man/bestuferrups.8 | 30 - man/etapro.8 | 26 - man/everups.8 | 32 - man/isbmex.8 | 26 - man/ivtscd.8 | 27 - man/libupsclient-config.1 | 35 - man/liebert.8 | 42 - man/liebertgxt2.8 | 40 - man/masterguard.8 | 26 - man/megatec.8 | 169 -- man/megatec_usb.8 | 187 -- man/mge-shut.8 | 70 - man/mge-utalk.8 | 103 - man/microdowell.8 | 26 - man/netxml-ups.8 | 81 - man/nutupsdrv.8 | 181 -- man/optiups.8 | 81 - man/powercom.8 | 191 -- man/powerman-pdu.8 | 62 - man/rhino.8 | 53 - man/richcomm_usb.8 | 35 - man/safenet.8 | 88 - man/skel.8 | 82 - man/snmp-ups.8 | 106 - man/solis.8 | 49 - man/tripplite_usb.8 | 272 -- man/tripplitesu.8 | 31 - man/ups.conf.5 | 134 - man/upsc.8 | 86 - man/upscli_connect.3 | 33 - man/upscli_disconnect.3 | 23 - man/upscli_fd.3 | 22 - man/upscli_get.3 | 91 - man/upscli_list_next.3 | 52 - man/upscli_list_start.3 | 65 - man/upscli_readline.3 | 26 - man/upscli_sendline.3 | 24 - man/upscli_splitaddr.3 | 33 - man/upscli_splitname.3 | 36 - man/upscli_ssl.3 | 23 - man/upscli_strerror.3 | 22 - man/upscli_upserror.3 | 27 - man/upsclient.3 | 53 - man/upscode2.8 | 87 - man/upsd.8 | 158 - man/upsimage.cgi.8 | 36 - man/upslog.8 | 96 - man/upssched.conf.5 | 127 - man/upsstats.html.5 | 234 -- man/victronups.8 | 47 - scripts/Makefile.am | 3 +- scripts/Makefile.in | 34 +- scripts/README | 4 +- scripts/augeas/Makefile.am | 16 + scripts/augeas/Makefile.in | 457 +++ scripts/augeas/README | 205 ++ scripts/augeas/gen-nutupsconf-aug.py | 119 + scripts/augeas/nuthostsconf.aug.in | 45 + scripts/augeas/nutnutconf.aug.in | 48 + scripts/augeas/nutupsconf.aug.in | 159 + scripts/augeas/nutupsconf.aug.tpl | 58 + scripts/augeas/nutupsdconf.aug.in | 65 + scripts/augeas/nutupsdusers.aug.in | 83 + scripts/augeas/nutupsmonconf.aug.in | 122 + scripts/augeas/nutupsschedconf.aug.in | 75 + scripts/augeas/nutupssetconf.aug.in | 46 + scripts/augeas/tests/test_nut.aug | 187 ++ scripts/hal/Makefile.in | 27 +- scripts/hal/ups-nut-device.fdi.in | 186 ++ scripts/hotplug/Makefile.in | 27 +- scripts/hotplug/libhid.usermap | 54 + scripts/python/Makefile.am | 8 +- scripts/python/Makefile.in | 35 +- scripts/python/app/NUT-Monitor | 1136 ++++--- scripts/python/app/gui-1.3.glade | 1072 +++++++ scripts/python/app/gui.glade | 658 ----- .../app/locale/fr/LC_MESSAGES/NUT-Monitor.mo | Bin 0 -> 6503 bytes scripts/python/app/pixmaps/on_battery.png | Bin 0 -> 2894 bytes scripts/python/app/pixmaps/on_line.png | Bin 0 -> 2622 bytes scripts/python/app/pixmaps/var-ro.png | Bin 0 -> 627 bytes scripts/python/app/pixmaps/var-rw.png | Bin 0 -> 780 bytes scripts/python/app/pixmaps/warning.png | Bin 0 -> 3039 bytes scripts/python/module/PyNUT.py | 31 +- scripts/python/module/test_nutclient.py | 2 +- scripts/subdriver/path-to-subdriver.sh | 6 +- scripts/udev/Makefile.in | 27 +- scripts/udev/nut-usbups.rules.in | 58 +- scripts/upower/95-upower-hid.rules | 110 + server/Makefile.am | 6 +- server/Makefile.in | 37 +- server/conf.c | 106 +- server/desc.c | 71 +- server/netcmds.h | 7 +- server/netget.c | 2 +- server/netinstcmd.c | 2 +- server/netlist.c | 8 +- server/netset.c | 2 +- server/sockdebug.c | 3 +- server/ssl.c | 40 +- server/sstate.c | 21 +- server/sstate.h | 11 +- server/upsd.c | 105 +- server/upstype.h | 4 +- tools/Makefile.am | 15 +- tools/Makefile.in | 42 +- tools/nut-hclinfo.py | 268 ++ tools/nut-usbinfo.pl | 65 +- tools/svn2cl.authors | 5 + 510 files changed, 40508 insertions(+), 18859 deletions(-) rename docs/ideas.txt => TODO (68%) create mode 100644 common/atexit.c create mode 100644 common/setenv.c create mode 100644 common/snprintf.c create mode 100644 common/strerror.c delete mode 100644 data/driver.list create mode 100644 data/driver.list.in create mode 100644 data/epdu-managed.dev rename data/{evolution500.dev => evolution500.seq} (86%) delete mode 100644 docs/FAQ create mode 100644 docs/FAQ.txt delete mode 100644 docs/README create mode 100644 docs/acknowledgements.txt delete mode 100644 docs/acpi.txt create mode 100644 docs/asciidoc.conf delete mode 100644 docs/big-servers.txt create mode 100644 docs/cables.txt delete mode 100644 docs/chroot.txt delete mode 100644 docs/commands.txt delete mode 100644 docs/config-files.txt create mode 100644 docs/config-notes.txt delete mode 100644 docs/data-room.txt create mode 100644 docs/developer-guide.txt create mode 100644 docs/docinfo.xml create mode 100644 docs/documentation.txt create mode 100644 docs/download.txt create mode 100644 docs/features.txt create mode 100644 docs/history.txt create mode 100644 docs/images/advanced.png create mode 100644 docs/images/asciidoc.png create mode 100644 docs/images/bigbox.png create mode 100644 docs/images/bizarre.png create mode 100644 docs/images/blue-arrow.png create mode 100644 docs/images/cables/73-0724.png create mode 100644 docs/images/cables/940-0024C.jpg create mode 100644 docs/images/cables/Lansafecable.jpg create mode 100644 docs/images/cables/SOLA-330.png create mode 100644 docs/images/cables/belkin-f6cx-rkm-xu-cable.jpg create mode 100644 docs/images/cables/mac-940-0024C.png create mode 100644 docs/images/cables/mge-66049.png create mode 100644 docs/images/cables/mge-db9-rj12.jpg create mode 100644 docs/images/cables/mge-db9-rj45.jpg create mode 100644 docs/images/eaton-logo.png create mode 100644 docs/images/note.png create mode 100644 docs/images/nut_layering.png create mode 100644 docs/images/old-cgi.png create mode 100644 docs/images/simple.png create mode 100644 docs/images/warning.png create mode 100644 docs/man/Makefile.am rename {man => docs/man}/Makefile.in (58%) create mode 100644 docs/man/apcsmart.8 rename man/apcsmart.8 => docs/man/apcsmart.txt (53%) create mode 100644 docs/man/asciidoc.conf create mode 100644 docs/man/bcmxcp.8 create mode 100644 docs/man/bcmxcp.txt create mode 100644 docs/man/bcmxcp_usb.8 rename man/bcmxcp_usb.8 => docs/man/bcmxcp_usb.txt (57%) create mode 100644 docs/man/belkin.8 rename man/belkin.8 => docs/man/belkin.txt (54%) create mode 100644 docs/man/belkinunv.8 create mode 100644 docs/man/belkinunv.txt create mode 100644 docs/man/bestfcom.8 rename man/bestfcom.8 => docs/man/bestfcom.txt (57%) create mode 100644 docs/man/bestfortress.8 create mode 100644 docs/man/bestfortress.txt create mode 100644 docs/man/bestuferrups.8 create mode 100644 docs/man/bestuferrups.txt create mode 100644 docs/man/bestups.8 rename man/bestups.8 => docs/man/bestups.txt (70%) create mode 100644 docs/man/blazer.8 rename man/blazer.8 => docs/man/blazer.txt (55%) create mode 100644 docs/man/clone.8 rename man/clone.8 => docs/man/clone.txt (56%) create mode 100644 docs/man/dummy-ups.8 rename man/dummy-ups.8 => docs/man/dummy-ups.txt (55%) create mode 100644 docs/man/etapro.8 create mode 100644 docs/man/etapro.txt create mode 100644 docs/man/everups.8 create mode 100644 docs/man/everups.txt create mode 100644 docs/man/gamatronic.8 rename man/gamatronic.8 => docs/man/gamatronic.txt (56%) create mode 100644 docs/man/genericups.8 rename man/genericups.8 => docs/man/genericups.txt (59%) create mode 100644 docs/man/hosts.conf.5 rename man/hosts.conf.5 => docs/man/hosts.conf.txt (50%) create mode 100644 docs/man/isbmex.8 create mode 100644 docs/man/isbmex.txt create mode 100644 docs/man/ivtscd.8 create mode 100644 docs/man/ivtscd.txt create mode 100644 docs/man/libupsclient-config.1 create mode 100644 docs/man/libupsclient-config.txt create mode 100644 docs/man/liebert-esp2.8 create mode 100644 docs/man/liebert-esp2.txt create mode 100644 docs/man/liebert.8 create mode 100644 docs/man/liebert.txt create mode 100644 docs/man/masterguard.8 create mode 100644 docs/man/masterguard.txt create mode 100644 docs/man/metasys.8 rename man/metasys.8 => docs/man/metasys.txt (61%) create mode 100644 docs/man/mge-shut.8 create mode 100644 docs/man/mge-shut.txt create mode 100644 docs/man/mge-utalk.8 create mode 100644 docs/man/mge-utalk.txt create mode 100644 docs/man/microdowell.8 create mode 100644 docs/man/microdowell.txt create mode 100644 docs/man/netxml-ups.8 create mode 100644 docs/man/netxml-ups.txt create mode 100644 docs/man/nut.conf.5 rename man/nut.conf.5 => docs/man/nut.conf.txt (56%) create mode 100644 docs/man/nutupsdrv.8 create mode 100644 docs/man/nutupsdrv.txt create mode 100644 docs/man/oneac.8 rename man/oneac.8 => docs/man/oneac.txt (55%) create mode 100644 docs/man/optiups.8 create mode 100644 docs/man/optiups.txt create mode 100644 docs/man/powercom.8 create mode 100644 docs/man/powercom.txt create mode 100644 docs/man/powerman-pdu.8 create mode 100644 docs/man/powerman-pdu.txt create mode 100644 docs/man/powerpanel.8 rename man/powerpanel.8 => docs/man/powerpanel.txt (53%) create mode 100644 docs/man/rhino.8 create mode 100644 docs/man/rhino.txt create mode 100644 docs/man/richcomm_usb.8 create mode 100644 docs/man/richcomm_usb.txt create mode 100644 docs/man/safenet.8 create mode 100644 docs/man/safenet.txt create mode 100644 docs/man/skel.txt create mode 100644 docs/man/snmp-ups.8 create mode 100644 docs/man/snmp-ups.txt create mode 100644 docs/man/solis.8 create mode 100644 docs/man/solis.txt create mode 100644 docs/man/tripplite.8 rename man/tripplite.8 => docs/man/tripplite.txt (50%) create mode 100644 docs/man/tripplite_usb.8 create mode 100644 docs/man/tripplite_usb.txt create mode 100644 docs/man/tripplitesu.8 create mode 100644 docs/man/tripplitesu.txt create mode 100644 docs/man/ups.conf.5 create mode 100644 docs/man/ups.conf.txt create mode 100644 docs/man/upsc.8 create mode 100644 docs/man/upsc.txt create mode 100644 docs/man/upscli_connect.3 create mode 100644 docs/man/upscli_connect.txt create mode 100644 docs/man/upscli_disconnect.3 create mode 100644 docs/man/upscli_disconnect.txt create mode 100644 docs/man/upscli_fd.3 create mode 100644 docs/man/upscli_fd.txt create mode 100644 docs/man/upscli_get.3 create mode 100644 docs/man/upscli_get.txt create mode 100644 docs/man/upscli_list_next.3 create mode 100644 docs/man/upscli_list_next.txt create mode 100644 docs/man/upscli_list_start.3 create mode 100644 docs/man/upscli_list_start.txt create mode 100644 docs/man/upscli_readline.3 create mode 100644 docs/man/upscli_readline.txt create mode 100644 docs/man/upscli_sendline.3 create mode 100644 docs/man/upscli_sendline.txt create mode 100644 docs/man/upscli_splitaddr.3 create mode 100644 docs/man/upscli_splitaddr.txt create mode 100644 docs/man/upscli_splitname.3 create mode 100644 docs/man/upscli_splitname.txt create mode 100644 docs/man/upscli_ssl.3 create mode 100644 docs/man/upscli_ssl.txt create mode 100644 docs/man/upscli_strerror.3 create mode 100644 docs/man/upscli_strerror.txt create mode 100644 docs/man/upscli_upserror.3 create mode 100644 docs/man/upscli_upserror.txt create mode 100644 docs/man/upsclient.3 create mode 100644 docs/man/upsclient.txt create mode 100644 docs/man/upscmd.8 rename man/upscmd.8 => docs/man/upscmd.txt (52%) create mode 100644 docs/man/upscode2.8 create mode 100644 docs/man/upscode2.txt create mode 100644 docs/man/upsd.8 create mode 100644 docs/man/upsd.conf.5 rename man/upsd.conf.5 => docs/man/upsd.conf.txt (51%) create mode 100644 docs/man/upsd.txt create mode 100644 docs/man/upsd.users.5 rename man/upsd.users.5 => docs/man/upsd.users.txt (64%) create mode 100644 docs/man/upsdrvctl.8 rename man/upsdrvctl.8 => docs/man/upsdrvctl.txt (52%) create mode 100644 docs/man/upsimage.cgi.8 create mode 100644 docs/man/upsimage.cgi.txt create mode 100644 docs/man/upslog.8 create mode 100644 docs/man/upslog.txt create mode 100644 docs/man/upsmon.8 create mode 100644 docs/man/upsmon.conf.5 rename man/upsmon.conf.5 => docs/man/upsmon.conf.txt (67%) rename man/upsmon.8 => docs/man/upsmon.txt (68%) create mode 100644 docs/man/upsrw.8 rename man/upsrw.8 => docs/man/upsrw.txt (54%) create mode 100644 docs/man/upssched.8 create mode 100644 docs/man/upssched.conf.5 create mode 100644 docs/man/upssched.conf.txt rename man/upssched.8 => docs/man/upssched.txt (68%) create mode 100644 docs/man/upsset.cgi.8 rename man/upsset.cgi.8 => docs/man/upsset.cgi.txt (60%) create mode 100644 docs/man/upsset.conf.5 rename man/upsset.conf.5 => docs/man/upsset.conf.txt (59%) create mode 100644 docs/man/upsstats.cgi.8 rename man/upsstats.cgi.8 => docs/man/upsstats.cgi.txt (53%) create mode 100644 docs/man/upsstats.html.5 create mode 100644 docs/man/upsstats.html.txt create mode 100644 docs/man/usbhid-ups.8 rename man/usbhid-ups.8 => docs/man/usbhid-ups.txt (61%) create mode 100644 docs/man/victronups.8 create mode 100644 docs/man/victronups.txt delete mode 100644 docs/megatec.txt create mode 100644 docs/net-protocol.txt create mode 100644 docs/new-clients.txt delete mode 100644 docs/new-names.txt create mode 100644 docs/nut-names.txt create mode 100644 docs/nut-qa.txt delete mode 100644 docs/osd-notify.txt create mode 100644 docs/outlets.txt create mode 100644 docs/packager-guide.txt delete mode 100644 docs/pager.txt delete mode 100644 docs/powersaving.txt delete mode 100644 docs/protocol.txt rename docs/{upssched.txt => scheduling.txt} (65%) create mode 100644 docs/security.txt delete mode 100644 docs/shutdown.txt delete mode 100644 docs/ssl.txt create mode 100644 docs/stable-hcl.txt create mode 100644 docs/support.txt create mode 100644 docs/user-manual.txt create mode 100644 docs/website/Makefile.am create mode 100644 docs/website/Makefile.in create mode 100644 docs/website/css/ie-overrides.css create mode 100644 docs/website/css/web-layout.css create mode 100644 docs/website/css/xhtml11-quirks.css create mode 100644 docs/website/css/xhtml11.css create mode 100644 docs/website/faviconut.ico create mode 100644 docs/website/faviconut.png create mode 100644 docs/website/news.txt create mode 100644 docs/website/projects.txt create mode 100644 docs/website/scripts/filter_png.js create mode 100644 docs/website/scripts/jquery.js create mode 100644 docs/website/scripts/nut_jquery.js create mode 100644 docs/website/scripts/toc.js create mode 100644 docs/website/ups-protocols.txt create mode 100644 docs/website/web-layout.conf create mode 100644 docs/website/website.txt create mode 100644 drivers/bestpower-mib.c create mode 100644 drivers/bestpower-mib.h create mode 100644 drivers/idowell-hid.c create mode 100644 drivers/idowell-hid.h rename drivers/{liebertgxt2.c => liebert-esp2.c} (73%) delete mode 100644 drivers/megatec.c delete mode 100644 drivers/megatec.h delete mode 100644 drivers/megatec_usb.c create mode 100755 m4/ax_compare_version.m4 create mode 100644 m4/nut_check_asciidoc.m4 delete mode 100644 m4/nut_check_ipv6.m4 mode change 100755 => 100644 m4/nut_check_os.m4 create mode 100644 m4/nut_config_libhal.m4 delete mode 100644 man/Makefile.am delete mode 100644 man/bcmxcp.8 delete mode 100644 man/belkinunv.8 delete mode 100644 man/bestfortress.8 delete mode 100644 man/bestuferrups.8 delete mode 100644 man/etapro.8 delete mode 100644 man/everups.8 delete mode 100644 man/isbmex.8 delete mode 100644 man/ivtscd.8 delete mode 100644 man/libupsclient-config.1 delete mode 100644 man/liebert.8 delete mode 100644 man/liebertgxt2.8 delete mode 100644 man/masterguard.8 delete mode 100644 man/megatec.8 delete mode 100644 man/megatec_usb.8 delete mode 100644 man/mge-shut.8 delete mode 100644 man/mge-utalk.8 delete mode 100644 man/microdowell.8 delete mode 100644 man/netxml-ups.8 delete mode 100644 man/nutupsdrv.8 delete mode 100644 man/optiups.8 delete mode 100644 man/powercom.8 delete mode 100644 man/powerman-pdu.8 delete mode 100644 man/rhino.8 delete mode 100644 man/richcomm_usb.8 delete mode 100644 man/safenet.8 delete mode 100644 man/skel.8 delete mode 100644 man/snmp-ups.8 delete mode 100644 man/solis.8 delete mode 100644 man/tripplite_usb.8 delete mode 100644 man/tripplitesu.8 delete mode 100644 man/ups.conf.5 delete mode 100644 man/upsc.8 delete mode 100644 man/upscli_connect.3 delete mode 100644 man/upscli_disconnect.3 delete mode 100644 man/upscli_fd.3 delete mode 100644 man/upscli_get.3 delete mode 100644 man/upscli_list_next.3 delete mode 100644 man/upscli_list_start.3 delete mode 100644 man/upscli_readline.3 delete mode 100644 man/upscli_sendline.3 delete mode 100644 man/upscli_splitaddr.3 delete mode 100644 man/upscli_splitname.3 delete mode 100644 man/upscli_ssl.3 delete mode 100644 man/upscli_strerror.3 delete mode 100644 man/upscli_upserror.3 delete mode 100644 man/upsclient.3 delete mode 100644 man/upscode2.8 delete mode 100644 man/upsd.8 delete mode 100644 man/upsimage.cgi.8 delete mode 100644 man/upslog.8 delete mode 100644 man/upssched.conf.5 delete mode 100644 man/upsstats.html.5 delete mode 100644 man/victronups.8 create mode 100644 scripts/augeas/Makefile.am create mode 100644 scripts/augeas/Makefile.in create mode 100644 scripts/augeas/README create mode 100755 scripts/augeas/gen-nutupsconf-aug.py create mode 100644 scripts/augeas/nuthostsconf.aug.in create mode 100644 scripts/augeas/nutnutconf.aug.in create mode 100644 scripts/augeas/nutupsconf.aug.in create mode 100644 scripts/augeas/nutupsconf.aug.tpl create mode 100644 scripts/augeas/nutupsdconf.aug.in create mode 100644 scripts/augeas/nutupsdusers.aug.in create mode 100644 scripts/augeas/nutupsmonconf.aug.in create mode 100644 scripts/augeas/nutupsschedconf.aug.in create mode 100644 scripts/augeas/nutupssetconf.aug.in create mode 100644 scripts/augeas/tests/test_nut.aug create mode 100644 scripts/python/app/gui-1.3.glade delete mode 100644 scripts/python/app/gui.glade create mode 100644 scripts/python/app/locale/fr/LC_MESSAGES/NUT-Monitor.mo create mode 100644 scripts/python/app/pixmaps/on_battery.png create mode 100644 scripts/python/app/pixmaps/on_line.png create mode 100644 scripts/python/app/pixmaps/var-ro.png create mode 100644 scripts/python/app/pixmaps/var-rw.png create mode 100644 scripts/python/app/pixmaps/warning.png create mode 100644 scripts/upower/95-upower-hid.rules create mode 100755 tools/nut-hclinfo.py create mode 100644 tools/svn2cl.authors diff --git a/AUTHORS b/AUTHORS index 949847d..320efbe 100644 --- a/AUTHORS +++ b/AUTHORS @@ -96,11 +96,6 @@ N: Lars Balker Rasmussen E: lbr@mjolner.dk D: Solaris and minor patches -N: Carlos Rodrigues -E: carlos.efr@mail.telepac.pt -W: http://students.fct.unl.pt/~cer09566/ -D: author of the "megatec" driver - N: David Santinoli E: david@santinoli.com W: http://www.santinoli.com diff --git a/ChangeLog b/ChangeLog index 4bd5b6f..a21849b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,23 +1,1156 @@ -2.4.3 +2011-01-14 Arnaud Quette + + * [r2832] docs/download.txt, docs/website/news.txt: Missing website + update for 2.6.0 + * [r2830] configure.in: Final update for 2.6.0 release + * [r2829] autogen.sh, docs/download.txt, nut-autoreconf: Rename the + nut-autoreconf script to autogen.sh, since it is a more standard + name + +2011-01-14 Charles Lepple + + * [r2828] docs/developer-guide.txt, docs/history.txt, + docs/user-manual.txt: Remove work-in-progress warnings. + * [r2827] docs/Makefile.am, docs/docinfo.xml: Add basic revision + information to PDF documentation. + + This should be automated later. + +2011-01-13 Arnaud Quette + + * [r2825] docs/Makefile.am, docs/configure.txt: Remove AsciiDoc + hard-coded verbose flag, which can now be enabled using + 'ASCIIDOC_VERBOSE=-v make' + +2011-01-13 Arjen de Korte + + * [r2824] clients/upsclient.c: Revert commit 2819 which seems to + break certificate validation on some systems + +2011-01-13 Arnaud Quette + + * [r2823] docs/documentation.txt: Add a NUT Korean GuideBook to the + documentation (from PointBre) + * [r2821] clients/Makefile.am, configure.in, drivers/Makefile.am, + m4/nut_check_libhal.m4, m4/nut_check_libneon.m4, + m4/nut_check_libnetsnmp.m4, m4/nut_check_libpowerman.m4, + m4/nut_check_libssl.m4, m4/nut_check_libusb.m4, + m4/nut_check_libwrap.m4, server/Makefile.am: Fix the wrong use of + *_LDFLAGS instead of *_LIBS, which break compilation on newer + toolchains like the on the upcoming Ubuntu Natty (patch from + Laurent Bigonville, from Debian) + +2011-01-11 Arjen de Korte + + * [r2819] clients/upsclient.c: Set SSL verification method in CTX, + rather than through the filedescriptor (for clarity, no + functional change) + +2011-01-11 Arnaud Quette + + * [r2816] drivers/idowell-hid.c: Remove the wrong + 'battery.capacity' data mapping + * [r2815] NEWS, data/driver.list.in: Add iDowell iBox UPS to the + list of usbhid-ups supported models, and upgrade the NEWS + * [r2814] Makefile.am: Disable distcleancheck rule, which fails due + to files generated at 'make dist' time, while waiting for a + proper solution. This will allow older Unix to enter the BuildBot + system + +2011-01-10 Arnaud Quette + + * [r2812] configure.in: Restore --with[out]-all flags that were + lost during the AsciiDoc branch merge + +2011-01-08 Arjen de Korte + + * [r2811] scripts/upower/95-upower-hid.rules: Update upower script + with iDowell driver + +2011-01-05 Arjen de Korte + + * [r2803] drivers/idowell-hid.c: Complete HID to NUT mapping + +2011-01-04 Arjen de Korte + + * [r2802] drivers/Makefile.am, drivers/idowell-hid.c, + drivers/idowell-hid.h, drivers/usbhid-ups.c: Add generated + 'iDowell' subdriver (HID to NUT mapping to be added) + * [r2801] server/desc.c: Minor cleanup (change 'struct dlist_t' to + proper 'dlist_t' and zero dynamically allocated memory before + use) + * [r2800] server/conf.c: If multiple 'driver', 'port' or 'desc' + entries were specified in 'ups.conf', the server would leak + memory on (re)loading the configuration file. Also make sure + dynamically allocated memory is zero'd before use (to prevent + accidentally free'ing uninitialized pointers). + +2011-01-04 Arnaud Quette + + * [r2799] NEWS, data/driver.list.in: Add Rocketfish RF-1000VA / + RF-1025VA to the list of usbhid-ups supported models (reported by + James "Among The Living") + +2010-12-31 Charles Lepple + + * [r2795] nut-autoreconf, scripts/augeas/Makefile.am, + scripts/augeas/gen-nutupsconf-aug.py, + scripts/python/app/NUT-Monitor, scripts/python/module/PyNUT.py, + scripts/python/module/test_nutclient.py, tools/Makefile.am, + tools/nut-hclinfo.py, tools/nut-usbinfo.pl: Do not hardcode + Python and Perl interpreter paths + + Useful for systems like FreeBSD where Python is optional, and + pulled in from + the ports tree. + + This patch uses the first interpreter seen in $PATH. A future + improvement would + be to add a configure script argument, although that might be + annoying for the + nut-autoreconf script. + +2010-12-24 Arnaud Quette + + * [r2793] docs, docs/man: Don't version generated files (no + functional change) + * [r2792] docs/Makefile.am, docs/images/old-cgi.png: Add the + missing old CGI image + * [r2791] docs/configure.txt: Add a mention that '--with-doc=auto' + will try to build only the possible documents + * [r2790] docs/download.txt, docs/website/news.txt: Website update + for 2.6.0-pre1 + * [r2789] NEWS, UPGRADING, configure.in: News, upgrading + information and configure version bump for 2.6.0(-pre1) + * [r2788] docs/Makefile.am, docs/stable-hcl.txt, + docs/user-manual.txt, docs/website/Makefile.am, + docs/website/stable-hcl.txt, tools/nut-hclinfo.py: Fist stab to + integrate hardware compatibility list to the user manual + * [r2787] docs/asciidoc.conf: Fix linkdoc AsciiDoc macro, to handle + more smartly links with no anchors + * [r2786] docs/website/website.txt: Prepare website for the switch + to production, by removing the WARNING banner on the homepage + * [r2785] scripts/augeas: Don't version generated files (no + functional change) + * [r2784] docs/Makefile.am, docs/config-notes.txt, + docs/developer-guide.txt, scripts/augeas/README: Improve Augeas + documentation, integrate it as a chapter in the developer guide, + and reference the user section in the user manual + +2010-12-23 Arnaud Quette + + * [r2783] docs/download.txt, nut-autoreconf: Create an autoreconf + wrapper script to ensure that the source tree is in a buildable + state after an initial Subversion checkout + * [r2782] INSTALL, README, docs/asciidoc.conf, + docs/config-notes.txt, docs/configure.txt, + docs/documentation.txt, docs/download.txt, docs/nut-names.txt, + docs/support.txt, docs/user-manual.txt: Create a linkdoc AsciiDoc + macro to deal with cross references between NUT documentations + and variables paths (which depend on the generated documentation + format). A remaining limitation is that anchors are only + supported for single page HTML + * [r2781] configure.in, scripts/Makefile.am, scripts/README, + scripts/augeas: Merge the Augeas branch, related to configuration + files management + +2010-12-22 Arnaud Quette + + * [r2778] data/Makefile.am, data/epdu-managed.dev, + data/evolution500.dev, data/evolution500.seq: Add more comments + to the simulation files samples, and rename the UPS one to .seq + since it includes TIMER examples + +2010-12-22 Arjen de Korte + + * [r2777] data, docs/man, drivers, scripts/hal, + scripts/hal/ups-nut-device.fdi.in, scripts/hotplug, + scripts/hotplug/libhid.usermap, scripts/udev, + scripts/udev/nut-usbups.rules.in: Don't version generated files + +2010-12-22 Arnaud Quette + + * [r2775] README, docs/Makefile.am, docs/asciidoc.conf, + docs/config-notes.txt, docs/contact-closure.txt, + docs/developer-guide.txt, docs/new-clients.txt, + docs/scheduling.txt, docs/security.txt: Create, and distribute, a + linkman AsciiDoc macro to deal with variables manual pages path + (which depend on the generated documentation format): chunked + HTML points a level up, single page HTML points to the same + directory and PDF points online versions (which will only be + active once the new website is in production!) + * [r2774] docs/man/Makefile.am: Also distribute asciidoc.conf, + since it is needed for the linkman macro + * [r2773] docs/man/upscli_connect.txt, + docs/man/upscli_disconnect.txt, docs/man/upscli_fd.txt, + docs/man/upscli_get.txt, docs/man/upscli_list_next.txt, + docs/man/upscli_list_start.txt, docs/man/upscli_readline.txt, + docs/man/upscli_sendline.txt, docs/man/upscli_ssl.txt, + docs/man/upscli_strerror.txt, docs/man/upscli_upserror.txt, + docs/man/upsclient.txt: Fix wrong references to the NUT C client + structure (UPSCONN instead of UPSCONN_t) + +2010-12-21 Arnaud Quette + + * [r2766] AUTHORS, conf/ups.conf.sample, data/driver.list.in, + docs/FAQ.txt, docs/acknowledgements.txt, docs/cables/sms.txt, + docs/config-notes.txt, docs/man/Makefile.am, docs/man/blazer.txt, + docs/man/index.txt, docs/man/megatec.txt, + docs/man/megatec_usb.txt, docs/man/nutupsdrv.txt, + docs/man/ups.conf.txt, docs/new-drivers.txt, + docs/website/scripts/nut_jquery.js, drivers/Makefile.am, + drivers/megatec.c, drivers/megatec.h, drivers/megatec_usb.c, + tools/nut-usbinfo.pl: Final removal of the megatec and + megatec_usb drivers, now replaced by blazer_ser and blazer_usb + * [r2765] drivers/dstate.c, drivers/dstate.h: Rename the second + parameter of dstate_init() from 'port' to 'devname', since the + port name has been replaced for long by the device entry name, as + specified in ups.conf + * [r2764] docs/man/Makefile.am: Fix HTML_CONF_MANS files extension, + complete the clean stage and make AsciiDoc mandatory for 'make + dist' + +2010-12-20 Arnaud Quette + + * [r2759] tools/nut-usbinfo.pl: Fix udev rules refreshing issue + (reported by Laurent Bigonville, Debian bug #557178) + +2010-12-20 Arjen de Korte + + * [r2758] drivers/ietf-mib.c: Extend the IETF MIB with some + previously unmapped variables + * [r2757] drivers/snmp-ups.c, drivers/snmp-ups.h: Add + 'input.bypass' to the list of variables for which we support + detection of single or three phase operation + +2010-12-20 Arnaud Quette + + * [r2756] conf/upsd.conf.sample, docs/man/upsd.conf.txt: Complete + missing configuration directives in upsd.conf manual page and + sample configuration file + +2010-12-20 Charles Lepple + + * [r2753] tools/svn2cl.authors: Update authors list for ChangeLog + generation + +2010-12-19 Arnaud Quette + + * [r2751] configure.in, m4/nut_report_feature.m4: Rework + configuration summary report ordering in a more comprehensive way + * [r2750] configure.in: Revert commit r2748 + +2010-12-17 Arnaud Quette + + * [r2749] drivers/mge-utalk.c: Fix initialisation sequence, improve + model detection, don't declare stale too quickly and bump driver + version to 0.92 + * [r2748] configure.in: --with-doc=auto now behave depending on + AsciiDoc presence + * [r2747] docs/man/Makefile.am: Fix manual pages distribution and + installation issue + +2010-12-16 Arnaud Quette + + * [r2742] docs/website/news.txt, docs/website/projects.txt: Update + NUT-Monitor link, and announce release 1.3 + * [r2741] configure.in: Fix minor typo, among which some broke some + syntax highlighters + +2010-12-15 Arnaud Quette + + * [r2739] Makefile.am, configure.in, docs/man/Makefile.am, + docs/man/index.txt, docs/man/ivtscd.txt, man: Switch manual pages + to AsciiDoc, thus removing the redundant toplevel man/ directory, + now replaced by docs/man/ + +2010-12-15 Arjen de Korte + + * [r2738] drivers/ietf-mib.c, drivers/powerware-mib.c: The + upsConfigLowBattTime OID is in minutes. In order to convert this + to the seconds, we need to multiply by 60. Currently, the + conversion factor is stored in the length field. So we can either + make this value ST_FLAG_RW (and not convert from minutes to + seconds) or show the correct value without being able to modify + it. + + If we set ST_FLAG_RW | ST_FLAG_STRING, the length field must show + the length of the string that needs to be passed by clients (and + this can't be done). + * [r2737] clients/upsrw.c: Cleanup of upsrw client (no functional + changes) + * [r2736] clients/upscmd.c: Return server response to user (instead + of silently failing, which confuses the heck out of people) + + [http://lists.alioth.debian.org/pipermail/nut-upsuser/2010-December/006459.html] + +2010-12-13 Arjen de Korte + + * [r2735] drivers/belkin.c: Discard the manufacturer information + (which doesn't seem to be consistent between models) and instead + only require a valid reply format + +2010-12-12 Arjen de Korte + + * [r2734] drivers/powerp-bin.c: Reinstate support for older + CyberPower models that report the model number in a numerical + format (which was supported through the now obsolete 'cyberpower' + driver) + + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-July/004866.html] + * [r2733] conf/upsd.users.sample, docs/man/upsd.users.txt: + upsd.users: Specifying multiple instcmds + Add examples for adding multiple instcmds to upsd.users + + [https://alioth.debian.org/tracker/index.php?func=detail&aid=312768&group_id=30602&atid=411544] + * [r2732] drivers/belkin.c, drivers/belkin.h: Update to fix + datastale reports and general overhaul of driver code + + [https://alioth.debian.org/tracker/index.php?func=detail&aid=312877&group_id=30602&atid=411544] + +2010-12-11 Arnaud Quette + + * [r2731] docs, docs/man, docs/website, docs/website/scripts: + Complete the list of Subversion ignored files, with AsciiDoc + generated contents (no functional changes) + +2010-12-10 Arnaud Quette + + * [r2730] docs/Makefile.am, docs/cables.txt, + docs/cables/73-0724.png, docs/cables/940-0024C.jpg, + docs/cables/Lansafecable.jpg, docs/cables/SOLA-330.png, + docs/cables/belkin-f6cx-rkm-xu-cable.jpg, + docs/cables/mac-940-0024C.png, docs/cables/mge-66049.png, + docs/cables/mge-db9-rj12.jpg, docs/cables/mge-db9-rj45.jpg, + docs/documentation.txt, docs/images/cables, + docs/images/cables/73-0724.png, docs/images/cables/940-0024C.jpg, + docs/images/cables/Lansafecable.jpg, + docs/images/cables/SOLA-330.png, + docs/images/cables/belkin-f6cx-rkm-xu-cable.jpg, + docs/images/cables/mac-940-0024C.png, + docs/images/cables/mge-66049.png, + docs/images/cables/mge-db9-rj12.jpg, + docs/images/cables/mge-db9-rj45.jpg, docs/support.txt: Fix + cabling information integration, and some remaining broken links + in the documentation and website + +2010-12-06 Arjen de Korte + + * [r2725] drivers/apc-hid.c: Add HID to NUT mappings + + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-December/005105.html] + +2010-12-05 Arjen de Korte + + * [r2724] clients/upsclient.c: Rather than relying on + TLSv1_client_method() to never return a NULL pointer and/or + SSL_CTX_new() dealing with this gracefully, make this check + explicit (no functional change) + * [r2723] server/ssl.c: Fixed compilation warning (OpenSSL 1.0.0 + added the 'const' qualifier to SSL_METHOD) + +2010-12-04 Charles Lepple + + * [r2722] INSTALL, Makefile.am, README, TODO, UPGRADING, + configure.in, data/Makefile.am, data/driver.list, + data/driver.list.in, docs/FAQ, docs/FAQ.txt, docs/Makefile.am, + docs/README, docs/acknowledgements.txt, docs/acpi.txt, + docs/asciidoc.txt, docs/big-servers.txt, docs/cables.txt, + docs/cables/73-0724.png, docs/cables/940-0024C.jpg, + docs/cables/Lansafecable.jpg, docs/cables/SOLA-330.png, + docs/cables/belkin-f6cx-rkm-xu-cable.jpg, + docs/cables/mac-940-0024C.png, docs/cables/mge-66049.png, + docs/cables/mge-db9-rj12.jpg, docs/cables/mge-db9-rj45.jpg, + docs/chroot.txt, docs/commands.txt, docs/config-files.txt, + docs/config-notes.txt, docs/configure.txt, + docs/contact-closure.txt, docs/data-room.txt, docs/design.txt, + docs/developer-guide.txt, docs/developers.txt, + docs/documentation.txt, docs/download.txt, docs/features.txt, + docs/hid-subdrivers.txt, docs/history.txt, docs/ideas.txt, + docs/images, docs/images/advanced.png, docs/images/asciidoc.png, + docs/images/bigbox.png, docs/images/bizarre.png, + docs/images/blue-arrow.png, docs/images/eaton-logo.png, + docs/images/note.png, docs/images/nut-banner.png, + docs/images/nut_layering.png, docs/images/nut_layering.svg, + docs/images/simple.png, docs/images/warning.png, docs/macros.txt, + docs/man, docs/man/Makefile.am, docs/man/apcsmart.txt, + docs/man/asciidoc.conf, docs/man/bcmxcp.txt, + docs/man/bcmxcp_usb.txt, docs/man/belkin.txt, + docs/man/belkinunv.txt, docs/man/bestfcom.txt, + docs/man/bestfortress.txt, docs/man/bestuferrups.txt, + docs/man/bestups.txt, docs/man/blazer.txt, docs/man/clone.txt, + docs/man/dummy-ups.txt, docs/man/etapro.txt, + docs/man/everups.txt, docs/man/gamatronic.txt, + docs/man/genericups.txt, docs/man/hosts.conf.txt, + docs/man/index.txt, docs/man/isbmex.txt, + docs/man/libupsclient-config.txt, docs/man/liebert-esp2.txt, + docs/man/liebert.txt, docs/man/masterguard.txt, + docs/man/megatec.txt, docs/man/megatec_usb.txt, + docs/man/metasys.txt, docs/man/mge-shut.txt, + docs/man/mge-utalk.txt, docs/man/microdowell.txt, + docs/man/netxml-ups.txt, docs/man/nut.conf.txt, + docs/man/nutupsdrv.txt, docs/man/oneac.txt, docs/man/optiups.txt, + docs/man/powercom.txt, docs/man/powerman-pdu.txt, + docs/man/powerpanel.txt, docs/man/rhino.txt, + docs/man/richcomm_usb.txt, docs/man/safenet.txt, + docs/man/skel.txt, docs/man/snmp-ups.txt, docs/man/solis.txt, + docs/man/tripplite.txt, docs/man/tripplite_usb.txt, + docs/man/tripplitesu.txt, docs/man/ups.conf.txt, + docs/man/upsc.txt, docs/man/upscli_connect.txt, + docs/man/upscli_disconnect.txt, docs/man/upscli_fd.txt, + docs/man/upscli_get.txt, docs/man/upscli_list_next.txt, + docs/man/upscli_list_start.txt, docs/man/upscli_readline.txt, + docs/man/upscli_sendline.txt, docs/man/upscli_splitaddr.txt, + docs/man/upscli_splitname.txt, docs/man/upscli_ssl.txt, + docs/man/upscli_strerror.txt, docs/man/upscli_upserror.txt, + docs/man/upsclient.txt, docs/man/upscmd.txt, + docs/man/upscode2.txt, docs/man/upsd.conf.txt, docs/man/upsd.txt, + docs/man/upsd.users.txt, docs/man/upsdrvctl.txt, + docs/man/upsimage.cgi.txt, docs/man/upslog.txt, + docs/man/upsmon.conf.txt, docs/man/upsmon.txt, + docs/man/upsrw.txt, docs/man/upssched.conf.txt, + docs/man/upssched.txt, docs/man/upsset.cgi.txt, + docs/man/upsset.conf.txt, docs/man/upsstats.cgi.txt, + docs/man/upsstats.html.txt, docs/man/usbhid-ups.txt, + docs/man/victronups.txt, docs/megatec.txt, docs/net-protocol.txt, + docs/new-clients.txt, docs/new-drivers.txt, docs/new-names.txt, + docs/nut-names.txt, docs/nut-qa.txt, docs/osd-notify.txt, + docs/outlets.txt, docs/packager-guide.txt, docs/pager.txt, + docs/powersaving.txt, docs/protocol.txt, docs/scheduling.txt, + docs/security.txt, docs/shutdown.txt, docs/sock-protocol.txt, + docs/ssl.txt, docs/support.txt, docs/suspend-to-disk.txt, + docs/upssched.txt, docs/user-manual.txt, docs/website, + docs/website/Makefile.am, docs/website/css, + docs/website/css/ie-overrides.css, + docs/website/css/web-layout.css, + docs/website/css/xhtml11-quirks.css, + docs/website/css/xhtml11.css, docs/website/faviconut.ico, + docs/website/faviconut.png, docs/website/news.txt, + docs/website/projects.txt, docs/website/scripts, + docs/website/scripts/filter_png.js, + docs/website/scripts/jquery.js, + docs/website/scripts/nut_jquery.js, docs/website/scripts/toc.js, + docs/website/stable-hcl.txt, docs/website/ups-protocols.txt, + docs/website/web-layout.conf, docs/website/website.txt, + drivers/skel.c, m4/ax_compare_version.m4, + m4/nut_check_asciidoc.m4, m4/nut_check_os.m4, tools/Makefile.am, + tools/nut-hclinfo.py: Merging AsciiDoc branch into trunk + + Merged svn://svn.debian.org/nut/branches/AsciiDoc at r2701, with + the trunk + as of r2720. The AsciiDoc branch commit r2721 was cherry-picked + later. + + The AsciiDoc homepage is http://www.methods.co.nz/asciidoc/ and + the earliest + suggested version to use (in order to properly generate all + output formats) + is 8.6.3. + + The commits have been grouped into the following categories: + + == Build Machinery, File Management, Miscellaneous == + + r1874, r1880, r1894, r1895, r1896, r1897, r1898, r1908, r1909, + r1910, r1917, + r1920, r1927, r1928, r1929, r1931, r1958, r1976, r1977, r1978, + r1994, r2032, + r2125, r2126, r2130, r2155, r2160, r2246, r2470, r2473, r2474, + r2475, r2505, + r2522, r2538, ~~r2541~~, r2542, r2544, r2546, r2547, r2548, + r2549, r2552, + ~~r2553~~, r2554, r2558, r2560, ~~r2563~~, r2564, r2565, r2566, + r2606, r2607, + r2608, r2611, r2612, r2613, r2614, r2615, r2617, r2630, r2661, + r2669, r2670, + r2672, r2673, r2674, ~~r2679~~, r2683, r2684, r2685, r2686, + r2689, r2690 + + == Text File Conversion == + + r1875, r1881, r1899, r1900, r1901, r1902, r1903, r1912, r1913, + r1916, r1921, + r1922, r1923, r1924, r1925, r1926, r1997, r1998, r2003, r2030, + r2031, r2064, + r2065, r2135, r2150, r2157, r2158, r2245, r2283, r2284, r2285, + r2289, r2291, + r2292, r2328, r2409, r2463, r2465, r2481, r2482, r2497, r2498, + r2499, r2502, + r2517, r2519, r2520, r2525, r2526, r2527, r2530, r2533, r2534, + r2535, r2536, + r2537, r2556, r2561, r2562, r2649, r2701 + + == Updated Content == + + r1938, r1939, r1984, r1985, r1991, r1992, r2052, r2069, r2108, + r2124, r2131, + r2142, r2144, r2149, r2154, r2156, r2164, r2211, r2227, r2293, + r2304, r2309, + r2351, r2358, r2409, r2416, r2418, r2419, r2420, r2438, r2460, + r2461, r2462, + r2464, r2466, r2469, r2471, r2472, r2476, r2477, r2478, r2479, + r2480, r2483, + r2484, r2485, r2493, r2496, r2501, r2503, r2506, r2507, r2510, + r2512, r2518, + r2529, r2540, r2543, r2545, r2550, r2551, r2555, r2557, r2559, + r2631, r2632, + r2633, r2634, r2637, r2638, r2639, r2640, r2643, r2648, r2652, + r2653, r2655, + r2662, r2664, r2665, r2666, r2681 + + == Website == + + r1883, r1905, r1907, r1911, r1933, r1935, r1937, r1940, r1950, + r1953, r1954, + r1967, r1973, r1974, r1975, r2000, r2001, r2002, r2058, r2059, + ~~r2060~~, + r2061, r2063, r2066, r2123, r2134, r2136, r2159, r2225, r2288, + r2290, r2486, + r2487, r2494, r2495, r2500, r2504, r2515, r2521, r2523, r2539, + r2562, r2607, + r2721 + + == Manual Page Conversion == + + r1961, r1962, r1963, r1965, r1969, r1971, r1972, r1981, r1982, + r1986, r1987, + r1988, r1993, r2004, r2005, r2006, r2007, r2008, r2009, r2010, + r2011, r2012, + r2013, r2014, r2019, r2020, r2021, r2028, r2033, r2034, r2038, + r2044, r2047, + r2048, r2049, r2050, r2051, r2062, r2067, r2068, r2074, r2075, + r2107, r2109, + r2110, r2111, r2112, r2113, r2127, r2129, r2132, r2137, r2146, + r2147, r2151, + r2152, r2162, r2204, r2205, r2206, r2207, r2208, r2209, r2210, + r2211, r2226, + r2227, r2228, r2229, r2249, r2251, r2252, r2258, r2259, r2310, + r2311, r2312, + r2313, r2314, r2572, r2580 + + == Ported from trunk == + + r2039, r2043, r2049, r2076, r2110, r2120, r2209, r2210, r2249, + r2258, r2287, + r2325, r2358, r2393, r2429, r2430, r2434, r2439, r2440, r2443, + r2447, r2514, + r2532, r2567, r2657, r2694, r2696, r2700 + +2010-12-03 Arjen de Korte + + * [r2720] server/upsd.c: Allow hostnames in /etc/hosts.allow too + (not only IPv4 and/or IPv6 addresses). This is a frequent source + of confusion for people setting up libwrap access control. + + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-December/005097.html] + * [r2719] drivers/libhid.c: Revert commit 2407 (which breaks + reading reports larger than 8 bytes) and make sure we only store + data that was read. + + Breaking up the buffer in chunks that the USB interface can + handle is the job of the libusb library. If this doesn't work, + it's libusb that needs fixing, not NUT. + +2010-11-30 Arjen de Korte + + * [r2713] server/ssl.c: When a CERTFILE is configured for the + server, mandate that SSL is started or else fail starting the + server (so that a configuration problem doesn't remain hidden). + + Remove redundant OpenSSL_add_ssl_algorithms() call (same as + SSL_library_init). + +2010-11-29 Arnaud Quette + + * [r2710] scripts/upower/95-upower-hid.rules, tools/nut-usbinfo.pl: + Complete the renaming from DeviceKit-power to UPower, synchronise + the rules file as per upstream changes and update the generated + content + +2010-11-23 Arnaud Quette + + * [r2699] drivers/dummy-ups.c, drivers/dummy-ups.h, + man/dummy-ups.8: dummy-ups 0.12 now allows variable removal, by + setting an empty value + +2010-11-20 Arnaud Quette + + * [r2697] data/driver.list: Also add CyberPower CP1500AVRLCD to the + list of usbhid-ups supported models (reported by Patrick + O'Malley) + * [r2695] data/driver.list: Add CyberPower CP1350AVRLCD to the list + of usbhid-ups supported models (reported by Patrick O'Malley) + +2010-11-13 Arjen de Korte + + * [r2688] Makefile.am: Create empty website target (to silence + warnings about missing target) + +2010-11-12 Arjen de Korte + + * [r2687] drivers/apc-hid.c: Add additional HID mappings for + shutting down APC SmartUPS RM series + + [http://lists.alioth.debian.org/pipermail/nut-upsuser/2010-November/006318.html] + +2010-11-06 David Goncalves + + * [r2682] scripts/python/Makefile.am, + scripts/python/app/NUT-Monitor, scripts/python/app/gui-1.2.glade, + scripts/python/app/gui-1.3.glade, scripts/python/app/locale, + scripts/python/app/locale/fr, + scripts/python/app/locale/fr/LC_MESSAGES, + scripts/python/app/locale/fr/LC_MESSAGES/NUT-Monitor.mo: + NUT-Monitor 1.3 - Added localization support + +2010-11-05 Arjen de Korte + + * [r2680] drivers/blazer.c: Check for NULL pointer before checking + the status flags was missing + + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-November/005045.html] + +2010-11-03 Arnaud Quette + + * [r2656] data/driver.list, drivers/tripplite-hid.c: Add HP T750 G2 + to the list of usbhid-ups supported models (patch from Jorge + Salamero Sanz) + +2010-11-02 Arjen de Korte + + * [r2654] configure.in, m4/nut_check_libnetsnmp.m4: Exclude -I. and + extra developer warning flags with Net-SNMP support enabled + (using them is the responsibility of the NUT developers) + +2010-10-31 Arjen de Korte + + * [r2651] configure.in, drivers/upsdrvctl.c: Fix remaining + compilation warnings by doing an explicit cast that removes the + 'const' qualification and ignoring this specific GCC warning. + Sadly the underlying functions don't support this qualifier (and + it's not trivial to work around these remaining warnings). + +2010-10-28 Arjen de Korte + + * [r2647] drivers/powerman-pdu.c: Fix compilation warnings + * [r2646] drivers/dstate-hal.c: Fix compilation warnings + * [r2645] drivers/megatec_usb.c: Fix compilation warnings + +2010-10-27 Arjen de Korte + + * [r2636] drivers/mge-utalk.c, drivers/mge-utalk.h: Fix compilation + warnings + * [r2635] drivers/mge-shut.c, drivers/mge-shut.h: Fix compilation + warnings + +2010-10-26 Arjen de Korte + + * [r2629] drivers/tripplite.c: Fix compilation warnings + * [r2628] drivers/rhino.c: Fix compilation warnings + * [r2627] drivers/powercom.h: Fix compilation warnings + * [r2626] drivers/libshut.c, drivers/libshut.h: Fix compilation + warnings + * [r2625] drivers/microdowell.c: Fix compilation warnings + * [r2624] drivers/gamatronic.c, drivers/gamatronic.h: Fix + compilation warnings + * [r2623] drivers/usb-common.c: Fix compilation warnings + * [r2622] drivers/mge-xml.c, drivers/netxml-ups.h: Fix compilation + warnings + * [r2621] drivers/bestfortress.c: Fix compilation warnings + * [r2620] drivers/dummy-ups.h: Fix compilation warnings + * [r2619] drivers/bcmxcp.c, drivers/bcmxcp.h: Fix compilation + warnings + * [r2618] drivers/powerp-txt.c, drivers/powerpanel.h: Fix + compilation warnings + +2010-10-25 Arjen de Korte + + * [r2616] drivers/mge-hid.c, drivers/powercom-hid.c, + drivers/usbhid-ups.h: Remove superfluous const declaration + (function return values can never be a lvalue) + +2010-10-20 Arjen de Korte + + * [r2604] server/upsd.c: Revert experimental stuff that + accidentally made it into commit 2600 + * [r2603] drivers/mge-hid.c: Fix wrong pointer type + * [r2602] configure.in: Remove inet_aton from AC_REPLACE_FUNCS (no + longer needed) + * [r2601] drivers/bcmxcp_usb.c, drivers/bestfcom.c, + drivers/ivtscd.c, drivers/libshut.c, drivers/metasys.c, + drivers/optiups.c, drivers/powerp-bin.c, drivers/powerp-txt.c, + drivers/rhino.c, drivers/richcomm_usb.c, drivers/safenet.c, + drivers/snmp-ups.c, drivers/solis.h: Fix bad prototypes (missing + void) + * [r2600] Makefile.am, clients/upsclient.c, clients/upsclient.h, + clients/upsmon.c, common/inet_aton.c, configure.in, + docs/configure.txt, m4/nut_check_ipv6.m4, server/upsd.c: Remove + code that used the (now obsoleted) gethostbyaddr in favor of the + (IPv6 capable) getaddrinfo function + * [r2599] drivers/libusb.h: Fix compilation warnings + * [r2598] drivers/tripplite_usb.c: Fix compilation warnings + * [r2597] drivers/serial.c: Replace explicit typecasts of void + pointers by adding an intermediate variable of the proper type + * [r2596] drivers/apcsmart.c: Fix compilation warnings (functions + returning string contants, should return (const char *), not + (char *)) + +2010-10-19 Charles Lepple + + * [r2581] scripts/python/module/PyNUT.py: Fix small typo in + comments of PyNUT class + +2010-10-16 Arjen de Korte + + * [r2573] man/upsd.conf.5: Add information on the CERTFILE keyword, + needed for SSL support in the upsd server + +2010-10-13 Arnaud Quette + + * [r2571] drivers/belkin.c, drivers/belkin.h: Add battery tests and + beeper control commands, and report the beeper and test status + (patch from John Bayly) + +2010-10-08 Arjen de Korte + + * [r2570] drivers/apc-hid.c, drivers/belkin-hid.c, + drivers/cps-hid.c, drivers/explore-hid.c, drivers/liebert-hid.c, + drivers/mge-hid.c, drivers/powercom-hid.c, + drivers/tripplite-hid.c, drivers/usbhid-ups.c, + drivers/usbhid-ups.h, scripts/subdriver/path-to-subdriver.sh: Fix + compilation warnings for the usbhid-ups driver (functions + returning string contants, should return (const char *), not + (char *)) + * [r2569] clients/upsmon.c, common/common.c: Change strange (but + valid) construction. Setting a flag should be done by either + '*val |= *flag' or '*val = (*val | flag)'. Using '*val = (*val |= + flag)' will first set the flag in *val and then assign the result + to *val (which is redundant). + * [r2568] server/upsd.c: Initialize SSL before we drop privileges + (we may not be able to read the keyfile as non-root) + +2010-09-22 Arnaud Quette + + * [r2531] drivers/snmp-ups.c, drivers/snmp-ups.h, man/snmp-ups.8: + Add SNMP v3 support, and rework SNMP initialisation + +2010-09-20 Charles Lepple + + * [r2528] drivers/libhid.c, drivers/usbhid-ups.c: Print HID values + in scientific notation. + +2010-09-15 Arnaud Quette + + * [r2524] data/driver.list, drivers/tripplite-hid.c: Add a bunch of + Tripplite USB/HID devices, reported from UPower, and HP R1500 G2 + INTL to the list of supported Tripplite HID devices + +2010-09-11 Arjen de Korte + + * [r2516] data/driver.list, drivers/tripplite-hid.c: Add + Smart1000LCD to list of supported devices + [http://lists.alioth.debian.org/pipermail/nut-upsuser/2010-September/006188.html] + +2010-09-08 Chetan Agarwal + + * [r2513] data/driver.list: Fixed renaming of liebertgxt2 to + liebert-esp2 driver done in commit r2432 and in r2444 + +2010-09-07 Chetan Agarwal + + * [r2511] data/driver.list: Add Eaton ConnectUPS X / BD / E Slot to + compatibility list for bcmxcp and snmp-ups + +2010-09-06 Arjen de Korte + + * [r2509] data/driver.list, drivers/tripplite-hid.c: Add HP T1500 + INTL to list of supported devices + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-September/004938.html] + +2010-08-30 Arnaud Quette + + * [r2508] drivers/mge-hid.c: ups.test.result is now refreshed upon + each full polling cycle + +2010-07-25 David Goncalves + + * [r2492] scripts/python/Makefile.am, scripts/python/app/pixmaps, + scripts/python/app/pixmaps/on_battery.png, + scripts/python/app/pixmaps/on_line.png, + scripts/python/app/pixmaps/var-ro.png, + scripts/python/app/pixmaps/var-rw.png, + scripts/python/app/pixmaps/warning.png: Added missing pixmaps for + NUT-Monitor 1.2 + +2010-07-25 Arjen de Korte + + * [r2491] drivers/upsdrvctl.c: Check for NULL before xbasename() on + 'port' variable (legacy code for nut-2.0.4 drivers and older) + + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-July/004894.html] + +2010-07-24 Charles Lepple + + * [r2490] scripts/python/Makefile.am: Add new glade filename to + Makefile.am + + Should fix Buildbot failure from r2489. + +2010-07-23 David Goncalves + + * [r2489] scripts/python/app/NUT-Monitor, + scripts/python/app/gui-1.2.glade, scripts/python/app/gui.glade, + scripts/python/module/PyNUT.py: Upgrade NUT-Monitor to 1.2 + * [r2488] scripts/python/module/PyNUT.py: Upgrade PyNUT module to + 1.2 + +2010-07-11 Charles Lepple + + * [r2468] data/driver.list: driver.list: Split entries for Tripp + Lite OmniVS1000 + + http://article.gmane.org/gmane.comp.monitoring.nut.user/5591 + +2010-06-25 Arjen de Korte + + * [r2459] drivers/apc-hid.c: Add support for APC 5G models + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-June/004846.html + +2010-06-24 Arnaud Quette + + * [r2458] drivers/mge-hid.c: Do no ignore DST offset, or it will be + substracted from the actual value in the target device + +2010-06-22 Arnaud Quette + + * [r2457] drivers/dummy-ups.c: Fix status handling in simulation + (dummy) mode, conform to the coding rules, fix a memory leak and + bump the release to 0.11 + +2010-05-13 Charles Lepple + + * [r2456] tools/nut-usbinfo.pl: BUS to SUBSYSTEMS in nut-usbinfo.pl + (to match r2411) + * [r2455] data/driver.list, drivers/tripplite-hid.c: Add "Tripp + Lite SmartOnline SU1000XLA" to list of supported devices. [Ron + Peterson] + + http://lists.alioth.debian.org/pipermail/nut-upsuser/2010-May/006055.html + +2010-05-04 Arjen de Korte + + * [r2454] configure.in, drivers/main-hal.c, m4/nut_check_libhal.m4: + Use AC_CHECK_FUNCS to see if g_timeout_add_seconds is available + (rather than checking the version of the library that is + installed) + +2010-05-04 Arnaud Quette + + * [r2453] drivers/mge-xml.c, drivers/usbhid-ups.c: Add "Test + scheduled" handling for ups.test.result on Eaton and derivative + units + +2010-05-02 Arjen de Korte + + * [r2452] m4/nut_check_libhal.m4: Additionally check for 'glib.h' + and 'dbus/glib.h' to see if the requirements for HAL are met + +2010-04-19 Arnaud Quette + + * [r2445] data/driver.list, drivers/Makefile.am, + drivers/bestpower-mib.c, drivers/bestpower-mib.h, + drivers/snmp-ups.c, drivers/snmp-ups.h: Add Eaton Best Ferrups + with older ConnectUPS card to the list of snmp-ups supported + models + +2010-04-18 Arjen de Korte + + * [r2444] drivers/Makefile.am: Renaming the liebertgxt2 to + liebert-esp2 driver in commit r2432 failed to update the + Makefile.am + * [r2442] data/driver.list: Add two models that were reported on + the mailinglists: + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-April/004738.html + http://lists.alioth.debian.org/pipermail/nut-upsuser/2010-April/006023.html + * [r2441] drivers/tripplite-hid.c: Allow 'productid' overrides for + Hewlett Packard UPS devices + +2010-04-15 Arjen de Korte + + * [r2437] drivers/tripplite-hid.c: Add 'HP T1000 INTL UPS' to list + of supported devices [Sturle Sunde] + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-April/004735.html + +2010-04-14 Arjen de Korte + + * [r2436] docs/new-names.txt: Add 'output.crestfactor' and + 'outlet.n.crestfactor' to list of supported variables + +2010-04-10 Arjen de Korte + + * [r2435] drivers/liebert-esp2.c: Allow spaces in model name and + add 'battery.temperature' variable (Spiros Ioannou) + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-April/004719.html + +2010-04-10 Charles Lepple + + * [r2433] drivers: Add 'liebert-esp2' driver to svn:ignore list. + +2010-04-10 Arjen de Korte + + * [r2432] drivers/Makefile.am, drivers/liebert-esp2.c, + drivers/liebertgxt2.c, man/Makefile.am, man/liebert-esp2.8, + man/liebertgxt2.8: Rename 'liebertgxt2' driver to 'liebert-esp2' + (GXT2 is a model name, ESP-II the serial protocol being used by + other models as well) + +2010-04-09 Arjen de Korte + + * [r2431] drivers/liebertgxt2.c, man/liebertgxt2.8: Allow to + override default baudrate to user specified value (needed on some + models) + +2010-04-09 Arnaud Quette + + * [r2428] data/driver.list: Add Eaton 9395 with serial interface to + the list of bcmxcp supported models + +2010-04-07 Arjen de Korte + + * [r2426] drivers/liebertgxt2.c: Add CHRG and DISCHRG status flags + (based on the reported battery.current) + * [r2425] drivers/liebertgxt2.c: Fix previous commit + * [r2424] drivers/liebertgxt2.c: Add 'battery.current' value + [Spiros Ioannou] removing the CHRG flag at the same time (which + doesn't seem to be usable) + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-April/004700.html + * [r2423] drivers/liebertgxt2.c: Fix ups.firmware [Robert Jobbagy] + and only require ups.model for successful detection + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-April/004701.html + +2010-04-07 Arnaud Quette + + * [r2422] scripts/Makefile.am, scripts/README, scripts/dkp, + scripts/upower, scripts/upower/95-devkit-power-hid.rules, + scripts/upower/95-upower-hid.rules: Update DeviceKit-power + resource to the new UPower name + +2010-04-06 Arjen de Korte + + * [r2421] drivers/liebertgxt2.c: More byte swapping issues fixed + [Richard Gregory] + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-April/004698.html + +2010-04-02 Arjen de Korte + + * [r2415] drivers/liebertgxt2.c: Swap bytes in calculations for + reported values by the UPS [Robert Jobbagy] + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-April/004695.html] + +2010-03-29 Charles Lepple + + * [r2414] ., ChangeLog, Makefile.am, tools/Makefile.am, + tools/svn2cl.authors: Generate the ChangeLog file with 'make + dist' from SVN history + + ` svn merge -r2401:r2413 + svn+ssh://svn.debian.org/svn/nut/branches/svn-auto-changelog ` + + Includes the following: + - r2402 removes the static ChangeLog and adds a rule and the + authors file. + - r2403 shows how little I remember about automake + - r2404 and r2413 cancel each other out + - r2405 fixes the SVN starting revision syntax. + +2010-03-27 Arnaud Quette + + * [r2411] scripts/udev/nut-usbups.rules.in: Change BUS to + SUBSYSTEMS, since the former is deprecated (patch from Michal + Hlavinka, Red Hat) + +2010-03-26 Arjen de Korte + + * [r2410] drivers/powercom-hid.c, man/usbhid-ups.8: Reject devices + that are known not to be supported by the powercom-hid subdriver + +2010-03-23 Arnaud Quette + + * [r2408] clients/Makefile.am, common/Makefile.am, + drivers/Makefile.am, server/Makefile.am: Fix the distribution and + compilation of local implementation of missing systems functions. + This resulted in compilation failure on HP-UX, and possibly other + older Unix systems, like Aix. Refer to configure.in -> + AC_REPLACE_FUNCS for more information. + +2010-03-22 Arjen de Korte + + * [r2407] drivers/libhid.c: Reduce size of buffer to maximum size + supported by low-speed USB devices. + +2010-03-22 Arnaud Quette + + * [r2406] drivers/Makefile.am: Add the missing link to the math + library for bcmxcp driver + +2010-03-12 Arjen de Korte + + * [r2400] README: Remove monitor-only option that never existed. + Whether or not a system will shutdown is determined by the + combined powervalue of all devices it monitors (this has nothing + to do with the master or slave setting). + +2010-03-08 Arjen de Korte + + * [r2399] clients/upsclient.h, drivers/hidparser.h, + drivers/hidtypes.h, include/parseconf.h: Add control comments for + 'ident' to switch off formatting in some places + * [r2398] clients/upsimage.c, clients/upsimagearg.h, + clients/upslog.c, clients/upslog.h, clients/upssched.c, + clients/upssched.h, drivers/apcsmart.c, drivers/apcsmart.h, + drivers/dstate-hal.h, drivers/gamatronic.h, drivers/main-hal.h, + drivers/main.h, drivers/netxml-ups.h, drivers/usbhid-ups.h, + server/netcmds.h: Finalize cleanup of type definitions for + structures where needed and/or useful (and replace a couple of + void pointers by the proper structures) + +2010-03-07 Arjen de Korte + + * [r2397] common/state.c, drivers/dstate-hal.h, drivers/dstate.c, + drivers/dstate.h, include/extstate.h, include/state.h, + server/netget.c, server/netinstcmd.c, server/netlist.c, + server/netset.c, server/sstate.c, server/sstate.h, + server/upstype.h: Create types for structures that already + suggested that they were types, but were not (cmdlist_t, conn_t, + enum_t and st_tree_t) and use these instead + * [r2396] drivers/blazer.c: Fix loss of precision in dividing + integers + +2010-03-07 Charles Lepple + + * [r2395] docs/cables/ge-imv-victron.txt: Remove escape sequence + from cable diagram. + + Pointed out on Feb 25 2010 by Yury V. Zaytsev on nut-upsuser. + +2010-03-04 Arjen de Korte + + * [r2392] data/driver.list: Add PowerWare 5119 RM support through + upscode2 driver + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-March/004608.html] + * [r2391] drivers/upscode2.c: Use "shutdown.reboot" (which was used + before r2389 was committed) instead of "shutdown.return" in the + shutdown function + +2010-03-03 Arjen de Korte + + * [r2390] drivers/upscode2.c: Update based on information provided + by Steve Golson + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-March/004608.html] + * [r2389] drivers/upscode2.c: Update based on information provided + by Steve Golson + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-March/004608.html] + +2010-03-01 Arjen de Korte + + * [r2387] configure.in: No longer require autoconf version 2.60 or + better and work around broken quadrigraphs before autoconf + version 2.62 + * [r2385] drivers/mge-hid.c: Add missing Kelvin to Celcius + conversion + [http://lists.alioth.debian.org/pipermail/nut-upsuser/2010-March/005944.html] + * [r2384] configure.in: Attempt to fix problem with two consecutive + '@:>@' quadrigraphs (also reports m4 version used) + +2010-02-28 Arjen de Korte + + * [r2383] configure.in, m4/nut_check_libgd.m4, + m4/nut_check_libhal.m4, m4/nut_check_libneon.m4, + m4/nut_check_libnetsnmp.m4, m4/nut_check_libpowerman.m4, + m4/nut_check_libssl.m4, m4/nut_check_libusb.m4, + m4/nut_config_libhal.m4: Restore @<:@ and @:>@ quadrigraphs + * [r2382] configure.in: Revert commit 2380 which fails on Debian + * [r2381] m4/nut_check_libgd.m4, m4/nut_check_libhal.m4, + m4/nut_check_libneon.m4, m4/nut_check_libnetsnmp.m4, + m4/nut_check_libpowerman.m4, m4/nut_check_libssl.m4, + m4/nut_check_libusb.m4, m4/nut_config_libhal.m4: Revert commit + 2380 which fails on Debian + * [r2380] configure.in, m4/nut_check_libgd.m4, + m4/nut_check_libhal.m4, m4/nut_check_libneon.m4, + m4/nut_check_libnetsnmp.m4, m4/nut_check_libpowerman.m4, + m4/nut_check_libssl.m4, m4/nut_check_libusb.m4, + m4/nut_config_libhal.m4: Change escaped characters (no functional + changes) + * [r2379] configure.in, m4/nut_check_libgd.m4, + m4/nut_check_libhal.m4, m4/nut_check_libneon.m4, + m4/nut_check_libnetsnmp.m4, m4/nut_check_libpowerman.m4, + m4/nut_check_libssl.m4, m4/nut_check_libusb.m4, + m4/nut_config_libhal.m4: Clean up output of 'configure --help' + (indentation, optional parameters) and don't allow options which + need a parameter + * [r2378] m4/nut_check_libgd.m4, m4/nut_check_libhal.m4, + m4/nut_check_libneon.m4, m4/nut_check_libnetsnmp.m4, + m4/nut_check_libpowerman.m4, m4/nut_check_libssl.m4, + m4/nut_check_libusb.m4, m4/nut_config_libhal.m4, + scripts/hal/ups-nut-device.fdi.in, + scripts/udev/nut-usbups.rules.in: When setting variables from + pkg-config, rather than checking for the return value, check for + a (non-)zero length. It will happily return zero for unknown + variables in otherwise supported packages (and this is usually + not what we want). + Also direct stderr to /dev/null for systems that don't use + pkg-config. + * [r2377] m4/nut_config_libhal.m4: Fix type (leftover from + debugging) + * [r2376] configure.in, m4/nut_check_libhal.m4, + m4/nut_config_libhal.m4: Keep compile and linker options separate + from runtime configuration parameters (and skip the latter if the + first are not usable) + +2010-02-27 Arjen de Korte + + * [r2375] m4/nut_check_libhal.m4: Test for empty variable, rather + than the return value of pkg-config + * [r2374] docs/configure.txt, m4/nut_check_libhal.m4: Allow + overrides in ./configure for all variables needed for HAL support + +2010-02-26 Arjen de Korte + + * [r2372] common/common.c, configure.in, drivers/main.c, + include/common.h, man/nutupsdrv.8, man/upsd.8, server/upsd.c: Due + to popular demand, add a possibility to reduce the verbosity of + messages written to the syslog (by adding one or more -q flags in + a similar fashion as the -D debug flag) + * [r2371] m4/nut_check_libgd.m4, m4/nut_check_libneon.m4, + m4/nut_check_libnetsnmp.m4, m4/nut_check_libpowerman.m4, + m4/nut_check_libssl.m4, m4/nut_check_libusb.m4: Check if + overrides are specified, but the mandatory argument is missing + (and refer to 'docs/configure.txt') + +2010-02-25 Arjen de Korte + + * [r2370] clients/upslog.c, clients/upsmon.c, clients/upsrw.c, + clients/upssched.c, server/sockdebug.c, server/upsd.c: Use + open_syslog wrapper function instead of openlog directly and grab + program name from argv[0] + +2010-02-23 Arjen de Korte + + * [r2367] drivers/netvision-mib.c: Fixes Alioth bug #312364 2010-02-23 Arnaud Quette - * [r2366] ChangeLog, configure.in, NEWS, UPGRADING: Final update for - 2.4.3 release + * [r2366] ChangeLog, NEWS, UPGRADING, configure.in: Final update + for 2.4.3 release 2010-02-20 Arjen de Korte * [r2365] m4/nut_check_ipv6.m4: Fix broken logic to enable IPv6 support -2.4.2 - 2010-02-19 Arnaud Quette * [r2363] ChangeLog, configure.in: Final update for 2.4.2 release - -2010-02-19 Arnaud Quette - * [r2362] NEWS, data/driver.list: Add HP R1500 G2 to compatibility list for bcmxcp (reported by Stephan Schupfer) @@ -97,7 +1230,7 @@ the mailinglist [http://lists.alioth.debian.org/pipermail/nut-upsuser/2005-August/000118.html] -2010-02-11 Charles Lepple +2010-02-11 Charles Lepple * [r2338] ChangeLog: Generate ChangeLog entries from r2337 through r2331. @@ -108,7 +1241,158 @@ 2010-02-11 Arjen de Korte - * [r2336] (numerous files) No functional changes (properties only) + * [r2336] COPYING, ChangeLog, INSTALL, LICENSE-GPL2, LICENSE-GPL3, + MAINTAINERS, Makefile.am, NEWS, UPGRADING, clients/cgilib.c, + clients/cgilib.h, clients/status.h, clients/upsc.c, + clients/upsclient.c, clients/upsclient.h, clients/upscmd.c, + clients/upsimage.c, clients/upsimagearg.h, clients/upslog.c, + clients/upslog.h, clients/upsmon.c, clients/upsmon.h, + clients/upsrw.c, clients/upssched-cmd, clients/upssched.c, + clients/upssched.h, clients/upsset.c, clients/upsstats.c, + clients/upsstats.h, common/Makefile.am, common/atexit.c, + common/common.c, common/inet_aton.c, common/parseconf.c, + common/setenv.c, common/snprintf.c, common/state.c, + common/strerror.c, common/upsconf.c, compile, conf/Makefile.am, + conf/hosts.conf.sample, conf/nut.conf.sample, + conf/ups.conf.sample, conf/upsd.conf.sample, + conf/upsd.users.sample, conf/upsmon.conf.sample, + conf/upssched.conf.sample.in, conf/upsset.conf.sample, + conf/upsstats-single.html.sample, conf/upsstats.html.sample, + configure.in, data/Makefile.am, data/cmdvartab, data/driver.list, + data/epdu-managed.dev, data/evolution500.dev, + data/html/Makefile.am, data/html/README, data/html/bottom.html, + data/html/header.html.in, data/html/index.html, + data/html/nut-banner.png, docs/FAQ, docs/Makefile.am, + docs/README, docs/acpi.txt, docs/big-servers.txt, + docs/cables/apc-rs500-serial.txt, docs/cables/apc.txt, + docs/cables/ge-imv-victron.txt, docs/cables/imv.txt, + docs/cables/mgeups.txt, docs/cables/powerware.txt, + docs/cables/repotec.txt, docs/cables/sms.txt, docs/chroot.txt, + docs/commands.txt, docs/config-files.txt, docs/configure.txt, + docs/contact-closure.txt, docs/data-room.txt, docs/design.txt, + docs/developers.txt, docs/hid-subdrivers.txt, docs/ideas.txt, + docs/macros.txt, docs/megatec.txt, docs/new-drivers.txt, + docs/new-names.txt, docs/nut-hal.txt, docs/osd-notify.txt, + docs/pager.txt, docs/powersaving.txt, docs/protocol.txt, + docs/shutdown.txt, docs/snmp.txt, docs/sock-protocol.txt, + docs/ssl.txt, docs/suspend-to-disk.txt, docs/upssched.txt, + drivers/Makefile.am, drivers/apc-hid.c, drivers/apc-hid.h, + drivers/apc-mib.c, drivers/apc-mib.h, drivers/apcsmart.c, + drivers/apcsmart.h, drivers/baytech-mib.c, drivers/baytech-mib.h, + drivers/bcmxcp.c, drivers/bcmxcp.h, drivers/bcmxcp_io.h, + drivers/bcmxcp_ser.c, drivers/bcmxcp_usb.c, drivers/belkin-hid.c, + drivers/belkin-hid.h, drivers/belkin.c, drivers/belkin.h, + drivers/belkinunv.c, drivers/bestfcom.c, drivers/bestfortress.c, + drivers/bestuferrups.c, drivers/bestups.c, drivers/blazer.c, + drivers/blazer.h, drivers/blazer_ser.c, drivers/blazer_usb.c, + drivers/clone-outlet.c, drivers/clone.c, drivers/compaq-mib.c, + drivers/compaq-mib.h, drivers/cps-hid.c, drivers/cps-hid.h, + drivers/dstate-hal.c, drivers/dstate-hal.h, drivers/dstate.c, + drivers/dstate.h, drivers/dummy-ups.c, drivers/dummy-ups.h, + drivers/eaton-mib.h, drivers/etapro.c, drivers/everups.c, + drivers/explore-hid.c, drivers/explore-hid.h, + drivers/gamatronic.c, drivers/gamatronic.h, drivers/genericups.c, + drivers/genericups.h, drivers/hidparser.c, drivers/hidparser.h, + drivers/hidtypes.h, drivers/ietf-mib.c, drivers/ietf-mib.h, + drivers/isbmex.c, drivers/ivtscd.c, drivers/libhid.c, + drivers/libhid.h, drivers/libshut.c, drivers/libshut.h, + drivers/libusb.c, drivers/libusb.h, drivers/liebert-hid.c, + drivers/liebert-hid.h, drivers/liebert.c, drivers/liebertgxt2.c, + drivers/main-hal.c, drivers/main-hal.h, drivers/main.c, + drivers/main.h, drivers/masterguard.c, drivers/megatec.c, + drivers/megatec.h, drivers/megatec_usb.c, drivers/metasys.c, + drivers/mge-hid.c, drivers/mge-hid.h, drivers/mge-mib.c, + drivers/mge-mib.h, drivers/mge-shut.c, drivers/mge-shut.h, + drivers/mge-utalk.c, drivers/mge-utalk.h, drivers/mge-xml.c, + drivers/mge-xml.h, drivers/microdowell.c, drivers/microdowell.h, + drivers/netvision-mib.c, drivers/netvision-mib.h, + drivers/netxml-ups.c, drivers/netxml-ups.h, drivers/optiups.c, + drivers/powercom-hid.c, drivers/powercom-hid.h, + drivers/powercom.c, drivers/powercom.h, drivers/powerman-pdu.c, + drivers/powerp-bin.c, drivers/powerp-bin.h, drivers/powerp-txt.c, + drivers/powerp-txt.h, drivers/powerpanel.c, drivers/powerpanel.h, + drivers/powerware-mib.c, drivers/powerware-mib.h, + drivers/raritan-pdu-mib.h, drivers/rhino.c, + drivers/richcomm_usb.c, drivers/safenet.c, drivers/safenet.h, + drivers/serial.c, drivers/serial.h, drivers/skel.c, + drivers/snmp-ups.c, drivers/snmp-ups.h, drivers/solis.c, + drivers/solis.h, drivers/tripplite-hid.c, + drivers/tripplite-hid.h, drivers/tripplite.c, + drivers/tripplite.h, drivers/tripplite_usb.c, + drivers/tripplitesu.c, drivers/upscode2.c, drivers/upsdrvctl.c, + drivers/upshandler.h, drivers/usb-common.c, drivers/usb-common.h, + drivers/usbhid-ups.c, drivers/usbhid-ups.h, drivers/victronups.c, + include/Makefile.am, include/attribute.h, include/common.h, + include/extstate.h, include/parseconf.h, include/proto.h, + include/state.h, include/timehead.h, include/upsconf.h, + lib/Makefile.am, lib/README, lib/libupsclient-config.in, + lib/libupsclient.pc.in, m4/ax_create_stdint_h.m4, + m4/nut_arg_with.m4, m4/nut_check_ipv6.m4, m4/nut_check_libgd.m4, + m4/nut_check_libhal.m4, m4/nut_check_libneon.m4, + m4/nut_check_libnetsnmp.m4, m4/nut_check_libpowerman.m4, + m4/nut_check_libssl.m4, m4/nut_check_libusb.m4, + m4/nut_check_libwrap.m4, m4/nut_check_os.m4, + m4/nut_report_feature.m4, m4/nut_type_socklen_t.m4, + man/Makefile.am, man/apcsmart.8, man/bcmxcp.8, man/bcmxcp_usb.8, + man/belkin.8, man/belkinunv.8, man/bestfcom.8, + man/bestfortress.8, man/bestuferrups.8, man/bestups.8, + man/blazer.8, man/clone.8, man/dummy-ups.8, man/etapro.8, + man/everups.8, man/gamatronic.8, man/genericups.8, + man/hosts.conf.5, man/isbmex.8, man/ivtscd.8, + man/libupsclient-config.1, man/liebert.8, man/liebertgxt2.8, + man/masterguard.8, man/megatec.8, man/megatec_usb.8, + man/metasys.8, man/mge-shut.8, man/mge-utalk.8, + man/microdowell.8, man/netxml-ups.8, man/nut.conf.5, + man/nutupsdrv.8, man/oneac.8, man/optiups.8, man/powercom.8, + man/powerman-pdu.8, man/powerpanel.8, man/rhino.8, + man/richcomm_usb.8, man/safenet.8, man/skel.8, man/snmp-ups.8, + man/solis.8, man/tripplite.8, man/tripplite_usb.8, + man/tripplitesu.8, man/ups.conf.5, man/upsc.8, + man/upscli_connect.3, man/upscli_disconnect.3, man/upscli_fd.3, + man/upscli_get.3, man/upscli_list_next.3, + man/upscli_list_start.3, man/upscli_readline.3, + man/upscli_sendline.3, man/upscli_splitaddr.3, + man/upscli_splitname.3, man/upscli_ssl.3, man/upscli_strerror.3, + man/upscli_upserror.3, man/upsclient.3, man/upscmd.8, + man/upscode2.8, man/upsd.8, man/upsd.conf.5, man/upsd.users.5, + man/upsdrvctl.8, man/upsimage.cgi.8, man/upslog.8, man/upsmon.8, + man/upsmon.conf.5, man/upsrw.8, man/upssched.8, + man/upssched.conf.5, man/upsset.cgi.8, man/upsset.conf.5, + man/upsstats.cgi.8, man/upsstats.html.5, man/usbhid-ups.8, + man/victronups.8, scripts/HP-UX/Makefile, + scripts/HP-UX/nut-drvctl, scripts/HP-UX/nut-drvctl.sh, + scripts/HP-UX/nut-upsd, scripts/HP-UX/nut-upsd.sh, + scripts/HP-UX/nut-upsmon, scripts/HP-UX/nut-upsmon.sh, + scripts/Makefile.am, scripts/README, scripts/RedHat/README, + scripts/RedHat/halt.patch, scripts/RedHat/ups, + scripts/RedHat/upsd, scripts/RedHat/upsd.in, + scripts/RedHat/upsmon, scripts/RedHat/upsmon.in, + scripts/Solaris8/S99upsmon, scripts/Windows/Makefile, + scripts/Windows/halt.c, scripts/dkp/95-devkit-power-hid.rules, + scripts/hal/Makefile.am, scripts/hal/ups-nut-device.fdi.in, + scripts/hotplug/Makefile.am, scripts/hotplug/README, + scripts/hotplug/libhid.usermap, scripts/hotplug/libhidups.in, + scripts/misc/nut.bash_completion, scripts/misc/osd-notify, + scripts/perl/Nut.pm, scripts/python/Makefile.am, + scripts/python/README, scripts/python/app/NUT-Monitor, + scripts/python/app/README, scripts/python/app/gui.glade, + scripts/python/app/nut-monitor.desktop, + scripts/python/app/nut-monitor.png, + scripts/python/module/PyNUT.py, + scripts/python/module/test_nutclient.py, + scripts/subdriver/path-to-subdriver.sh, scripts/udev/Makefile.am, + scripts/udev/README, scripts/udev/nut-usbups.rules.in, + server/Makefile.am, server/conf.c, server/conf.h, server/ctype.h, + server/desc.c, server/desc.h, server/netcmds.h, server/neterr.h, + server/netget.c, server/netget.h, server/netinstcmd.c, + server/netinstcmd.h, server/netlist.c, server/netlist.h, + server/netmisc.c, server/netmisc.h, server/netset.c, + server/netset.h, server/netuser.c, server/netuser.h, + server/sockdebug.c, server/ssl.c, server/ssl.h, server/sstate.c, + server/sstate.h, server/stype.h, server/upsd.c, server/upsd.h, + server/upstype.h, server/user-data.h, server/user.c, + server/user.h, tools/Makefile.am, tools/device-recorder.sh, + tools/nut-usbinfo.pl: No functional changes (properties only) * [r2335] AUTHORS: No functional changes (properties only) 2010-02-10 Arnaud Quette @@ -121,971 +1405,8 @@ required for IPv6 support in the header files that are defined by POSIX (don't rely on the netdb.h header to include them) -2010-02-10 Charles Lepple +2010-02-10 Charles Lepple * [r2332] ChangeLog: Generate ChangeLog entries from SVN r2331 back through r2117. -2010-02-10 Arjen de Korte - - * [r2331] drivers/genericups.c: Fix typo in previous commit - * [r2330] drivers/genericups.c: Don't hang up on last close - (initial state of HUPCL is implementation dependent) - [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327072] - -2010-02-09 Arjen de Korte - - * [r2329] drivers/main.c: Some drivers set - 'driver.version.internal' in upsdrv_initinfo() so we should set - the generic message before running that - * [r2327] man/upssched.conf.5: Fix wrong reference - [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-February/004532.html] - * [r2326] server/netuser.c: Check if user is allowed to login - before accepting connection - - [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544390] - -2010-02-08 Arjen de Korte - - * [r2324] UPGRADING: The tcp-wrappers support is optional in - addition to the LISTEN directive (not the other way around) - -2010-02-08 Arnaud Quette - - * [r2323] UPGRADING: Add a double explicit note about the ACL - mechanism removal in 2.4.0. - (reported on Debian by Anthony DeRobertis, Bug #526811) - -2010-02-08 Arjen de Korte - - * [r2322] data/driver.list: Added lots of Ippon devices that were - mentioned on the mailinglists (serial devices will undoubtly - work, USB support still experimental) - -2010-02-07 Arjen de Korte - - * [r2321] UPGRADING, drivers/blazer_usb.c, man/blazer.8: Use - 'ippon' subdriver for devices with USB id 06da:0003 (old - 'phoenix' subdriver still available) - * [r2320] drivers/raritan-mib.h, drivers/snmp-ups.c: Fix wrong name - * [r2319] drivers/raritan-mib.h: Add missing file in previous - commit - * [r2318] drivers, drivers/Makefile.am, drivers/apc-mib.c, - drivers/apc-mib.h, drivers/apccmib.h, drivers/baytech-mib.c, - drivers/baytech-mib.h, drivers/baytechmib.h, - drivers/compaq-mib.c, drivers/compaq-mib.h, - drivers/cpqpowermib.h, drivers/eaton-aphel-mib.h, - drivers/eaton-mib.c, drivers/eaton-mib.h, drivers/ietf-mib.c, - drivers/ietf-mib.h, drivers/ietfmib.h, drivers/mge-mib.c, - drivers/mge-mib.h, drivers/mgemib.h, drivers/netvision-mib.c, - drivers/netvision-mib.h, drivers/netvisionmib.h, - drivers/powerware-mib.c, drivers/powerware-mib.h, - drivers/pwmib.h, drivers/raritan-mib.h, - drivers/raritan-pdu-mib.c, drivers/raritan-pdu-mib.h, - drivers/snmp-ups.c, drivers/snmp-ups.h: Extract subdriver info - from main driver body into separate modules. This prevents - namespace conflicts and ensures that changes in one subdriver - don't lead to surprise changes in others. - - It also allows to use a single mapping file to be used in several - subdrivers by specifying a different entry point (which doesn't - work if everything is in one module). - -2010-02-07 Charles Lepple - - * [r2317] drivers/apcsmart.c, drivers/apcsmart.h: apcsmart: Add - input.transfer.reason - - Contributed by Michael Haardt: - http://article.gmane.org/gmane.comp.monitoring.nut.devel/4498 - -2010-02-05 Arjen de Korte - - * [r2316] drivers/cpqpowermib.h: Could this be a Powerware OEM - device? - -2010-02-04 Arjen de Korte - - * [r2315] drivers/cpqpowermib.h: Based on patch from Philip Ward - [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-February/004509.html] - -2010-02-01 Arjen de Korte - - * [r2305] clients/upsimage.c, common/strerror.c, drivers/bcmxcp.c, - drivers/main-hal.c, drivers/powerman-pdu.c: Prefer snprintf over - sprintf to prevent overflowing buffers (also removes trailing - whitespace) - * [r2303] drivers/Makefile.am, drivers/cpqpowermib.h, - drivers/snmp-ups.c, man/snmp-ups.8: - -2010-01-31 Charles Lepple - - * [r2297] drivers/tripplite_usb.c: Revert trunk commit r2294, which - was meant for a branch. - * [r2296] drivers/clone-outlet.c: clone-outlet.c: remove executable - bit - * [r2294] drivers/tripplite_usb.c: tripplite_usb: initial changes - to test protocol 3004 - -2010-01-30 Arnaud Quette - - * [r2286] tools/Makefile.am, tools/device-recorder.sh: Create a - script to record device running sequence and dump it in a .seq - format. - The .seq file can then be used by dummy-ups to replay the - sequence. - -2010-01-28 Charles Lepple - - * [r2282] m4/nut_report_feature.m4: Another attempt to fix the - feature report on OS X. - -2010-01-27 Arjen de Korte - - * [r2281] m4/nut_report_feature.m4: Attempt to get rid of spurious - '-n' on MacOSX-10.5 BuildBot - * [r2280] m4/nut_check_libhal.m4: Prefer to use 'test' over '[ ]' - (on many shells, this first a built-in function while the second - is a symbolic link to 'test') - -2010-01-27 Charles Lepple - - * [r2279] m4/nut_check_libhal.m4: Remove fallback HAL information - path, and remove extra parentheses. - -2010-01-25 Arjen de Korte - - * [r2278] drivers/megatec.c: Don't check reliability of connection - at driver startup. This confuses users and really serves no - purpose for normal use. In case the connection is unreliable, it - should ultimately be the decision of the user whether or not it - is acceptable (not the driver). - * [r2277] drivers/apc-hid.c, drivers/belkin-hid.c, - drivers/cps-hid.c, drivers/explore-hid.c, drivers/liebert-hid.c, - drivers/mge-hid.c, drivers/powercom-hid.c, - drivers/tripplite-hid.c, include/common.h: The "config.h" header - should be the first included, since it contains the _GNU_SOURCE - declaration (enables Posix extensions to C) - * [r2276] configure.in: Add AC_USE_SYSTEM_EXTENSIONS to use - features of Posix that are extensions to C (requires Autoconf - 2.60 or better) - * [r2275] common/common.c: Fix compiler warning on MacOSX-10.5 - * [r2274] common/common.c: Fix compiler warning on FreeBSD - * [r2273] configure.in: - * [r2272] configure.in, drivers/mge-hid.c: Check for presence of - strptime() before using it - -2010-01-24 Arjen de Korte - - * [r2271] configure.in, drivers/mge-hid.c: The previous patch was a - resounding failure (reverting back to setting _XOPEN_SOURCE in - one specific source file instead) - * [r2270] configure.in: Request SUSv2 compliance for all sources - (experimental) - * [r2269] drivers/mge-hid.c: _XOPEN_SOURCE seems to break on - FreeBSD - * [r2268] drivers/mge-xml.c: Fix compiler warning - -2010-01-24 Charles Lepple - - * [r2267] drivers/mge-hid.c: Define _XOPEN_SOURCE=500 for - strptime() prototype in glibc2 - -2010-01-24 Arjen de Korte - - * [r2266] drivers/mge-hid.c: Removing stuff that was added to fix - strptime on Debian Etch (incompatible with FreeBSD) - -2010-01-23 Arjen de Korte - - * [r2265] drivers/mge-hid.c: Fourth attempt of fixing strptime() - declaration missing on Debian - * [r2264] drivers/mge-hid.c: Third attempt of fixing strptime() - declaration missing on Debian - * [r2263] drivers/mge-hid.c: Second attempt of fixing strptime() - declaration missing on Debian - * [r2262] drivers/apc-hid.c, drivers/belkin-hid.c, - drivers/cps-hid.c, drivers/explore-hid.c, drivers/liebert-hid.c, - drivers/mge-hid.c, drivers/powercom-hid.c, - drivers/tripplite-hid.c, scripts/subdriver/path-to-subdriver.sh: - Remove redundant #include's (are being dealt with by main.h) - * [r2261] data/cmdvartab: Add descriptions for - 'ups.timer.(start|reboot|shutdown)' variables - * [r2260] drivers/mge-hid.c: Need to define _XOPEN_SOURCE for - strptime() prototype in glibc2 - -2010-01-22 Arjen de Korte - - * [r2257] drivers/mge-shut.c, drivers/mge-shut.h: Change naming of - ups.delay.* variables to ups.timer.*, since writing these values - immediately starts the countdown (and not when a shutdown command - is issued) - * [r2256] drivers/powercom-hid.c: Fallback to stored value of - 'ups.delay.(start|shutdown)' only if no parameter is given (to - fix 'load.on' command) - -2010-01-21 Arjen de Korte - - * [r2255] drivers/powercom-hid.c: Fix beeper.status and add - load.on.delay command (to allow starting up with delay when UPS - is shutdown) - -2010-01-19 Arjen de Korte - - * [r2254] data/driver.list, drivers, drivers/Makefile.am, - drivers/liebertgxt2.c, man/Makefile.am, man/liebertgxt2.8: Based - on the patch from the below message (needs to be tested) - - http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-January/004391.html - * [r2253] drivers/powercom-hid.c: Add - 'beeper.(enable|disable|mute)' instcmd's - -2010-01-17 Charles Lepple - - * [r2250] drivers/tripplite_usb.c: tripplite_usb: Detect protocol - before using tl_model - - Reported by Chase Wallis. - -2010-01-17 Arjen de Korte - - * [r2248] man/blazer.8: Add 'ippon' subdriver to man page - * [r2247] drivers/blazer_usb.c: ETIME is not defined on FreeBSD, so - make this test conditional (also fixes wrong sign) - -2010-01-13 Arjen de Korte - - * [r2244] drivers/blazer_usb.c: Close device handle after - usb_reset() is called and reconnect - * [r2243] drivers/blazer_usb.c: Attempt to clear stalled devices by - sending them an usb_reset() command - -2010-01-13 Charles Lepple - - * [r2242] drivers/tripplite_usb.c: tripplite_usb: don't reset - watchdog on SMARTPRO models - - Patch by Chase Wallis: - http://article.gmane.org/gmane.comp.monitoring.nut.devel/4376 - -2010-01-12 Arjen de Korte - - * [r2241] drivers/blazer_usb.c: Fix bug in ippon subdriver - -2010-01-07 Arjen de Korte - - * [r2240] drivers/blazer_usb.c: Fix minor bug in debug code - * [r2239] drivers/blazer_usb.c: Add experimental 'ippon' subdriver - to communicate with UPS devices of the same name - -2010-01-06 Arjen de Korte - - * [r2238] drivers/blazer_usb.c: Clear potential stall condition - while flushing interrupt pipe - * [r2237] drivers/libusb.c, drivers/usbhid-ups.c: Reconnect if - usb_clear_halt() is not implemented (older libusb on *BSD - systems) so that we don't get stuck with a stalled interrupt - endpoint (correction of 2235) - * [r2236] drivers/usbhid-ups.c: EPIPE should not result in - reconnecting since we're reading from a control endpoint here, - not an interrupt endpoint (where this would be an appropriate - action after attempting to fix the stall condition through - usb_clear_halt() first) - * [r2235] drivers/usbhid-ups.c: Reconnect if usb_clear_halt() is - not implemented (older libusb on *BSD systems) so that we don't - get stuck with a stalled interrupt endpoint - -2010-01-05 Arjen de Korte - - * [r2234] drivers/libusb.c: Don't ignore persistent "Broken pipe" - on stalled interrupt endpoint (only ignore them on control - endpoints) - * [r2233] drivers/libusb.c: Clear stall condition on interrupt - endpoint if needed (since we no longer reconnect, this may be - needed) - * [r2232] drivers/libusb.c, drivers/usbhid-ups.c: Change libusb.c - error handling. Most important (functional) change is that - "Broken pipe" is no longer considered a reason to reconnect - (fixes MGE/Eaton Ellipse series UPS stability problems). - -2010-01-04 Arjen de Korte - - * [r2231] drivers/libusb.c: Fix previous patch - * [r2230] drivers/libusb.c: Log message to syslog when - usb_get/set_* operation fails (except timeouts) at LOG_DEBUG to - make sure we have something to work with for debugging frequent - disconnects - -2010-01-02 Arjen de Korte - - * [r2224] m4/nut_check_libneon.m4: Fix output when library is not - installed - * [r2223] m4/nut_check_libhal.m4: Don't wast effort trying to - detect HAL stuff if we already know it is not available - * [r2222] m4/nut_check_libgd.m4: Remove braces around test - conditions - * [r2221] m4/nut_check_libpowerman.m4, m4/nut_check_libssl.m4: - Remove braces around test conditions - * [r2220] m4/nut_check_libusb.m4: Fix one "==" that was left behind - (and slightly improve message when pkg-config is not available) - -2010-01-01 Charles Lepple - - * [r2219] m4/nut_check_libusb.m4: Remove extra parentheses from - libusb test. - - Also change '==' to '=' for string equality test. - -2009-12-31 Arjen de Korte - - * [r2218] m4/nut_check_libusb.m4: Add pkg-config as method to - retrieve CFLAGS and LDFLAGS (but fall back to libusb-config) - -2009-12-30 Arjen de Korte - - * [r2217] drivers/libusb.c: Fix previous patch (failed to remove - closing #endif statement) - * [r2216] drivers/libusb.c, drivers/usbhid-ups.c: Enable the use of - the interrupt pipe on Solaris (for drivers that require this), - but disable it on the usbhid-ups driver (for which it is - optional). - * [r2215] drivers/powercom-hid.c: Honor 'offdelay' configuration - parameter and allow changing the 'ups.delay.shutdown' variable at - runtime - -2009-12-28 Arjen de Korte - - * [r2214] data/driver.list: Add new PowerCOM devices with HID PDC - interface to list of supported models - * [r2213] drivers/powercom-hid.c: The PowerCOM subdriver has now - reached a state where it is useable. Commands have been tested on - a BNT-500AP. - * [r2212] drivers/usbhid-ups.c: The composite commands - 'shutdown.return' and 'shutdown.stayoff' require 'load.on.delay' - and 'load.off.delay' (not 'ups.delay.start' and - 'ups.delay.shutdown'). - -2009-12-27 Charles Lepple - - * [r2203] scripts/hal/Makefile.am: Hard-code source file in - scripts/hal - -2009-12-26 Arjen de Korte - - * [r2202] m4/nut_check_libhal.m4: Revert previous patch that breaks - on OpenSUSE (and add HAL_CALLOUTS_PATH instead of relying on the - default) - * [r2201] m4/nut_check_libhal.m4: Use ${datarootdir} instead of - /usr/share or /usr/local/share (we check for the presence of a - subdirectory, so the chance of a false positive is low) - * [r2200] m4/nut_check_libneon.m4: Only check for optional - functions if we know library is available - * [r2199] m4/nut_check_libgd.m4: Simplify the --with-gd-includes - and --with-gd-libs processing - -2009-12-25 Arjen de Korte - - * [r2198] configure.in: FreeBSD requires both and - so explicitly use only these two headers to check for - availability of uu_lock - * [r2197] m4/nut_check_libusb.m4: Check for presence of 'usb.h' - (not 'libusb.h', which is what we use internally) - -2009-12-24 Charles Lepple - - * [r2196] m4/nut_check_libhal.m4: Test for FDI files in /usr/local - as well as /usr - - This should fix HAL-enabled builds on FreeBSD. - -2009-12-24 Arjen de Korte - - * [r2195] m4/nut_check_libhal.m4: If we can't detect the - HAL_FDI_PATH automatically, set it to /dev/null and emit warning - * [r2194] m4/nut_check_libusb.m4: Fix missing default -lusb library - and improve comments during detection - * [r2193] m4/nut_check_libusb.m4: Work around missing libusb-config - on FreeBSD 8 by falling back to defaults for CFLAGS and LDFLAGS - * [r2192] configure.in: Try to workaround some FreeBSD bugs - * [r2191] drivers/powercom-hid.c: Updated HID to NUT mappings (work - in progress and still quite broken, do not run on production - systems!) - -2009-12-22 Arjen de Korte - - * [r2190] drivers/libhid.c: Add debug information for input reports - that are not in the report descriptor - -2009-12-21 Arjen de Korte - - * [r2189] drivers/libhid.c: Use hexadecimal report numbers in debug - messages (to be consistent throughout the code) - -2009-12-20 Arjen de Korte - - * [r2188] m4/nut_check_libwrap.m4: Small improvement to better - mimic the behavior of AC_SEARCH_LIBS (by checking if we need to - add -lwrap before adding it to LIBS) - -2009-12-19 Arjen de Korte - - * [r2187] m4/ax_create_stdint_h.m4: Update location of Autoconf - Archive in header (so that we can check for modifications) - * [r2186] m4/nut_check_libgd.m4: AC_SEARCH_LIBS puts the result in - LIB, so we need to add that to the LIBGD_LDFLAGS (otherwise, this - will be part of the global LIBS that are used) - -2009-12-18 Arjen de Korte - - * [r2185] m4/nut_check_libgd.m4: Apparently, gdlib-config sometimes - fails to mention '-lgd' when asked for the LDFLAGS, so we need to - test once again if we need to include this library. - * [r2184] common/snprintf.c, configure.in: Instead of trying to - figure out if 'long long' is supported through AC_TRY_RUN - (obsolete), use AC_TYPE_LONG_LONG_INT (and AC_TYPE_LONG_DOUBLE). - Since this is only used by common/snprintf.c, only do this if - snprintf isn't a build-in function (which means probably never). - * [r2183] configure.in: Don't run preprocessor tests on - AC_CHECK_HEADERS (so CPPFLAGS is no longer needed). Replace shell - scripting by autoconf macros. - * [r2182] m4/nut_check_libgd.m4, m4/nut_check_libnetsnmp.m4, - m4/nut_check_libwrap.m4: Don't run preprocessor tests on - AC_CHECK_HEADERS (so CPPFLAGS is no longer needed). - * [r2181] m4/nut_check_libhal.m4: Don't run preprocessor tests on - AC_CHECK_HEADERS (so CPPFLAGS is no longer needed). Reformatted - macro (no functional changes). - * [r2180] m4/nut_check_libwrap.m4: Prefer AC_CHECK_HEADERS over - AC_CHECK_HEADER - * [r2179] m4/nut_check_libgd.m4: Set CPPFLAGS in case autoconf only - runs the preprocessor for AC_CHECK_HEADERS (which doesn't use - CFLAGS) - -2009-12-17 Arjen de Korte - - * [r2178] m4/nut_check_libnetsnmp.m4: Set CPPFLAGS in case autoconf - only runs the preprocessor (which doesn't use CFLAGS) - * [r2177] m4/nut_check_libneon.m4: Cleanup autoconf macro - * [r2176] clients/upsimage.c: Remove redundant test (this is - already handled by autoconf) - * [r2175] Makefile.am: - * [r2174] configure.in: Keep defaults and checks together - * [r2173] drivers/bcmxcp.c: Automatic variables must have a length - that can be computed at compile time rather than runtime. GCC - will happily accept this C++ construction here, but this is not - C. - - Follow the same principle as used elsewhere in the code, by hard - coding this to PW_ANSWER_MAX_SIZE, the maximum size of replies we - expect. - -2009-12-16 Arjen de Korte - - * [r2172] m4/nut_check_libgd.m4: Check for all GD specific header - files while we're at it - * [r2171] clients/upsimage.c: The HAVE_GD_H should not be used - here, it is better to check for HAVE_LIBGD since that one is only - set if both the header file and the gd library are found (and not - just the first). - * [r2170] m4/nut_check_libnetsnmp.m4: Cleanup autoconf macro - * [r2169] m4/nut_check_libgd.m4: Cleanup GD autoconf stuff (also - fixes double -lgd linker flag) - * [r2168] configure.in, m4/nut_check_ipv6.m4, - m4/nut_check_libssl.m4, m4/nut_check_libwrap.m4: Cleanup some - autoconf macros - -2009-12-15 Arjen de Korte - - * [r2167] m4/nut_check_libnetsnmp.m4: Use AC_CHECK_HEADER to check - for required headers. - * [r2166] m4/nut_check_libwrap.m4: Fix autoconf magic for Solaris. - Apparently, allow/deny_severity are not defined as weak symbols, - so autoconf fails with undefined symbols when checking for the - library through AC_SEARCH_LIBS. - -2009-12-15 Charles Lepple - - * [r2165] include/common.h: Fix __attribute__ in common.h - - Patch provided by Tim Rice - http://lists.alioth.debian.org/pipermail/nut-upsdev/2009-December/004288.html - -2009-12-10 Arnaud Quette - - * [r2163] drivers/mge-utalk.c: complete r2151 with the - implementation details that were removed from the new mge-utalk - man page. - -2009-12-09 Arnaud Quette - - * [r2161] drivers/mge-hid.c: complete alarms and status handling - for Eaton / MGE / Dell. - -2009-12-04 Arnaud Quette - - * [r2153] m4/nut_check_libssl.m4: fix a wrong pkg-config call - parameter, that resulted in using pkg-config's own version - instead of OpenSSL's one. - -2009-12-02 Arnaud Quette - - * [r2148] drivers/libhid.c: skip reports 254/255 for Eaton / MGE / - Dell due to special handling needs - -2009-11-30 Arjen de Korte - - * [r2145] man/upsd.8, man/upsd.conf.5, man/upsd.users.5: Add - upgrading notes for versions earlier than nut-2.4.0 - * [r2143] drivers/usbhid-ups.c, drivers/usbhid-ups.h: Use contents - of interrupt report. In case these are broken, set 'pollonly' - flag in ups.conf or use_interrupt_pipe = FALSE in subdriver (when - device matches!) - -2009-11-26 Arjen de Korte - - * [r2141] man/usbhid-ups.8: Document the 'pollonly' flag - -2009-11-25 Arjen de Korte - - * [r2140] drivers/microdowell.c: Fix compiler warning (dead code, - no functional change) - * [r2139] drivers/usbhid-ups.c: Fix compiler warning - * [r2138] drivers/usbhid-ups.c: Add some USB error codes observed - in the field for possible future handling (and the comments from - the headerfiles where these are defined) - -2009-11-24 Arjen de Korte - - * [r2133] drivers/mge-hid.c: We already know if the value to the - reverse conversion functions should be a time or date value, so - there is no need to guess it. - -2009-11-23 Arnaud Quette - - * [r2128] drivers/mge-hid.c: - fix mge_time_date_conversion_nuf() - to actually use the input value - - force ignoring the DST offset for the output value - -2009-11-19 Arnaud Quette - - * [r2122] data/driver.list, drivers/libshut.c, man/mge-shut.8: Add - serial / SHUT support for the new Dell UPS range - - list all models in driver.list using newmge-shut, - - add "battery.runtime.elapsed" support, - - update mge-shut manual page and add an alias for newmge-shut. - -2009-11-19 Arjen de Korte - - * [r2121] drivers/mge-hid.c: Prefer to use non-negated logic when - possible (also minimizes changes) - -2009-11-19 Arnaud Quette - - * [r2119] data/driver.list, docs/new-names.txt, drivers/mge-hid.c, - man/usbhid-ups.8, scripts/dkp/95-devkit-power-hid.rules, - scripts/hal/ups-nut-device.fdi.in, - scripts/hotplug/libhid.usermap, scripts/udev/nut-usbups.rules.in: - Add USB support for the new Dell UPS range - - list all models in driver.list, - - add "battery.runtime.elapsed" in mge-hid.c and NUT namespace, - - adapt ups.model formating to Dell rules, - - update USB helper files, - - update usbhid-ups manual page. - -2009-11-18 Arjen de Korte - - * [r2118] drivers/netxml-ups.c: Re-subscribe to NMC when it doesn't - send us alarm messages anymore - -2009-11-18 Arnaud Quette - - * [r2117] drivers/mge-xml.c: minor typo fix on comment - -Mon Nov 16 01:57:23 UTC 2009 / Charles Lepple - - - drivers/tripplite_usb.c: fix copy-n-paste error in load.on instcmd. - -Fri Oct 9 11:26:49 UTC 2009 / Arjen de Korte - -- m4/nut_check_libssl.m4,nut_check_libusb.m4: show version information during - configuration - -Thu Oct 8 19:38:03 UTC 2009 / Arjen de Korte - - - m4/nut_check_libneon.m4,nut_check_libusb.m4: changes in autoconf magic to - detect optional functions (without making assumptions on where they are - located) - - configure.in: update for the above - - drivers/libusb.c,netxml-ups.c,richcomm_usb.c: update for the above - -Wed Oct 7 17:53:42 UTC 2009 / Arnaud Quette - - * drivers/dummy-ups.c: dummy-ups general improvements - - dummy mode now loop on reading the .dev file, instead of reading it once. - Interacting through this method is also possible, by changing the .dev file - content on the fly, - - dummy mode now support actions (TIMER only ATM) in the .dev file. This - allows to have an automated scripting sequence (see data/evolution.dev and - dummy-ups manpage for examples), - - repeater mode now check the upsd connection, and reconnect if needed, - (reported by Gabor Kiss) - - cleanup the inline TODO list, - - bump the driver version to 0.10. - * man/dummy-ups.8: update according to the above changes. - * data/epdu-managed.dev: new dummy-ups definition file. - -Wed Oct 7 14:05:35 UTC 2009 / Arjen de Korte - - - drivers/snmp-ups.c: remove suspicious code for shutdown.* commands - -Wed Oct 7 13:43:15 UTC 2009 / Arjen de Korte - - - drivers/apc-hid.c: add support for Back-UPS RS series test.battery.* - commands (experimental) - -Tue Oct 6 19:39:22 UTC 2009 / Arjen de Korte - - - m4/nut_check_libssl.m4: use pkg-config for compiler and linker flags - - m4/nut_check_libusb.m4: minor change - -Tue Oct 6 19:16:08 UTC 2009 / Arjen de Korte - - - MAINTAINERS: Remove entry for Peter Selinger (by request) - -Tue Oct 6 12:13:01 UTC 2009 / Arnaud Quette - - - drivers/mge-shut.c: actually apply the low battery level if provided (either - through "-x lowbatt" or ups.conf). Also change the driver reported name from - "MGE UPS SYSTEMS" to "Eaton". - (reported by Daniel O'Connor) - -Mon Oct 5 20:02:42 UTC 2009 / Arnaud Quette - - - drivers/nut_usb.c: remove the calls to usb_set_configuration() and - usb_set_altinterface(), which were not needed and caused troubles - with some Eaton / Powerware models. Also add some older HP T500 / T750 which - seem to be supported, - - data/driver.list: add entries for the above. - -Mon Sep 21 08:30:18 UTC 2009 / Arjen de Korte - - - drivers/tripplite-hid.c: add ECO550UPS to list of supported devices. - - data/driver.list: add an entry for the above. - -Sun Sep 20 19:06:34 UTC 2009 / Arjen de Korte - - - drivers/tripplite-hid.c: fix broken matcher function that would - unconditionally reject possibly supported devices, even when the - productid option was supplied. - -Tue Sep 15 09:06:32 UTC 2009 / Arnaud Quette - - - data/driver.list: add an entry for Eaton E Series DX UPS (1-20 kVA) with - mge-utalk. - -Tue Sep 15 08:16:32 UTC 2009 / Arnaud Quette - - - data/driver.list: add an entry for Eaton E Series NV UPS (400-2000 VA) with - megatec_usb (reported by Vitor Choi Feitosa). - -Tue Sep 8 18:57:51 UTC 2009 / Arjen de Korte - - - m4/nut_check_libnetsnmp.m4: check for presence of header files to see - if development files are installed - -Tue Sep 8 09:39:24 UTC 2009 / Arnaud Quette - - - drivers/ivtscd.c: complete general information (device.{mfr,model,type}), - - man/ivtscd.8, man/Makefile.am: add the manpage for ivtscd driver, - - data/driver.list: add an entry for IVT SCD-series devices. - -Fri Sep 4 08:36:21 UTC 2009 / Arnaud Quette - - - scripts/perl/Nut.pm: embed the NUT Perl client module, - (patch from Gabor Kiss) - - COPYING, scripts/README: update information for Perl module inclusion. - -Fri Sep 4 08:12:52 UTC 2009 / Arnaud Quette - - - drivers/apc-hid.c: fix input.transfer.reason support by using the standard - BOOL lookup mechanism (thanks Arjen), and bump the subdriver version to 0.94. - -Thu Sep 3 11:49:12 UTC 2009 / Arnaud Quette - - - drivers/apc-hid.c: add input.transfer.reason and input.sensitivity, along - with some more reverse engineered information. - (reported by Markus Wildi) - -Wed Sep 2 19:52:21 UTC 2009 / Arjen de Korte - - - drivers/ietfmib.h,drivers/mgemib.h: Indexes start at 1 (not 0). - -Tue Aug 25 20:40:28 UTC 2009 / Arjen de Korte - - - drivers/usbhid-ups.[ch]: remove delayed matching which wasn't really - useful, since it requires claiming the device, breaking any existing - bindings in the process (should also fix Alioth bug #311869) - -Tue Aug 18 01:22:14 UTC 2009 / Charles Lepple - - - drivers/bestfortress.c, man/bestfortress.8, data/driver.list: Resurrect the - bestfortress driver (submitted by Stuart D. Gathman) - -Sat Aug 15 17:42:49 UTC 2009 / Charles Lepple - - - drivers/cps-hid.c, data/driver.list: Add CyberPower OR2200 to usbhid-ups - (reported by James Erickson) - -Wed Aug 12 13:42:21 UTC 2009 / Arnaud Quette - - - data/drivers.list: also list Inform Informer Compact 1000VA with blazer_ser - (reported by Mutlu Tunç) - -Mon Aug 10 12:18:42 UTC 2009 / Arnaud Quette - - - drivers/mge-xml.c: add support for newer Eaton ePDU monitored - - man/netxml-ups.8: add a reference to Eaton ePDU monitored - - data/drivers.list: update the Eaton ePDU monitored to include netxml-ups - -Sun Aug 9 15:43:21 UTC 2009 / Arnaud Quette - - - data/drivers.list: add Inform Informer Compact 1000VA - (reported by Mutlu Tunç) - -Fri Jul 31 03:07:27 UTC 2009 / Charles Lepple - - - drivers/liebert.c: Hard-code the baud rate to 9600 to prevent problems with - noise. - -Wed Jul 29 01:37:06 UTC 2009 / Charles Lepple - - - data/driver.list: Add "CP 1500C" to compatibility list for usbhid-ups - (reported by Svein Skogen) - -Mon Jul 27 22:00:00 UTC 2009 / Arnaud Quette - - - tools/nut-usbinfo.pl, scripts/dkp/95-devkit-power-hid.rules: remove - the 0x prefix from the VendorIDs - -Mon Jul 27 11:21:21 UTC 2009 / Arnaud Quette - - - tools/nut-usbinfo.pl, scripts/dkp/95-devkit-power-hid.rules: generate - the DeviceKit-power rule file, so that it can be maintained up to - date from the NUT source. - -Mon Jul 20 19:20:35 UTC 2009 / Arjen de Korte - - - Renamed 'virtual' to 'clone' driver, to resolve a conflict with the - Postfix virtual domain mail delivery agent man pages - -Sat Jul 11 15:58:16 UTC 2009 / Charles Lepple - - * Makefile.am: Add "." to "find" command - -Sat Jul 11 14:25:00 UTC 2009 / Charles Lepple - - * drivers/nut_usb.c: Add usb_strerror() to USB error messages. - -Tue Jul 7 11:06:32 UTC 2009 / Arnaud Quette - - * device collection completion, for the transition period - - drivers/main.c: remap device.{mfr,model,serial} from the ups.* - equivalent, and preset device.type to ups so that it only has to be - overriden if necessary. - - drivers/skel.c: some update for the device collection - - docs/new-names.txt: add the device collection description - -Mon Jul 6 09:28:10 UTC 2009 / Arnaud Quette - - - drivers/tripplite.c: fix the reading with some SmartUPS models - (patch from Robert Waldie, Opengear) - -Tue Jun 30 13:28:42 UTC 2009 / Arnaud Quette - - - drivers/baytechmib.h: add outlet.{current,voltage} and fix some - comments (from Scott Burns, Opengear) - -Wed May 27 20:35:41 UTC 2009 / Arjen de Korte - - - clients/upsmon.c: multilevel debug information (similar to other NUT - binaries) - -Mon May 25 19:53:02 UTC 2009 / Arjen de Korte - - * Enable timestamp on debug messages by default - - common/common.c: prepend elapsed number of seconds and microseconds - since start of program for upsdebug() messages, - - drivers/upsdrvctl.c: inform people that adding debug flags to upsdrvctl - is not the way to debug a driver, - - revert remainder of previous patch - -Mon May 18 11:48:31 UTC 2009 / Arnaud Quette - - * Enable timestamp on output messages (format "%H:%M:%S: msg") - - common/common.c, include/common.h: modify vupslog() to allow optional - appending of a timestamp on debug output, - - clients/upsmon.c, drivers/main.c, drivers/upsdrvctl.c, server/upsd.c: - enable timestamping using the "-T" option, - - man/upsmon.8, man/nutupsdrv.8, man/upsdrvctl.8, man/upsd.8: document the - timestamp option. - -Thu May 14 19:19:52 UTC 2009 / Arnaud Quette - - - drivers/baytechmib.h: add native NUT support for Baytech SNMP PDUs (RPCs), - - drivers/snmp-ups.c: enable Baytech MIB, - - drivers/Makefile.am: add the new MIB file, - - data/driver.list: add the supported PDUs from BayTech, - - man/snmp-ups.8: document the new MIB and devices. - (patch from Scott Burns, Opengear) - -Thu May 14 21:06:11 UTC 2009 / Arnaud Quette - - - drivers/raritan-mib.h: use the outlets template mechanism and remove all - the OIDs defines for a better readability - - drivers/snmp-ups.c: enable Raritan MIB back. - -Thu May 14 19:19:52 UTC 2009 / Arnaud Quette - - - drivers/eaton-aphel-mib.h: use the outlets template mechanism. - -Thu May 14 14:44:22 UTC 2009 / Arnaud Quette - - - docs/configure.txt: a bit of completion and standardisation. - -Thu May 14 14:23:41 UTC 2009 / Arnaud Quette - - - drivers/snmp-ups.[ch]: add a template mechanism for outlets declaration, and - the needed helpers. Also disable temporarily the Raritan MIB as it conflicts - with Eaton (Aphel) . - -Wed May 13 13:54:32 UTC 2009 / Arnaud Quette - - - man/Makefile.am, man/nut.conf.5: add a manpage for nut.conf - (patch from Debian BTS, #528222) - -Tue May 05 13:26:21 UTC 2009 / Arnaud Quette - - - drivers/apcsmart.h: add support for older SmartUPS 600 responding to other - D codes (D7, D8 and D9) - (patch from Konstantin 'Kastus' Shchuka) - -Tue May 05 02:01:13 UTC 2009 / Charles Lepple - - - drivers/tripplite_usb.c, man/tripplite_usb.8, data/driver.list: update list - of units tested with tripplite_usb - -Mon May 04 08:11:01 UTC 2009 / Arnaud Quette - - - drivers/apcsmart.[ch]: add support for older SmartUPS, which do not respond - to the ^Z, a or b commands (used to inquire the supported data) - (patch from Thomas Juerges) - -Thu Apr 30 21:20:42 UTC 2009 / Arnaud Quette - - - data/driver.list: add Apollo 1000A and 1000F compatibility with genericups - upstype=4 (reported by mvochin) - -Thu Apr 23 12:46:12 UTC 2009 / Arnaud Quette - - - man/snmp-ups.8: remove the EXPERIMENTAL section to the profit of a LIMITATION - section. - -Fri Apr 17 13:26:21 UTC 2009 / Arnaud Quette - - - data/driver.list: add UPSonic DS-800 compatibility with megatec_usb - (reported by Nick Jenkins) - -Sun Mar 29 20:59:09 UTC 2009 / Arjen de Korte - - - drivers/netxml.c: Either do a quick poll or a complete poll (not both). - -Sun Mar 29 20:21:19 UTC 2009 / Arjen de Korte - - * clients/upsimage.c, clients/upsstats.c: - - Add ups.temperature, ambient.temperature and ambient.humidity (sorry folks, - Celsius only for now). - - The graph for the battery.charge now honors battery.charge.low for the red zone. - - The number of minor dashes for the battery.charge is reduced. - - Value on the scales is now right aligned. Display of negative values is corrected. - * conf/upsstats-single.html.sample: - - If ambient.(temperature|humidity) is supported, an 'Ambient' column is added to - display the bars for them. - -Thu Mar 26 20:04:53 UTC 2009 / Arjen de Korte - - * drivers/netxml.[ch], drivers/mge-xml.c: - - Allow multiple entry points for the initial XML page that is loaded - - Use different XML pages for quick and full status updates (the latter - is only polled once every 10 times) - -Mon Mar 23 17:34:10 UTC 2009 / Kjell Claesson - - - data/driver.list, add Eaton Powerware 9130 compatibility with bcmxcp and usbhid-ups. - -Sun Mar 22 01:13:18 UTC 2009 / Alexander I. Gordeev - - - drivers/blazer_usb.c: read data from device until timeout. - -Mon Mar 16 22:10:30 UTC 2009 / Kjell Claesson - - - drivers/bcmxcp.[ch]: Extend alarm map to fix debug crash on PW9130. Driver version 0.22. - -Wed Mar 04 19:37:12 UTC 2009 / Arnaud Quette - - - drivers/mge-utalk.c: fix enable_ups_comm() - (patch from Hans-Werner Paulsen) - -Sun Mar 01 19:51:54 UTC 2009 / Arnaud Quette - - - data/driver.list, drivers/tripplite-hid.c: add HP T750 INTL - (reported by KP Kirchdoerfer) - -Fri Feb 27 09:33:27 UTC 2009 / Arnaud Quette - - - data/driver.list: add Mustek PowerMust 424 / 636 / 848 (USB) compatibility - with blazer_usb (reported by Vitaly Polyakov) - -Fri Feb 27 09:07:05 UTC 2009 / Arnaud Quette - - - drivers/apcsmart.[ch]: add APC Matrix 5000, vintage 12/00 - (patch from Jarett Stevens) - -Tue Feb 17 22:00:01 UTC 2009 / Arnaud Quette - - - drivers/Makefile.am: Fix snmp-ups overlinking with lcrypto. - (Debian Lintian report) - -2.4.1 - -Mon Feb 16 17:41:32 UTC 2009 / Arnaud Quette - - - configure.in: 2.4.1 - -Mon Feb 16 16:13:47 UTC 2009 / David Goncalves - - - scripts/python/app/NUT-Monitor: Changed version from 1.0 to 1.1. Changed - the way NUT-Monitor deals with 'ups.status' var to better handle composite - status (OL + TRIM, OL + CHRG, ...) - -Thu Feb 12 13:23:41 UTC 2009 / Arnaud Quette - - - scripts/udev/Makefile.am, scripts/hal/Makefile.am, scripts/hotplug/Makefile.am, - Makefile.am: fix the autotools issue with the clean/distclean target removing - the USB helper files. - -Wed Feb 11 10:43:10 UTC 2009 / Kjell Claesson - - - data/driver.list: Updated list with ups supported by microdowell driver. - -Thu Feb 05 22:16:10 UTC 2009 / Kjell Claesson - - - drivers/microdowell.c: Cleaned some of the code. Fixed reading of ups.conf variables. - -Wed Feb 04 15:01:20 UTC 2009 / Kjell Claesson - - - Added microdowell.c/h into drivers/. add man/microdowell.8. Adjusted - drivers/Makefile.am and man/makefile.am. Adjusted the code for 2.4.0 - in the microdowell.c. - -*** File trimmed here 28 January 2009 *** - -For entries before this point, start with version 2.4.1 and work back. diff --git a/INSTALL b/INSTALL index ceb81b6..1e58c4c 100644 --- a/INSTALL +++ b/INSTALL @@ -1,522 +1,320 @@ -Network UPS Tools: INSTALL +Installation instructions +========================= -These are the essential steps for compiling and installing this -software, including configuring safe shutdowns when the UPS battery -runs out of power. +This chapter describe the various methods for installing Network UPS Tools. -There are many programs and other features in this package. You should -check out the README file and other accompanying documentation to see -how it all works. +Whenever it is possible, prefer <>. +Packagers have done an excellent and hard work at improving NUT integration into +their system. -The paths shown below are the default values you get by just calling -configure by itself. If you have used --prefix or similar, things will -be different. Also, if you didn't install this program from source -yourself, the paths will probably have a number of differences. +[[Installing_source]] +Installing from source +---------------------- -Note: by default, your system probably won't find the man pages, since -they install to /usr/local/ups/man. You can fix this by editing your -MANPATH, or just do this: +These are the essential steps for compiling and installing this software. + +The NUT linkdoc:packager-guide[Packager Guide], which presents the best +practices for installing and integrating NUT, is also a good reading. + +[NOTE] +.Keep in mind that... +================================================================================ + +- the paths shown below are the default values you get by just calling +configure by itself. If you have used --prefix or similar, things will be +different. Also, if you didn't install this program from source yourself, the +paths will probably have a number of differences. + +- by default, your system probably won't find the man pages, since they +install to /usr/local/ups/man. You can fix this by editing your MANPATH, or +just do this: man -M /usr/local/ups/man - man -M /usr/local/ups/man upsd.conf +- if your favorite system offers up to date binary packages, you should always +prefer these over a source installation. Along with the known advantages of such +systems for installation, upgrade and removal, there are many integration issues +that have been addressed. -Also, if your favorite system offers up to date binary packages, -always prefer these over a source installation. Along with the known -advantages of such systems for installation, upgrade and removal, there -are many integration issues that have been addressed. - -============================================================================ -============================================================================ -============================================================================ - - Prepare your system - =================== - - 1. Create at least one user and a group for running this software. You - might call them "ups" and "nut". The exact names aren't important as - long as you are consistent. - - The process for doing this varies from one system to the next, and - explaining how to add users is beyond the scope of this document. - - For the purposes of this document, the user name and group name - will be "ups" and "nut" respectively. - - Be sure the new user is a member of the new group! If you forget to - do this, you will have problems later on when you try to start upsd. - -============================================================================ -============================================================================ -============================================================================ - - Build and install - ================= +================================================================================ - 1. Configure the source tree for your system. Add the --with-user and - --with-group switch to set the user name and group that you created - above. +Prepare your system +~~~~~~~~~~~~~~~~~~~~ + +System User creation +^^^^^^^^^^^^^^^^^^^^ + +Create at least one system user and a group for running this software. You +might call them "ups" and "nut". The exact names aren't important as +long as you are consistent. + +The process for doing this varies from one system to the next, and +explaining how to add users is beyond the scope of this document. + +For the purposes of this document, the user name and group name +will be 'ups' and 'nut' respectively. + +Be sure the new user is a member of the new group! If you forget to +do this, you will have problems later on when you try to start upsd. + + +Build and install +~~~~~~~~~~~~~~~~~ + +[[Configuration]] +Configuration +^^^^^^^^^^^^^ + +Configure the source tree for your system. Add the '--with-user' and +'--with-group' switch to set the user name and group that you created +above. ./configure --with-user=ups --with-group=nut - If you need any other switches for configure, add them here. For - example: +If you need any other switches for configure, add them here. For example: - * to build and install USB drivers, add --with-usb (note that you - need to install libusb development package or files). +* to build and install USB drivers, add '--with-usb' (note that you + need to install libusb development package or files). - * to build and install SNMP drivers, add --with-snmp (note that - you need to install libsnmp development package or files). +* to build and install SNMP drivers, add '--with-snmp' (note that + you need to install libsnmp development package or files). - * to build and install CGI scripts, add --with-cgi. +* to build and install CGI scripts, add '--with-cgi'. - * to build and install NUT development files (needed to compile - WMNut and MGE PSP), add --with-lib. +See <> from the User Manual, +docs/configure.txt or './configure --help' for all the available +options. - * to build and install HAL support, add --with-hal. +If you alter paths with additional switches, be sure to use those +new paths while reading the rest of the steps. - See docs/configure.txt or "./configure --help" for the available - options. +Reference: <> from the +User Manual. - If you alter paths with additional switches, be sure to use those - new paths while reading the rest of the steps. - *** Reference: docs/configure.txt - ---------------------------------------------------------------------------- - - 2. Build the programs. +Build the programs +^^^^^^^^^^^^^^^^^^ make - This will build the NUT client and server programs and the - selected drivers. It will also build any other features that were - selected during configuration in step 1. above. +This will build the NUT client and server programs and the +selected drivers. It will also build any other features that were +selected during <> step above. ---------------------------------------------------------------------------- - 3. Gain privileges for installing software if necessary. +Installation +^^^^^^^^^^^^ + +[NOTE] +===================================================================== + +you should now gain privileges for installing software if necessary: su ---------------------------------------------------------------------------- +===================================================================== - - 4. Install the files to a system level directory. +Install the files to a system level directory: make install - This will install the compiled programs and man pages, as well as - some data files required by NUT. Any optional features selected - during configuration will also be installed. +This will install the compiled programs and man pages, as well as +some data files required by NUT. Any optional features selected +during configuration will also be installed. - This will also install sample versions of the NUT configuration - files. Sample files are installed with names like ups.conf.sample - so they will not overwrite any existing real config files you may - have created. +This will also install sample versions of the NUT configuration +files. Sample files are installed with names like ups.conf.sample +so they will not overwrite any existing real config files you may +have created. - If you are packaging this software, then you will probably want to - use the DESTDIR variable to redirect the build into another place, - i.e.: +If you are packaging this software, then you will probably want to +use the DESTDIR variable to redirect the build into another place, +i.e.: make DESTDIR=/tmp/package install make DESTDIR=/tmp/package install-conf ---------------------------------------------------------------------------- +[[StatePath]] +State path creation +^^^^^^^^^^^^^^^^^^^ - 5. Create the state path directory for the driver(s) and server to use - for storing UPS status data and other auxiliary files, and make it - owned by the user you created. +Create the state path directory for the driver(s) and server to use +for storing UPS status data and other auxiliary files, and make it +owned by the user you created. mkdir -p /var/state/ups chmod 0770 /var/state/ups chown root:nut /var/state/ups ---------------------------------------------------------------------------- +[[Ownership]] +Ownership and permissions +^^^^^^^^^^^^^^^^^^^^^^^^^ - 6. Set ownership data and permissions on your serial or USB ports - that go to your UPS hardware. Be sure to limit access to just - the user you created earlier. +Set ownership data and permissions on your serial or USB ports +that go to your UPS hardware. Be sure to limit access to just +the user you created earlier. - These examples assume the second serial port (ttyS1) on a typical - Slackware system. On FreeBSD, that would be cuaa1. Serial ports - vary greatly, so yours may be called something else. +These examples assume the second serial port (ttyS1) on a typical +Slackware system. On FreeBSD, that would be cuaa1. Serial ports +vary greatly, so yours may be called something else. chmod 0660 /dev/ttyS1 chown root:nut /dev/ttyS1 - The setup for USB ports is slightly more complicated. Device files - for USB devices, such as /proc/bus/usb/002/001, are usually - created "on the fly" when a device is plugged in, and disappear - when the device is disconnected. Moreover, the names of these - device files can change randomly. To set up the correct - permissions for the USB device, you may need to set up (operating - system dependent) hotplugging scripts. Sample scripts and - information are provided in the scripts/hotplug and - scripts/udev directories. For most users, the hotplugging scripts - will be installed automatically by "make install". +//////////////////////////////////////////////////////////////////////////////// +FIXME: TBR +//////////////////////////////////////////////////////////////////////////////// - (If you want to try if a driver works without setting up - hotplugging, you can add the "-u root" option to upsd, upsmon, and - drivers; this should allow you to follow the below - instructions. However, don't forget to set up the correct - permissions later!). +The setup for USB ports is slightly more complicated. Device files +for USB devices, such as /proc/bus/usb/002/001, are usually +created "on the fly" when a device is plugged in, and disappear +when the device is disconnected. Moreover, the names of these +device files can change randomly. To set up the correct +permissions for the USB device, you may need to set up (operating +system dependent) hotplugging scripts. Sample scripts and +information are provided in the scripts/hotplug and +scripts/udev directories. For most users, the hotplugging scripts +will be installed automatically by "make install". - NOTE: if you are using something like devfs or udev, make sure - these permissions stay set across a reboot. If they revert to the - old values, your drivers may fail to start. +(If you want to try if a driver works without setting up +hotplugging, you can add the "-u root" option to upsd, upsmon, and +drivers; this should allow you to follow the below +instructions. However, don't forget to set up the correct +permissions later!). ---------------------------------------------------------------------------- +NOTE: if you are using something like devfs or udev, make sure +these permissions stay set across a reboot. If they revert to the +old values, your drivers may fail to start. - 7. Create one section per UPS in /usr/local/ups/etc/ups.conf - To find out which driver to use, check the "HARDWARE SUPPORT TABLE" - in the README file, or data/driver.list. +You are now ready to configure NUT, and start testing and using it. - Once you have picked a driver, create a section for your UPS in - ups.conf. You must supply values for "driver" and "port". +You can jump directly to the <>. - Some drivers may require other flags or settings. The "desc" value - is optional, but is recommended to provide a better description of - what your UPS is supporting. - A typical UPS without any extra settings looks like this: +[[Installing_packages]] +Installing from packages +------------------------ - [myupsname] - driver = mydriver - port = /dev/ttyS1 - desc = "Workstation" +This chapter describes the specific installation steps when using +binary packages that exist on various major systems. - NOTE: usbhid-ups is a special case and ignores the "port" value. - You must still set this value, but it does not matter what you set - it to; you can set "port" to "auto" if you like. If you only own - one local UBS UPS, the driver will find it automatically. If you - own more than one UBS UPS, refer to the usbhid-ups(8) man page for - more information. +[[Debian]] +Debian, Ubuntu and other derivatives +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - *** References: man pages: ups.conf(5), nutupsdrv(8), plus - whatever driver(s) you intend to use. +NOTE: NUT is packaged and well maintained in these systems. +The official Debian packager is part of the NUT Team. ---------------------------------------------------------------------------- +Using your prefered method (apt-get, aptitude, Synaptic, ...), install +the 'nut' package, and optionaly the following: - 8. Start the driver(s) for your hardware. +- 'nut-cgi', if you need the CGI (HTML) option, +- 'nut-snmp', if you need the snmp-ups driver, +- 'nut-xml', for the netxml-ups driver, +- 'nut-powerman-pdu', to control the PowerMan daemon (PDU management) +- 'nut-dev', if you need the development files. - /usr/local/ups/bin/upsdrvctl start +//////////////////////////////////////////////////////////////////////////////// +- nut-client +- nut-hal-drivers +//////////////////////////////////////////////////////////////////////////////// - Make sure the driver doesn't report any errors. It should show a - few details about the hardware and then enter the background. You - should get back to the command prompt a few seconds later. For - reference, a successful start of the belkin driver looks like this: +Configuration files are located in /etc/nut. +nut.conf must be edited to be able to invoke /etc/init.d/nut - # /usr/local/ups/bin/upsdrvctl start - Network UPS Tools - UPS driver controller 1.5.12 - Network UPS Tools - Belkin Smart protocol driver 0.21 (1.5.12) - Detected F6C525-SER on /dev/cuaa0 - # +NOTE: Ubuntu users can access the APT URL installation by clicking on link:apt://nut[this link]. - If the driver doesn't start cleanly, make sure you have picked the - right one for your hardware. You might need to try other drivers - by changing the "driver=" value in ups.conf. - Be sure to check the driver's man page to see if it needs any extra - settings in ups.conf to detect your hardware. +[[Mandriva]] +Mandriva +~~~~~~~~ - If it says "can't bind /var/state/ups/..." or similar, then your - state path probably isn't writable by the driver. Check the - permissions and mode on that directory (step 5). +NOTE: NUT is packaged and well maintained in these systems. +The official Mandriva packager is part of the NUT Team. - After making changes, try step 6 again. +Using your prefered method (urpmi, RPMdrake, ...), install one of the two below +packages: - *** References: man pages: nutupsdrv(8), upsdrvctl(8) +- 'nut-server' if you have a 'standalone' or 'netserver' installation, +- 'nut' if you have a 'netclient' installation. ---------------------------------------------------------------------------- +Optionaly, you can also install the following: - 9. Configure upsd, which serves data from the drivers to the clients. +- 'nut-cgi', if you need the CGI (HTML) option, +- 'nut-devel', if you need the development files. - First, edit upsd.conf to allow access to your client systems. By - default, upsd will only listen to localhost port 3493/tcp. If you want - to connect to it from other machines, you must specify each interface you - want upsd to listen on for connections, optionally with a port number. - LISTEN 127.0.0.1 3493 - LISTEN ::1 3493 +[[Suse]] +Suse / Opensuse +~~~~~~~~~~~~~~~ - Note: if you run a firewall of some sort, you may have to add rules - to allow these incoming connections. +NOTE: NUT is packaged and well maintained in these systems. +The official Suse packager is part of the NUT Team. - Next, create upsd.users. For now, this can be an empty file. - You can come back and add more to it later when it's time to - configure upsmon or run one of the management tools. +Install the 'nut-classic' package, and optionaly the following: - Do not make either file world-readable, since they both hold - access control data and passwords. They just need to be readable by - the user you created in the preparation process. +- 'nut-drivers-net', if you need the snmp-ups or the netxml-ups drivers, +- 'nut-cgi', if you need the CGI (HTML) option, +- 'nut-devel', if you need the development files, - The suggested configuration is to chown it to root, chgrp it to the - group you created, then make it readable by the group. +NOTE: Suse and Opensuse users can use the +link:http://software.opensuse.org/search?baseproject=ALL&p=1&q=nut[one-click install method] +to install NUT. - chown root:nut upsd.conf upsd.users - chmod 0640 upsd.conf upsd.users - *** References: man pages: upsd.conf(5), upsd.users(5), upsd(8) +[[RedHat]] +Red Hat, Fedora and CentOS +~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------------------------------------------------- +NOTE: NUT is packaged and well maintained in these systems. +The official Red Hat packager is part of the NUT Team. -10. Start the network server. +Using your prefered method (yum, Add/Remove Software, ...), install one of the +two below packages: - /usr/local/ups/sbin/upsd +- 'nut' if you have a 'standalone' or 'netserver' installation, +- 'nut-client' if you have a 'netclient' installation. - Make sure it is able to connect to the driver(s) on your system. - A successful run looks like this: +Optionaly, you can also install the following: - # /usr/local/ups/sbin/upsd - Network UPS Tools upsd 1.5.12 - Connected to UPS [belkin]: belkin-cuaa0 - Synchronizing...done - # +- 'nut-cgi', if you need the CGI (HTML) option, +- 'nut-xml', if you need the netxml-ups driver, +- 'nut-devel', if you need the development files. - upsd prints dots while it waits for the driver to respond. Your - system may print more or less depending on how many drivers you - have and how fast they are. - NOTE: if upsd says that it can't connect to a UPS or that the data - is stale, then your ups.conf is not configured correctly, or you - have a driver that isn't working properly. You must fix this before - going on to the next step. +[[FreeBSD]] +FreeBSD +~~~~~~~ - *** Reference: man page: upsd(8) +You can either install NUT as a binary package or as a port. ---------------------------------------------------------------------------- +Binary package +^^^^^^^^^^^^^^ -11. Make sure that the UPS is providing good status data. +To install the main component, use the following command: - /usr/local/ups/bin/upsc myupsname@localhost ups.status + # pkg_add -r nut - You should see just one line in response: +Port +^^^^ - OL +The port is located under /usr/ports/sysutils/nut. +To install it, use the following command: - OL means your system is running on line power. If it says something - else (like OB - on battery, or LB - low battery), your driver was - probably misconfigured in step 7. If you reconfigure the driver, - use 'upsdrvctl stop' to stop it, then start it again in step 8. + # cd /usr/ports/sysutils/nut/ && make install clean - *** Reference: man page: upsc(8) +You have to define WITH_NUT_CGI to build the optional CGI scripts. ---------------------------------------------------------------------------- +Optionaly, you can also install the following ports: -12. Look at all of the status data which is being monitored. +- sysutils/nut-snmp, for the SNMP driver, +- sysutils/nut-usb, for the USB drivers, +- sysutils/nut-libupsclient, for the upsclient library. - /usr/local/ups/bin/upsc myupsname@localhost - What happens now depends on the kind of UPS and driver you have. - In the list, you should see ups.status with the same value you got - above. A sample run on a MGE UPS SYSTEMS Ellipse ASR 600 looks - like this: +You are now ready to configure NUT, and start testing and using it. - battery.charge: 82 - battery.charge.low: 30 - battery.runtime: 1563 - driver.name: usbhid-ups - driver.parameter.port: auto - driver.version: 2.0.3 - driver.version.data: MGE HID 0.8 - driver.version.internal: 0.28 - input.transfer.high: 264.0 - input.transfer.low: 184.0 - outlet.desc: Main Outlet - outlet.id: 1 - outlet.switchable: 0 - outlet.1.desc: PowerShare Outlet 1 - outlet.1.id: 2 - outlet.1.switch: 0 - outlet.1.switchable: 0 - output.voltage: 230.0 - ups.delay.shutdown: -1 - ups.delay.start: -10 - ups.load: 0 - ups.mfr: MGE UPS SYSTEMS - ups.model: Ellipse 600 - ups.power.nominal: 600 - ups.serial: AP8F15005 - ups.status: OB DISCHRG - - *** Reference: man page: upsc(8) - ---------------------------------------------------------------------------- - -13. Edit your startup scripts. - - Make sure upsdrvctl and upsd are run every time your system starts. - -============================================================================ -============================================================================ -============================================================================ - - Configuring shutdowns for low battery events - -------------------------------------------- - -The whole point of UPS software is to bring down the OS cleanly when you -run out of battery power. Everything else is just eye candy. To make -sure your system shuts down properly, you will need to perform some -additional configuration and run upsmon. Here are the basics: - ---------------------------------------------------------------------------- - - 1. Create a upsd user for upsmon to use while monitoring this UPS. - - Edit upsd.users and create a new section. upsmon will connect - to upsd and use this user name (in brackets) and password to - authenticate. This example is for a user called "monuser": - - [monuser] - password = mypass - upsmon master # or upsmon slave - - *** References: man pages: upsd(8), upsd.users(5) - ---------------------------------------------------------------------------- - - 2. Reload upsd. Depending on your configuration, you may be able to - do this without stopping upsd: - - /usr/local/ups/sbin/upsd -c reload - - If that doesn't work (check the syslog), just restart it: - - /usr/local/ups/sbin/upsd -c stop - /usr/local/ups/sbin/upsd - - Later: if you want to make reloading work, see the entry in the FAQ - about starting upsd as a different user. - ---------------------------------------------------------------------------- - - 3. Set the POWERDOWNFLAG location for upsmon. - - In upsmon.conf, add a POWERDOWNFLAG directive with a filename. - upsmon will create this file when the UPS needs to be powered off - during a power failure when low battery is reached. - - We will test for the presence of this file in a later step. - - POWERDOWNFLAG /etc/killpower - - *** References: man pages: upsmon(8), upsmon.conf(5) - ---------------------------------------------------------------------------- - - 4. Secure upsmon.conf. - - The recommended setting is to have it owned by root:nut, then - make it readable by the group and not world. This file contains - passwords that could be used by an attacker to start a shutdown, - so keep it secure. - - chown root:nut upsmon.conf - chmod 0640 upsmon.conf - - This step has been placed early in the process so you secure this - file before adding sensitive data in the next step. - ---------------------------------------------------------------------------- - - 5. Create a MONITOR directive for upsmon - - Edit upsmon.conf and create a MONITOR line with the UPS definition - (@), username and password from step 2, and - the master or slave setting. - - If it's the master (i.e., it's connected to this UPS directly): - - MONITOR myupsname@mybox 1 monuser mypass master - - If it's just monitoring this UPS over the network, and some other - system is the master: - - MONITOR myupsname@mybox 1 monuser mypass slave - - The number "1" here is the power value. This should always be set - to 1 unless you have a very special (read: expensive) system with - redundant power supplies. See big-servers.txt and data-room.txt. - - *** References: man pages: upsmon(8), upsmon.conf(5) - ---------------------------------------------------------------------------- - - 6. Define a SHUTDOWNCMD for upsmon. - - Still in upsmon.conf, add a directive that tells upsmon how to - shut down your system. This example seems to work on most systems: - - SHUTDOWNCMD "/sbin/shutdown -h +0" - - Notice the presence of "quotes" here to keep it together. - - If your system has special needs, you may want to set this to - a script which does local shutdown tasks before calling init. - ---------------------------------------------------------------------------- - - 7. Start upsmon. - - /usr/local/ups/sbin/upsmon - - If it complains about something, then check your configuration. - ---------------------------------------------------------------------------- - - 8. Look for messages in the syslog to indicate success. It should look - something like this: - - May 29 01:11:27 mybox upsmon[102]: Startup successful - May 29 01:11:28 mybox upsd[100]: Client monuser@192.168.50.1 - logged into UPS [myupsname] - - Any errors seen here are probably due to an error in the config - files of either upsmon or upsd. You should fix them before - continuing. - ---------------------------------------------------------------------------- - - 9. Edit your startup scripts: add upsmon - - Make sure upsmon starts when your system comes up. Do it after - upsdrvctl and upsd, or it will complain about not being able to - contact the server. - ---------------------------------------------------------------------------- - -10. Edit your shutdown scripts: add upsdrvctl shutdown - - You should configure your system to power down the UPS after the - filesystems are remounted read-only. Have it look for the presence - of the POWERDOWNFLAG (from upsmon.conf), using this as an example: - - if (test -f /etc/killpower) - then - echo "Killing the power, bye!" - /usr/local/ups/bin/upsdrvctl shutdown - - sleep 120 - - # uh oh... the UPS power-off failed - # you probably want to reboot here so you don't get stuck! - # *** see the section on power races in shutdown.txt! *** - fi - - Be careful: that upsdrvctl command will probably power off your - machine. Don't use it unless your system is ready to be halted by - force. If you run RAID, be sure the arrays are ready to lose power. - Your kernel's power-off routines may not execute. - - Make sure that the filesystem(s) holding your UPS drivers and - configuration details are still mounted when that part of the script - is run. You need upsdrvctl, ups.conf, and any drivers for the - hardware on your system. - ---------------------------------------------------------------------------- - -More information can be found in the README file, the shutdown.txt document, -the upsmon(8) man page and the upsmon.conf(5) man page. +You can jump directly to the +<>. diff --git a/Makefile.am b/Makefile.am index fea5ed4..82c212c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ ACLOCAL_AMFLAGS = -I m4 # subdirectories to build and distribute. The order matters, as # several subdirectories depend on stuff in "common" being built first -SUBDIRS = include common clients conf data docs drivers lib man \ +SUBDIRS = include common clients conf data docs drivers lib \ tools scripts server EXTRA_DIST = MAINTAINERS UPGRADING @@ -16,8 +16,8 @@ EXTRA_DIST = MAINTAINERS UPGRADING # need to give hotplug-dir and udev-dir, so that staged install does # not fail. -DISTCHECK_FLAGS = --with-all --with-ssl --with-ipv6 -DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-ipv6=auto +DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto +DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \ --with-hotplug-dir='$${prefix}/etc/hotplug' \ @@ -27,8 +27,29 @@ distcheck-light: $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck # workaround the dist generated files that are also part of the distribution -distcleancheck_listfiles = \ - find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';' +# Note that distcleancheck is disabled for now, while waiting for a proper +# solution, that do not break older unix systems +#distcleancheck_listfiles = \ +# find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';' +distcleancheck: + @: + +# Automatically generate the ChangeLog from SVN logs: +MAINTAINERCLEAN_FILES = ChangeLog +ChangeLog: tools/svn2cl.authors + svn2cl --group-by-day --include-rev --authors=$< --revision 'HEAD:2332' --output=$@ || \ + echo "svn2cl failed to generate the ChangeLog. See http://trac.networkupstools.org/projects/nut/timeline" > $@ + +if HAVE_ASCIIDOC +website: + cd docs; $(MAKE) $(AM_MAKEFLAGS) website + cd docs/man; $(MAKE) $(AM_MAKEFLAGS) html-man + cd tools; $(MAKE) $(AM_MAKEFLAGS) website + cd docs/website; $(MAKE) $(AM_MAKEFLAGS) website +else !HAVE_ASCIIDOC +website: + @echo "Not building website since 'asciidoc' was not found." +endif !HAVE_ASCIIDOC # ---------------------------------------------------------------------- # targets from old build system (pre-automake). diff --git a/Makefile.in b/Makefile.in index 7839a3a..f7b5c89 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -39,15 +39,16 @@ target_triplet = @target@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ - ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \ - install-sh ltmain.sh missing + ChangeLog INSTALL NEWS TODO compile config.guess config.sub \ + depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(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_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -57,6 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.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_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -120,9 +122,12 @@ am__relativize = \ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -135,8 +140,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -153,7 +160,6 @@ 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@ @@ -164,22 +170,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -281,7 +287,7 @@ ACLOCAL_AMFLAGS = -I m4 # subdirectories to build and distribute. The order matters, as # several subdirectories depend on stuff in "common" being built first -SUBDIRS = include common clients conf data docs drivers lib man \ +SUBDIRS = include common clients conf data docs drivers lib \ tools scripts server EXTRA_DIST = MAINTAINERS UPGRADING @@ -291,17 +297,15 @@ EXTRA_DIST = MAINTAINERS UPGRADING # distcheck-light". Try to check as many features as possible! Also # need to give hotplug-dir and udev-dir, so that staged install does # not fail. -DISTCHECK_FLAGS = --with-all --with-ssl --with-ipv6 -DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-ipv6=auto +DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto +DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \ --with-hotplug-dir='$${prefix}/etc/hotplug' \ --with-udev-dir='$${prefix}/etc/udev' -# workaround the dist generated files that are also part of the distribution -distcleancheck_listfiles = \ - find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';' - +# Automatically generate the ChangeLog from SVN logs: +MAINTAINERCLEAN_FILES = ChangeLog # ---------------------------------------------------------------------- # targets from old build system (pre-automake). @@ -361,7 +365,7 @@ distclean-libtool: # (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): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -386,7 +390,7 @@ $(RECURSIVE_TARGETS): fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -550,7 +554,8 @@ distdir: $(DISTFILES) fi; \ done -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + || 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 {} {} \; \ @@ -594,17 +599,17 @@ dist dist-all: distdir distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + lzma -dc $(distdir).tar.lzma | $(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) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -654,15 +659,6 @@ distuninstallcheck: 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 @@ -784,6 +780,25 @@ uninstall-am: distcheck-light: $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck +# workaround the dist generated files that are also part of the distribution +# Note that distcleancheck is disabled for now, while waiting for a proper +# solution, that do not break older unix systems +#distcleancheck_listfiles = \ +# find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';' +distcleancheck: + @: +ChangeLog: tools/svn2cl.authors + svn2cl --group-by-day --include-rev --authors=$< --revision 'HEAD:2332' --output=$@ || \ + echo "svn2cl failed to generate the ChangeLog. See http://trac.networkupstools.org/projects/nut/timeline" > $@ + +@HAVE_ASCIIDOC_TRUE@website: +@HAVE_ASCIIDOC_TRUE@ cd docs; $(MAKE) $(AM_MAKEFLAGS) website +@HAVE_ASCIIDOC_TRUE@ cd docs/man; $(MAKE) $(AM_MAKEFLAGS) html-man +@HAVE_ASCIIDOC_TRUE@ cd tools; $(MAKE) $(AM_MAKEFLAGS) website +@HAVE_ASCIIDOC_TRUE@ cd docs/website; $(MAKE) $(AM_MAKEFLAGS) website +@HAVE_ASCIIDOC_FALSE@website: +@HAVE_ASCIIDOC_FALSE@ @echo "Not building website since 'asciidoc' was not found." + build: @echo $(WARN) @echo "Warning: 'make build' is deprecated. Use 'make all' instead." diff --git a/NEWS b/NEWS index d47ff06..ab1bb39 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,67 @@ If you're upgrading from an earlier version, see the UPGRADING file. For a complete list of changes, please refer to the ChangeLog file. +--------------------------------------------------------------------------- +Release notes for NUT 2.6.0 - what's new since 2.4.3: + + - the main focus of this release is the complete documentation revamping, + using AsciiDoc. This includes a new website, user manual, developer guide, + packager guide and manual pages, available in various formats (single and + multiple pages HTML, and PDF at the moment). + Be sure to check the --with-doc configure option help, and + docs/configure.txt for more information. + + - Add Augeas support, to provide easy NUT configuration management, through + tools and development APIs. For more information, refer to the developer + guide, or scripts/augeas/README in the source directory. + + - support for new devices: APC 5G; Eaton PowerWare 5119 RM (smart mode using + upscode2 driver), Eaton Best Ferrups (using older ConnectUPS card), + Eaton 9395 (serial interface), Eaton ConnectUPS X / BD / E Slot; + HP T1000 INTL, HP T1500 INTL, HP T750 G2, HP R1500 G2 INTL; iDowell iBox UPS; + Tripp Lite SmartOnline SU1000XLA, Tripp Lite Smart1000LCD, and some + more USB/HID devices IDs; CyberPower CP1500AVRLCD and CP1350AVRLCD; + PowerWalker Line-Interactive VI 1400 ; Rocketfish RF-1000VA / RF-1025VA. + + - usbhid-ups has better support for shutting down APC SmartUPS RM series, + and finally fix the "buffer size" issue, which was breaking some + devices data retrieval, or truncating some data on others. + + - snmp-ups now support SNMP v3 and its security parameters. IETF MIB support + has also been extended. + + - fix dummy-ups simulation driver status handling bug, and add the + capability to remove exposed variables on the fly. + + - the belkin driver now support control commands and status reporting + for beeper and battery test. + + - the powerpanel driver supports more older CyberPower units. + + - mge-utalk, upscode2, blazer and liebert-esp2 have also received some + care, and been improved. + + - NUT-Monitor and the PyNUT client module have been updated to 1.3, + adding more features like automatic connection to the first local device + and i18n support. + + - improve configure time dependencies checking and processing. + + - improve older Unix systems support (HP-UX, Aix, ...) for missing functions. + + - refresh and improve USB helper files (udev and UPower). + + - more generation automation: the ChangeLog file is now generated + automatically at distribution time, along with the files needed for + the website hardware compatibility list. + + - SSL support has also received some improvements. + + - tcp-wrapper now allows hostnames in /etc/hosts.allow too (not only IPv4 + and/or IPv6 addresses). + + - many bugfixes, cleanup and improvements. + --------------------------------------------------------------------------- Release notes for NUT 2.4.3 - what's new since 2.4.2: diff --git a/README b/README index c43679b..2f9213b 100644 --- a/README +++ b/README @@ -1,144 +1,111 @@ -================================= - Network UPS Tools Documentation -================================= +Network UPS Tools Overview +=========================== -:Info: Program support page: -:Author: Arnaud Quette and others, see AUTHORS file. -:Copyright: Released under the GNU GPL - see COPYING for details. - -Mailing list details: http://alioth.debian.org/mail/?group_id=30602 - -.. contents:: - -=========== Description -=========== +----------- Network UPS Tools is a collection of programs which provide a common -interface for monitoring and administering UPS and PDU hardware. NUT comes in -two flavors: the "classic" and the "HAL enabled" one. - -The "classic" flavor --------------------- - -It is the standard installation that uses a layered approach to connect -all of the NUT parts. +interface for monitoring and administering UPS, PDU and SCD hardware. +It uses a layered approach to connect all of the parts. Drivers are provided for a wide assortment of equipment. They understand the specific language of each device and map it back to a -compatibility layer. This means both an expensive "smart" protocol UPS -and a simple "power strip" model can be handled transparently. +compatibility layer. This means both an expensive high end UPS, a simple +"power strip" PDU, or any other power device can be handled transparently with +a uniform management interface. -This information is cached by the network server ``upsd``, which then +This information is cached by the network server `upsd`, which then answers queries from the clients. upsd contains a number of access control features to limit the abilities of the clients. Only authorized hosts may monitor or control your hardware if you wish. Since the notion of monitoring over the network is built into the software, you -can hang many systems off one large UPS and they will all shut down -together. You can also use NUT to power on, off or cycle your data centers -nodes, individually or globally through PDUs outlets. +can hang many systems off one large UPS, and they will all shut down +together. You can also use NUT to power on, off or cycle your data center +nodes, individually or globally through PDU outlets. -Clients such as upsmon check on the status of the hardware and do things +Clients such as `upsmon` check on the status of the hardware and do things when necessary. The most important task is shutting down the operating system cleanly before the UPS runs out of power. Other programs are -also provided to log UPS status regularly, monitor status through your +also provided to log information regularly, monitor status through your web browser, and more. -The "HAL enabled" flavor ------------------------- -This one is intended for use: - -- with supported USB UPS, -- on HAL enabled systems (Linux, FreeBSD, Sun Solaris), -- on HAL enabled desktops (Gnome and possibly KDE) - -Using this approach, you don't have to configure NUT files, nor to -manually start components, nor to install a specific NUT client. - -Upon plugging your USB UPS, the right driver will be automatically -launched, and the according Power Manager GUI will pop up. - -Note that this feature is still beta and incomplete. But it -represents a major evolution, and a huge user experience improvement! - -For more information, refer to INSTALL and docs/nut-hal.txt. - -========== Installing -========== +---------- If you are installing these programs for the first time, go read the -INSTALL file to find out how to do that. This document contains more -information on what all of this stuff does. +<<_installation_instructions,installation instructions>> +to find out how to do that. This document contains more information on what all +of this stuff does. -========= Upgrading -========= +--------- -When upgrading from an older version, always check the UPGRADING file to -see what may have changed. Compatibility issues and other changes will -be listed there to ease the process. +When upgrading from an older version, always check the +<> to see what may have +changed. Compatibility issues and other changes will be listed there to ease +the process. + + +Configuring and using +--------------------- + +Once NUT is installed, refer to the +<> for directions. -============= Documentation -============= +------------- -This file gives an overview of the software. You should read the man -pages, included example configuration files, and auxiliary documentation -for the parts that you intend to use. +This is just an overview of the software. You should read the man pages, +included example configuration files, and auxiliary documentation for the parts +that you intend to use. -=================== Network Information -=================== +------------------- These programs are designed to share information over the network. In -the examples below, ``localhost`` is used as the hostname. This can also +the examples below, `localhost` is used as the hostname. This can also be an IP address or a fully qualified domain name. You can specify a port number if your upsd process runs on another port. -In the case of the program ``upsc``, to view the variables on the UPS called -sparky on the ``upsd`` server running on the local machine, you'd do this:: +In the case of the program `upsc`, to view the variables on the UPS called +sparky on the `upsd` server running on the local machine, you'd do this: /usr/local/ups/bin/upsc sparky@localhost -The default port number is 3493. You can change this with +The default port number is 3493. You can change this with "configure --with-port" at compile-time. To make a client talk to upsd -on a specific port, add it after the hostname with a colon, like this:: +on a specific port, add it after the hostname with a colon, like this: /usr/local/ups/bin/upsc sparky@localhost:1234 This is handy when you have a mixed environment and some of the systems are on different ports. -The general form for UPS identifiers is this:: +The general form for UPS identifiers is this: [@[:]] Keep this in mind when viewing the examples below. -======== Manifest -======== +-------- This package is broken down into several categories: -- *drivers* - These programs talk directly to your UPS hardware. +- *drivers* - These programs talk directly to your UPS hardware. +- *server* - upsd serves data from the drivers to the network. +- *clients* - They talk to upsd and do things with the status data. +- *cgi-bin* - Special class of clients that you can use with your web server. +- *scripts* - Contains various scripts, like the Perl and Python binding, +integration bits and applications. -- *server* - upsd serves data from the drivers to the network. - -- *clients* - They talk to upsd and do things with the status data. - -- *cgi-bin* - Special class of clients that you can use with your web server. - - -======= Drivers -======= +------- These programs provide support for specific UPS models. They understand the protocols and port specifications which define status information @@ -146,170 +113,189 @@ and convert it to a form that upsd can understand. To configure drivers, edit ups.conf. For this example, we'll have a UPS called "sparky" that uses the apcsmart driver and is connected to -``/dev/ttyS1``. That's the second serial port on most Linux-based systems. -The entry in ``ups.conf`` looks like this:: +`/dev/ttyS1`. That's the second serial port on most Linux-based systems. +The entry in `ups.conf` looks like this: [sparky] driver = apcsmart port = /dev/ttyS1 To start and stop drivers, use upsdrvctl. By default, it will start or -stop every UPS in the config file:: +stop every UPS in the config file: /usr/local/ups/bin/upsdrvctl start /usr/local/ups/bin/upsdrvctl stop -However, you can also just start or stop one by adding its name:: +However, you can also just start or stop one by adding its name: /usr/local/ups/bin/upsdrvctl start sparky /usr/local/ups/bin/upsdrvctl stop sparky -To get the driver name for your device, refer to the below section +To find the driver name for your device, refer to the section below called "HARDWARE SUPPORT TABLE". Extra Settings --------------- +~~~~~~~~~~~~~~ Some drivers may require additional settings to properly communicate with your hardware. If it doesn't detect your UPS by default, check the driver's man page or help (-h) to see which options are available. -For example, the apcsmart driver allows setting "cable" to "940-0095B". -To use this feature, just add another line to your ups.conf section for -that UPS:: +For example, the usbhid-ups driver allows you to use USB serial numbers to +distingish between units via the "serial" configuration option. To use this +feature, just add another line to your ups.conf section for that UPS: [sparky] - driver = apcsmart - port = /dev/ttyS1 - cable = 940-0095B + driver = usbhid-ups + port = auto + serial = 1234567890 -Hardware Support Table ----------------------- +Hardware Compatibility List +~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The NUT Hardware support table is available in the source directory: - - nut-X.Y.Z/data/driver.list - -This one should also be distributed with your favorite packages. +The <> is available in the source directory +('nut-X.Y.Z/data/driver.list'), and is generally distributed with packages. For example, it is available on Debian systems as: /usr/share/nut/driver.list -For another take on this list, try the web page: +This table is also available link:http://www.networkupstools.org/stable-hcl.html[online]. - http://random.networkupstools.org/compat/ -If your driver has vanished, see the FAQ and UPGRADING files. +If your driver has vanished, see the link:FAQ.html[FAQ] and +<>. -Generic UPS Driver ------------------- +Generic Device Drivers +~~~~~~~~~~~~~~~~~~~~~~ -The ``genericups`` driver will support many models that use the same basic +NUT provides several generic drivers that support a variety of very similar models. + +- The `genericups` driver supports many serial models that use the same basic principle to communicate with the computer. This is known as "contact closure", and basically involves raising or lowering signals to indicate power status. - ++ This type of UPS tends to be cheaper, and only provides the very simplest data about power and battery status. Advanced features like battery charge readings and such require a "smart" UPS and a driver which supports it. ++ +See the linkman:genericups[8] man page for more information. -See the genericups(8) man page for more information. +- The `usbhid-ups` driver attempts to communicate with USB HID Power Device +Class (PDC) UPSes. These units generally implement the same basic protocol, +with minor variations in the exact set of supported attributes. This driver +also applies several correction factors when the UPS firmware reports values +with incorrect scale factors. ++ +See the linkman:usbhid-ups[8] man page for more information. + +- The `blazer_ser` and `blazer_usb` drivers supports the Megatec / Q1 +protocol that is used in many brands (Blazer, Energy Sistem, Fenton +Technologies, Mustek and many others). ++ +See the linkman:blazer[8] man page for more information. + +- The `snmp-ups` driver handles various SNMP enabled devices, from many +different manufacturers. In SNMP terms, `snmp-ups` is a manager, that +monitors SNMP agents. ++ +See the linkman:snmp-ups[8] man page for more information. + +- The `powerman-pdu` is a bridge to the PowerMan daemon, thus handling all +PowerMan supported devices. The PowerMan project supports several serial +and networked PDU, along with Blade and IPMI enabled servers. ++ +See the linkman:powerman-pdu[8] man page for more +information. -There is also a document called contact-closure.txt included with the -source distribution that contains information on this kind of hardware -and details on adding additional types to the genericups driver. UPS Shutdowns -------------- +~~~~~~~~~~~~~ upsdrvctl can also shut down (power down) all of your UPS hardware. -**WARNING:** if you play around with this command, expect your filesystems -to die. Don't power off your computers unless they're ready for it:: +WARNING: if you play around with this command, expect your filesystems +to die. Don't power off your computers unless they're ready for it: /usr/local/ups/bin/upsdrvctl shutdown /usr/local/ups/bin/upsdrvctl shutdown sparky -You should read the shutdown.txt file in the docs subdirectory to -learn more about when to use this feature. If called at the wrong time, -you may cause data loss by turning off a system with a filesystem +You should read the <> +chapter to learn more about when to use this feature. If called at the wrong +time, you may cause data loss by turning off a system with a filesystem mounted read-write. +Power distribution unit management +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +NUT also provides an advanced support for power distribution units. + +You should read the <> +chapter to learn more about when to use this feature. -============== Network Server -============== +-------------- -``upsd`` is responsible for passing data from the drivers to the client -programs via the network. It should be run immediately after ``upsdrvctl`` +`upsd` is responsible for passing data from the drivers to the client +programs via the network. It should be run immediately after `upsdrvctl` in your system's startup scripts. -``upsd`` should be kept running whenever possible, as it is the only source -of status information for the monitoring clients like ``upsmon``. +`upsd` should be kept running whenever possible, as it is the only source +of status information for the monitoring clients like `upsmon`. -====== -upsmon -====== +Monitoring client +----------------- -``upsmon`` provides the essential feature that you expect to find in UPS +`upsmon` provides the essential feature that you expect to find in UPS monitoring software: safe shutdowns when the power fails. In the layered scheme of NUT software, it is a client. It has this separate section in the documentation since it is so important. You configure it by telling it about UPSes that you want to monitor in -upsmon.conf. Each UPS can be defined as one of three possible types: +upsmon.conf. Each UPS can be defined as one of two possible types: -- Master +Master +~~~~~~ - This UPS supplies power to the system running upsmon, and - this system is also responsible for shutting it down when - the battery is depleted. This occurs after any slave systems - have disconnected safely. +This UPS supplies power to the system running `upsmon`, and this system is also +responsible for shutting it down when the battery is depleted. This occurs +after any slave systems have disconnected safely. - If your UPS is plugged directly into a system's serial port, - the upsmon on that system should define that UPS as a master. +If your UPS is plugged directly into a system's serial port, the `upsmon` +process on that system should define that UPS as a master. -- Slave +For a typical home user, there's one computer connected to one UPS. +That means you run a driver, `upsd`, and `upsmon` in master mode. - This UPS supplies power to the system running upsmon, but - this system can't shut it down directly. This system will - shut down the operating system before the master turns off the - power. +Slave +~~~~~ - Use this mode when you run multiple computers on the same UPS. - Obviously, only one can be connected to the serial port on the - UPS, and that system is the master. Everything else is a - slave. - -- Monitor-only +This UPS may supply power to the system running `upsmon`, but this system can't +shut it down directly. - This UPS will still generate notifications about status - changes (on battery, on line, etc.) but no shutdowns of the - local system result from critical situations on that UPS. +Use this mode when you run multiple computers on the same UPS. Obviously, only +one can be connected to the serial port on the UPS, and that system is the +master. Everything else is a slave. For a typical home user, there's one computer connected to one UPS. That means you run a driver, upsd, and upsmon in master mode. Additional Information ----------------------- +~~~~~~~~~~~~~~~~~~~~~~ More information on configuring upsmon can be found in these places: - - The man page - upsmon(8) - - - big-servers.txt in the docs subdirectory - - - shutdown.txt in the docs subdirectory - - - The stock upsmon.conf that comes with the package +- The linkman:upsmon[8] man page +- <> +- <> chapter +- The stock `upsmon.conf` that comes with the package -======= Clients -======= +------- Clients talk to upsd over the network and do useful things with the data from the drivers. There are tools for command line access, and a few @@ -319,48 +305,48 @@ programs. For more details on specific programs, refer to their man pages. upsc ----- +~~~~ -upsc is a simple client that will display the values of variables known -to upsd and your UPS drivers. It will list every variable by default, -or just one if you specify an additional argument. This can be useful -in shell scripts for monitoring something without writing your own +`upsc` is a simple client that will display the values of variables known +to `upsd` and your UPS drivers. It will list every variable by default, +or just one if you specify an additional argument. This can be useful +in shell scripts for monitoring something without writing your own network code. -upsc is a quick way to find out if your driver(s) and upsd are working -together properly. Just run upsc to see what's going on, i.e.:: +`upsc` is a quick way to find out if your driver(s) and upsd are working +together properly. Just run `upsc ` to see what's going on, i.e.: - morbo:~$ upsc su700@localhost + morbo:~$ upsc sparky@localhost ambient.humidity: 035.6 ambient.humidity.alarm.maximum: NO,NO ambient.humidity.alarm.minimum: NO,NO ambient.temperature: 25.14 + ... - [ and so on ] - -If you are interested in writing a simple client that monitors upsd, -the source code for upsc is a good way to learn about using the +If you are interested in writing a simple client that monitors `upsd`, +the source code for `upsc` is a good way to learn about using the upsclient functions. -See the upsc(8) man page for more information. +See the linkman:upsc[8] man page and +<> for more information. upslog ------- +~~~~~~ -upslog will write status information from upsd to a file at set +`upslog` will write status information from `upsd` to a file at set intervals. You can use this to generate graphs or reports with other -programs such as gnuplot. +programs such as `gnuplot`. upsrw ------ +~~~~~ -upsrw allows you to display and change the read/write variables in your +`upsrw` allows you to display and change the read/write variables in your UPS hardware. Not all devices or drivers implement this, so this may -not have any effect on your system. +not have any effect on your system. -A driver that supports read/write variables will give results like this:: +A driver that supports read/write variables will give results like this: - $ upsrw su700@localhost + $ upsrw sparky@localhost ( many skipped ) @@ -373,64 +359,66 @@ A driver that supports read/write variables will give results like this:: ( more skipped ) -On the other hand, one that doesn't support them won't print anything:: +On the other hand, one that doesn't support them won't print anything: $ upsrw fenton@gearbox ( nothing ) -upsrw requires administrator powers to change settings in the hardware. -Refer to upsd.users(5) for information on defining users in upsd. +`upsrw` requires administrator powers to change settings in the hardware. +Refer to linkman:upsd.users[5] for information on defining +users in `upsd`. upscmd ------- +~~~~~~ Some UPS hardware and drivers support the notion of an instant command - a feature such as starting a battery test, or powering off the load. You can use upscmd to list or invoke instant commands if your hardware/drivers support them. -Use the -l command to list them, like this:: +Use the -l command to list them, like this: - $ upscmd -l su700@localhost - Instant commands supported on UPS [su700@localhost]: + $ upscmd -l sparky@localhost + Instant commands supported on UPS [sparky@localhost]: load.on - Turn on the load immediately test.panel.start - Start testing the UPS panel calibrate.start - Start run time calibration calibrate.stop - Stop run time calibration + ... - [ snip ] +`upscmd` requires administrator powers to start instant commands. +To define users and passwords in `upsd`, see +linkman:upsd.users[5]. -upscmd requires administrator powers to start instant commands. -To define users and passwords in upsd, see upsd.users(5). -============ CGI Programs -============ +------------ The CGI programs are clients that run through your web server. They allow you to see UPS status and perform certain administrative commands from any web browser. Javascript and cookies are not required. These programs are not installed or compiled by default. To compile -and install them, first run 'configure --with-cgi', then do 'make' and -'make install'. If you receive errors about "gd" during configure, go +and install them, first run `configure --with-cgi`, then do `make` and +`make install`. If you receive errors about "gd" during configure, go get it and install it before continuing. You can get the source here: - http://www.boutell.com/gd/ + http://www.libgd.org/ -In the event that you need libpng or zlib in order to compile gd, +In the event that you need libpng or zlib in order to compile gd, they can be found at these URLs: http://www.libpng.org/pub/png/pngcode.html http://www.gzip.org/zlib/ + Access Restrictions -------------------- +~~~~~~~~~~~~~~~~~~~ The CGI programs use hosts.conf to see if they are allowed to talk to a host. This keeps malicious visitors from creating queries from your web @@ -440,107 +428,58 @@ If you get error messages that say "Access to that host is not authorized", you're probably missing an entry in your hosts.conf. upsstats --------- +~~~~~~~~ -upsstats generates web pages from HTML templates, and plugs in status +`upsstats` generates web pages from HTML templates, and plugs in status information in the right places. It looks like a distant relative of APC's old Powerchute interface. You can use it to monitor several systems or just focus on one. -It also can generate IMG references to upsimage. +It also can generate IMG references to `upsimage`. upsimage --------- +~~~~~~~~ This is usually called by upsstats via IMG SRC tags to draw either the utility or outgoing voltage, battery charge percent, or load percent. upsset ------- +~~~~~~ -upsset provides several useful administration functions through a web -interface. You can use upsset to kick off instant commands on your UPS +`upsset` provides several useful administration functions through a web +interface. You can use `upsset` to kick off instant commands on your UPS hardware like running a battery test. You can also use it to change variables in your UPS that accept user-specified values. -Essentially, upsset provides the functions of upsrw and upscmd, but +Essentially, `upsset` provides the functions of `upsrw` and `upscmd`, but with a happy pointy-clicky interface. -upsset will not run until you convince it that you have secured your +`upsset` will not run until you convince it that you have secured your system. You *must* secure your CGI path so that random interlopers -can't run this program remotely. See the upsset.conf file. Once you +can't run this program remotely. See the `upsset.conf` file. Once you have secured the directory, you can enable this program in that configuration file. It is not active by default. -===================== -Support / Help / etc. -===================== - -The main URL: - - http://www.networkupstools.org/ - -There is also a mailing list for general queries and discussion about -this software called nut-upsuser. It typically moves around 50-100 messages -per month at the time of this writing. To join, go to the below address and -subscribe to the desired list. - -Finally, there is a developer list called nut-upsdev. This is not -an install help list, and any such mails probably will be ignored. - -The mailing lists are archived on the web: - - http://alioth.debian.org/mail/?group_id=30602 - -Try running some searches against the archives. Many times, problems have -already been answered by someone else. Currently, there is no internal -search engine, so you will have to try with a search engine like Google. - -There is more documentation in the docs/ directory within the source -tree. Be sure to read through the files in there (especially the -FAQ) before mailing the list for help. Many times the questions have -already been answered in the files which are right in front of you. - - -=================================== -Making your own clients (upsclient) -=================================== - -The upsclient.a library can be linked into other programs to give access -to upsd and UPS status information. Clients like upsc are provided as -examples of how to retrieve data using the upsclient functions. Other -programs not included in this package may also use this library, as wmnut. - -This library file and the associated header files are not installed by -default. You must './configure --with-lib' to enable building and -installing these files. The libraries can then be build and installed -with 'make' and 'make install' as usual. This must be done before -building other (non-NUT) programs which depend on them. - -To obtain the right compilation and link flags, two helpers are provided: -one for platform providing pkg-config, and the other (libupsclient-config) -for platform not providing pkg-config. - - -================= Version Numbering -================= +----------------- The version numbers work like this: if the middle number is odd, it's a development tree, otherwise it is the stable tree. -The past stable trees were 1.0, 1.2, 1.4 and 2.0, with the latest stable tree -designated 2.2. The development trees were 1.1, 1.3, 1.5 and 2.1. +The past stable trees were 1.0, 1.2, 1.4, 2.0, 2.2 and 2.4, with the +latest stable tree designated 2.6. The development trees were 1.1, 1.3, +1.5, 2.1 and 2.3. As of the 2.4 release, there is no real development +branch anymore since the code is available through a revision control +system (namely Subversion) and snapshots. -The jump to 2.2 is mostly due to the large changes to the features list. -There have also been a number of architectural changes which may not be -noticeable to most users. +Major release jumps are mostly due to large changes to the features +list. There have also been a number of architectural changes which +may not be noticeable to most users, but which can impact developers. -==================================== Backwards and Forwards Compatibility -==================================== +------------------------------------ The old network code spans a range from about 0.41.1 when TCP support was introduced up to the recent 1.4 series. It used variable names @@ -567,21 +506,17 @@ use the new names. Here's a table to make it easier to visualize: - +--------+------------------------+ - | | Server | - +--------+-----+-----+-----+------+ - | Client | 1.0 | 1.2 | 1.4 | 2.0+ | - +========+=====+=====+=====+======+ - | 1.0 | yes | yes | yes | no | - +--------+-----+-----+-----+------+ - | 1.2 | yes | yes | yes | no | - +--------+-----+-----+-----+------+ - | 1.4 | yes | yes | yes | yes | - +--------+-----+-----+-----+------+ - | 2.0 | no | no | yes | yes | - +--------+-----+-----+-----+------+ +[options="header"] +|============================================= +| 4+| Server version +| *Client version* | 1.0 | 1.2 | 1.4 | 2.0+ +| 1.0 | yes | yes | yes | no +| 1.2 | yes | yes | yes | no +| 1.4 | yes | yes | yes | yes +| 2.0+ | no | no | yes | yes +|============================================= -Version 2.0 (and more recent) does not contain backwards compatibility for +Version 2.0, and more recent, do not contain backwards compatibility for the old protocol and variable/command names. As a result, 2.0 clients can't talk to anything older than a 1.4 server. If you ask a 2.0 client to fetch "STATUS", it will fail. You'll have to ask for "ups.status" @@ -593,67 +528,24 @@ software can easily support both versions as long as they like. If upsd returns 'ERR UNKNOWN-COMMAND' to a GET request, you need to use REQ. -========================== +Support / Help / etc. +--------------------- + +If you are in need of help, refer to the +<> in the user manual. + + Hacking / Development Info -========================== +-------------------------- -Additional documentation can be found in the docs subdirectory. +Additional documentation can be found in: -Information on creating new drivers can be found in new-drivers.txt. -Also be sure to look at skel.c and main.c. All drivers are just -collections of support functions built around a common core, so most of -the dull housekeeping work has been handled for you. - -Information on the NUT variables naming can be found in new-names.txt. -Information on the architecture and how it all fits together is in the -design.txt file. In short, there's a lot more documentation out there. - -Also be sure to read developers.txt, as it explains a lot about the -tree, including some of the functions that are provided for your use. +- the linkdoc:developer-guide[Developer Guide], +- the linkdoc:packager-guide[Packager Guide]. -================================ Acknowledgements / Contributions -================================ - -MGE UPS SYSTEMS provided extensive technical documents for their UPS product -line, along with many units for development of NUT-related projects. The -company also sponsored and later hired Arnaud Quette to further officially -support these efforts. - -Several drivers such as mge-utalk, mge-shut, snmp-ups, hidups, and usbhid-ups -are the result of this collaboration, in addition to the WMNut, MGE HID Parser -the libhid projects, .... The features page has improved artwork thanks to Luc -and Arnaud of MGE. Other client projects such as KNutClient and ups-monitor -have also received assistance. - -The master NUT site and several related projects are hosted on MGE's equipment -at no cost to the project. - -More information on their open source support can be found on their web site: -http://opensource.mgeups.com/contrib.htm - -Fenton Technologies contributed a PowerPal 660 to the project. Their open -stance and quick responses to technical inquiries are appreciated for -making the development of the fentonups driver possible. - -Bo Kersey of VirCIO (http://www.vircio.com) provided a Best Power -Fortress 750 to facilitate the bestups driver. - -Invensys Energy Systems provided the SOLA/Best "Phoenixtec" protocol -document currently residing at the following URL: - - http://random.networkupstools.org/protocols/sola.html - -PowerKinetics technical support provided documentation on their MiniCOL -protocol, which is archived in the NUT protocol library online: - - http://random.networkupstools.org/protocols/minicol/ - -Cyber Power Systems contributed a 700AVR model for testing and driver -development. - -Liebert Corporation supplied serial test boxes and a UPStation GXT2 -with the Web/SNMP card for development of the liebert driver and -expansion of the existing snmp-ups driver. +-------------------------------- +The many people who have participated in creating and improving NUT are +listed in the user manual <>. diff --git a/docs/ideas.txt b/TODO similarity index 68% rename from docs/ideas.txt rename to TODO index 5fc90f8..1c45636 100644 --- a/docs/ideas.txt +++ b/TODO @@ -1,14 +1,35 @@ -Desc: Ideas for future expansion and features -File: ideas.txt -Date: 20 October 2003 -Auth: Russell Kroll +NUT roadmap and ideas for future expansion +------------------------------------------ Here are some ideas that have come up over the years but haven't been implemented yet. This may be a good place to start if you're looking for a rainy day hacking project. + +Roadmap +~~~~~~~ + +2.6 +^^^ + +This release is focused on the website and documentation rewrite, using +the excellent link:http://www.methods.co.nz/asciidoc[AsciiDoc]. + +2.8 +^^^ + +This branch will focus on configuration and user interface improvements. + +3.0 +^^^ + +This major transition will mark the final switch to a complete power +device broker. + + + Non-network "upsmon" -==================== +~~~~~~~~~~~~~~~~~~~~ Some systems don't want a daemon listening to the network. This can be for security reasons, or perhaps because the system has been squashed @@ -20,16 +41,13 @@ This also makes monitoring extremely easy to automate - you don't need to worry about usernames, passwords or firewalling. Just start a driver and drop this program on top of it. - - Parse ups.conf and open the state socket for a driver - - - Send DUMPALL and enter a select loop - - - Parse SETINFOs that change ups.status - - - When you get OB LB, shut down +- Parse ups.conf and open the state socket for a driver +- Send DUMPALL and enter a select loop +- Parse SETINFOs that change ups.status +- When you get OB LB, shut down Completely unprivileged upsmon -============================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ upsmon currently retains root in a forked process so it can call the shutdown command. The only reason it needs root on most systems is that @@ -51,7 +69,7 @@ down the group access so only upsmon's unprivileged user can access it, and make that your SHUTDOWNCMD. Then it could drop root completely. Chrooted upsmon -=============== +~~~~~~~~~~~~~~~ upsmon could run the network monitoring part in a chroot jail if it had a pipe to another process running outside for NOTIFY dispatches. Such a @@ -64,7 +82,7 @@ All it has to do is dispatch the UPS name and event type. [start] [type] [length] [stop] Monitor program with interpreted language -========================================= +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Once in awhile, I get requests for a way to shut down based on the UPS temperature, or ambient humidity, or at a certain battery charge level, @@ -83,3 +101,18 @@ timers. Due to the expected size and limited audience for such a program, it might have to be distributed separately. + +NOTE: Python may be a good candidate. + +Sandbox +~~~~~~~ + +- check to refresh and integrate the https://alioth.debian.org/pm/?group_id=30602[tasks] list +and https://alioth.debian.org/tracker/?atid=411545&group_id=30602&func=browse[feature requests] list from Alioth +- add "Generic ?Ascii? driver": I've got to think more about that, but the recent +solar panel driver, and the powerman internal approach of a generic engine with +a scripting interface is a cool idea. +Ref http://powerman.svn.sourceforge.net/viewvc/powerman/trunk/etc/apcpdu.dev?revision=969&view=markup +- integrate the (future) new powerman LUA engine (maybe/mustbe used for the driver above?) +for native PDU support +- see how we can help and collaborate with DeviceKit-power diff --git a/UPGRADING b/UPGRADING index 63ed28d..9336069 100644 --- a/UPGRADING +++ b/UPGRADING @@ -1,373 +1,198 @@ -This file lists changes that affect users who installed older versions +ifdef::txt[] +Upgrading notes +=============== +endif::txt[] + +This file lists changes that affect users who installed older versions of this software. When upgrading from an older version, be sure to check this file to see if you need to make changes to your system. ---------------------------------------------------------------------------- -Changes from 2.4.2 to 2.4.3: - - - nothing that affects upgraded systems. - ---------------------------------------------------------------------------- -Changes from 2.4.1 to 2.4.2: - - - The default subdriver for the blazer_usb driver USB id 06da:0003 has - changed. If you use such a device and it is no longer working with this - driver, override the 'subdriver' default in 'ups.conf' (see man 8 blazer). - - NUT ACL and the allowfrom mechanism has been replaced in 2.4.0 by the LISTEN - directive and tcp-wrappers respectively. This information was missing - below, so a double note has been added. - ---------------------------------------------------------------------------- -Changes from 2.4.0 to 2.4.1: - - - nothing that affects upgraded systems. - ---------------------------------------------------------------------------- -Changes from 2.2.2 to 2.4.0: - - - The nut.conf file has been introduced to standardize startup configuration - across the various systems. - - The cpsups and nitram drivers have been replaced by the powerpanel driver, - and removed from the tree. The cyberpower driver may suffer the same in the - future. - - The al175 and energizerups drivers have been removed from the tree, since - these were tagged broken for a long time. - - Developers of external client application using libupsclient must rename - their "UPSCONN" client structure to "UPSCONN_t". - - The upsd server will now disconnect clients that remain silent for more than - 60 seconds. - - The files under scripts/python/client are distributed under GPL 3+, whereas - the rest of the files are distributed under GPL 2+. Refer to COPYING for more - information. - - The generated udev rules file has been renamed with dash only, no underscore - anymore (ie 52-nut-usbups.rules instead of 52_nut-usbups.rules) - - (Note: this has been missed at release time): The NUT internal network access - control (ACL using ACCEPT / REJECT in upsd.conf) has been replaced by - the LISTEN directive. This can also be complemented by tcp-wrappers. - Refer to upsd and upsd.conf manual pages for more information. - ---------------------------------------------------------------------------- -Changes from 2.2.1 to 2.2.2: - - - The configure option "--with-lib" has been replaced by "--with-dev". - This enable the additional build and distribution of the static - version of libupsclient, along with the pkg-config helper and manual - pages. The default configure option is to distribute only the shared - version of libupsclient. This can be overriden by using the - "--disable-shared" configure option (distribute static only binaries). - - The UPS poweroff handling of the usbhid-ups driver has been reworked. - Though regression is not expected, users of this driver are - encouraged to test this feature by calling "upsmon -c fsd" and - report any issue on the NUT mailing lists. - ---------------------------------------------------------------------------- -Changes from 2.2.0 to 2.2.1: - - - nothing that affects upgraded systems. - (The below message is repetead due to previous omission) - - Developers of external client application using libupsclient are - encouraged to rename their "UPSCONN" client structure to "UPSCONN_t" - since the former will disappear by the release of NUT 2.4. - ---------------------------------------------------------------------------- -Changes from 2.0.5 to 2.2.0: - - - users of the newhidups driver are advised that the driver name has changed - to usbhid-ups. - - users of the hidups driver must switch to usbhid-ups. - - users of the following drivers (powermust, blazer, fentonups, mustek, - esupssmart, ippon, sms) must switch to megatec, which replaces - all these drivers. Please refer to doc/megatec.txt for details. - - users of the mge-shut driver are encouraged to test newmge-shut, which - is an alternate driver scheduled to replace mge-shut, - - users of the cpsups driver are encouraged to switch to powerpanel which - is scheduled to replace cpsups, - - packagers will have to rework the whole nut packaging due to the - major changes in the build system (completely modified, and now using - automake). Refer to packaging/debian/ for an example of migration. - - specifying '-a ' is now mandatory when starting a driver manually, - ie not using upsdrvctl. - - Developers of external client application using libupsclient are - encouraged to rename the "UPSCONN" client structure to "UPSCONN_t" - since the former will disapear by the release of NUT 2.4. - ---------------------------------------------------------------------------- -Changes from 2.0.4 to 2.0.5: - - - users of the newhidups driver: the driver is now more strict about - refusing to connect to unknown devices. If your device was - previously supported, but fails to be recognized now, add - 'productid=XXXX' to ups.conf. Please report the device to the NUT - developer's mailing list. - ---------------------------------------------------------------------------- -Changes from 2.0.3 to 2.0.4: - - - nothing that affects upgraded systems. - - users of the following drivers (powermust, blazer, fentonups, mustek, - esupssmart, ippon, sms, masterguard) are encouraged to switch to megatec, - which should replace all these drivers by nut 2.2. For more information, - please refer to doc/megatec.txt - ---------------------------------------------------------------------------- -Changes from 2.0.2 to 2.0.3: - - - nothing that affects upgraded systems. - - hidups users are encouraged to switch to newhidups, as hidups will be - removed by nut 2.2. - ---------------------------------------------------------------------------- -Changes from 2.0.1 to 2.0.2: - - - The newhidups driver, which is the long run USB support approach, - needs hotplug files installed to setup the right permissions on - device file to operate. Check newhidups manual page for more information. - ---------------------------------------------------------------------------- -Changes from 2.0.0 to 2.0.1: - - - The cyberpower1100 driver is now called cpsups since it supports - more than just one model. If you use this driver, be sure to remove - the old binary and update your ups.conf 'driver=' setting with the - new name. - - - The upsstats.html template page has been changed slightly to reflect - better HTML compliance, so you may want to update your installed copy - accordingly. If you've customized your file, don't just copy the new - one over it, or your changes will be lost! - ---------------------------------------------------------------------------- -Changes from 1.4.0 to 2.0.0: - - - The sample config files are no longer installed by default. If you - want to install them, use 'make install-conf' for the main programs, - and 'make install-cgi-conf' for the CGI programs. - - - ACCESS is no longer supported in upsd.conf. Use ACCEPT and REJECT. +Changes from 2.4.3 to 2.6.0 +--------------------------- + +- users of the megatec and megatec_usb drivers must respectively switch to +blazer_ser and blazer_usb. +- users of the liebertgxt2 driver are advised that the driver name has changed +to liebert-esp2. + +Changes from 2.4.2 to 2.4.3 +--------------------------- + +- nothing that affects upgraded systems. + +Changes from 2.4.1 to 2.4.2 +--------------------------- + +- The default subdriver for the blazer_usb driver USB id 06da:0003 has changed. +If you use such a device and it is no longer working with this driver, override +the 'subdriver' default in 'ups.conf' (see man 8 blazer). +- NUT ACL and the allowfrom mechanism has been replaced in 2.4.0 by the LISTEN +directive and tcp-wrappers respectively. This information was missing below, so +a double note has been added. + +Changes from 2.4.0 to 2.4.1 +--------------------------- + +- nothing that affects upgraded systems. + +Changes from 2.2.2 to 2.4.0 +--------------------------- + +- The nut.conf file has been introduced to standardize startup configuration +across the various systems. +- The cpsups and nitram drivers have been replaced by the powerpanel driver, +and removed from the tree. The cyberpower driver may suffer the same in the +future. +- The al175 and energizerups drivers have been removed from the tree, since +these were tagged broken for a long time. +- Developers of external client application using libupsclient must rename +their "UPSCONN" client structure to "UPSCONN_t". +- The upsd server will now disconnect clients that remain silent for more than +60 seconds. +- The files under scripts/python/client are distributed under GPL 3+, whereas +the rest of the files are distributed under GPL 2+. Refer to COPYING for more +information. +- The generated udev rules file has been renamed with dash only, no underscore +anymore (ie 52-nut-usbups.rules instead of 52_nut-usbups.rules) + +Changes from 2.2.1 to 2.2.2 +--------------------------- + +- The configure option "--with-lib" has been replaced by "--with-dev". +This enable the additional build and distribution of the static +version of libupsclient, along with the pkg-config helper and manual +pages. The default configure option is to distribute only the shared +version of libupsclient. This can be overriden by using the +"--disable-shared" configure option (distribute static only binaries). +- The UPS poweroff handling of the usbhid-ups driver has been reworked. +Though regression is not expected, users of this driver are +encouraged to test this feature by calling "upsmon -c fsd" and +report any issue on the NUT mailing lists. + +Changes from 2.2.0 to 2.2.1 +--------------------------- + +- nothing that affects upgraded systems. +(The below message is repetead due to previous omission) +- Developers of external client application using libupsclient are +encouraged to rename their "UPSCONN" client structure to "UPSCONN_t" +since the former will disappear by the release of NUT 2.4. + +Changes from 2.0.5 to 2.2.0 +--------------------------- + +- users of the newhidups driver are advised that the driver name has changed +to usbhid-ups. +- users of the hidups driver must switch to usbhid-ups. +- users of the following drivers (powermust, blazer, fentonups, mustek, +esupssmart, ippon, sms) must switch to megatec, which replaces +all these drivers. Please refer to doc/megatec.txt for details. +- users of the mge-shut driver are encouraged to test newmge-shut, which +is an alternate driver scheduled to replace mge-shut, +- users of the cpsups driver are encouraged to switch to powerpanel which +is scheduled to replace cpsups, +- packagers will have to rework the whole nut packaging due to the +major changes in the build system (completely modified, and now using +automake). Refer to packaging/debian/ for an example of migration. +- specifying '-a ' is now mandatory when starting a driver manually, +ie not using upsdrvctl. +- Developers of external client application using libupsclient are +encouraged to rename the "UPSCONN" client structure to "UPSCONN_t" +since the former will disapear by the release of NUT 2.4. + +Changes from 2.0.4 to 2.0.5 +--------------------------- + +- users of the newhidups driver: the driver is now more strict about +refusing to connect to unknown devices. If your device was +previously supported, but fails to be recognized now, add +'productid=XXXX' to ups.conf. Please report the device to the NUT +developer's mailing list. + +Changes from 2.0.3 to 2.0.4 +--------------------------- + +- nothing that affects upgraded systems. +- users of the following drivers (powermust, blazer, fentonups, mustek, +esupssmart, ippon, sms, masterguard) are encouraged to switch to megatec, +which should replace all these drivers by nut 2.2. For more information, +please refer to doc/megatec.txt + +Changes from 2.0.2 to 2.0.3 +--------------------------- + +- nothing that affects upgraded systems. +- hidups users are encouraged to switch to newhidups, as hidups will be +removed by nut 2.2. + +Changes from 2.0.1 to 2.0.2 +--------------------------- + +- The newhidups driver, which is the long run USB support approach, +needs hotplug files installed to setup the right permissions on +device file to operate. Check newhidups manual page for more information. + +Changes from 2.0.0 to 2.0.1 +--------------------------- + +- The cyberpower1100 driver is now called cpsups since it supports +more than just one model. If you use this driver, be sure to remove +the old binary and update your ups.conf 'driver=' setting with the +new name. + +- The upsstats.html template page has been changed slightly to reflect +better HTML compliance, so you may want to update your installed copy +accordingly. If you've customized your file, don't just copy the new +one over it, or your changes will be lost! + +Changes from 1.4.0 to 2.0.0 +--------------------------- + +- The sample config files are no longer installed by default. If you +want to install them, use 'make install-conf' for the main programs, +and 'make install-cgi-conf' for the CGI programs. + +- ACCESS is no longer supported in upsd.conf. Use ACCEPT and REJECT. +Old way: + + ACCESS grant all adminbox + ACCESS grant all webserver + ACCESS deny all all + +New way: + + ACCEPT adminbox + ACCEPT webserver + REJECT all + +Note that ACCEPT and REJECT can take multiple arguments, so this +will also work: + + ACCEPT adminbox webserver + REJECT all + +- The drivers no longer support sddelay in ups.conf or -d on the +command line. If you need a delay after calling 'upsdrvctl +shutdown', add a call to sleep in your shutdown script. + +- The templates used by upsstats have changed considerably to reflect +the new variable names. If you use upsstats, you will need to +install new copies or edit your existing files to use the new names. + +- Nobody needed UDP mode, so it has been removed. The only users +seemed to be a few people like me with ancient asapm-ups binaries. +If you really want to run asapm-ups again, bug me for the new patch +which makes it work with upsclient. + +- 'make install-misc' is now 'make install-lib'. The misc directory +has been gone for a long time, and the target was ambiguous. +>>>>>>> switch UPGRADING information to AsciiDoc, and integrate these in the User Manual. - Old way: +- The newapc driver has been renamed to apcsmart. If you previously +used newapc, make sure you delete the old binary and fix your +ups.conf. Otherwise, you may run the old driver from 1.4. - ACCESS grant all adminbox - ACCESS grant all webserver - ACCESS deny all all - New way: +*** File trimmed here on changes from 1.2.2 to 1.4.0 *** - ACCEPT adminbox - ACCEPT webserver - REJECT all - - Note that ACCEPT and REJECT can take multiple arguments, so this - will also work: - - ACCEPT adminbox webserver - REJECT all - - - The drivers no longer support sddelay in ups.conf or -d on the - command line. If you need a delay after calling 'upsdrvctl - shutdown', add a call to sleep in your shutdown script. - - - The templates used by upsstats have changed considerably to reflect - the new variable names. If you use upsstats, you will need to - install new copies or edit your existing files to use the new names. - - - Nobody needed UDP mode, so it has been removed. The only users - seemed to be a few people like me with ancient asapm-ups binaries. - If you really want to run asapm-ups again, bug me for the new patch - which makes it work with upsclient. - - - 'make install-misc' is now 'make install-lib'. The misc directory - has been gone for a long time, and the target was ambiguous. - - - The newapc driver has been renamed to apcsmart. If you previously - used newapc, make sure you delete the old binary and fix your - ups.conf. Otherwise, you may run the old driver from 1.4. - ---------------------------------------------------------------------------- - -Changes from 1.2.2 to 1.4.0: - - - The clients no longer support the notion of a "default UPS" when - communicating with newer versions of upsd. If you leave off a UPS - name, they will fall back on compatibility mode and will use the - old variable and command names. - - That is, "upsc localhost" will give you things like STATUS, and you - have to do "upsc myups@localhost" to get the new ones like - ups.status. - - The old variable names and default UPS mode will be supported - throughout the 1.4 series to allow users to convert to the new - style. This support will be formally dropped in 2.0. - - - upsmon is part of the "no default upsname" change. You must change - the MONITOR directives in your upsmon.conf if you were using this - technique before. - - Old way: - - MONITOR bigserver 1 monuser password master - - New way: - - MONITOR myups@bigserver 1 monuser password master - - Just look at the top of ups.conf on 'bigserver' to figure out what - the first UPS is called, and stick it and a @ on that MONITOR line. - - - upsrw's appearance has changed to avoid wrapping when displaying - the new longer variable names and descriptions. It still displays - the old format when talking to an older upsd. - - To see the difference, try "upsrw localhost" and then compare it to - "upsrw myups@localhost", assuming a new version of upsd is running - on localhost. - - - upslog now uses the new variable names in the default format - string. It will still monitor the old variable names for backwards - compatibility, but you will have to specify the format string - explicitly. - - - 'make install' no longer creates the state path. Instructions for - creating it properly have been added to the INSTALL file. - - Technically, this only affects packagers, since this is the - UPGRADING file and normal users should already have a state path. - If you are a packager, you will need to add the right mkdir + chown + - chmod magic to your install process to keep things working. - - This also means that you no longer need any special permissions to - bundle this software into a package. The installer no longer - requires root now that the chown is gone. - - - configure --with-group no longer does anything useful. The programs - which will drop permissions support "-u ", and will pick up - the group id based on the values in /etc/passwd for that user name. - - configure --with-user still works as before, and provides the default - value if you don't specify another one with -u. - - - The "DROP" action in upsd.conf now behaves a little differently. - - It still causes new TCP connections to be closed without reading - from the socket, and still causes UDP datagrams to be ignored. - - The only difference is that commands that are denied after the - remote host connects will now generate an error message. Previously, - upsd would just ignore them, and the clients could get out of sync. - - DENY also has been changed slightly to silently ignore UDP packets. - - Essentially, DROP and DENY are now the same thing. If you use DROP - anywhere, you should change to DENY before it goes away in the future. - - - upsmon now requires a username on the MONITOR lines. If you have an - older installation from the 1.x era or earlier, you probably need - to convert them. - - Old way: MONITOR ups@mybox 1 mypass master - New way: MONITOR ups@mybox 1 username mypass master - - You will also have to add a [username] section to the upsd.users - with a matching password, an allowfrom value, and "upsmon master" or - "upsmon slave". - - If upsmon says the login failed due to "username required" or fails to - start, saying "Unable to use old-style MONITOR line without a username", - then you're still using the old method. - ---------------------------------------------------------------------------- - -Changes from 1.2.1 to 1.2.2: - - - upssched.conf now requires the LOCKFN directive to prevent races when - handling two events that happen at nearly the same time. - - If you use upssched, you must add this to your upssched.conf or it - will fail to run. - ---------------------------------------------------------------------------- - -Changes from 1.0.0 to 1.2.0: - - - upsct is gone. upsc now uses the new upsclient library which is - TCP only, so there is no need for a separate client for TCP polling. - - - upsct2 has been renamed to upsrw since the name was already - ambiguous and it looked even more out of place with upsct gone. - - - The multimon.cgi behavior has been absorbed into upsstats.cgi. - - - Calling upsstats.cgi with no arguments will make it render - the template file called upsstats.html in your confpath. The default - version of this file looks a lot like multimon, but is flexible. - You will have to copy this file from upsstats.html.sample to - upsstats.html the first time you install this version. - - - Calling upsstats.cgi with host= set will still render a single status - page as before, but the markup for that page now comes from - upsstats-single.html. This is also a template and may be - reconfigured to suit your needs. It must also be copied over from - the .sample filename the first time. - - - upsmon can now send a username when authenticating to upsd. It is - recommended that you change to this mode, as the old host-based - authentication is clunky and eventually will be removed. - - Old way: - - MONITOR myups@bigserver 1 blah master - - New way: - - MONITOR myups@bigserver 1 monmaster blah master - - Note that the username has been inserted between the power value and - the password. When switching to this method, be sure to add a user - to upsd.users, i.e.: - - [monmaster] - password = blah - allowfrom = localhost - upsmon master - - You still need to give the upsmon host(s) at least "monitor" access, - so don't delete those old ACCESS lines in your upsd.conf. Just - lower the access level and remove the password. - - Old way: - - ACCESS grant master localhost blah - - New way: - - ACCESS grant monitor localhost - - - The old upsfetch "library" (used loosely) has been replaced by - upsclient. This will be installed if you do "make install-misc", - but it goes into $(prefix)/lib and $(prefix)/include by default. - - The upsclient interface is not compatible with upsfetch. Old - accessory programs which linked to upsfetch will have to be updated - to work with upsclient instead. - - Existing binaries that were linked against upsfetch will still work - since the network protocol used by upsd has not changed. - - - SET and INSTCMD no longer work via host-level authentication. This - is only a meaningful change if you are using very old versions of - upscmd/upsct2/upsset.cgi, or if you're talking to upsd directly. - - You must now set a USERNAME first, and authentication will occur - through upsd.users as a result. - - This means that the "manager" level in upsd.conf ACCESS directives - is no longer meaningful, and you should remove them. - - - INSTALLROOT is no longer available for redirecting 'make install' - - use DESTDIR instead. - - - Makefile targets have been reworked to allow fine-grained control - over what happens at install-time. 'make install' and 'make - install-cgi' still do everything, but you can call subsets instead - if necessary. See ChangeLog. +For information before this point, start with version 2.4.1 and work back. diff --git a/aclocal.m4 b/aclocal.m4 index b52cc76..9da2cb1 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11 -*- Autoconf -*- +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, -[m4_warning([this file was generated for autoconf 2.64. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. 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'.])]) @@ -144,7 +144,7 @@ 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], [], +m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -160,7 +160,7 @@ m4_define([_AM_AUTOCONF_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])dnl +[AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -1134,6 +1134,7 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/ax_compare_version.m4]) m4_include([m4/ax_create_stdint_h.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) @@ -1141,7 +1142,7 @@ m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/nut_arg_with.m4]) -m4_include([m4/nut_check_ipv6.m4]) +m4_include([m4/nut_check_asciidoc.m4]) m4_include([m4/nut_check_libgd.m4]) m4_include([m4/nut_check_libhal.m4]) m4_include([m4/nut_check_libneon.m4]) @@ -1151,5 +1152,6 @@ m4_include([m4/nut_check_libssl.m4]) m4_include([m4/nut_check_libusb.m4]) m4_include([m4/nut_check_libwrap.m4]) m4_include([m4/nut_check_os.m4]) +m4_include([m4/nut_config_libhal.m4]) m4_include([m4/nut_report_feature.m4]) m4_include([m4/nut_type_socklen_t.m4]) diff --git a/clients/Makefile.am b/clients/Makefile.am index 59e92c7..24c11b6 100644 --- a/clients/Makefile.am +++ b/clients/Makefile.am @@ -1,9 +1,9 @@ # Network UPS Tools: clients # by default, link programs in this directory with libcommon.a -LDADD = ../common/libcommon.a libupsclient.la $(NETLIBS) +LDADD = ../common/libcommon.la libupsclient.la $(NETLIBS) if WITH_SSL - LDADD += $(LIBSSL_LDFLAGS) + LDADD += $(LIBSSL_LIBS) endif # Avoid per-target CFLAGS, because this will prevent re-use of object @@ -35,7 +35,7 @@ upslog_SOURCES = upslog.c upsclient.h upslog.h upsmon_SOURCES = upsmon.c upsmon.h upsclient.h upssched_SOURCES = upssched.c upssched.h -upssched_LDADD = ../common/libcommon.a ../common/libparseconf.la $(NETLIBS) +upssched_LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS) upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS) @@ -48,6 +48,6 @@ upsstats_cgi_SOURCES = upsstats.c upsclient.h status.h upsstats.h \ libupsclient_la_SOURCES = upsclient.c upsclient.h libupsclient_la_LIBADD = ../common/libparseconf.la if WITH_SSL - libupsclient_la_LIBADD += $(LIBSSL_LDFLAGS) + libupsclient_la_LIBADD += $(LIBSSL_LIBS) endif libupsclient_la_LDFLAGS = -version-info 1:0:0 diff --git a/clients/Makefile.in b/clients/Makefile.in index 27cd0c6..d2ca2fc 100644 --- a/clients/Makefile.in +++ b/clients/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -40,7 +40,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@WITH_SSL_TRUE@am__append_1 = $(LIBSSL_LDFLAGS) +@WITH_SSL_TRUE@am__append_1 = $(LIBSSL_LIBS) @WITH_SSL_TRUE@am__append_2 = $(LIBSSL_CFLAGS) @WITH_CGI_TRUE@am__append_3 = $(LIBGD_CFLAGS) bin_PROGRAMS = upsc$(EXEEXT) upslog$(EXEEXT) upsrw$(EXEEXT) \ @@ -48,17 +48,18 @@ bin_PROGRAMS = upsc$(EXEEXT) upslog$(EXEEXT) upsrw$(EXEEXT) \ sbin_PROGRAMS = upsmon$(EXEEXT) upssched$(EXEEXT) @WITH_CGI_TRUE@cgiexec_PROGRAMS = upsstats.cgi$(EXEEXT) \ @WITH_CGI_TRUE@ upsimage.cgi$(EXEEXT) upsset.cgi$(EXEEXT) -@WITH_SSL_TRUE@am__append_4 = $(LIBSSL_LDFLAGS) +@WITH_SSL_TRUE@am__append_4 = $(LIBSSL_LIBS) subdir = clients DIST_COMMON = $(am__include_HEADERS_DIST) $(dist_bin_SCRIPTS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(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_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -68,6 +69,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.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_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -115,47 +117,47 @@ PROGRAMS = $(bin_PROGRAMS) $(cgiexec_PROGRAMS) $(sbin_PROGRAMS) am_upsc_OBJECTS = upsc.$(OBJEXT) upsc_OBJECTS = $(am_upsc_OBJECTS) upsc_LDADD = $(LDADD) -upsc_DEPENDENCIES = ../common/libcommon.a libupsclient.la \ +upsc_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upscmd_OBJECTS = upscmd.$(OBJEXT) upscmd_OBJECTS = $(am_upscmd_OBJECTS) upscmd_LDADD = $(LDADD) -upscmd_DEPENDENCIES = ../common/libcommon.a libupsclient.la \ +upscmd_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upsimage_cgi_OBJECTS = upsimage.$(OBJEXT) cgilib.$(OBJEXT) upsimage_cgi_OBJECTS = $(am_upsimage_cgi_OBJECTS) -am__DEPENDENCIES_3 = ../common/libcommon.a libupsclient.la \ +am__DEPENDENCIES_3 = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) upsimage_cgi_DEPENDENCIES = $(am__DEPENDENCIES_3) \ $(am__DEPENDENCIES_1) am_upslog_OBJECTS = upslog.$(OBJEXT) upslog_OBJECTS = $(am_upslog_OBJECTS) upslog_LDADD = $(LDADD) -upslog_DEPENDENCIES = ../common/libcommon.a libupsclient.la \ +upslog_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upsmon_OBJECTS = upsmon.$(OBJEXT) upsmon_OBJECTS = $(am_upsmon_OBJECTS) upsmon_LDADD = $(LDADD) -upsmon_DEPENDENCIES = ../common/libcommon.a libupsclient.la \ +upsmon_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upsrw_OBJECTS = upsrw.$(OBJEXT) upsrw_OBJECTS = $(am_upsrw_OBJECTS) upsrw_LDADD = $(LDADD) -upsrw_DEPENDENCIES = ../common/libcommon.a libupsclient.la \ +upsrw_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upssched_OBJECTS = upssched.$(OBJEXT) upssched_OBJECTS = $(am_upssched_OBJECTS) -upssched_DEPENDENCIES = ../common/libcommon.a \ +upssched_DEPENDENCIES = ../common/libcommon.la \ ../common/libparseconf.la $(am__DEPENDENCIES_1) am_upsset_cgi_OBJECTS = upsset.$(OBJEXT) cgilib.$(OBJEXT) upsset_cgi_OBJECTS = $(am_upsset_cgi_OBJECTS) upsset_cgi_LDADD = $(LDADD) -upsset_cgi_DEPENDENCIES = ../common/libcommon.a libupsclient.la \ +upsset_cgi_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upsstats_cgi_OBJECTS = upsstats.$(OBJEXT) cgilib.$(OBJEXT) upsstats_cgi_OBJECTS = $(am_upsstats_cgi_OBJECTS) upsstats_cgi_LDADD = $(LDADD) -upsstats_cgi_DEPENDENCIES = ../common/libcommon.a libupsclient.la \ +upsstats_cgi_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) SCRIPTS = $(dist_bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include @@ -184,9 +186,11 @@ HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -199,8 +203,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -217,7 +223,6 @@ 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@ @@ -228,22 +233,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -341,7 +346,7 @@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ # by default, link programs in this directory with libcommon.a -LDADD = ../common/libcommon.a libupsclient.la $(NETLIBS) \ +LDADD = ../common/libcommon.la libupsclient.la $(NETLIBS) \ $(am__append_1) # Avoid per-target CFLAGS, because this will prevent re-use of object @@ -357,7 +362,7 @@ upsrw_SOURCES = upsrw.c upsclient.h upslog_SOURCES = upslog.c upsclient.h upslog.h upsmon_SOURCES = upsmon.c upsmon.h upsclient.h upssched_SOURCES = upssched.c upssched.h -upssched_LDADD = ../common/libcommon.a ../common/libparseconf.la $(NETLIBS) +upssched_LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS) upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS) upsset_cgi_SOURCES = upsset.c upsclient.h cgilib.c cgilib.h diff --git a/clients/upsclient.c b/clients/upsclient.c index ae29b2c..50177d1 100644 --- a/clients/upsclient.c +++ b/clients/upsclient.c @@ -298,6 +298,11 @@ int upscli_sslcert(UPSCONN_t *ups, const char *dir, const char *file, int verify static int upscli_sslinit(UPSCONN_t *ups) { +#if OPENSSL_VERSION_NUMBER >= 0x10000000L + const SSL_METHOD *ssl_method; +#else + SSL_METHOD *ssl_method; +#endif char buf[UPSCLI_NETBUF_LEN]; /* see if upsd even talks SSL/TLS */ @@ -317,10 +322,16 @@ static int upscli_sslinit(UPSCONN_t *ups) /* upsd is happy, so let's crank up the client */ - SSL_library_init(); SSL_load_error_strings(); + SSL_library_init(); - ups->ssl_ctx = SSL_CTX_new(TLSv1_client_method()); + ssl_method = TLSv1_client_method(); + + if (!ssl_method) { + return 0; + } + + ups->ssl_ctx = SSL_CTX_new(ssl_method); if (!ups->ssl_ctx) { return 0; @@ -385,14 +396,9 @@ int upscli_sslcert(UPSCONN_t *ups, const char *file, const char *path, int verif int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags) { int sock_fd; -#ifndef HAVE_IPV6 - struct sockaddr_in local, server; - struct hostent *serv; -#else struct addrinfo hints, *res, *ai; char sport[NI_MAXSERV]; int v; -#endif if (!ups) { return -1; @@ -408,58 +414,6 @@ int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags) return -1; } -#ifndef HAVE_IPV6 - serv = gethostbyname(host); - - if (!serv) { - struct in_addr listenaddr; - - if (!inet_aton(host, &listenaddr)) { - ups->upserror = UPSCLI_ERR_NOSUCHHOST; - return -1; - } - - serv = gethostbyaddr(&listenaddr, sizeof(listenaddr), AF_INET); - - if (!serv) { - ups->upserror = UPSCLI_ERR_NOSUCHHOST; - return -1; - } - } - - if ((sock_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { - ups->upserror = UPSCLI_ERR_SOCKFAILURE; - ups->syserrno = errno; - close(sock_fd); - return -1; - } - - memset(&local, '\0', sizeof(local)); - local.sin_family = AF_INET; - local.sin_port = htons(INADDR_ANY); - - memset(&server, '\0', sizeof(server)); - server.sin_family = AF_INET; - server.sin_port = htons(port); - - memcpy(&server.sin_addr, serv->h_addr, serv->h_length); - - if (bind(sock_fd, (struct sockaddr *) &local, sizeof(local)) < 0) { - ups->upserror = UPSCLI_ERR_BINDFAILURE; - ups->syserrno = errno; - close(sock_fd); - return -1; - } - - if (connect(sock_fd, (struct sockaddr *) &server, sizeof(struct sockaddr_in)) < 0) { - ups->upserror = UPSCLI_ERR_CONNFAILURE; - ups->syserrno = errno; - close(sock_fd); - return -1; - } - - ups->fd = sock_fd; -#else snprintf(sport, sizeof(sport), "%hu", (unsigned short int)port); memset(&hints, 0, sizeof(hints)); @@ -543,7 +497,7 @@ int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags) if (ups->fd < 0) { return -1; } -#endif + pconf_init(&ups->pc_ctx, NULL); ups->host = strdup(host); diff --git a/clients/upsclient.h b/clients/upsclient.h index 1b05341..55ffd29 100644 --- a/clients/upsclient.h +++ b/clients/upsclient.h @@ -26,7 +26,9 @@ #endif #ifdef __cplusplus +/* *INDENT-OFF* */ extern "C" { +/* *INDENT-ON* */ #endif #define UPSCLI_ERRBUF_LEN 256 @@ -154,13 +156,12 @@ int upscli_ssl(UPSCONN_t *ups); #define UPSCLI_CONN_TRYSSL 0x0001 /* try SSL, OK if not supported */ #define UPSCLI_CONN_REQSSL 0x0002 /* try SSL, fail if not supported */ -#ifdef HAVE_IPV6 #define UPSCLI_CONN_INET 0x0004 /* IPv4 only */ #define UPSCLI_CONN_INET6 0x0008 /* IPv6 only */ -#endif #ifdef __cplusplus +/* *INDENT-OFF* */ } +/* *INDENT-ON* */ #endif - #endif /* UPSCLIENT_H_SEEN */ diff --git a/clients/upscmd.c b/clients/upscmd.c index cba125d..c3952a1 100644 --- a/clients/upscmd.c +++ b/clients/upscmd.c @@ -152,6 +152,13 @@ static void do_cmd(char **argv, const int argc) if (upscli_readline(ups, buf, sizeof(buf)) < 0) { fatalx(EXIT_FAILURE, "Instant command failed: %s", upscli_strerror(ups)); } + + /* FUTURE: status cookies will tie in here */ + if (strncmp(buf, "OK", 2) != 0) { + fatalx(EXIT_FAILURE, "Unexpected response from upsd: %s", buf); + } + + fprintf(stderr, "%s\n", buf); } static void clean_exit(void) diff --git a/clients/upsimage.c b/clients/upsimage.c index 9a64463..3d6a51d 100644 --- a/clients/upsimage.c +++ b/clients/upsimage.c @@ -620,7 +620,7 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); } -struct imgvar_t imgvar[] = { +imgvar_t imgvar[] = { { "input.voltage", "input.transfer.low", "input.voltage.nominal", "input.transfer.high", 0, "%.1f VAC", draw_utility }, diff --git a/clients/upsimagearg.h b/clients/upsimagearg.h index 4ecc85a..6bd5f08 100644 --- a/clients/upsimagearg.h +++ b/clients/upsimagearg.h @@ -44,7 +44,7 @@ struct { { NULL, 0, 0, 0 } }; -struct imgvar_t { +typedef struct { char *name; /* name of the UPS variable */ char *minimum; /* name of minimum value UPS variable or variable in imgarg table */ @@ -55,6 +55,6 @@ struct imgvar_t { /* pointer to drawing function */ void (*drawfunc)(double, int, int, int, int, const char*); -}; +} imgvar_t; -extern struct imgvar_t imgvar[]; +extern imgvar_t imgvar[]; diff --git a/clients/upslog.c b/clients/upslog.c index 49084b6..170a378 100644 --- a/clients/upslog.c +++ b/clients/upslog.c @@ -47,7 +47,7 @@ static sigset_t nut_upslog_sigmask; static char logbuffer[LARGEBUF], *logformat; - static struct flist_t *fhead = NULL; + static flist_t *fhead = NULL; #define DEFAULT_LOGFORMAT "%TIME @Y@m@d @H@M@S% %VAR battery.charge% " \ "%VAR input.voltage% %VAR ups.load% [%VAR ups.status%] " \ @@ -109,7 +109,7 @@ static void help(const char *prog) printf(" - Use -f \"\" so your shell doesn't break it up.\n"); printf(" -i - Time between updates, in seconds\n"); printf(" -l - Log file name, or - for stdout\n"); - printf(" -p - Base name for PID file (defaults to \"upslog\")\n"); + printf(" -p - Base name for PID file (defaults to \"%s\")\n", prog); printf(" -s - Monitor UPS - @[:]\n"); printf(" - Example: -s myups@server\n"); printf(" -u - Switch to if started as root\n"); @@ -238,7 +238,7 @@ static void print_literal(const char *arg) /* register another parsing function to be called later */ static void add_call(void (*fptr)(const char *arg), const char *arg) { - struct flist_t *tmp, *last; + flist_t *tmp, *last; tmp = last = fhead; @@ -247,7 +247,7 @@ static void add_call(void (*fptr)(const char *arg), const char *arg) tmp = tmp->next; } - tmp = xmalloc(sizeof(struct flist_t)); + tmp = xmalloc(sizeof(flist_t)); tmp->fptr = fptr; @@ -343,7 +343,7 @@ static void compile_format(void) /* go through the list of functions and call them in order */ static void run_flist(void) { - struct flist_t *tmp; + flist_t *tmp; tmp = fhead; @@ -369,18 +369,16 @@ static void run_flist(void) int main(int argc, char **argv) { int interval = 30, i; - char *prog = NULL; + const char *prog = xbasename(argv[0]); time_t now, nextpoll = 0; - const char *user = NULL; - struct passwd *new_uid = NULL; - const char *pidfilebase = "upslog"; + const char *user = NULL; + struct passwd *new_uid = NULL; + const char *pidfilebase = prog; logformat = DEFAULT_LOGFORMAT; user = RUN_AS_USER; - printf("Network UPS Tools upslog %s\n", UPS_VERSION); - - prog = argv[0]; + printf("Network UPS Tools %s %s\n", prog, UPS_VERSION); while ((i = getopt(argc, argv, "+hs:l:i:f:u:Vp:")) != -1) { switch(i) { @@ -476,7 +474,7 @@ int main(int argc, char **argv) /* now drop root if we have it */ new_uid = get_user_pwent(user); - openlog("upslog", LOG_PID, LOG_FACILITY); + open_syslog(prog); if (logfile != stdout) background(); diff --git a/clients/upslog.h b/clients/upslog.h index 506cd15..cf06e01 100644 --- a/clients/upslog.h +++ b/clients/upslog.h @@ -1,11 +1,11 @@ /* upslog.h - table of functions for handling various logging functions */ /* function list */ -struct flist_t { +typedef struct flist_s { void (*fptr)(const char *arg); const char *arg; - struct flist_t *next; -}; + struct flist_s *next; +} flist_t; static void do_host(const char *arg); static void do_upshost(const char *arg); diff --git a/clients/upsmon.c b/clients/upsmon.c index d5566a8..fe3f5fb 100644 --- a/clients/upsmon.c +++ b/clients/upsmon.c @@ -73,9 +73,7 @@ static int userfsd = 0, use_pipe = 1, pipefd[2]; static utype_t *firstups = NULL; -#ifdef HAVE_IPV6 static int opt_af = AF_UNSPEC; -#endif /* signal handling things */ static struct sigaction sa; @@ -89,12 +87,12 @@ static sigset_t nut_upsmon_sigmask; static void setflag(int *val, int flag) { - *val = (*val |= flag); + *val |= flag; } static void clearflag(int *val, int flag) { - *val = (*val ^= (*val & flag)); + *val ^= (*val & flag); } static int flag_isset(int num, int flag) @@ -1431,13 +1429,11 @@ static int try_connect(utype_t *ups) else flags |= UPSCLI_CONN_TRYSSL; -#ifdef HAVE_IPV6 if (opt_af == AF_INET) flags |= UPSCLI_CONN_INET; if (opt_af == AF_INET6) flags |= UPSCLI_CONN_INET6; -#endif ret = upscli_connect(&ups->conn, ups->hostname, ups->port, flags); @@ -1674,10 +1670,8 @@ static void help(const char *progname) printf(" -K checks POWERDOWNFLAG, sets exit code to 0 if set\n"); printf(" -p always run privileged (disable privileged parent)\n"); printf(" -u run child as user (ignored when using -p)\n"); -#ifdef HAVE_IPV6 printf(" -4 IPv4 only\n"); printf(" -6 IPv6 only\n"); -#endif exit(EXIT_SUCCESS); } @@ -1718,16 +1712,9 @@ static void runparent(int fd) } /* fire up the split parent/child scheme */ -static void start_pipe(const char *user) +static void start_pipe(void) { int ret; - struct passwd *new_uid = NULL; - - /* default user = the --with-user value from configure */ - if (user) - new_uid = get_user_pwent(user); - else - new_uid = get_user_pwent(RUN_AS_USER); ret = pipe(pipefd); @@ -1748,11 +1735,6 @@ static void start_pipe(const char *user) } close(pipefd[0]); - - /* write the pid file now, as we will soon lose root */ - writepid("upsmon"); - - become_user(new_uid); } static void delete_ups(utype_t *target) @@ -1897,11 +1879,17 @@ static void check_parent(void) int main(int argc, char *argv[]) { - int i, cmd, checking_flag = 0; + const char *prog = xbasename(argv[0]); + int i, cmd = 0, checking_flag = 0; - cmd = 0; + printf("Network UPS Tools %s %s\n", prog, UPS_VERSION); - printf("Network UPS Tools upsmon %s\n", UPS_VERSION); + /* if no configuration file is specified on the command line, use default */ + configfile = xmalloc(SMALLBUF); + snprintf(configfile, SMALLBUF, "%s/upsmon.conf", confpath()); + configfile = xrealloc(configfile, strlen(configfile) + 1); + + run_as_user = xstrdup(RUN_AS_USER); while ((i = getopt(argc, argv, "+Dhic:f:pu:VK46")) != -1) { switch (i) { @@ -1921,6 +1909,7 @@ int main(int argc, char *argv[]) nut_debug_level++; break; case 'f': + free(configfile); configfile = xstrdup(optarg); break; case 'h': @@ -1933,19 +1922,18 @@ int main(int argc, char *argv[]) use_pipe = 0; break; case 'u': + free(run_as_user); run_as_user = xstrdup(optarg); break; case 'V': /* just show the banner */ exit(EXIT_SUCCESS); -#ifdef HAVE_IPV6 case '4': opt_af = AF_INET; break; case '6': opt_af = AF_INET6; break; -#endif default: help(argv[0]); break; @@ -1953,21 +1941,14 @@ int main(int argc, char *argv[]) } if (cmd) { - sendsignal("upsmon", cmd); + sendsignal(prog, cmd); exit(EXIT_SUCCESS); } argc -= optind; argv += optind; - openlog("upsmon", LOG_PID, LOG_FACILITY); - - /* if no configuration file was specified on the command line, use default */ - if (!configfile) { - configfile = xmalloc(SMALLBUF); - snprintf(configfile, SMALLBUF, "%s/upsmon.conf", confpath()); - configfile = xrealloc(configfile, strlen(configfile) + 1); - } + open_syslog(prog); loadconfig(); @@ -1997,14 +1978,21 @@ int main(int argc, char *argv[]) upsdebugx(1, "debug level is '%d'", nut_debug_level); } - /* === root parent and unprivileged child split here === */ - /* only do the pipe stuff if the user hasn't disabled it */ - if (use_pipe) - start_pipe(run_as_user); - else { + if (use_pipe) { + struct passwd *new_uid = get_user_pwent(run_as_user); + + /* === root parent and unprivileged child split here === */ + start_pipe(); + + /* write the pid file now, as we will soon lose root */ + writepid(prog); + + become_user(new_uid); + } else { upslogx(LOG_INFO, "Warning: running as one big root process by request (upsmon -p)"); - writepid("upsmon"); + + writepid(prog); } /* prep our signal handlers */ @@ -2012,7 +2000,7 @@ int main(int argc, char *argv[]) /* reopen the log for the child process */ closelog(); - openlog("upsmon", LOG_PID, LOG_FACILITY); + open_syslog(prog); while (exit_flag == 0) { utype_t *ups; diff --git a/clients/upsrw.c b/clients/upsrw.c index cdc16b9..21649ff 100644 --- a/clients/upsrw.c +++ b/clients/upsrw.c @@ -26,6 +26,9 @@ #include "upsclient.h" +static char *upsname = NULL, *hostname = NULL; +static UPSCONN_t *ups = NULL; + struct list_t { char *name; struct list_t *next; @@ -33,7 +36,7 @@ struct list_t { static void usage(const char *prog) { - printf("Network UPS Tools upsrw %s\n\n", UPS_VERSION); + printf("Network UPS Tools %s %s\n\n", prog, UPS_VERSION); printf("usage: %s [-h]\n", prog); printf(" %s [-s ] [-u ] [-p ] \n\n", prog); printf("Demo program to set variables within UPS hardware.\n"); @@ -47,56 +50,45 @@ static void usage(const char *prog) printf(" UPS identifier - [@[:]]\n"); printf("\n"); printf("Call without -s to show all possible read/write variables.\n"); - - exit(EXIT_SUCCESS); } -static void clean_exit(UPSCONN_t *ups, char *upsname, char *hostname, int code) +static void clean_exit(void) { + if (ups) { + upscli_disconnect(ups); + } + free(upsname); free(hostname); - - upscli_disconnect(ups); - - exit(code); + free(ups); } -static int do_set(UPSCONN_t *ups, const char *upsname, const char *varname, - const char *newval) +static void do_set(const char *varname, const char *newval) { char buf[SMALLBUF], enc[SMALLBUF]; - snprintf(buf, sizeof(buf), "SET VAR %s %s \"%s\"\n", - upsname, varname, pconf_encode(newval, enc, sizeof(enc))); + snprintf(buf, sizeof(buf), "SET VAR %s %s \"%s\"\n", upsname, varname, pconf_encode(newval, enc, sizeof(enc))); if (upscli_sendline(ups, buf, strlen(buf)) < 0) { - fprintf(stderr, "Can't set variable: %s\n", - upscli_strerror(ups)); - - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Can't set variable: %s", upscli_strerror(ups)); } if (upscli_readline(ups, buf, sizeof(buf)) < 0) { - fprintf(stderr, "Set variable failed: %s\n", - upscli_strerror(ups)); - - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Set variable failed: %s", upscli_strerror(ups)); } /* FUTURE: status cookies will tie in here */ if (strncmp(buf, "OK", 2) != 0) { - printf("Unexpected response from upsd: %s\n", buf); - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Unexpected response from upsd: %s", buf); } - return EXIT_SUCCESS; + fprintf(stderr, "%s\n", buf); } -static int do_setvar(UPSCONN_t *ups, const char *varname, char *uin, - const char *pass, char *upsname, char *hostname) +static void do_setvar(const char *varname, char *uin, const char *pass) { char newval[SMALLBUF], temp[SMALLBUF], user[SMALLBUF], *ptr; - struct passwd *pw; + struct passwd *pw; if (uin) { snprintf(user, sizeof(user), "%s", uin); @@ -105,22 +97,24 @@ static int do_setvar(UPSCONN_t *ups, const char *varname, char *uin, pw = getpwuid(getuid()); - if (pw) + if (pw) { printf("Username (%s): ", pw->pw_name); - else + } else { printf("Username: "); + } if (fgets(user, sizeof(user), stdin) == NULL) { upsdebug_with_errno(LOG_INFO, "%s", __func__); } /* deal with that pesky newline */ - if (strlen(user) > 1) + if (strlen(user) > 1) { user[strlen(user) - 1] = '\0'; - else { - if (!pw) + } else { + if (!pw) { fatalx(EXIT_FAILURE, "No username available - even tried getpwuid"); - + } + snprintf(user, sizeof(user), "%s", pw->pw_name); } } @@ -130,10 +124,7 @@ static int do_setvar(UPSCONN_t *ups, const char *varname, char *uin, pass = GETPASS("Password: " ); if (!pass) { - fprintf(stderr, "getpass failed: %s\n", - strerror(errno)); - - return EXIT_FAILURE; + fatal_with_errno(EXIT_FAILURE, "getpass failed"); } } @@ -153,116 +144,93 @@ static int do_setvar(UPSCONN_t *ups, const char *varname, char *uin, snprintf(temp, sizeof(temp), "USERNAME %s\n", user); if (upscli_sendline(ups, temp, strlen(temp)) < 0) { - fprintf(stderr, "Can't set username: %s\n", - upscli_strerror(ups)); - - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Can't set username: %s", upscli_strerror(ups)); } if (upscli_readline(ups, temp, sizeof(temp)) < 0) { if (upscli_upserror(ups) == UPSCLI_ERR_UNKCOMMAND) { - fprintf(stderr, "Set username failed due to an " - "unknown command.\n"); - - fprintf(stderr, "You probably need to upgrade upsd.\n"); - - clean_exit(ups, upsname, hostname, EXIT_FAILURE); + fatalx(EXIT_FAILURE, "Set username failed due to an unknown command. You probably need to upgrade upsd."); } - fprintf(stderr, "Set username failed: %s\n", - upscli_strerror(ups)); - - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Set username failed: %s", upscli_strerror(ups)); } snprintf(temp, sizeof(temp), "PASSWORD %s\n", pass); if (upscli_sendline(ups, temp, strlen(temp)) < 0) { - fprintf(stderr, "Can't set password: %s\n", - upscli_strerror(ups)); - - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Can't set password: %s", upscli_strerror(ups)); } if (upscli_readline(ups, temp, sizeof(temp)) < 0) { - fprintf(stderr, "Set password failed: %s\n", - upscli_strerror(ups)); - - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Set password failed: %s", upscli_strerror(ups)); } /* no upsname means die */ if (!upsname) { - fprintf(stderr, "Error: a UPS name must be specified (upsname[@hostname[:port]])\n"); - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Error: a UPS name must be specified (upsname[@hostname[:port]])"); } /* old variable names are no longer supported */ if (!strchr(varname, '.')) { - fprintf(stderr, "Error: old variable names are not supported\n"); - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Error: old variable names are not supported"); } - return do_set(ups, upsname, varname, newval); -} + do_set(varname, newval); +} -static const char *get_data(const char *type, UPSCONN_t *ups, - const char *upsname, const char *varname) +static const char *get_data(const char *type, const char *varname) { int ret; unsigned int numq, numa; char **answer; - const char *query[4]; + const char *query[4]; query[0] = type; query[1] = upsname; query[2] = varname; + numq = 3; ret = upscli_get(ups, numq, query, &numa, &answer); - if ((ret < 0) || (numa < numq)) + if ((ret < 0) || (numa < numq)) { return NULL; + } /* */ return answer[3]; } -static void do_string(UPSCONN_t *ups, const char *upsname, const char *varname) +static void do_string(const char *varname) { - const char *val; + const char *val; - val = get_data("VAR", ups, upsname, varname); + val = get_data("VAR", varname); if (!val) { - fprintf(stderr, "do_string: can't get current value of %s\n", - varname); - return; + fatalx(EXIT_FAILURE, "do_string: can't get current value of %s", varname); } printf("Type: STRING\n"); printf("Value: %s\n", val); } -static void do_enum(UPSCONN_t *ups, const char *upsname, const char *varname) +static void do_enum(const char *varname) { int ret; unsigned int numq, numa; - char **answer, *val; - const char *query[4], *tmp; + char **answer, buf[SMALLBUF]; + const char *query[4], *val; /* get current value */ - tmp = get_data("VAR", ups, upsname, varname); + val = get_data("VAR", varname); - if (!tmp) { - fprintf(stderr, "do_enum: can't get current value of %s\n", - varname); - return; + if (!val) { + fatalx(EXIT_FAILURE, "do_enum: can't get current value of %s", varname); } - /* tmp is a pointer into answer - have to save it somewhere else */ - val = xstrdup(tmp); + snprintf(buf, sizeof(buf), "%s", val); query[0] = "ENUM"; query[1] = upsname; @@ -272,8 +240,7 @@ static void do_enum(UPSCONN_t *ups, const char *upsname, const char *varname) ret = upscli_list_start(ups, numq, query); if (ret < 0) { - fprintf(stderr, "Error: %s\n", upscli_strerror(ups)); - return; + fatalx(EXIT_FAILURE, "Error: %s", upscli_strerror(ups)); } ret = upscli_list_next(ups, numq, query, &numa, &answer); @@ -285,32 +252,27 @@ static void do_enum(UPSCONN_t *ups, const char *upsname, const char *varname) /* ENUM */ if (numa < 4) { - fprintf(stderr, "Error: insufficient data " - "(got %d args, need at least 4)\n", numa); - - free(val); - return; + fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa); } printf("Option: \"%s\"", answer[3]); - if (!strcmp(answer[3], val)) + if (!strcmp(answer[3], buf)) { printf(" SELECTED"); + } printf("\n"); ret = upscli_list_next(ups, numq, query, &numa, &answer); } - - free(val); } -static void do_type(UPSCONN_t *ups, const char *upsname, const char *varname) +static void do_type(const char *varname) { int ret; unsigned int i, numq, numa; char **answer; - const char *query[4]; + const char *query[4]; query[0] = "TYPE"; query[1] = upsname; @@ -328,54 +290,54 @@ static void do_type(UPSCONN_t *ups, const char *upsname, const char *varname) for (i = 3; i < numa; i++) { if (!strcasecmp(answer[i], "ENUM")) { - do_enum(ups, upsname, varname); + do_enum(varname); return; } if (!strncasecmp(answer[i], "STRING:", 7)) { - do_string(ups, upsname, varname); + do_string(varname); return; } /* ignore this one */ - if (!strcasecmp(answer[i], "RW")) + if (!strcasecmp(answer[i], "RW")) { continue; + } printf("Type: %s (unrecognized)\n", answer[i]); } - } -static void print_rw(UPSCONN_t *ups, const char *upsname, const char *varname) +static void print_rw(const char *varname) { - const char *tmp; + const char *tmp; printf("[%s]\n", varname); - tmp = get_data("DESC", ups, upsname, varname); + tmp = get_data("DESC", varname); - if (tmp) + if (tmp) { printf("%s\n", tmp); - else + } else { printf("Description unavailable\n"); + } - do_type(ups, upsname, varname); + do_type(varname); printf("\n"); -} +} -static int print_rwlist(UPSCONN_t *ups, const char *upsname) +static void print_rwlist(void) { int ret; unsigned int numq, numa; - const char *query[2]; + const char *query[2]; char **answer; struct list_t *lhead, *llast, *ltmp, *lnext; /* the upsname is now required */ if (!upsname) { - fprintf(stderr, "Error: a UPS name must be specified (upsname[@hostname[:port]])\n"); - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Error: a UPS name must be specified (upsname[@hostname[:port]])"); } llast = lhead = NULL; @@ -390,12 +352,10 @@ static int print_rwlist(UPSCONN_t *ups, const char *upsname) /* old upsd --> fall back on old LISTRW technique */ if (upscli_upserror(ups) == UPSCLI_ERR_UNKCOMMAND) { - fprintf(stderr, "Error: upsd is too old to support this query\n"); - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Error: upsd is too old to support this query"); } - fprintf(stderr, "Error: %s\n", upscli_strerror(ups)); - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Error: %s", upscli_strerror(ups)); } ret = upscli_list_next(ups, numq, query, &numa, &answer); @@ -404,9 +364,7 @@ static int print_rwlist(UPSCONN_t *ups, const char *upsname) /* RW */ if (numa < 4) { - fprintf(stderr, "Error: insufficient data " - "(got %d args, need at least 4)\n", numa); - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa); } /* sock this entry away for later */ @@ -415,10 +373,11 @@ static int print_rwlist(UPSCONN_t *ups, const char *upsname) ltmp->name = xstrdup(answer[2]); ltmp->next = NULL; - if (llast) + if (llast) { llast->next = ltmp; - else + } else { lhead = ltmp; + } llast = ltmp; @@ -432,28 +391,23 @@ static int print_rwlist(UPSCONN_t *ups, const char *upsname) while (ltmp) { lnext = ltmp->next; - print_rw(ups, upsname, ltmp->name); + print_rw(ltmp->name); free(ltmp->name); free(ltmp); ltmp = lnext; } - - return EXIT_SUCCESS; } int main(int argc, char **argv) { - int i, port, ret; - char *upsname, *hostname, *setvar, *prog; - char *password = NULL, *username = NULL; - UPSCONN_t ups; - - setvar = username = NULL; - prog = argv[0]; + int i, port; + const char *prog = xbasename(argv[0]); + char *password = NULL, *username = NULL, *setvar = NULL; while ((i = getopt(argc, argv, "+s:p:u:V")) != -1) { - switch (i) { + switch (i) + { case 's': setvar = optarg; break; @@ -464,45 +418,42 @@ int main(int argc, char **argv) username = optarg; break; case 'V': - printf("Network UPS Tools upsrw %s\n", UPS_VERSION); + printf("Network UPS Tools %s %s\n", prog, UPS_VERSION); exit(EXIT_SUCCESS); default: usage(prog); - break; + exit(EXIT_SUCCESS); } } argc -= optind; argv += optind; - if (argc < 1) + if (argc < 1) { usage(prog); + exit(EXIT_SUCCESS); + } - upsname = hostname = NULL; + /* be a good little client that cleans up after itself */ + atexit(clean_exit); if (upscli_splitname(argv[0], &upsname, &hostname, &port) != 0) { - fprintf(stderr, "Error: invalid UPS definition. Required format: upsname[@hostname[:port]]\n"); - clean_exit(&ups, upsname, hostname, EXIT_FAILURE); + fatalx(EXIT_FAILURE, "Error: invalid UPS definition. Required format: upsname[@hostname[:port]]"); } - if (upscli_connect(&ups, hostname, port, 0) < 0) { - fprintf(stderr, "Can't connect: %s\n", upscli_strerror(&ups)); - clean_exit(&ups, upsname, hostname, EXIT_FAILURE); + ups = xcalloc(1, sizeof(*ups)); + + if (upscli_connect(ups, hostname, port, 0) < 0) { + fatalx(EXIT_FAILURE, "Error: %s", upscli_strerror(ups)); } - /* setting a variable? */ if (setvar) { - ret = do_setvar(&ups, setvar, username, password, upsname, - hostname); - - clean_exit(&ups, upsname, hostname, ret); + /* setting a variable */ + do_setvar(setvar, username, password); + } else { + /* if not, get the list of supported read/write variables */ + print_rwlist(); } - /* if not, get the list of supported read/write variables */ - ret = print_rwlist(&ups, upsname); - - clean_exit(&ups, upsname, hostname, ret); - - /* NOTREACHED */ - exit(EXIT_FAILURE); + exit(EXIT_SUCCESS); } diff --git a/clients/upssched.c b/clients/upssched.c index e00ae17..e707248 100644 --- a/clients/upssched.c +++ b/clients/upssched.c @@ -50,14 +50,14 @@ #include "upssched.h" #include "timehead.h" -typedef struct { +typedef struct ttype_s { char *name; time_t etime; - void *next; -} ttype_t; + struct ttype_s *next; +} ttype_t; ttype_t *thead = NULL; - static struct conn_t *connhead = NULL; + static conn_t *connhead = NULL; char *cmdscript = NULL, *pipefn = NULL, *lockfn = NULL; int verbose = 0; /* use for debugging */ @@ -300,9 +300,9 @@ static int open_sock(void) return fd; } -static void conn_del(struct conn_t *target) +static void conn_del(conn_t *target) { - struct conn_t *tmp, *last = NULL; + conn_t *tmp, *last = NULL; tmp = connhead; @@ -327,7 +327,7 @@ static void conn_del(struct conn_t *target) upslogx(LOG_ERR, "Tried to delete a bogus state connection"); } -static int send_to_one(struct conn_t *conn, const char *fmt, ...) +static int send_to_one(conn_t *conn, const char *fmt, ...) { int ret; va_list ap; @@ -354,7 +354,7 @@ static int send_to_one(struct conn_t *conn, const char *fmt, ...) static void conn_add(int sockfd) { int acc, ret; - struct conn_t *tmp, *last; + conn_t *tmp, *last; struct sockaddr_un saddr; socklen_t salen; @@ -391,7 +391,7 @@ static void conn_add(int sockfd) tmp = tmp->next; } - tmp = xmalloc(sizeof(struct conn_t)); + tmp = xmalloc(sizeof(conn_t)); tmp->fd = acc; tmp->next = NULL; @@ -405,7 +405,7 @@ static void conn_add(int sockfd) pconf_init(&tmp->ctx, NULL); } -static int sock_arg(struct conn_t *conn) +static int sock_arg(conn_t *conn) { if (conn->ctx.numargs < 1) return 0; @@ -446,7 +446,7 @@ static void log_unknown(int numarg, char **arg) upslogx(LOG_INFO, "arg %d: %s", i, arg[i]); } -static int sock_read(struct conn_t *conn) +static int sock_read(conn_t *conn) { int i, ret; char ch; @@ -494,7 +494,7 @@ static void start_daemon(int lockfd) int maxfd, pid, pipefd, ret; struct timeval tv; fd_set rfds; - struct conn_t *tmp, *tmpnext; + conn_t *tmp, *tmpnext; socklen_t fromlen; fromlen = sizeof(struct sockaddr); @@ -899,10 +899,12 @@ static void checkconf(void) int main(int argc, char **argv) { + const char *prog = xbasename(argv[0]); + verbose = 1; /* TODO: remove when done testing */ /* normally we don't have stderr, so get this going to syslog early */ - openlog("upssched", LOG_PID, LOG_DAEMON); + open_syslog(prog); syslogbit_set(); upsname = getenv("UPSNAME"); diff --git a/clients/upssched.h b/clients/upssched.h index 94be9e3..c9aca9f 100644 --- a/clients/upssched.h +++ b/clients/upssched.h @@ -7,8 +7,8 @@ #define SERIALIZE_WAIT 3 /* track client connections */ -struct conn_t { +typedef struct conn_s { int fd; PCONF_CTX_t ctx; - void *next; -}; + struct conn_s *next; +} conn_t; diff --git a/common/Makefile.am b/common/Makefile.am index 026a239..84caa0f 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -2,14 +2,15 @@ AM_CFLAGS = -I$(top_srcdir)/include -noinst_LIBRARIES = libcommon.a -libcommon_a_SOURCES = common.c state.c upsconf.c ../include/nut_version.h -libcommon_a_LIBADD = libparseconf.la - ../include/nut_version.h: FORCE (cd ../include/ && $(MAKE) $(AM_MAKEFLAGS) nut_version.h) FORCE: -noinst_LTLIBRARIES = libparseconf.la +noinst_LTLIBRARIES = libparseconf.la libcommon.la libparseconf_la_SOURCES = parseconf.c + +libcommon_la_SOURCES = common.c state.c upsconf.c ../include/nut_version.h +# ensure inclusion of local implementation of missing systems functions +# using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS +libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@ diff --git a/common/Makefile.in b/common/Makefile.in index 9707bd6..8006e9e 100644 --- a/common/Makefile.in +++ b/common/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -17,7 +17,6 @@ # Network UPS Tools: common - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -39,14 +38,16 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = common -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in atexit.c \ + setenv.c snprintf.c strerror.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(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_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -56,6 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.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_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -65,14 +67,10 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libcommon_a_AR = $(AR) $(ARFLAGS) -libcommon_a_DEPENDENCIES = libparseconf.la -am_libcommon_a_OBJECTS = common.$(OBJEXT) state.$(OBJEXT) \ - upsconf.$(OBJEXT) -libcommon_a_OBJECTS = $(am_libcommon_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) +libcommon_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@ +am_libcommon_la_OBJECTS = common.lo state.lo upsconf.lo +libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) libparseconf_la_LIBADD = am_libparseconf_la_OBJECTS = parseconf.lo libparseconf_la_OBJECTS = $(am_libparseconf_la_OBJECTS) @@ -89,14 +87,16 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libcommon_a_SOURCES) $(libparseconf_la_SOURCES) -DIST_SOURCES = $(libcommon_a_SOURCES) $(libparseconf_la_SOURCES) +SOURCES = $(libcommon_la_SOURCES) $(libparseconf_la_SOURCES) +DIST_SOURCES = $(libcommon_la_SOURCES) $(libparseconf_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -109,8 +109,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -127,7 +129,6 @@ 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@ @@ -138,22 +139,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -250,11 +251,12 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ AM_CFLAGS = -I$(top_srcdir)/include -noinst_LIBRARIES = libcommon.a -libcommon_a_SOURCES = common.c state.c upsconf.c ../include/nut_version.h -libcommon_a_LIBADD = libparseconf.la -noinst_LTLIBRARIES = libparseconf.la +noinst_LTLIBRARIES = libparseconf.la libcommon.la libparseconf_la_SOURCES = parseconf.c +libcommon_la_SOURCES = common.c state.c upsconf.c ../include/nut_version.h +# ensure inclusion of local implementation of missing systems functions +# using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS +libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@ all: all-am .SUFFIXES: @@ -290,13 +292,6 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libcommon.a: $(libcommon_a_OBJECTS) $(libcommon_a_DEPENDENCIES) - -rm -f libcommon.a - $(libcommon_a_AR) libcommon.a $(libcommon_a_OBJECTS) $(libcommon_a_LIBADD) - $(RANLIB) libcommon.a - clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ @@ -305,6 +300,8 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done +libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) + $(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) libparseconf.la: $(libparseconf_la_OBJECTS) $(libparseconf_la_DEPENDENCIES) $(LINK) $(libparseconf_la_OBJECTS) $(libparseconf_la_LIBADD) $(LIBS) @@ -314,10 +311,14 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/atexit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/setenv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseconf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsconf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsconf.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -430,7 +431,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) +all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am @@ -459,11 +460,11 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - clean-noinstLTLIBRARIES mostlyclean-am +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -509,7 +510,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -531,18 +532,17 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ - ctags distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags 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-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags 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-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am ../include/nut_version.h: FORCE diff --git a/common/atexit.c b/common/atexit.c new file mode 100644 index 0000000..9279c66 --- /dev/null +++ b/common/atexit.c @@ -0,0 +1,22 @@ +/* atexit() Mark Powell */ +/* Implemented in terms of on_exit() for old BSD-style systems, like SunOS4 */ + +#include "config.h" + +#ifndef HAVE_ATEXIT + +#include + +int atexit(fn) + void (*fn)(); +{ +#ifdef HAVE_ON_EXIT + return on_exit(fn, 0); +#else + /* Choose some errno thats likely to exist on lots of systems */ + errno = EPERM; + return (-1); +#endif /* HAVE_ON_EXIT */ +} + +#endif /* HAVE_ATEXIT */ diff --git a/common/common.c b/common/common.c index a4bcaed..f443cb7 100644 --- a/common/common.c +++ b/common/common.c @@ -33,16 +33,17 @@ const char *UPS_VERSION = NUT_VERSION_MACRO; int nut_debug_level = 0; + int nut_log_level = 0; static int upslog_flags = UPSLOG_STDERR; static void xbit_set(int *val, int flag) { - *val = (*val |= flag); + *val |= flag; } static void xbit_clear(int *val, int flag) { - *val = (*val ^= (*val & flag)); + *val ^= (*val & flag); } static int xbit_test(int val, int flag) @@ -70,6 +71,44 @@ void open_syslog(const char *progname) #endif openlog(progname, opt, LOG_FACILITY); + + switch (nut_log_level) + { +#if HAVE_SETLOGMASK && HAVE_DECL_LOG_UPTO + case 7: + setlogmask(LOG_UPTO(LOG_EMERG)); /* system is unusable */ + break; + case 6: + setlogmask(LOG_UPTO(LOG_ALERT)); /* action must be taken immediately */ + break; + case 5: + setlogmask(LOG_UPTO(LOG_CRIT)); /* critical conditions */ + break; + case 4: + setlogmask(LOG_UPTO(LOG_ERR)); /* error conditions */ + break; + case 3: + setlogmask(LOG_UPTO(LOG_WARNING)); /* warning conditions */ + break; + case 2: + setlogmask(LOG_UPTO(LOG_NOTICE)); /* normal but significant condition */ + break; + case 1: + setlogmask(LOG_UPTO(LOG_INFO)); /* informational */ + break; + case 0: + setlogmask(LOG_UPTO(LOG_DEBUG)); /* debug-level messages */ + break; + default: + fatalx(EXIT_FAILURE, "Invalid log level threshold"); +#else + case 0: + break; + default: + upslogx(LOG_INFO, "Changing log level threshold not possible"); + break; +#endif + } } /* close ttys and become a daemon */ diff --git a/common/setenv.c b/common/setenv.c new file mode 100644 index 0000000..00f7a6b --- /dev/null +++ b/common/setenv.c @@ -0,0 +1,26 @@ +/* setenv.c Ben Collver */ +#ifndef HAVE_SETENV +#include +#include +#include "common.h" + +int nut_setenv(const char *name, const char *value, int overwrite) +{ + char *val; + char *buffer; + int rv; + + if (overwrite == 0) { + val = getenv(name); + if (val != NULL) { + return 0; + } + } + buffer = xmalloc(strlen(value) + strlen(name) + 2); + strcpy(buffer, name); + strcat(buffer, "="); + strcat(buffer, value); + rv = putenv(buffer); /* man putenv, do not free(buffer) */ + return (rv); +} +#endif diff --git a/common/snprintf.c b/common/snprintf.c new file mode 100644 index 0000000..a180269 --- /dev/null +++ b/common/snprintf.c @@ -0,0 +1,914 @@ +/* + * Copyright Patrick Powell 1995 + * This code is based on code written by Patrick Powell (papowell@astart.com) + * It may be used for any purpose as long as this notice remains intact + * on all source code distributions + */ + +/************************************************************** + * Original: + * Patrick Powell Tue Apr 11 09:48:21 PDT 1995 + * A bombproof version of doprnt (dopr) included. + * Sigh. This sort of thing is always nasty do deal with. Note that + * the version here does not include floating point... + * + * snprintf() is used instead of sprintf() as it does limit checks + * for string length. This covers a nasty loophole. + * + * The other functions are there to prevent NULL pointers from + * causing nast effects. + * + * More Recently: + * Brandon Long 9/15/96 for mutt 0.43 + * This was ugly. It is still ugly. I opted out of floating point + * numbers, but the formatter understands just about everything + * from the normal C string format, at least as far as I can tell from + * the Solaris 2.5 printf(3S) man page. + * + * Brandon Long 10/22/97 for mutt 0.87.1 + * Ok, added some minimal floating point support, which means this + * probably requires libm on most operating systems. Don't yet + * support the exponent (e,E) and sigfig (g,G). Also, fmtint() + * was pretty badly broken, it just wasn't being exercised in ways + * which showed it, so that's been fixed. Also, formated the code + * to mutt conventions, and removed dead code left over from the + * original. Also, there is now a builtin-test, just compile with: + * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm + * and run snprintf for results. + * + * Thomas Roessler 01/27/98 for mutt 0.89i + * The PGP code was using unsigned hexadecimal formats. + * Unfortunately, unsigned formats simply didn't work. + * + * Michael Elkins 03/05/98 for mutt 0.90.8 + * The original code assumed that both snprintf() and vsnprintf() were + * missing. Some systems only have snprintf() but not vsnprintf(), so + * the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF. + * + * Andrew Tridgell (tridge@samba.org) Oct 1998 + * fixed handling of %.0f + * added test for HAVE_LONG_DOUBLE + * + **************************************************************/ + +#include "config.h" + +#include +# include +#include + +#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) + +/* Define this as a fall through, HAVE_STDARG_H is probably already set */ + +#ifndef HAVE_VARARGS_H +#define HAVE_VARARGS_H +#endif + +/* varargs declarations: */ + +#if defined(HAVE_STDARG_H) +# include +# define HAVE_STDARGS /* let's hope that works everywhere (mj) */ +# define VA_LOCAL_DECL va_list ap +# define VA_START(f) va_start(ap, f) +# define VA_SHIFT(v,t) ; /* no-op for ANSI */ +# define VA_END va_end(ap) +#else +# if defined(HAVE_VARARGS_H) +# include +# undef HAVE_STDARGS +# define VA_LOCAL_DECL va_list ap +# define VA_START(f) va_start(ap) /* f is ignored! */ +# define VA_SHIFT(v,t) v = va_arg(ap,t) +# define VA_END va_end(ap) +# else +/*XX ** NO VARARGS ** XX*/ +# endif +#endif + +#ifdef HAVE_LONG_DOUBLE +#define LDOUBLE long double +#else +#define LDOUBLE double +#endif + +#ifdef HAVE_LONG_LONG_INT +#define LLONG long long +#else +#define LLONG long +#endif + +/*int snprintf (char *str, size_t count, const char *fmt, ...);*/ +/*int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);*/ + +static void dopr (char *buffer, size_t maxlen, const char *format, + va_list args); +static void fmtstr (char *buffer, size_t *currlen, size_t maxlen, + char *value, int flags, int min, int max); +static void fmtint (char *buffer, size_t *currlen, size_t maxlen, + long value, int base, int min, int max, int flags); +static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, + LDOUBLE fvalue, int min, int max, int flags); +static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c ); + +/* + * dopr(): poor man's version of doprintf + */ + +/* format read states */ +#define DP_S_DEFAULT 0 +#define DP_S_FLAGS 1 +#define DP_S_MIN 2 +#define DP_S_DOT 3 +#define DP_S_MAX 4 +#define DP_S_MOD 5 +#define DP_S_CONV 6 +#define DP_S_DONE 7 + +/* format flags - Bits */ +#define DP_F_MINUS (1 << 0) +#define DP_F_PLUS (1 << 1) +#define DP_F_SPACE (1 << 2) +#define DP_F_NUM (1 << 3) +#define DP_F_ZERO (1 << 4) +#define DP_F_UP (1 << 5) +#define DP_F_UNSIGNED (1 << 6) + +/* Conversion Flags */ +#define DP_C_SHORT 1 +#define DP_C_LONG 2 +#define DP_C_LDOUBLE 3 +#define DP_C_LLONG 4 + +#define char_to_int(p) ((p)- '0') +#define MAX(p,q) (((p) >= (q)) ? (p) : (q)) + +static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) +{ + char ch; + LLONG value; + LDOUBLE fvalue; + char *strvalue; + int min; + int max; + int state; + int flags; + int cflags; + size_t currlen; + + state = DP_S_DEFAULT; + currlen = flags = cflags = min = 0; + max = -1; + ch = *format++; + + while (state != DP_S_DONE) + { + if ((ch == '\0') || (currlen >= maxlen)) + state = DP_S_DONE; + + switch(state) + { + case DP_S_DEFAULT: + if (ch == '%') + state = DP_S_FLAGS; + else + dopr_outch (buffer, &currlen, maxlen, ch); + ch = *format++; + break; + case DP_S_FLAGS: + switch (ch) + { + case '-': + flags |= DP_F_MINUS; + ch = *format++; + break; + case '+': + flags |= DP_F_PLUS; + ch = *format++; + break; + case ' ': + flags |= DP_F_SPACE; + ch = *format++; + break; + case '#': + flags |= DP_F_NUM; + ch = *format++; + break; + case '0': + flags |= DP_F_ZERO; + ch = *format++; + break; + default: + state = DP_S_MIN; + break; + } + break; + case DP_S_MIN: + if (isdigit((unsigned char)ch)) + { + min = 10*min + char_to_int (ch); + ch = *format++; + } + else if (ch == '*') + { + min = va_arg (args, int); + ch = *format++; + state = DP_S_DOT; + } + else + state = DP_S_DOT; + break; + case DP_S_DOT: + if (ch == '.') + { + state = DP_S_MAX; + ch = *format++; + } + else + state = DP_S_MOD; + break; + case DP_S_MAX: + if (isdigit((unsigned char)ch)) + { + if (max < 0) + max = 0; + max = 10*max + char_to_int (ch); + ch = *format++; + } + else if (ch == '*') + { + max = va_arg (args, int); + ch = *format++; + state = DP_S_MOD; + } + else + state = DP_S_MOD; + break; + case DP_S_MOD: + switch (ch) + { + case 'h': + cflags = DP_C_SHORT; + ch = *format++; + break; + case 'l': + cflags = DP_C_LONG; + ch = *format++; + if (ch == 'l') { /* It's a long long */ + cflags = DP_C_LLONG; + ch = *format++; + } + break; + case 'L': + cflags = DP_C_LDOUBLE; + ch = *format++; + break; + default: + break; + } + state = DP_S_CONV; + break; + case DP_S_CONV: + switch (ch) + { + case 'd': + case 'i': + if (cflags == DP_C_SHORT) + value = va_arg (args, short int); + else if (cflags == DP_C_LONG) + value = va_arg (args, long int); + else if (cflags == DP_C_LLONG) + value = va_arg (args, LLONG); + else + value = va_arg (args, int); + fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); + break; + case 'o': + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned short int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (long)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags); + break; + case 'u': + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned short int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (LLONG)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); + break; + case 'X': + flags |= DP_F_UP; + case 'x': + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned short int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (LLONG)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags); + break; + case 'f': + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + /* um, floating point? */ + fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); + break; + case 'E': + flags |= DP_F_UP; + case 'e': + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + break; + case 'G': + flags |= DP_F_UP; + case 'g': + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + break; + case 'c': + dopr_outch (buffer, &currlen, maxlen, va_arg (args, int)); + break; + case 's': + strvalue = va_arg (args, char *); + if (max < 0) + max = maxlen; /* ie, no max */ + fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max); + break; + case 'p': + strvalue = va_arg (args, void *); + fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags); + break; + case 'n': + if (cflags == DP_C_SHORT) + { + short int *num; + num = va_arg (args, short int *); + *num = currlen; + } + else if (cflags == DP_C_LONG) + { + long int *num; + num = va_arg (args, long int *); + *num = (long int)currlen; + } + else if (cflags == DP_C_LLONG) + { + LLONG *num; + num = va_arg (args, LLONG *); + *num = (LLONG)currlen; + } + else + { + int *num; + num = va_arg (args, int *); + *num = currlen; + } + break; + case '%': + dopr_outch (buffer, &currlen, maxlen, ch); + break; + case 'w': + /* not supported yet, treat as next char */ + ch = *format++; + break; + default: + /* Unknown, skip */ + break; + } + ch = *format++; + state = DP_S_DEFAULT; + flags = cflags = min = 0; + max = -1; + break; + case DP_S_DONE: + break; + default: + /* hmm? */ + break; /* some picky compilers need this */ + } + } + if (currlen < maxlen - 1) + buffer[currlen] = '\0'; + else + buffer[maxlen - 1] = '\0'; +} + +static void fmtstr (char *buffer, size_t *currlen, size_t maxlen, + char *value, int flags, int min, int max) +{ + int padlen, strln; /* amount to pad */ + int cnt = 0; + + if (value == 0) + { + value = ""; + } + + for (strln = 0; value[strln]; ++strln); /* strlen */ + padlen = min - strln; + if (padlen < 0) + padlen = 0; + if (flags & DP_F_MINUS) + padlen = -padlen; /* Left Justify */ + + while ((padlen > 0) && (cnt < max)) + { + dopr_outch (buffer, currlen, maxlen, ' '); + --padlen; + ++cnt; + } + while (*value && (cnt < max)) + { + dopr_outch (buffer, currlen, maxlen, *value++); + ++cnt; + } + while ((padlen < 0) && (cnt < max)) + { + dopr_outch (buffer, currlen, maxlen, ' '); + ++padlen; + ++cnt; + } +} + +/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */ + +static void fmtint (char *buffer, size_t *currlen, size_t maxlen, + long value, int base, int min, int max, int flags) +{ + int signvalue = 0; + unsigned long uvalue; + char convert[20]; + int place = 0; + int spadlen = 0; /* amount to space pad */ + int zpadlen = 0; /* amount to zero pad */ + int caps = 0; + + if (max < 0) + max = 0; + + uvalue = value; + + if(!(flags & DP_F_UNSIGNED)) + { + if( value < 0 ) { + signvalue = '-'; + uvalue = -value; + } + else + if (flags & DP_F_PLUS) /* Do a sign (+/i) */ + signvalue = '+'; + else + if (flags & DP_F_SPACE) + signvalue = ' '; + } + + if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ + + do { + convert[place++] = + (caps? "0123456789ABCDEF":"0123456789abcdef") + [uvalue % (unsigned)base ]; + uvalue = (uvalue / (unsigned)base ); + } while(uvalue && (place < 20)); + if (place == 20) place--; + convert[place] = 0; + + zpadlen = max - place; + spadlen = min - MAX (max, place) - (signvalue ? 1 : 0); + if (zpadlen < 0) zpadlen = 0; + if (spadlen < 0) spadlen = 0; + if (flags & DP_F_ZERO) + { + zpadlen = MAX(zpadlen, spadlen); + spadlen = 0; + } + if (flags & DP_F_MINUS) + spadlen = -spadlen; /* Left Justifty */ + +#ifdef DEBUG_SNPRINTF + printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", + zpadlen, spadlen, min, max, place); +#endif + + /* Spaces */ + while (spadlen > 0) + { + dopr_outch (buffer, currlen, maxlen, ' '); + --spadlen; + } + + /* Sign */ + if (signvalue) + dopr_outch (buffer, currlen, maxlen, signvalue); + + /* Zeros */ + if (zpadlen > 0) + { + while (zpadlen > 0) + { + dopr_outch (buffer, currlen, maxlen, '0'); + --zpadlen; + } + } + + /* Digits */ + while (place > 0) + dopr_outch (buffer, currlen, maxlen, convert[--place]); + + /* Left Justified spaces */ + while (spadlen < 0) { + dopr_outch (buffer, currlen, maxlen, ' '); + ++spadlen; + } +} + +static LDOUBLE abs_val (LDOUBLE value) +{ + LDOUBLE result = value; + + if (value < 0) + result = -value; + + return result; +} + +static LDOUBLE pow10 (int exp) +{ + LDOUBLE result = 1; + + while (exp) + { + result *= 10; + exp--; + } + + return result; +} + +static long round (LDOUBLE value) +{ + long intpart; + + intpart = (long)value; + value = value - intpart; + if (value >= 0.5) + intpart++; + + return intpart; +} + +static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, + LDOUBLE fvalue, int min, int max, int flags) +{ + int signvalue = 0; + LDOUBLE ufvalue; +#ifndef HAVE_FCVT + char iconvert[20]; + char fconvert[20]; +#else + char iconvert[311]; + char fconvert[311]; + char *result; + int dec_pt, sig; + int r_length; +# ifdef HAVE_FCVTL + extern char *fcvtl(long double value, int ndigit, int *decpt, int *sign); +# else + extern char *fcvt(double value, int ndigit, int *decpt, int *sign); +# endif +#endif + int iplace = 0; + int fplace = 0; + int padlen = 0; /* amount to pad */ + int zpadlen = 0; + int caps = 0; + long intpart; + long fracpart; + + /* + * AIX manpage says the default is 0, but Solaris says the default + * is 6, and sprintf on AIX defaults to 6 + */ + if (max < 0) + max = 6; + + ufvalue = abs_val (fvalue); + + if (fvalue < 0) + signvalue = '-'; + else + if (flags & DP_F_PLUS) /* Do a sign (+/i) */ + signvalue = '+'; + else + if (flags & DP_F_SPACE) + signvalue = ' '; + +#if 0 + if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ +#endif + +#ifndef HAVE_FCVT + intpart = (long)ufvalue; + + /* + * Sorry, we only support 9 digits past the decimal because of our + * conversion method + */ + if (max > 9) + max = 9; + + /* We "cheat" by converting the fractional part to integer by + * multiplying by a factor of 10 + */ + fracpart = round ((pow10 (max)) * (ufvalue - intpart)); + + if (fracpart >= pow10 (max)) + { + intpart++; + fracpart -= pow10 (max); + } + +#ifdef DEBUG_SNPRINTF + printf("fmtfp: %g %d.%d min=%d max=%d\n", + (double)fvalue, intpart, fracpart, min, max); +#endif + + /* Convert integer part */ + do { + iconvert[iplace++] = + (caps? "0123456789ABCDEF":"0123456789abcdef")[intpart % 10]; + intpart = (intpart / 10); + } while(intpart && (iplace < 20)); + if (iplace == 20) iplace--; + iconvert[iplace] = 0; + + /* Convert fractional part */ + do { + fconvert[fplace++] = + (caps? "0123456789ABCDEF":"0123456789abcdef")[fracpart % 10]; + fracpart = (fracpart / 10); + } while(fracpart && (fplace < 20)); + if (fplace == 20) fplace--; + fconvert[fplace] = 0; +#else /* use fcvt() */ + if (max > 310) + max = 310; +# ifdef HAVE_FCVTL + result = fcvtl(ufvalue, max, &dec_pt, &sig); +# else + result = fcvt(ufvalue, max, &dec_pt, &sig); +# endif + + r_length = strlen(result); + + /* + * Fix broken fcvt implementation returns.. + */ + + if (r_length == 0) + { + result[0] = '0'; + result[1] = '\0'; + r_length = 1; + } + + if ( r_length < dec_pt ) + dec_pt = r_length; + + if (dec_pt <= 0) { + iplace = 1; + iconvert[0] = '0'; + iconvert[1] = '\0'; + + fplace = 0; + + while(r_length) + fconvert[fplace++] = result[--r_length]; + + while ((dec_pt < 0) && (fplace < max)) { + fconvert[fplace++] = '0'; + dec_pt++; + } + } else { + int c; + + iplace=0; + for(c=dec_pt; c; iconvert[iplace++] = result[--c]) + ; + iconvert[iplace] = '\0'; + + result += dec_pt; + fplace = 0; + + for(c=(r_length-dec_pt); c; fconvert[fplace++] = result[--c]) + ; + } +#endif /* fcvt */ + + /* -1 for decimal point, another -1 if we are printing a sign */ + padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); + zpadlen = max - fplace; + if (zpadlen < 0) + zpadlen = 0; + if (padlen < 0) + padlen = 0; + if (flags & DP_F_MINUS) + padlen = -padlen; /* Left Justifty */ + + if ((flags & DP_F_ZERO) && (padlen > 0)) + { + if (signvalue) + { + dopr_outch (buffer, currlen, maxlen, signvalue); + --padlen; + signvalue = 0; + } + while (padlen > 0) + { + dopr_outch (buffer, currlen, maxlen, '0'); + --padlen; + } + } + while (padlen > 0) + { + dopr_outch (buffer, currlen, maxlen, ' '); + --padlen; + } + if (signvalue) + dopr_outch (buffer, currlen, maxlen, signvalue); + + while (iplace > 0) + dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]); + + +#ifdef DEBUG_SNPRINTF + printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen); +#endif + + /* + * Decimal point. This should probably use locale to find the correct + * char to print out. + */ + if (max > 0) { + dopr_outch (buffer, currlen, maxlen, '.'); + + while (fplace > 0) + dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); + } + + while (zpadlen > 0) + { + dopr_outch (buffer, currlen, maxlen, '0'); + --zpadlen; + } + + while (padlen < 0) + { + dopr_outch (buffer, currlen, maxlen, ' '); + ++padlen; + } +} + +static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c) +{ + if (*currlen < maxlen) + buffer[(*currlen)++] = c; +} +#endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */ + +#ifndef HAVE_VSNPRINTF + int vsnprintf (char *str, size_t count, const char *fmt, va_list args) +{ + str[0] = 0; + dopr(str, count, fmt, args); + return(strlen(str)); +} +#endif /* !HAVE_VSNPRINTF */ + +#ifndef HAVE_SNPRINTF +/* VARARGS3 */ +#ifdef HAVE_STDARGS + int snprintf (char *str,size_t count,const char *fmt,...) +#else + int snprintf (va_alist) va_dcl +#endif +{ +#ifndef HAVE_STDARGS + char *str; + size_t count; + char *fmt; +#endif + VA_LOCAL_DECL; + + VA_START (fmt); + VA_SHIFT (str, char *); + VA_SHIFT (count, size_t ); + VA_SHIFT (fmt, char *); + (void) vsnprintf(str, count, fmt, ap); + VA_END; + return(strlen(str)); +} + + +#else + /* keep compilers happy about empty files */ + void dummy_snprintf(void) {} +#endif /* !HAVE_SNPRINTF */ + +#ifdef TEST_SNPRINTF +#ifndef LONG_STRING +#define LONG_STRING 1024 +#endif + int main (void) +{ + char buf1[LONG_STRING]; + char buf2[LONG_STRING]; + char *fp_fmt[] = { + "%-1.5f", + "%1.5f", + "%123.9f", + "%10.5f", + "% 10.5f", + "%+22.9f", + "%+4.9f", + "%01.3f", + "%4f", + "%3.1f", + "%3.2f", + "%.0f", + "%.1f", + NULL + }; + double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, + 0.9996, 1.996, 4.136, 6442452944.1234, 0}; + char *int_fmt[] = { + "%-1.5d", + "%1.5d", + "%123.9d", + "%5.5d", + "%10.5d", + "% 10.5d", + "%+22.33d", + "%01.3d", + "%4d", + NULL + }; + long int_nums[] = { -1, 134, 91340, 341, 0203, 0}; + int x, y; + int fail = 0; + int num = 0; + + printf ("Testing snprintf format codes against system sprintf...\n"); + + for (x = 0; fp_fmt[x] != NULL ; x++) + for (y = 0; fp_nums[y] != 0 ; y++) + { + snprintf (buf1, sizeof (buf1), fp_fmt[x], fp_nums[y]); + sprintf (buf2, fp_fmt[x], fp_nums[y]); + if (strcmp (buf1, buf2)) + { + printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", + fp_fmt[x], buf1, buf2); + fail++; + } + num++; + } + + for (x = 0; int_fmt[x] != NULL ; x++) + for (y = 0; int_nums[y] != 0 ; y++) + { + snprintf (buf1, sizeof (buf1), int_fmt[x], int_nums[y]); + sprintf (buf2, int_fmt[x], int_nums[y]); + if (strcmp (buf1, buf2)) + { + printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", + int_fmt[x], buf1, buf2); + fail++; + } + num++; + } + printf ("%d tests failed out of %d.\n", fail, num); +} +#endif /* SNPRINTF_TEST */ + diff --git a/common/state.c b/common/state.c index 42d77d6..0e728a7 100644 --- a/common/state.c +++ b/common/state.c @@ -30,7 +30,7 @@ #include "state.h" #include "parseconf.h" -static void val_escape(struct st_tree_t *node) +static void val_escape(st_tree_t *node) { char etmp[ST_MAX_VALUE_LEN]; @@ -53,7 +53,7 @@ static void val_escape(struct st_tree_t *node) node->val = node->safe; } -static void st_tree_enum_free(struct enum_t *list) +static void st_tree_enum_free(enum_t *list) { if (!list) { return; @@ -66,7 +66,7 @@ static void st_tree_enum_free(struct enum_t *list) } /* free all memory associated with a node */ -static void st_tree_node_free(struct st_tree_t *node) +static void st_tree_node_free(st_tree_t *node) { free(node->var); free(node->raw); @@ -82,7 +82,7 @@ static void st_tree_node_free(struct st_tree_t *node) } /* add a subtree to another subtree */ -static void st_tree_node_add(struct st_tree_t **nptr, struct st_tree_t *sptr) +static void st_tree_node_add(st_tree_t **nptr, st_tree_t *sptr) { if (!sptr) { return; @@ -90,7 +90,7 @@ static void st_tree_node_add(struct st_tree_t **nptr, struct st_tree_t *sptr) while (*nptr) { - struct st_tree_t *node = *nptr; + st_tree_t *node = *nptr; if (strcasecmp(node->var, sptr->var) > 0) { nptr = &node->left; @@ -110,11 +110,11 @@ static void st_tree_node_add(struct st_tree_t **nptr, struct st_tree_t *sptr) } /* remove a variable from a tree */ -int state_delinfo(struct st_tree_t **nptr, const char *var) +int state_delinfo(st_tree_t **nptr, const char *var) { while (*nptr) { - struct st_tree_t *node = *nptr; + st_tree_t *node = *nptr; if (strcasecmp(node->var, var) > 0) { nptr = &node->left; @@ -142,11 +142,11 @@ int state_delinfo(struct st_tree_t **nptr, const char *var) /* interface */ -int state_setinfo(struct st_tree_t **nptr, const char *var, const char *val) +int state_setinfo(st_tree_t **nptr, const char *var, const char *val) { while (*nptr) { - struct st_tree_t *node = *nptr; + st_tree_t *node = *nptr; if (strcasecmp(node->var, var) > 0) { nptr = &node->left; @@ -193,9 +193,9 @@ int state_setinfo(struct st_tree_t **nptr, const char *var, const char *val) return 1; /* added */ } -static int st_tree_enum_add(struct enum_t **list, const char *enc) +static int st_tree_enum_add(enum_t **list, const char *enc) { - struct enum_t *item; + enum_t *item; while (*list) { @@ -217,9 +217,9 @@ static int st_tree_enum_add(struct enum_t **list, const char *enc) return 1; /* added */ } -int state_addenum(struct st_tree_t *root, const char *var, const char *val) +int state_addenum(st_tree_t *root, const char *var, const char *val) { - struct st_tree_t *sttmp; + st_tree_t *sttmp; char enc[ST_MAX_VALUE_LEN]; /* find the tree node for var */ @@ -237,9 +237,9 @@ int state_addenum(struct st_tree_t *root, const char *var, const char *val) return st_tree_enum_add(&sttmp->enum_list, enc); } -int state_setaux(struct st_tree_t *root, const char *var, const char *auxs) +int state_setaux(st_tree_t *root, const char *var, const char *auxs) { - struct st_tree_t *sttmp; + st_tree_t *sttmp; int aux; /* find the tree node for var */ @@ -263,9 +263,9 @@ int state_setaux(struct st_tree_t *root, const char *var, const char *auxs) return 1; } -const char *state_getinfo(struct st_tree_t *root, const char *var) +const char *state_getinfo(st_tree_t *root, const char *var) { - struct st_tree_t *sttmp; + st_tree_t *sttmp; /* find the tree node for var */ sttmp = state_tree_find(root, var); @@ -277,9 +277,9 @@ const char *state_getinfo(struct st_tree_t *root, const char *var) return sttmp->val; } -int state_getflags(struct st_tree_t *root, const char *var) +int state_getflags(st_tree_t *root, const char *var) { - struct st_tree_t *sttmp; + st_tree_t *sttmp; /* find the tree node for var */ sttmp = state_tree_find(root, var); @@ -291,9 +291,9 @@ int state_getflags(struct st_tree_t *root, const char *var) return sttmp->flags; } -int state_getaux(struct st_tree_t *root, const char *var) +int state_getaux(st_tree_t *root, const char *var) { - struct st_tree_t *sttmp; + st_tree_t *sttmp; /* find the tree node for var */ sttmp = state_tree_find(root, var); @@ -305,9 +305,9 @@ int state_getaux(struct st_tree_t *root, const char *var) return sttmp->aux; } -const struct enum_t *state_getenumlist(struct st_tree_t *root, const char *var) +const enum_t *state_getenumlist(st_tree_t *root, const char *var) { - struct st_tree_t *sttmp; + st_tree_t *sttmp; /* find the tree node for var */ sttmp = state_tree_find(root, var); @@ -319,10 +319,10 @@ const struct enum_t *state_getenumlist(struct st_tree_t *root, const char *var) return sttmp->enum_list; } -void state_setflags(struct st_tree_t *root, const char *var, int numflags, char **flag) +void state_setflags(st_tree_t *root, const char *var, int numflags, char **flag) { int i; - struct st_tree_t *sttmp; + st_tree_t *sttmp; /* find the tree node for var */ sttmp = state_tree_find(root, var); @@ -351,9 +351,9 @@ void state_setflags(struct st_tree_t *root, const char *var, int numflags, char } } -int state_addcmd(struct cmdlist_t **list, const char *cmd) +int state_addcmd(cmdlist_t **list, const char *cmd) { - struct cmdlist_t *item; + cmdlist_t *item; while (*list) { @@ -380,7 +380,7 @@ int state_addcmd(struct cmdlist_t **list, const char *cmd) return 1; /* added */ } -void state_infofree(struct st_tree_t *node) +void state_infofree(st_tree_t *node) { if (!node) { return; @@ -392,7 +392,7 @@ void state_infofree(struct st_tree_t *node) st_tree_node_free(node); } -void state_cmdfree(struct cmdlist_t *list) +void state_cmdfree(cmdlist_t *list) { if (!list) { return; @@ -404,11 +404,11 @@ void state_cmdfree(struct cmdlist_t *list) free(list); } -int state_delcmd(struct cmdlist_t **list, const char *cmd) +int state_delcmd(cmdlist_t **list, const char *cmd) { while (*list) { - struct cmdlist_t *item = *list; + cmdlist_t *item = *list; if (strcasecmp(item->name, cmd) > 0) { /* not found */ @@ -433,11 +433,11 @@ int state_delcmd(struct cmdlist_t **list, const char *cmd) return 0; /* not found */ } -static int st_tree_del_enum(struct enum_t **list, const char *val) +static int st_tree_del_enum(enum_t **list, const char *val) { while (*list) { - struct enum_t *item = *list; + enum_t *item = *list; /* if this is not the right value, go on to the next */ if (strcasecmp(item->val, val)) { @@ -457,9 +457,9 @@ static int st_tree_del_enum(struct enum_t **list, const char *val) return 0; /* not found */ } -int state_delenum(struct st_tree_t *root, const char *var, const char *val) +int state_delenum(st_tree_t *root, const char *var, const char *val) { - struct st_tree_t *sttmp; + st_tree_t *sttmp; /* find the tree node for var */ sttmp = state_tree_find(root, var); @@ -471,7 +471,7 @@ int state_delenum(struct st_tree_t *root, const char *var, const char *val) return st_tree_del_enum(&sttmp->enum_list, val); } -struct st_tree_t *state_tree_find(struct st_tree_t *node, const char *var) +st_tree_t *state_tree_find(st_tree_t *node, const char *var) { while (node) { diff --git a/common/strerror.c b/common/strerror.c new file mode 100644 index 0000000..b5cecb9 --- /dev/null +++ b/common/strerror.c @@ -0,0 +1,503 @@ +/* strerror() Mark Powell */ +/* Simple implementation derived from libiberty */ + +#include "config.h" + +#ifndef HAVE_STRERROR + +#include + +char *strerror(int errnum) +{ + static char buf[32]; + + switch (errnum) { +#if defined (EPERM) + case EPERM: + return "Not owner"; +#endif +#if defined (ENOENT) + case ENOENT: + return "No such file or directory"; +#endif +#if defined (ESRCH) + case ESRCH: + return "No such process"; +#endif +#if defined (EINTR) + case EINTR: + return "Interrupted system call"; +#endif +#if defined (EIO) + case EIO: + return "I/O error"; +#endif +#if defined (ENXIO) + case ENXIO: + return "No such device or address"; +#endif +#if defined (E2BIG) + return "Arg list too long"; +#endif +#if defined (ENOEXEC) + case ENOEXEC: + return "Exec format error"; +#endif +#if defined (EBADF) + case EBADF: + return "Bad file number"; +#endif +#if defined (ECHILD) + case ECHILD: + return "No child processes"; +#endif +#if defined (EWOULDBLOCK) /* Put before EAGAIN, sometimes aliased */ + case EWOULDBLOCK: + return "Operation would block"; +#endif +#if defined (EAGAIN) +#if defined (EWOULDBLOCK) && EAGAIN != EWOULDBLOCK + case EAGAIN: + return "No more processes"; +#endif +#endif +#if defined (ENOMEM) + case ENOMEM: + return "Not enough space"; +#endif +#if defined (EACCES) + case EACCES: + return "Permission denied"; +#endif +#if defined (EFAULT) + case EFAULT: + return "Bad address"; +#endif +#if defined (ENOTBLK) + case ENOTBLK: + return "Block device required"; +#endif +#if defined (EBUSY) + case EBUSY: + return "Device busy"; +#endif +#if defined (EEXIST) + case EEXIST: + return "File exists"; +#endif +#if defined (EXDEV) + case EXDEV: + return "Cross-device link"; +#endif +#if defined (ENODEV) + case ENODEV: + return "No such device"; +#endif +#if defined (ENOTDIR) + case ENOTDIR: + return "Not a directory"; +#endif +#if defined (EISDIR) + case EISDIR: + return "Is a directory"; +#endif +#if defined (EINVAL) + case EINVAL: + return "Invalid argument"; +#endif +#if defined (ENFILE) + case ENFILE: + return "File table overflow"; +#endif +#if defined (EMFILE) + case EMFILE: + return "Too many open files"; +#endif +#if defined (ENOTTY) + case ENOTTY: + return "Not a typewriter"; +#endif +#if defined (ETXTBSY) + case ETXTBSY: + return "Text file busy"; +#endif +#if defined (EFBIG) + case EFBIG: + return "File too large"; +#endif +#if defined (ENOSPC) + case ENOSPC: + return "No space left on device"; +#endif +#if defined (ESPIPE) + case ESPIPE: + return "Illegal seek"; +#endif +#if defined (EROFS) + case EROFS: + return "Read-only file system"; +#endif +#if defined (EMLINK) + case EMLINK: + return "Too many links"; +#endif +#if defined (EPIPE) + case EPIPE: + return "Broken pipe"; +#endif +#if defined (EDOM) + case EDOM: + return "Math argument out of domain of func"; +#endif +#if defined (ERANGE) + case ERANGE: + return "Math result not representable"; +#endif +#if defined (ENOMSG) + case ENOMSG: + return "No message of desired type"; +#endif +#if defined (EIDRM) + case EIDRM: + return "Identifier removed"; +#endif +#if defined (ECHRNG) + case ECHRNG: + return "Channel number out of range"; +#endif +#if defined (EL2NSYNC) + return "Level 2 not synchronized"; +#endif +#if defined (EL3HLT) + return "Level 3 halted"; +#endif +#if defined (EL3RST) + return "Level 3 reset"; +#endif +#if defined (ELNRNG) + case ELNRNG: + return "Link number out of range"; +#endif +#if defined (EUNATCH) + case EUNATCH: + return "Protocol driver not attached"; +#endif +#if defined (ENOCSI) + case ENOCSI: + return "No CSI structure available"; +#endif +#if defined (EL2HLT) + return "Level 2 halted"; +#endif +#if defined (EDEADLK) + case EDEADLK: + return "Deadlock condition"; +#endif +#if defined (ENOLCK) + case ENOLCK: + return "No record locks available"; +#endif +#if defined (EBADE) + case EBADE: + return "Invalid exchange"; +#endif +#if defined (EBADR) + case EBADR: + return "Invalid request descriptor"; +#endif +#if defined (EXFULL) + case EXFULL: + return "Exchange full"; +#endif +#if defined (ENOANO) + case ENOANO: + return "No anode"; +#endif +#if defined (EBADRQC) + case EBADRQC: + return "Invalid request code"; +#endif +#if defined (EBADSLT) + case EBADSLT: + return "Invalid slot"; +#endif +#if defined (EDEADLOCK) + case EDEADLOCK: + return "File locking deadlock error"; +#endif +#if defined (EBFONT) + case EBFONT: + return "Bad font file format"; +#endif +#if defined (ENOSTR) + case ENOSTR: + return "Device not a stream"; +#endif +#if defined (ENODATA) + case ENODATA: + return "No data available"; +#endif +#if defined (ETIME) + case ETIME: + return "Timer expired"; +#endif +#if defined (ENOSR) + case ENOSR: + return "Out of streams resources"; +#endif +#if defined (ENONET) + case ENONET: + return "Machine is not on the network"; +#endif +#if defined (ENOPKG) + case ENOPKG: + return "Package not installed"; +#endif +#if defined (EREMOTE) + case EREMOTE: + return "Object is remote"; +#endif +#if defined (ENOLINK) + case ENOLINK: + return "Link has been severed"; +#endif +#if defined (EADV) + case EADV: + return "Advertise error"; +#endif +#if defined (ESRMNT) + case ESRMNT: + return "Srmount error"; +#endif +#if defined (ECOMM) + case ECOMM: + return "Communication error on send"; +#endif +#if defined (EPROTO) + case EPROTO: + return "Protocol error"; +#endif +#if defined (EMULTIHOP) + case EMULTIHOP: + return "Multihop attempted"; +#endif +#if defined (EDOTDOT) + case EDOTDOT: + return "RFS specific error"; +#endif +#if defined (EBADMSG) + case EBADMSG: + return "Not a data message"; +#endif +#if defined (ENAMETOOLONG) + case ENAMETOOLONG: + return "File name too long"; +#endif +#if defined (EOVERFLOW) + case EOVERFLOW: + return "Value too large for defined data type"; +#endif +#if defined (ENOTUNIQ) + case ENOTUNIQ: + return "Name not unique on network"; +#endif +#if defined (EBADFD) + case EBADFD: + return "File descriptor in bad state"; +#endif +#if defined (EREMCHG) + case EREMCHG: + return "Remote address changed"; +#endif +#if defined (ELIBACC) + case ELIBACC: + return "Can not access a needed shared library"; +#endif +#if defined (ELIBBAD) + case ELIBBAD: + return "Accessing a corrupted shared library"; +#endif +#if defined (ELIBSCN) + case ELIBSCN: + return ".lib section in a.out corrupted"; +#endif +#if defined (ELIBMAX) + case ELIBMAX: + return "Attempting to link in too many shared libraries"; +#endif +#if defined (ELIBEXEC) + case ELIBEXEC: + return "Cannot exec a shared library directly"; +#endif +#if defined (EILSEQ) + case EILSEQ: + return "Illegal byte sequence"; +#endif +#if defined (ENOSYS) + case ENOSYS: + return "Operation not applicable"; +#endif +#if defined (ELOOP) + case ELOOP: + return "Too many symbolic links encountered"; +#endif +#if defined (ERESTART) + case ERESTART: + return "Interrupted system call should be restarted"; +#endif +#if defined (ESTRPIPE) + case ESTRPIPE: + return "Streams pipe error"; +#endif +#if defined (ENOTEMPTY) + case ENOTEMPTY: + return "Directory not empty"; +#endif +#if defined (EUSERS) + case EUSERS: + return "Too many users"; +#endif +#if defined (ENOTSOCK) + case ENOTSOCK: + return "Socket operation on non-socket"; +#endif +#if defined (EDESTADDRREQ) + case EDESTADDRREQ: + return "Destination address required"; +#endif +#if defined (EMSGSIZE) + case EMSGSIZE: + return "Message too long"; +#endif +#if defined (EPROTOTYPE) + case EPROTOTYPE: + return "Protocol wrong type for socket"; +#endif +#if defined (ENOPROTOOPT) + case ENOPROTOOPT: + return "Protocol not available"; +#endif +#if defined (EPROTONOSUPPORT) + case EPROTONOSUPPORT: + return "Protocol not supported"; +#endif +#if defined (ESOCKTNOSUPPORT) + case ESOCKTNOSUPPORT: + return "Socket type not supported"; +#endif +#if defined (EOPNOTSUPP) + case EOPNOTSUPP: + return "Operation not supported on transport endpoint"; +#endif +#if defined (EPFNOSUPPORT) + case EPFNOSUPPORT: + return "Protocol family not supported"; +#endif +#if defined (EAFNOSUPPORT) + case EAFNOSUPPORT: + return "Address family not supported by protocol"; +#endif +#if defined (EADDRINUSE) + case EADDRINUSE: + return "Address already in use"; +#endif +#if defined (EADDRNOTAVAIL) + case EADDRNOTAVAIL: + return "Cannot assign requested address"; +#endif +#if defined (ENETDOWN) + case ENETDOWN: + return "Network is down"; +#endif +#if defined (ENETUNREACH) + case ENETUNREACH: + return "Network is unreachable"; +#endif +#if defined (ENETRESET) + case ENETRESET: + return "Network dropped connection because of reset"; +#endif +#if defined (ECONNABORTED) + case ECONNABORTED: + return "Software caused connection abort"; +#endif +#if defined (ECONNRESET) + case ECONNRESET: + return "Connection reset by peer"; +#endif +#if defined (ENOBUFS) + case ENOBUFS: + return "No buffer space available"; +#endif +#if defined (EISCONN) + case EISCONN: + return "Transport endpoint is already connected"; +#endif +#if defined (ENOTCONN) + case ENOTCONN: + return "Transport endpoint is not connected"; +#endif +#if defined (ESHUTDOWN) + case ESHUTDOWN: + return "Cannot send after transport endpoint shutdown"; +#endif +#if defined (ETOOMANYREFS) + case ETOOMANYREFS: + return "Too many references: cannot splice"; +#endif +#if defined (ETIMEDOUT) + case ETIMEDOUT: + return "Connection timed out"; +#endif +#if defined (ECONNREFUSED) + case ECONNREFUSED: + return "Connection refused"; +#endif +#if defined (EHOSTDOWN) + case EHOSTDOWN: + return "Host is down"; +#endif +#if defined (EHOSTUNREACH) + case EHOSTUNREACH: + return "No route to host"; +#endif +#if defined (EALREADY) + case EALREADY: + return "Operation already in progress"; +#endif +#if defined (EINPROGRESS) + case EINPROGRESS: + return "Operation now in progress"; +#endif +#if defined (ESTALE) + case ESTALE: + return "Stale NFS file handle"; +#endif +#if defined (EUCLEAN) + case EUCLEAN: + return "Structure needs cleaning"; +#endif +#if defined (ENOTNAM) + case ENOTNAM: + return "Not a XENIX named type file"; +#endif +#if defined (ENAVAIL) + case ENAVAIL: + return "No XENIX semaphores available"; +#endif +#if defined (EISNAM) + case EISNAM: + return "Is a named type file"; +#endif +#if defined (EREMOTEIO) + case EREMOTEIO: + return "Remote I/O error"; +#endif + } + + /* Fallback: just print the error number */ + snprintf(buf, sizeof(buf), "Error %d", errnum); + return buf; +} + +#endif /* HAVE_STRERROR */ diff --git a/conf/Makefile.in b/conf/Makefile.in index 73ac244..8dd6128 100644 --- a/conf/Makefile.in +++ b/conf/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -41,12 +41,13 @@ 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 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(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_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -56,6 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.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_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -95,9 +97,11 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(sysconfdir)" DATA = $(dist_sysconf_DATA) $(nodist_sysconf_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -110,8 +114,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -128,7 +134,6 @@ 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@ @@ -139,22 +144,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/conf/ups.conf.sample b/conf/ups.conf.sample index 40a85a6..365a6f7 100644 --- a/conf/ups.conf.sample +++ b/conf/ups.conf.sample @@ -82,11 +82,11 @@ # Examples # -------- # -# A simple example for a UPS called "powerpal" that uses the megatec +# A simple example for a UPS called "powerpal" that uses the blazer_ser # driver on /dev/ttyS0 is: # # [powerpal] -# driver = megatec +# driver = blazer_ser # port = /dev/ttyS0 # desc = "Web server" # diff --git a/conf/upsd.conf.sample b/conf/upsd.conf.sample index 596fc55..56812ff 100644 --- a/conf/upsd.conf.sample +++ b/conf/upsd.conf.sample @@ -17,6 +17,13 @@ # the data fresh within the normal 15 second interval. Watch the syslog # for notifications from upsd about staleness. +# ======================================================================= +# STATEPATH +# STATEPATH /var/run/nut +# +# Tell upsd to look for the driver state sockets in 'path' rather +# than the default that was compiled into the program. + # ======================================================================= # LISTEN
[] # LISTEN 127.0.0.1 3493 @@ -34,8 +41,19 @@ # ======================================================================= # MAXCONN +# MAXCONN 1024 # # 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. + +# ======================================================================= +# CERTFILE +# +# When compiled with SSL support, you can enter the certificate file here. +# The certificates must be in PEM format and must be sorted starting with +# the subject's certificate (server certificate), followed by intermediate +# CA certificates (if applicable_ and the highest level (root) CA. It should +# end with the server key. See 'docs/security.txt' or the Security chapter of +# NUT user manual for more information on the SSL support in NUT. diff --git a/conf/upsd.users.sample b/conf/upsd.users.sample index 4e0e0c6..ec78eb5 100644 --- a/conf/upsd.users.sample +++ b/conf/upsd.users.sample @@ -48,6 +48,14 @@ # instcmds = ALL # +# +# --- Configuring for a user who can execute tests only +# +# [testuser] +# password = pass +# instcmds = test.battery.start +# instcmds = test.battery.stop + # # --- Configuring for upsmon # diff --git a/config.guess b/config.guess index da83314..e3a2116 100755 --- a/config.guess +++ b/config.guess @@ -1,10 +1,10 @@ #! /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, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-04-27' +timestamp='2009-06-10' # 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 @@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 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 + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -656,7 +656,7 @@ EOF # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -822,6 +822,9 @@ EOF [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-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 @@ -882,40 +885,17 @@ EOF m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips - #undef mipsel + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel + CPU=${UNAME_MACHINE}el #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 | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - 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 + CPU=${UNAME_MACHINE} #else CPU= #endif @@ -947,7 +927,7 @@ EOF EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; @@ -1001,14 +981,6 @@ EOF elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - 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 @@ -1074,7 +1046,7 @@ EOF i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1182,7 +1154,7 @@ EOF rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) diff --git a/config.sub b/config.sub index a39437d..eb0389a 100755 --- a/config.sub +++ b/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-04-17' +timestamp='2009-06-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -153,6 +153,9 @@ case $os in os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -467,6 +470,10 @@ case $basic_machine in basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; c90) basic_machine=c90-cray os=-unicos @@ -1260,7 +1267,7 @@ case $os in # 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]*\ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ @@ -1613,7 +1620,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) diff --git a/configure b/configure index 1828140..260bf0e 100755 --- a/configure +++ b/configure @@ -1,10 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for nut 2.4.3. +# Generated by GNU Autoconf 2.65 for nut 2.6.0. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -673,7 +675,8 @@ fi -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -695,8 +698,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='nut' PACKAGE_TARNAME='nut' -PACKAGE_VERSION='2.4.3' -PACKAGE_STRING='nut 2.4.3' +PACKAGE_VERSION='2.6.0' +PACKAGE_STRING='nut 2.6.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -759,28 +762,30 @@ NETLIBS DRIVER_INSTALL_TARGET DRIVER_MAN_LIST DRIVER_BUILD_LIST -LIBHAL_LDFLAGS +LIBHAL_LIBS LIBHAL_CFLAGS -HAVE_GLIB_2_14 HAL_CALLOUTS_PATH HAL_FDI_PATH HAL_DEVICE_MATCH_KEY HAL_USER -LIBWRAP_LDFLAGS +LIBWRAP_LIBS LIBWRAP_CFLAGS -LIBPOWERMAN_LDFLAGS +DOC_BUILD_LIST +LIBPOWERMAN_LIBS LIBPOWERMAN_CFLAGS -LIBNEON_LDFLAGS +LIBNEON_LIBS LIBNEON_CFLAGS -LIBUSB_LDFLAGS +LIBUSB_LIBS LIBUSB_CFLAGS -LIBNETSNMP_LDFLAGS +LIBNETSNMP_LIBS LIBNETSNMP_CFLAGS LIBGD_LDFLAGS LIBGD_CFLAGS -LIBSSL_LDFLAGS +LIBSSL_LIBS LIBSSL_CFLAGS OS_NAME +MANUALUPDATE_FALSE +MANUALUPDATE_TRUE WITH_UDEV_FALSE WITH_UDEV_TRUE WITH_HOTPLUG_FALSE @@ -789,18 +794,8 @@ WITH_PKG_CONFIG_FALSE WITH_PKG_CONFIG_TRUE SOME_DRIVERS_FALSE SOME_DRIVERS_TRUE -WITH_LIBPOWERMAN_FALSE -WITH_LIBPOWERMAN_TRUE -WITH_NEONXML_FALSE -WITH_NEONXML_TRUE -WITH_HAL_FALSE -WITH_HAL_TRUE -WITH_USB_FALSE -WITH_USB_TRUE -WITH_SNMP_FALSE -WITH_SNMP_TRUE -WITH_SERIAL_FALSE -WITH_SERIAL_TRUE +WITH_DEV_FALSE +WITH_DEV_TRUE OTOOL64 OTOOL LIPO @@ -816,14 +811,29 @@ LD FGREP SED LIBTOOL -WITH_DEV_FALSE -WITH_DEV_TRUE +HAVE_ASCIIDOC_FALSE +HAVE_ASCIIDOC_TRUE +DBLATEX +A2X +ASCIIDOC +WITH_HAL_FALSE +WITH_HAL_TRUE WITH_CGI_FALSE WITH_CGI_TRUE WITH_WRAP_FALSE WITH_WRAP_TRUE WITH_SSL_FALSE WITH_SSL_TRUE +WITH_LIBPOWERMAN_FALSE +WITH_LIBPOWERMAN_TRUE +WITH_NEONXML_FALSE +WITH_NEONXML_TRUE +WITH_SNMP_FALSE +WITH_SNMP_TRUE +WITH_USB_FALSE +WITH_USB_TRUE +WITH_SERIAL_FALSE +WITH_SERIAL_TRUE LIBOBJS RANLIB AR @@ -931,12 +941,19 @@ with_all with_dev with_serial with_usb +with_doc +with_snmp_includes +with_snmp_libs with_usb_includes with_usb_libs with_hal +with_hal_includes +with_hal_libs +with_hal_user +with_hal_device_match_key +with_hal_callouts_path +with_hal_fdi_path with_snmp -with_snmp_includes -with_snmp_libs with_neon with_neon_includes with_neon_libs @@ -947,12 +964,11 @@ with_ssl with_ssl_includes with_ssl_libs with_wrap -with_ipv6 with_cgi with_gd_includes with_gd_libs -enable_static enable_shared +enable_static with_pic enable_fast_install with_gnu_ld @@ -1523,7 +1539,7 @@ 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 nut 2.4.3 to adapt to many kinds of systems. +\`configure' configures nut 2.6.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1594,7 +1610,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of nut 2.4.3:";; + short | recursive ) echo "Configuration of nut 2.6.0:";; esac cat <<\_ACEOF @@ -1606,12 +1622,12 @@ Optional Features: --enable-dependency-tracking do not reject slow dependency extractors --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer - --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --enable-strip Strip debugging symbols from binaries no + --enable-strip Strip debugging symbols from binaries (no) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1621,59 +1637,44 @@ Optional Packages: --with-dev build and install the development files (no) --with-serial build and install serial drivers (yes) --with-usb build and install USB drivers (auto) - - --with-usb-includes=CFLAGS - include flags for the libusb library - - - --with-usb-libs=LDFLAGS linker flags for the libusb library - - --with-hal build and install HAL support (no) - --with-snmp build and install SNMP drivers (auto) - - --with-snmp-includes=CFLAGS + --with-doc build and install documentation (no) + [--with-snmp-includes=CFLAGS] include flags for the Net-SNMP library - - - --with-snmp-libs=LDFLAGS - linker flags for the Net-SNMP library - + [--with-snmp-libs=LIBS] linker flags for the Net-SNMP library + [--with-usb-includes=CFLAGS] + include flags for the libusb library + [--with-usb-libs=LIBS] linker flags for the libusb library + --with-hal build and install HAL support (no) + [--with-hal-includes=CFLAGS] + include flags for the HAL library + [--with-hal-libs=LIBS] linker flags for the HAL library + [--with-hal-user=USER] addons run as user + [--with-hal-device-match-key=KEY] + device match key + [--with-hal-callouts-path=PATH] + installation path for callouts + [--with-hal-fdi-path=PATH] + installation path for device information files + --with-snmp build and install SNMP drivers (auto) --with-neon build and install neon based XML/HTTP driver (auto) - - --with-neon-includes=CFLAGS + [--with-neon-includes=CFLAGS] include flags for the neon library - - - --with-neon-libs=LDFLAGS - linker flags for the neon library - + [--with-neon-libs=LIBS] linker flags for the neon library --with-powerman build and install Powerman PDU client driver (auto) - - --with-powerman-includes=CFLAGS + [--with-powerman-includes=CFLAGS] include flags for the libpowerman library - - - --with-powerman-libs=LDFLAGS + [--with-powerman-libs=LIBS] linker flags for the libpowerman library - --with-ssl enable SSL development code (auto) - - --with-ssl-includes=CFLAGS + [--with-ssl-includes=CFLAGS] include flags for the OpenSSL library - - - --with-ssl-libs=LDFLAGS linker flags for the OpenSSL library - + [--with-ssl-libs=LIBS] linker flags for the OpenSSL library --with-wrap enable libwrap (tcp-wrappers) support (auto) - --with-ipv6 enable IPv6 support (auto) --with-cgi build and install the CGI programs (no) - - --with-gd-includes=CFLAGS + [--with-gd-includes=CFLAGS] include flags for the gd library - - - --with-gd-libs=LDFLAGS linker flags for the gd library - + [--with-gd-libs=LDFLAGS] + linker flags for the gd library --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] @@ -1689,7 +1690,7 @@ Optional Packages: root (nogroup) --with-logfacility=FACILITY facility for log messages (LOG_DAEMON) - [--with-drivers=driver[,driver...]] + [--with-drivers=driver[,driver]] Only use specific drivers (all) --with-pkgconfig-dir=PATH where to install pkg-config *.pc files @@ -1703,7 +1704,7 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor @@ -1773,8 +1774,8 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -nut configure 2.4.3 -generated by GNU Autoconf 2.64 +nut configure 2.6.0 +generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -1821,7 +1822,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1858,7 +1859,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1987,7 +1988,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -2064,7 +2065,7 @@ fi # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -2402,15 +2403,15 @@ rm -f conftest.val fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_compute_int 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 nut $as_me 2.4.3, which was -generated by GNU Autoconf 2.64. Invocation command line was +It was created by nut $as_me 2.6.0, which was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -2663,7 +2664,7 @@ fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then + 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 @@ -2672,9 +2673,9 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;} 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. - if test -f "$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 @@ -3347,6 +3348,7 @@ 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 @@ -3354,7 +3356,6 @@ fi # 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. - test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi @@ -3471,7 +3472,7 @@ fi # Define the identity of the package. PACKAGE='nut' - VERSION='2.4.3' + VERSION='2.6.0' cat >>confdefs.h <<_ACEOF @@ -3512,8 +3513,12 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro to enable system extensions" >&5 +$as_echo_n "checking for autoconf macro to enable system extensions... " >&6; } -DEPDIR="${am__leading_dot}deps" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -3897,32 +3902,30 @@ $as_echo "$ac_try_echo"; } >&5 ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main () { -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -3984,10 +3987,10 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : - $as_echo "$as_me: failed program was:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 @@ -3995,51 +3998,18 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" @@ -4072,13 +4042,72 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi -rm -f conftest$ac_cv_exeext +rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : @@ -4931,6 +4960,7 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. @@ -5309,8 +5339,8 @@ $as_echo "$ac_try_echo"; } >&5 ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -6496,7 +6526,7 @@ _ACEOF fi done -for ac_func in on_exit strptime +for ac_func in on_exit strptime setlogmask do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -6509,6 +6539,18 @@ _ACEOF fi done +ac_fn_c_check_decl "$LINENO" "LOG_UPTO" "ac_cv_have_decl_LOG_UPTO" "#include +" +if test "x$ac_cv_have_decl_LOG_UPTO" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LOG_UPTO $ac_have_decl +_ACEOF + for ac_func in vsnprintf snprintf do : @@ -6668,7 +6710,7 @@ fi done -for ac_func in setenv inet_aton strerror atexit +for ac_func in setenv strerror atexit do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -7512,15 +7554,16 @@ $as_echo_n "checking for --with-all... " >&6; } # Check whether --with-all was given. if test "${with_all+set}" = set; then : - withval=$with_all; if test -n "${withval}"; then - if test -z "${with_cgi}"; then with_cgi="${withval}"; fi - if test -z "${with_dev}"; then with_dev="${withval}"; fi - if test -z "${with_serial}"; then with_serial="${withval}"; fi - if test -z "${with_snmp}"; then with_snmp="${withval}"; fi + withval=$with_all; + if test -n "${withval}"; then + if test -z "${with_serial}"; then with_serial="${withval}"; fi if test -z "${with_usb}"; then with_usb="${withval}"; fi + if test -z "${with_snmp}"; then with_snmp="${withval}"; fi if test -z "${with_hal}"; then with_hal="${withval}"; fi if test -z "${with_neon}"; then with_neon="${withval}"; fi if test -z "${with_powerman}"; then with_powerman="${withval}"; fi + if test -z "${with_cgi}"; then with_cgi="${withval}"; fi + if test -z "${with_dev}"; then with_dev="${withval}"; fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${withval}\"" >&5 $as_echo "\"${withval}\"" >&6; } else @@ -7529,7 +7572,8 @@ $as_echo "not given" >&6; } fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not given" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not given" >&5 $as_echo "not given" >&6; } fi @@ -7567,43 +7611,160 @@ fi +# Check whether --with-doc was given. +if test "${with_doc+set}" = set; then : + withval=$with_doc; nut_with_doc="${withval}" +else + nut_with_doc="no" + +fi + + + + + + +if test -z "${nut_have_libnetsnmp_seen}"; then + nut_have_libnetsnmp_seen=yes + + CFLAGS_ORIG="${CFLAGS}" + LIBS_ORIG="${LIBS}" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP version via net-snmp-config" >&5 +$as_echo_n "checking for Net-SNMP version via net-snmp-config... " >&6; } + SNMP_VERSION=`net-snmp-config --version 2>/dev/null` + if test "$?" != "0" -o -z "${SNMP_VERSION}"; then + SNMP_VERSION="none" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SNMP_VERSION} found" >&5 +$as_echo "${SNMP_VERSION} found" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP cflags" >&5 +$as_echo_n "checking for Net-SNMP cflags... " >&6; } + +# Check whether --with-snmp-includes was given. +if test "${with_snmp_includes+set}" = set; then : + withval=$with_snmp_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-snmp-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + +else + CFLAGS="`net-snmp-config --base-cflags 2>/dev/null`" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 +$as_echo "${CFLAGS}" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP libs" >&5 +$as_echo_n "checking for Net-SNMP libs... " >&6; } + +# Check whether --with-snmp-libs was given. +if test "${with_snmp_libs+set}" = set; then : + withval=$with_snmp_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-snmp-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + +else + LIBS="`net-snmp-config --libs 2>/dev/null`" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } + + for ac_header in net-snmp/net-snmp-config.h +do : + ac_fn_c_check_header_compile "$LINENO" "net-snmp/net-snmp-config.h" "ac_cv_header_net_snmp_net_snmp_config_h" "$ac_includes_default +" +if test "x$ac_cv_header_net_snmp_net_snmp_config_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NET_SNMP_NET_SNMP_CONFIG_H 1 +_ACEOF + nut_have_libnetsnmp=yes +else + nut_have_libnetsnmp=no +fi + +done + + for ac_func in init_snmp +do : + ac_fn_c_check_func "$LINENO" "init_snmp" "ac_cv_func_init_snmp" +if test "x$ac_cv_func_init_snmp" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_INIT_SNMP 1 +_ACEOF + +else + nut_have_libnetsnmp=no +fi +done + + + if test "${nut_have_libnetsnmp}" = "yes"; then + LIBNETSNMP_CFLAGS="${CFLAGS}" + LIBNETSNMP_LIBS="${LIBS}" + fi + + CFLAGS="${CFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" +fi + + if test -z "${nut_have_libusb_seen}"; then nut_have_libusb_seen=yes CFLAGS_ORIG="${CFLAGS}" - LDFLAGS_ORIG="${LDFLAGS}" + LIBS_ORIG="${LIBS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb version via pkg-config" >&5 $as_echo_n "checking for libusb version via pkg-config... " >&6; } - LIBUSB_VERSION=`pkg-config --silence-errors --modversion libusb` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBUSB_VERSION} found" >&5 -$as_echo "${LIBUSB_VERSION} found" >&6; } - CFLAGS="`pkg-config --silence-errors --cflags libusb`" - LDFLAGS="`pkg-config --silence-errors --libs libusb`" + LIBUSB_VERSION="`pkg-config --silence-errors --modversion libusb 2>/dev/null`" + if test "$?" = "0" -a -n "${LIBUSB_VERSION}"; then + CFLAGS="`pkg-config --silence-errors --cflags libusb 2>/dev/null`" + LIBS="`pkg-config --silence-errors --libs libusb 2>/dev/null`" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking via libusb-config" >&5 $as_echo_n "checking via libusb-config... " >&6; } - LIBUSB_VERSION=`libusb-config --version 2>/dev/null` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBUSB_VERSION} found" >&5 -$as_echo "${LIBUSB_VERSION} found" >&6; } + LIBUSB_VERSION="`libusb-config --version 2>/dev/null`" + if test "$?" = "0" -a -n "${LIBUSB_VERSION}"; then CFLAGS="`libusb-config --cflags 2>/dev/null`" - LDFLAGS="`libusb-config --libs 2>/dev/null`" + LIBS="`libusb-config --libs 2>/dev/null`" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } + LIBUSB_VERSION="none" CFLAGS="" - LDFLAGS="-lusb" + LIBS="-lusb" fi fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBUSB_VERSION} found" >&5 +$as_echo "${LIBUSB_VERSION} found" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb cflags" >&5 $as_echo_n "checking for libusb cflags... " >&6; } # Check whether --with-usb-includes was given. if test "${with_usb_includes+set}" = set; then : - withval=$with_usb_includes; CFLAGS="${withval}" + withval=$with_usb_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-usb-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -7614,11 +7775,20 @@ $as_echo_n "checking for libusb ldflags... " >&6; } # Check whether --with-usb-libs was given. if test "${with_usb_libs+set}" = set; then : - withval=$with_usb_libs; LDFLAGS="${withval}" + withval=$with_usb_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-usb-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LDFLAGS}" >&5 -$as_echo "${LDFLAGS}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } for ac_header in usb.h do : @@ -7662,11 +7832,11 @@ fi done LIBUSB_CFLAGS="${CFLAGS}" - LIBUSB_LDFLAGS="${LDFLAGS}" + LIBUSB_LIBS="${LIBS}" fi CFLAGS="${CFLAGS_ORIG}" - LDFLAGS="${LDFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" fi @@ -7684,54 +7854,75 @@ if test -z "${nut_have_libhal_seen}"; then nut_have_libhal_seen=yes CFLAGS_ORIG="${CFLAGS}" - LDFLAGS_ORIG="${LDFLAGS}" + LIBS_ORIG="${LIBS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal version via pkg-config (0.5.8 minimum required)" >&5 $as_echo_n "checking for libhal version via pkg-config (0.5.8 minimum required)... " >&6; } - HAL_VERSION=`pkg-config --silence-errors --modversion hal` - if test "$?" = "0"; then - if pkg-config --atleast-version=0.5.8 hal; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_VERSION} found" >&5 + HAL_VERSION="`pkg-config --silence-errors --modversion hal 2>/dev/null`" + if test "$?" != "0" -o -z "${HAL_VERSION}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none found" >&5 +$as_echo "none found" >&6; } + elif pkg-config --silence-errors --atleast-version=0.5.8 hal 2>/dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_VERSION} found" >&5 $as_echo "${HAL_VERSION} found" >&6; } - nut_have_libhal=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal cflags via pkg-config" >&5 -$as_echo_n "checking for libhal cflags via pkg-config... " >&6; } - CFLAGS=`pkg-config --silence-errors --cflags hal dbus-glib-1` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 -$as_echo "${CFLAGS}" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - nut_have_libhal=no - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal ldflags via pkg-config" >&5 -$as_echo_n "checking for libhal ldflags via pkg-config... " >&6; } - LDFLAGS=`pkg-config --silence-errors --libs hal dbus-glib-1` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LDFLAGS}" >&5 -$as_echo "${LDFLAGS}" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - nut_have_libhal=no - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_VERSION} is too old" >&5 -$as_echo "${HAL_VERSION} is too old" >&6; } - nut_have_libhal=no - fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - nut_have_libhal=check + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${HAL_VERSION} is too old" >&5 +$as_echo "$as_me: WARNING: ${HAL_VERSION} is too old" >&2;} fi - if test "${nut_have_libhal}" = "check"; then - CFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include" - LDFLAGS="-lhal -ldbus-1 -lpthread" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal cflags" >&5 +$as_echo_n "checking for libhal cflags... " >&6; } + +# Check whether --with-hal-includes was given. +if test "${with_hal_includes+set}" = set; then : + withval=$with_hal_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-hal-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + +else + + CFLAGS="`pkg-config --silence-errors --cflags hal dbus-glib-1 2>/dev/null`" + if test "$?" != "0"; then + CFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include" + fi + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 +$as_echo "${CFLAGS}" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal ldflags" >&5 +$as_echo_n "checking for libhal ldflags... " >&6; } + +# Check whether --with-hal-libs was given. +if test "${with_hal_libs+set}" = set; then : + withval=$with_hal_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-hal-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + +else + + LIBS="`pkg-config --silence-errors --libs hal dbus-glib-1 2>/dev/null`" + if test "$?" != "0"; then + LIBS="-lhal -ldbus-1 -lpthread" + fi + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } for ac_header in libhal.h do : @@ -7748,7 +7939,24 @@ fi done - for ac_func in libhal_device_new_changeset + for ac_header in glib.h dbus/dbus-glib.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + nut_have_libhal=no +fi + +done + + for ac_func in libhal_device_new_changeset do : ac_fn_c_check_func "$LINENO" "libhal_device_new_changeset" "ac_cv_func_libhal_device_new_changeset" if test "x$ac_cv_func_libhal_device_new_changeset" = x""yes; then : @@ -7761,106 +7969,146 @@ else fi done - fi if test "${nut_have_libhal}" = "yes"; then - LIBHAL_CFLAGS="${CFLAGS}" - LIBHAL_LDFLAGS="${LDFLAGS}" + for ac_func in g_timeout_add_seconds +do : + ac_fn_c_check_func "$LINENO" "g_timeout_add_seconds" "ac_cv_func_g_timeout_add_seconds" +if test "x$ac_cv_func_g_timeout_add_seconds" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_G_TIMEOUT_ADD_SECONDS 1 +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal user via pkg-config" >&5 -$as_echo_n "checking for libhal user via pkg-config... " >&6; } - HAL_USER=`pkg-config --silence-errors --variable=haluser hal` - if test -n "$HAL_USER"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_USER}" >&5 -$as_echo "${HAL_USER}" >&6; } - else +fi +done + + LIBHAL_CFLAGS="${CFLAGS}" + LIBHAL_LIBS="${LIBS}" + fi + + CFLAGS="${CFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" +fi + + +if test -z "${nut_have_config_libhal_seen}" -a "${nut_have_libhal}" = "yes"; then + nut_have_config_libhal_seen=yes + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal user" >&5 +$as_echo_n "checking for libhal user... " >&6; } + +# Check whether --with-hal-user was given. +if test "${with_hal_user+set}" = set; then : + withval=$with_hal_user; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-hal-user - see docs/configure.txt" "$LINENO" 5 + ;; + *) + HAL_USER="${withval}" + ;; + esac + +else + + HAL_USER="`pkg-config --silence-errors --variable=haluser hal 2>/dev/null`" + if test "$?" != "0" -o -z "${HAL_USER}"; then HAL_USER="haldaemon" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using default (${HAL_USER})" >&5 -$as_echo "using default (${HAL_USER})" >&6; } fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_USER}" >&5 +$as_echo "${HAL_USER}" >&6; } + cat >>confdefs.h <<_ACEOF #define HAL_USER "${HAL_USER}" _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hal-${HAL_VERSION} device match key" >&5 -$as_echo_n "checking for hal-${HAL_VERSION} device match key... " >&6; } - HAL_DEVICE_MATCH_KEY=`pkg-config --silence-errors --atleast-version=0.5.11 hal` - if test "$?" != "0"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal device match key" >&5 +$as_echo_n "checking for libhal device match key... " >&6; } + +# Check whether --with-hal-device-match-key was given. +if test "${with_hal_device_match_key+set}" = set; then : + withval=$with_hal_device_match_key; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-hal-device-match-key - see docs/configure.txt" "$LINENO" 5 + ;; + *) + HAL_DEVICE_MATCH_KEY="${withval}" + ;; + esac + +else + + if pkg-config --silence-errors --atleast-version=0.5.11 hal 2>/dev/null; then HAL_DEVICE_MATCH_KEY="info.bus" else HAL_DEVICE_MATCH_KEY="info.subsystem" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_DEVICE_MATCH_KEY}" >&5 + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_DEVICE_MATCH_KEY}" >&5 $as_echo "${HAL_DEVICE_MATCH_KEY}" >&6; } -cat >>confdefs.h <<_ACEOF -#define HAL_DEVICE_MATCH_KEY "${HAL_DEVICE_MATCH_KEY}" -_ACEOF - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal Callouts path" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal Callouts path" >&5 $as_echo_n "checking for libhal Callouts path... " >&6; } - HAL_CALLOUTS_PATH=`pkg-config --silence-errors --variable=libexecdir hal` - if test -n "$HAL_CALLOUTS_PATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_CALLOUTS_PATH}" >&5 -$as_echo "${HAL_CALLOUTS_PATH}" >&6; } - else - # fallback to detecting the right path - if (test -d "${libdir}/hal"); then - # For Debian - HAL_CALLOUTS_PATH="${libdir}/hal" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_CALLOUTS_PATH}" >&5 -$as_echo "${HAL_CALLOUTS_PATH}" >&6; } - elif (test -d "/usr/libexec"); then - # For RedHat - HAL_CALLOUTS_PATH="${libexecdir}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_CALLOUTS_PATH}" >&5 -$as_echo "${HAL_CALLOUTS_PATH}" >&6; } - elif (test -d "/usr/lib/hal"); then - # For OpenSUSE - HAL_CALLOUTS_PATH="${libdir}/hal" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_CALLOUTS_PATH}" >&5 -$as_echo "${HAL_CALLOUTS_PATH}" >&6; } - else - # FIXME - HAL_CALLOUTS_PATH="${libdir}/hal" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using default (${HAL_CALLOUTS_PATH})" >&5 -$as_echo "using default (${HAL_CALLOUTS_PATH})" >&6; } - fi + +# Check whether --with-hal-callouts-path was given. +if test "${with_hal_callouts_path+set}" = set; then : + withval=$with_hal_callouts_path; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-hal-callouts-path - see docs/configure.txt" "$LINENO" 5 + ;; + *) + HAL_CALLOUTS_PATH="${withval}" + ;; + esac + +else + + HAL_CALLOUTS_PATH="`pkg-config --silence-errors --variable=libexecdir hal 2>/dev/null`" + if test "$?" != "0" -o -z "${HAL_CALLOUTS_PATH}"; then + HAL_CALLOUTS_PATH="${libdir}/hal" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal Device Information path" >&5 +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_CALLOUTS_PATH}" >&5 +$as_echo "${HAL_CALLOUTS_PATH}" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal Device Information path" >&5 $as_echo_n "checking for libhal Device Information path... " >&6; } - HAL_FDI_PATH=`pkg-config --silence-errors --variable=hal_fdidir hal` - if test -n "$HAL_FDI_PATH"; then - HAL_FDI_PATH="${HAL_FDI_PATH}/information/20thirdparty" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_FDI_PATH}" >&5 -$as_echo "${HAL_FDI_PATH}" >&6; } - else - # seems supported everywhere + +# Check whether --with-hal-fdi-path was given. +if test "${with_hal_fdi_path+set}" = set; then : + withval=$with_hal_fdi_path; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-hal-fdi-path - see docs/configure.txt" "$LINENO" 5 + ;; + *) + HAL_FDI_PATH="${withval}" + ;; + esac + +else + + HAL_FDI_PATH="`pkg-config --silence-errors --variable=hal_fdidir hal 2>/dev/null`" + if test "$?" != "0" -o -z "${HAL_FDI_PATH}"; then HAL_FDI_PATH="${datarootdir}/hal/fdi/information/20thirdparty" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_FDI_PATH}" >&5 -$as_echo "${HAL_FDI_PATH}" >&6; } fi - fi - CFLAGS="${CFLAGS_ORIG}" - LDFLAGS="${LDFLAGS_ORIG}" +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GLib is version 2.14.0 or newer" >&5 -$as_echo_n "checking if GLib is version 2.14.0 or newer... " >&6; } - if pkg-config --silence-errors --atleast-version=2.14.0 glib-2.0; then - -$as_echo "#define HAVE_GLIB_2_14 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_FDI_PATH}" >&5 +$as_echo "${HAL_FDI_PATH}" >&6; } fi @@ -7878,27 +8126,34 @@ if test -z "${nut_have_libnetsnmp_seen}"; then nut_have_libnetsnmp_seen=yes CFLAGS_ORIG="${CFLAGS}" - LDFLAGS_ORIG="${LDFLAGS}" + LIBS_ORIG="${LIBS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP version via net-snmp-config" >&5 $as_echo_n "checking for Net-SNMP version via net-snmp-config... " >&6; } SNMP_VERSION=`net-snmp-config --version 2>/dev/null` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SNMP_VERSION} found" >&5 -$as_echo "${SNMP_VERSION} found" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } + if test "$?" != "0" -o -z "${SNMP_VERSION}"; then + SNMP_VERSION="none" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SNMP_VERSION} found" >&5 +$as_echo "${SNMP_VERSION} found" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP cflags" >&5 $as_echo_n "checking for Net-SNMP cflags... " >&6; } # Check whether --with-snmp-includes was given. if test "${with_snmp_includes+set}" = set; then : - withval=$with_snmp_includes; CFLAGS="${withval}" + withval=$with_snmp_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-snmp-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + else - CFLAGS="`net-snmp-config --cflags 2>/dev/null`" + CFLAGS="`net-snmp-config --base-cflags 2>/dev/null`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -7909,13 +8164,22 @@ $as_echo_n "checking for Net-SNMP libs... " >&6; } # Check whether --with-snmp-libs was given. if test "${with_snmp_libs+set}" = set; then : - withval=$with_snmp_libs; LDFLAGS="${withval}" + withval=$with_snmp_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-snmp-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + else - LDFLAGS="`net-snmp-config --libs 2>/dev/null`" + LIBS="`net-snmp-config --libs 2>/dev/null`" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LDFLAGS}" >&5 -$as_echo "${LDFLAGS}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } for ac_header in net-snmp/net-snmp-config.h do : @@ -7948,11 +8212,11 @@ done if test "${nut_have_libnetsnmp}" = "yes"; then LIBNETSNMP_CFLAGS="${CFLAGS}" - LIBNETSNMP_LDFLAGS="${LDFLAGS}" + LIBNETSNMP_LIBS="${LIBS}" fi CFLAGS="${CFLAGS_ORIG}" - LDFLAGS="${LDFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" fi @@ -7970,27 +8234,34 @@ if test -z "${nut_have_neon_seen}"; then nut_have_neon_seen=yes CFLAGS_ORIG="${CFLAGS}" - LDFLAGS_ORIG="${LDFLAGS}" + LIBS_ORIG="${LIBS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libneon version via pkg-config (0.25.0 minimum required)" >&5 $as_echo_n "checking for libneon version via pkg-config (0.25.0 minimum required)... " >&6; } - NEON_VERSION=`pkg-config --silence-errors --modversion neon` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${NEON_VERSION} found" >&5 -$as_echo "${NEON_VERSION} found" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } + NEON_VERSION="`pkg-config --silence-errors --modversion neon 2>/dev/null`" + if test "$?" != "0" -o -z "${NEON_VERSION}"; then + NEON_VERSION="none" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${NEON_VERSION} found" >&5 +$as_echo "${NEON_VERSION} found" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libneon cflags" >&5 $as_echo_n "checking for libneon cflags... " >&6; } # Check whether --with-neon-includes was given. if test "${with_neon_includes+set}" = set; then : - withval=$with_neon_includes; CFLAGS="${withval}" + withval=$with_neon_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-neon-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + else - CFLAGS="`pkg-config --silence-errors --cflags neon`" + CFLAGS="`pkg-config --silence-errors --cflags neon 2>/dev/null`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -8001,13 +8272,22 @@ $as_echo_n "checking for libneon ldflags... " >&6; } # Check whether --with-neon-libs was given. if test "${with_neon_libs+set}" = set; then : - withval=$with_neon_libs; LDFLAGS="${withval}" + withval=$with_neon_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-neon-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + else - LDFLAGS="`pkg-config --silence-errors --libs neon`" + LIBS="`pkg-config --silence-errors --libs neon 2>/dev/null`" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LDFLAGS}" >&5 -$as_echo "${LDFLAGS}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } for ac_header in ne_xmlreq.h do : @@ -8053,11 +8333,11 @@ fi done LIBNEON_CFLAGS="${CFLAGS}" - LIBNEON_LDFLAGS="${LDFLAGS}" + LIBNEON_LIBS="${LIBS}" fi CFLAGS="${CFLAGS_ORIG}" - LDFLAGS="${LDFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" fi @@ -8075,16 +8355,25 @@ if test -z "${nut_have_libpowerman_seen}"; then nut_have_libpowerman_seen=yes CFLAGS_ORIG="${CFLAGS}" - LDFLAGS_ORIG="${LDFLAGS}" + LIBS_ORIG="${LIBS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpowerman cflags" >&5 $as_echo_n "checking for libpowerman cflags... " >&6; } # Check whether --with-powerman-includes was given. if test "${with_powerman_includes+set}" = set; then : - withval=$with_powerman_includes; CFLAGS="${withval}" + withval=$with_powerman_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-powerman-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + else - CFLAGS="`pkg-config --silence-errors --cflags libpowerman`" + CFLAGS="`pkg-config --silence-errors --cflags libpowerman 2>/dev/null`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -8095,13 +8384,22 @@ $as_echo_n "checking for libpowerman libs... " >&6; } # Check whether --with-powerman-libs was given. if test "${with_powerman_libs+set}" = set; then : - withval=$with_powerman_libs; LDFLAGS="${withval}" + withval=$with_powerman_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-powerman-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + else - LDFLAGS="`pkg-config --silence-errors --libs libpowerman`" + LIBS="`pkg-config --silence-errors --libs libpowerman 2>/dev/null`" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LDFLAGS}" >&5 -$as_echo "${LDFLAGS}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } for ac_header in libpowerman.h do : @@ -8134,11 +8432,11 @@ done if test "${nut_have_libpowerman}" = "yes"; then LIBPOWERMAN_CFLAGS="${CFLAGS}" - LIBPOWERMAN_LDFLAGS="${LDFLAGS}" + LIBPOWERMAN_LIBS="${LIBS}" fi CFLAGS="${CFLAGS_ORIG}" - LDFLAGS="${LDFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" fi @@ -8203,7 +8501,7 @@ if test "$ac_res" != no; then : fi - LIBUSB_LDFLAGS="-R/usr/sfw/lib ${LIBUSB_LDFLAGS}" + LIBUSB_LIBS="-R/usr/sfw/lib ${LIBUSB_LIBS}" $as_echo "#define SUN_LIBUSB 1" >>confdefs.h @@ -8213,6 +8511,163 @@ esac +if test "${nut_with_serial}" != "no"; then + nut_with_serial="yes" +fi + if test "${nut_with_serial}" = "yes"; then + WITH_SERIAL_TRUE= + WITH_SERIAL_FALSE='#' +else + WITH_SERIAL_TRUE='#' + WITH_SERIAL_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build serial drivers" >&5 +$as_echo_n "checking whether to build serial drivers... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_serial}" >&5 +$as_echo "${nut_with_serial}" >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + fi + echo "build serial drivers: ${nut_with_serial}" >> conf_nut_report_feature + + + + +if test "${nut_with_usb}" = "yes" -a "${nut_have_libusb}" != "yes"; then + as_fn_error "\"USB drivers requested, but libusb not found.\"" "$LINENO" 5 +fi + +if test "${nut_with_usb}" != "no"; then + nut_with_usb="${nut_have_libusb}" +fi + + if test "${nut_with_usb}" = "yes"; then + WITH_USB_TRUE= + WITH_USB_FALSE='#' +else + WITH_USB_TRUE='#' + WITH_USB_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build USB drivers" >&5 +$as_echo_n "checking whether to build USB drivers... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_usb}" >&5 +$as_echo "${nut_with_usb}" >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + fi + echo "build USB drivers: ${nut_with_usb}" >> conf_nut_report_feature + + + + +if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then + as_fn_error "\"Net-SNMP libraries not found, required for SNMP drivers\"" "$LINENO" 5 +fi + +if test "${nut_with_snmp}" != "no"; then + nut_with_snmp="${nut_have_libnetsnmp}" +fi + + if test "${nut_with_snmp}" = "yes"; then + WITH_SNMP_TRUE= + WITH_SNMP_FALSE='#' +else + WITH_SNMP_TRUE='#' + WITH_SNMP_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build SNMP drivers" >&5 +$as_echo_n "checking whether to build SNMP drivers... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_snmp}" >&5 +$as_echo "${nut_with_snmp}" >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + fi + echo "build SNMP drivers: ${nut_with_snmp}" >> conf_nut_report_feature + + + + +if test "${nut_with_neon}" = "yes" -a "${nut_have_neon}" != "yes"; then + as_fn_error "\"neon libraries not found, required for neon based XML/HTTP driver\"" "$LINENO" 5 +fi + +if test "${nut_with_neon}" != "no"; then + nut_with_neon="${nut_have_neon}" +fi + + if test "${nut_with_neon}" = "yes"; then + WITH_NEONXML_TRUE= + WITH_NEONXML_FALSE='#' +else + WITH_NEONXML_TRUE='#' + WITH_NEONXML_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build neon based XML driver" >&5 +$as_echo_n "checking whether to build neon based XML driver... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_neon}" >&5 +$as_echo "${nut_with_neon}" >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + fi + echo "build neon based XML driver: ${nut_with_neon}" >> conf_nut_report_feature + + + + + +if test "${nut_with_powerman}" = "yes" -a "${nut_have_libpowerman}" != "yes"; then + as_fn_error "\"Powerman client libraries not found, required for Powerman PDU client driver\"" "$LINENO" 5 +fi + +if test "${nut_with_powerman}" != "no"; then + nut_with_powerman="${nut_have_libpowerman}" +fi + + if test "${nut_with_powerman}" = "yes"; then + WITH_LIBPOWERMAN_TRUE= + WITH_LIBPOWERMAN_FALSE='#' +else + WITH_LIBPOWERMAN_TRUE='#' + WITH_LIBPOWERMAN_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Powerman PDU client driver" >&5 +$as_echo_n "checking whether to build Powerman PDU client driver... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_powerman}" >&5 +$as_echo "${nut_with_powerman}" >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + fi + echo "build Powerman PDU client driver: ${nut_with_powerman}" >> conf_nut_report_feature + + + + + # Check whether --with-ssl was given. if test "${with_ssl+set}" = set; then : withval=$with_ssl; nut_with_ssl="${withval}" @@ -8229,29 +8684,37 @@ if test -z "${nut_have_libssl_seen}"; then nut_have_libssl_seen=yes CFLAGS_ORIG="${CFLAGS}" - LDFLAGS_ORIG="${LDFLAGS}" + LIBS_ORIG="${LIBS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl version via pkg-config" >&5 $as_echo_n "checking for openssl version via pkg-config... " >&6; } - OPENSSL_VERSION=`pkg-config --silence-errors --modversion openssl` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OPENSSL_VERSION} found" >&5 -$as_echo "${OPENSSL_VERSION} found" >&6; } - CFLAGS="`pkg-config --silence-errors --cflags openssl`" - LDFLAGS="`pkg-config --silence-errors --libs openssl`" + OPENSSL_VERSION="`pkg-config --silence-errors --modversion openssl 2>/dev/null`" + if test "$?" = "0" -a -n "${OPENSSL_VERSION}"; then + CFLAGS="`pkg-config --silence-errors --cflags openssl 2>/dev/null`" + LIBS="`pkg-config --silence-errors --libs openssl 2>/dev/null`" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } + OPENSSL_VERSION="none" CFLAGS="" - LDFLAGS="-lssl -lcrypto" + LIBS="-lssl -lcrypto" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OPENSSL_VERSION} found" >&5 +$as_echo "${OPENSSL_VERSION} found" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl cflags" >&5 $as_echo_n "checking for openssl cflags... " >&6; } # Check whether --with-ssl-includes was given. if test "${with_ssl_includes+set}" = set; then : - withval=$with_ssl_includes; CFLAGS="${withval}" + withval=$with_ssl_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-ssl-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -8262,11 +8725,20 @@ $as_echo_n "checking for openssl ldflags... " >&6; } # Check whether --with-ssl-libs was given. if test "${with_ssl_libs+set}" = set; then : - withval=$with_ssl_libs; LDFLAGS="${withval}" + withval=$with_ssl_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-ssl-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LDFLAGS}" >&5 -$as_echo "${LDFLAGS}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } for ac_header in openssl/ssl.h do : @@ -8302,11 +8774,11 @@ done $as_echo "#define HAVE_SSL 1" >>confdefs.h LIBSSL_CFLAGS="${CFLAGS}" - LIBSSL_LDFLAGS="${LDFLAGS}" + LIBSSL_LIBS="${LIBS}" fi CFLAGS="${CFLAGS_ORIG}" - LDFLAGS="${LDFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" fi fi @@ -8336,7 +8808,7 @@ $as_echo "${nut_with_ssl}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature fi echo "enable SSL development code: ${nut_with_ssl}" >> conf_nut_report_feature @@ -8498,7 +8970,7 @@ rm -f core conftest.err conftest.$ac_objext \ $as_echo "#define HAVE_WRAP 1" >>confdefs.h LIBWRAP_CFLAGS="" - LIBWRAP_LDFLAGS="${LIBS}" + LIBWRAP_LIBS="${LIBS}" fi LIBS="${LIBS_ORIG}" @@ -8531,7 +9003,7 @@ $as_echo "${nut_with_wrap}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature fi echo "enable libwrap (tcp-wrappers) support: ${nut_with_wrap}" >> conf_nut_report_feature @@ -8539,125 +9011,6 @@ $as_echo "${nut_with_wrap}" >&6; } -# Check whether --with-ipv6 was given. -if test "${with_ipv6+set}" = set; then : - withval=$with_ipv6; nut_with_ipv6="${withval}" -else - nut_with_ipv6="auto" - -fi - - - -if test "${nut_with_ipv6}" != "no"; then - -if test -z "${nut_check_ipv6_seen}"; then - nut_check_ipv6_seen=yes - - for ac_func in getaddrinfo freeaddrinfo -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - nut_have_ipv6=yes -else - nut_have_ipv6=no -fi -done - - - ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include -" -if test "x$ac_cv_type_struct_addrinfo" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_ADDRINFO 1 -_ACEOF - - -else - nut_have_ipv6=no -fi - - - ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include -" -if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 -_ACEOF - - -else - nut_have_ipv6=no -fi - - - ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "#include -" -if test "x$ac_cv_type_struct_sockaddr_in6" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_IN6 1 -_ACEOF - - -else - nut_have_ipv6=no -fi -ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "#include -" -if test "x$ac_cv_type_struct_in6_addr" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IN6_ADDR 1 -_ACEOF - - -else - nut_have_ipv6=no -fi - - - if test "${nut_have_ipv6}" = "yes"; then - -$as_echo "#define HAVE_IPV6 1" >>confdefs.h - - fi -fi - -fi - -if test "${nut_with_ipv6}" = "yes" -a "${nut_have_ipv6}" != "yes"; then - as_fn_error "\"Some feature required for IPv6 support is missing\"" "$LINENO" 5 -fi - -if test "${nut_with_ipv6}" != "no"; then - nut_with_ipv6="${nut_have_ipv6}" -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable IPv6 support" >&5 -$as_echo_n "checking whether to enable IPv6 support... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_ipv6}" >&5 -$as_echo "${nut_with_ipv6}" >&6; } - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - fi - echo "enable IPv6 support: ${nut_with_ipv6}" >> conf_nut_report_feature - - - - - # Check whether --with-cgi was given. if test "${with_cgi+set}" = set; then : withval=$with_cgi; nut_with_cgi="${withval}" @@ -8684,17 +9037,14 @@ if test -z "${nut_have_libgd_seen}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gd version via gdlib-config" >&5 $as_echo_n "checking for gd version via gdlib-config... " >&6; } GD_VERSION=`gdlib-config --version 2>/dev/null` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${GD_VERSION}" >&5 -$as_echo "${GD_VERSION}" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - GD_VERSION="unknown" + if test "$?" != "0" -o -z "${GD_VERSION}"; then + GD_VERSION="none" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${GD_VERSION} found" >&5 +$as_echo "${GD_VERSION} found" >&6; } case "${GD_VERSION}" in - unknown) + none) ;; 2.0.5 | 2.0.6 | 2.0.7) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gd ${GD_VERSION} detected, unable to use gdlib-config script" >&5 @@ -8703,9 +9053,9 @@ $as_echo "$as_me: WARNING: gd ${GD_VERSION} detected, unable to use gdlib-config $as_echo "$as_me: WARNING: If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs" >&2;} ;; *) - CFLAGS="`gdlib-config --includes`" - LDFLAGS="`gdlib-config --ldflags`" - LIBS="`gdlib-config --libs`" + CFLAGS="`gdlib-config --includes 2>/dev/null`" + LDFLAGS="`gdlib-config --ldflags 2>/dev/null`" + LIBS="`gdlib-config --libs 2>/dev/null`" ;; esac @@ -8714,7 +9064,16 @@ $as_echo_n "checking for gd include flags... " >&6; } # Check whether --with-gd-includes was given. if test "${with_gd_includes+set}" = set; then : - withval=$with_gd_includes; CFLAGS="${withval}" + withval=$with_gd_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-gd-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -8725,7 +9084,17 @@ $as_echo_n "checking for gd library flags... " >&6; } # Check whether --with-gd-libs was given. if test "${with_gd_libs+set}" = set; then : - withval=$with_gd_libs; LDFLAGS="${withval}" LIBS="" + withval=$with_gd_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-gd-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LDFLAGS="${withval}" + LIBS="" + ;; + esac + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LDFLAGS} ${LIBS}" >&5 @@ -8847,71 +9216,533 @@ $as_echo "${nut_with_cgi}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature fi echo "build CGI programs: ${nut_with_cgi}" >> conf_nut_report_feature -if test "${nut_with_dev}" != "no"; then - nut_with_dev="yes" +if test "${nut_with_hal}" = "yes" -a "${nut_have_libhal}" != "yes"; then + as_fn_error "\"libhal not found, required for HAL support\"" "$LINENO" 5 +fi + +if test "${nut_with_hal}" = "yes" -a "${nut_have_libusb}" != "yes"; then + as_fn_error "\"libusb not found, required for HAL support\"" "$LINENO" 5 +fi + +if test "${nut_with_hal}" != "no"; then + if test "${nut_have_libhal}" = "yes" -a "${nut_have_libusb}" = "yes"; then + nut_with_hal="yes" + else + nut_with_hal="no" + fi +fi + + if test "${nut_with_hal}" = "yes"; then + WITH_HAL_TRUE= + WITH_HAL_FALSE='#' else - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=no + WITH_HAL_TRUE='#' + WITH_HAL_FALSE= fi - - - - - - - -fi - if test "${nut_with_dev}" = "yes"; then - WITH_DEV_TRUE= - WITH_DEV_FALSE='#' -else - WITH_DEV_TRUE='#' - WITH_DEV_FALSE= -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build and install the development files" >&5 -$as_echo_n "checking whether to build and install the development files... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_dev}" >&5 -$as_echo "${nut_with_dev}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable HAL support" >&5 +$as_echo_n "checking whether to enable HAL support... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_hal}" >&5 +$as_echo "${nut_with_hal}" >&6; } if test -z "${nut_report_feature_flag}"; then nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature fi - echo "build and install the development files: ${nut_with_dev}" >> conf_nut_report_feature + echo "enable HAL support: ${nut_with_hal}" >> conf_nut_report_feature + + + +if test -z "${nut_have_asciidoc_seen}"; then + nut_have_asciidoc_seen=yes + + for ac_prog in asciidoc +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 test "${ac_cv_path_ASCIIDOC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $ASCIIDOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_ASCIIDOC="$ASCIIDOC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ASCIIDOC="$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 + + ;; +esac +fi +ASCIIDOC=$ac_cv_path_ASCIIDOC +if test -n "$ASCIIDOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASCIIDOC" >&5 +$as_echo "$ASCIIDOC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ASCIIDOC" && break +done + + if test -n "${ASCIIDOC}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for asciiDoc version" >&5 +$as_echo_n "checking for asciiDoc version... " >&6; } + ASCIIDOC_VERSION="`${ASCIIDOC} --version 2>/dev/null`" + ASCIIDOC_VERSION="${ASCIIDOC_VERSION##* }" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ASCIIDOC_VERSION} found" >&5 +$as_echo "${ASCIIDOC_VERSION} found" >&6; } + fi + + for ac_prog in a2x +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 test "${ac_cv_path_A2X+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $A2X in + [\\/]* | ?:[\\/]*) + ac_cv_path_A2X="$A2X" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_A2X="$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 + + ;; +esac +fi +A2X=$ac_cv_path_A2X +if test -n "$A2X"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A2X" >&5 +$as_echo "$A2X" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$A2X" && break +done + + if test -n "${A2X}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a2x version" >&5 +$as_echo_n "checking for a2x version... " >&6; } + A2X_VERSION="`${A2X} --version 2>/dev/null`" + A2X_VERSION="${A2X_VERSION##* }" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${A2X_VERSION} found" >&5 +$as_echo "${A2X_VERSION} found" >&6; } + fi + + for ac_prog in dblatex +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 test "${ac_cv_path_DBLATEX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $DBLATEX in + [\\/]* | ?:[\\/]*) + ac_cv_path_DBLATEX="$DBLATEX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DBLATEX="$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 + + ;; +esac +fi +DBLATEX=$ac_cv_path_DBLATEX +if test -n "$DBLATEX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBLATEX" >&5 +$as_echo "$DBLATEX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DBLATEX" && break +done + + if test -n "${DBLATEX}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dblatex version" >&5 +$as_echo_n "checking for dblatex version... " >&6; } + DBLATEX_VERSION="`${DBLATEX} --version 2>/dev/null`" + DBLATEX_VERSION="${DBLATEX_VERSION##* }" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${DBLATEX_VERSION} found" >&5 +$as_echo "${DBLATEX_VERSION} found" >&6; } + fi + + fi + + +case "${nut_with_doc}" in + yes|all|auto) + nut_doc_build_list="html-single html-chunked pdf" + ;; + no) + nut_doc_build_list="" + ;; + *) + nut_doc_build_list="`echo ${nut_with_doc} | sed 's/,/ /g'`" + ;; +esac + +for nut_doc_build_target in ${nut_doc_build_list}; do + case "${nut_doc_build_target}" in + html-single) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asciidoc version can build ${nut_doc_build_target}" >&5 +$as_echo_n "checking if asciidoc version can build ${nut_doc_build_target}... " >&6; } + + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "${ASCIIDOC_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "8.6.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + + fi + + ;; + + html-chunked) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if a2x version can build ${nut_doc_build_target}" >&5 +$as_echo_n "checking if a2x version can build ${nut_doc_build_target}... " >&6; } + + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "${A2X_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "8.6.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + + fi + + ;; + + pdf) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dblatex version can build ${nut_doc_build_target}" >&5 +$as_echo_n "checking if dblatex version can build ${nut_doc_build_target}... " >&6; } + + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "${DBLATEX_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "0.2.5" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + + fi + + ;; + esac +done + +case "${nut_with_doc}" in +auto) + if test -n "${DOC_BUILD_LIST}"; then + nut_with_doc="yes" + else + nut_with_doc="no" + fi + ;; +no) + ;; +*) + if test -z "${DOC_NOBUILD_LIST}"; then + nut_with_doc="yes" + else + as_fn_error "\"Asciidoc is required for documentation support and missing\"" "$LINENO" 5 + fi + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if asciidoc version can build website (minimum required 8.6.3)" >&5 +$as_echo_n "checking if asciidoc version can build website (minimum required 8.6.3)... " >&6; } + + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "${ASCIIDOC_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "8.6.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + nut_have_asciidoc="yes" + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + nut_have_asciidoc="no" + + fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if a2x version can build website (minimum required 8.6.3)" >&5 +$as_echo_n "checking if a2x version can build website (minimum required 8.6.3)... " >&6; } + + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "${A2X_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "8.6.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + nut_have_asciidoc="no" + + fi + + + if test "${nut_have_asciidoc}" = "yes"; then + HAVE_ASCIIDOC_TRUE= + HAVE_ASCIIDOC_FALSE='#' +else + HAVE_ASCIIDOC_TRUE='#' + HAVE_ASCIIDOC_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build and install documentation" >&5 +$as_echo_n "checking whether to build and install documentation... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_doc}" >&5 +$as_echo "${nut_with_doc}" >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + fi + echo "build and install documentation: ${nut_with_doc}" >> conf_nut_report_feature + + + +if test "${nut_with_doc}" = "yes"; then + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + fi + echo "only build specific documentation format: ${DOC_BUILD_LIST}" >> conf_nut_report_feature + +fi + + case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 @@ -8920,8 +9751,8 @@ esac -macro_version='2.2.6' -macro_revision='1.3012' +macro_version='2.2.6b' +macro_revision='1.3017' @@ -9391,13 +10222,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:9394: $ac_compile\"" >&5) + (eval echo "\"\$as_me:10225: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:9397: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:10228: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:9400: output\"" >&5) + (eval echo "\"\$as_me:10231: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -9863,7 +10694,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -10602,7 +11433,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 10605 "configure"' > conftest.$ac_ext + echo '#line 11436 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -11405,6 +12236,36 @@ fi + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + # Check whether --with-pic was given. @@ -11834,11 +12695,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11837: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12698: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11841: \$? = $ac_status" >&5 + echo "$as_me:12702: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12003,7 +12864,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -12173,11 +13034,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12176: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13037: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12180: \$? = $ac_status" >&5 + echo "$as_me:13041: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12278,11 +13139,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12281: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13142: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12285: \$? = $ac_status" >&5 + echo "$as_me:13146: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12333,11 +13194,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12336: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13197: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12340: \$? = $ac_status" >&5 + echo "$as_me:13201: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12476,6 +13337,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -12567,7 +13429,7 @@ _LT_EOF archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -14029,7 +14891,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -14716,7 +15578,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 14719 "configure" +#line 15581 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14812,7 +15674,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 14815 "configure" +#line 15677 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15040,215 +15902,78 @@ CC="$lt_save_CC" - -if test "${nut_with_serial}" != "no"; then - nut_with_serial="yes" -fi - if test "${nut_with_serial}" = "yes"; then - WITH_SERIAL_TRUE= - WITH_SERIAL_FALSE='#' +if test "${nut_with_dev}" != "no"; then + nut_with_dev="yes" else - WITH_SERIAL_TRUE='#' - WITH_SERIAL_FALSE= + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build serial drivers" >&5 -$as_echo_n "checking whether to build serial drivers... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_serial}" >&5 -$as_echo "${nut_with_serial}" >&6; } + + + + +fi + if test "${nut_with_dev}" = "yes"; then + WITH_DEV_TRUE= + WITH_DEV_FALSE='#' +else + WITH_DEV_TRUE='#' + WITH_DEV_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build and install the development files" >&5 +$as_echo_n "checking whether to build and install the development files... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_dev}" >&5 +$as_echo "${nut_with_dev}" >&6; } if test -z "${nut_report_feature_flag}"; then nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature fi - echo "build serial drivers: ${nut_with_serial}" >> conf_nut_report_feature + echo "build and install the development files: ${nut_with_dev}" >> conf_nut_report_feature -if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then - as_fn_error "\"Net-SNMP libraries not found, required for SNMP drivers\"" "$LINENO" 5 -fi - -if test "${nut_with_snmp}" != "no"; then - nut_with_snmp="${nut_have_libnetsnmp}" -fi - - if test "${nut_with_snmp}" = "yes"; then - WITH_SNMP_TRUE= - WITH_SNMP_FALSE='#' -else - WITH_SNMP_TRUE='#' - WITH_SNMP_FALSE= -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build SNMP drivers" >&5 -$as_echo_n "checking whether to build SNMP drivers... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_snmp}" >&5 -$as_echo "${nut_with_snmp}" >&6; } - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - fi - echo "build SNMP drivers: ${nut_with_snmp}" >> conf_nut_report_feature - - - - -if test "${nut_with_usb}" = "yes" -a "${nut_have_libusb}" != "yes"; then - as_fn_error "\"USB drivers requested, but libusb not found.\"" "$LINENO" 5 -fi - -if test "${nut_with_usb}" != "no"; then - nut_with_usb="${nut_have_libusb}" -fi - - if test "${nut_with_usb}" = "yes"; then - WITH_USB_TRUE= - WITH_USB_FALSE='#' -else - WITH_USB_TRUE='#' - WITH_USB_FALSE= -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build USB drivers" >&5 -$as_echo_n "checking whether to build USB drivers... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_usb}" >&5 -$as_echo "${nut_with_usb}" >&6; } - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - fi - echo "build USB drivers: ${nut_with_usb}" >> conf_nut_report_feature - - - - -if test "${nut_with_hal}" = "yes" -a "${nut_have_libhal}" != "yes"; then - as_fn_error "\"libhal not found, required for HAL support\"" "$LINENO" 5 -fi - -if test "${nut_with_hal}" = "yes" -a "${nut_have_libusb}" != "yes"; then - as_fn_error "\"libusb not found, required for HAL support\"" "$LINENO" 5 -fi - -if test "${nut_with_hal}" != "no"; then - if test "${nut_have_libhal}" = "yes" -a "${nut_have_libusb}" = "yes"; then - nut_with_hal="yes" - else - nut_with_hal="no" - fi -fi - - if test "${nut_with_hal}" = "yes"; then - WITH_HAL_TRUE= - WITH_HAL_FALSE='#' -else - WITH_HAL_TRUE='#' - WITH_HAL_FALSE= -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable HAL support" >&5 -$as_echo_n "checking whether to enable HAL support... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_hal}" >&5 -$as_echo "${nut_with_hal}" >&6; } - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - fi - echo "enable HAL support: ${nut_with_hal}" >> conf_nut_report_feature - - - - -if test "${nut_with_neon}" = "yes" -a "${nut_have_neon}" != "yes"; then - as_fn_error "\"neon libraries not found, required for neon based XML/HTTP driver\"" "$LINENO" 5 -fi - -if test "${nut_with_neon}" != "no"; then - nut_with_neon="${nut_have_neon}" -fi - - if test "${nut_with_neon}" = "yes"; then - WITH_NEONXML_TRUE= - WITH_NEONXML_FALSE='#' -else - WITH_NEONXML_TRUE='#' - WITH_NEONXML_FALSE= -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build neon based XML driver" >&5 -$as_echo_n "checking whether to build neon based XML driver... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_neon}" >&5 -$as_echo "${nut_with_neon}" >&6; } - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - fi - echo "build neon based XML driver: ${nut_with_neon}" >> conf_nut_report_feature - - - - - -if test "${nut_with_powerman}" = "yes" -a "${nut_have_libpowerman}" != "yes"; then - as_fn_error "\"Powerman client libraries not found, required for Powerman PDU client driver\"" "$LINENO" 5 -fi - -if test "${nut_with_powerman}" != "no"; then - nut_with_powerman="${nut_have_libpowerman}" -fi - - if test "${nut_with_powerman}" = "yes"; then - WITH_LIBPOWERMAN_TRUE= - WITH_LIBPOWERMAN_FALSE='#' -else - WITH_LIBPOWERMAN_TRUE='#' - WITH_LIBPOWERMAN_FALSE= -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Powerman PDU client driver" >&5 -$as_echo_n "checking whether to build Powerman PDU client driver... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_powerman}" >&5 -$as_echo "${nut_with_powerman}" >&6; } - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - fi - echo "build Powerman PDU client driver: ${nut_with_powerman}" >> conf_nut_report_feature - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking state path" >&5 $as_echo_n "checking state path... " >&6; } # Check whether --with-statepath was given. if test "${with_statepath+set}" = set; then : - withval=$with_statepath; case "${withval}" in + withval=$with_statepath; + case "${withval}" in yes|no) + as_fn_error "invalid option --with(out)-statepath - see docs/configure.txt" "$LINENO" 5 ;; *) STATEPATH="${withval}" ;; esac + fi @@ -15265,16 +15990,19 @@ $as_echo_n "checking alt pid path... " >&6; } # Check whether --with-altpidpath was given. if test "${with_altpidpath+set}" = set; then : - withval=$with_altpidpath; case "${withval}" in + withval=$with_altpidpath; + case "${withval}" in yes|no) - ALTPIDPATH="${STATEPATH}" + as_fn_error "invalid option --with(out)-altpidpath - see docs/configure.txt" "$LINENO" 5 ;; *) ALTPIDPATH="${withval}" ;; esac + else - ALTPIDPATH="${STATEPATH}" + + ALTPIDPATH="${STATEPATH}" fi @@ -15291,13 +16019,16 @@ $as_echo_n "checking driver path... " >&6; } # Check whether --with-drvpath was given. if test "${with_drvpath+set}" = set; then : - withval=$with_drvpath; case "${withval}" in + withval=$with_drvpath; + case "${withval}" in yes|no) + as_fn_error "invalid option --with(out)-drvpath - see docs/configure.txt" "$LINENO" 5 ;; *) driverexecdir="${withval}" ;; esac + fi conftemp="${driverexecdir}" @@ -15316,13 +16047,16 @@ $as_echo_n "checking cgi path... " >&6; } # Check whether --with-cgipath was given. if test "${with_cgipath+set}" = set; then : - withval=$with_cgipath; case "${withval}" in + withval=$with_cgipath; + case "${withval}" in yes|no) + as_fn_error "invalid option --with(out)-cgipath - see docs/configure.txt" "$LINENO" 5 ;; *) cgiexecdir="${withval}" ;; esac + fi conftemp="${cgiexecdir}" @@ -15341,13 +16075,16 @@ $as_echo_n "checking html path... " >&6; } # Check whether --with-htmlpath was given. if test "${with_htmlpath+set}" = set; then : - withval=$with_htmlpath; case "${withval}" in + withval=$with_htmlpath; + case "${withval}" in yes|no) + as_fn_error "invalid option --with(out)-htmlpath - see docs/configure.txt" "$LINENO" 5 ;; *) htmldir="${withval}" ;; esac + fi conftemp="${htmldir}" @@ -15366,13 +16103,16 @@ $as_echo_n "checking pidpath... " >&6; } # Check whether --with-pidpath was given. if test "${with_pidpath+set}" = set; then : - withval=$with_pidpath; case "${withval}" in + withval=$with_pidpath; + case "${withval}" in yes|no) + as_fn_error "invalid option --with(out)-pidpath - see docs/configure.txt" "$LINENO" 5 ;; *) PIDPATH="${withval}" ;; esac + fi @@ -15388,16 +16128,19 @@ $as_echo_n "checking network port number... " >&6; } # Check whether --with-port was given. if test "${with_port+set}" = set; then : - withval=$with_port; case "${withval}" in + withval=$with_port; + case "${withval}" in yes|no) - PORT="3493" + as_fn_error "invalid option --with(out)-port - see docs/configure.txt" "$LINENO" 5 ;; *) PORT="${withval}" ;; esac + else - PORT="3493" + + PORT="3493" fi @@ -15409,20 +16152,26 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PORT}" >&5 $as_echo "${PORT}" >&6; } -nut_user_given= { $as_echo "$as_me:${as_lineno-$LINENO}: checking user to run as" >&5 $as_echo_n "checking user to run as... " >&6; } # Check whether --with-user was given. if test "${with_user+set}" = set; then : - withval=$with_user; case "${withval}" in + withval=$with_user; + case "${withval}" in yes|no) + as_fn_error "invalid option --with(out)-user - see docs/configure.txt" "$LINENO" 5 ;; *) RUN_AS_USER="${withval}" nut_user_given=yes ;; esac + +else + + nut_user_given=no + fi @@ -15433,20 +16182,26 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RUN_AS_USER}" >&5 $as_echo "${RUN_AS_USER}" >&6; } -nut_group_given= { $as_echo "$as_me:${as_lineno-$LINENO}: checking group membership of user to run as" >&5 $as_echo_n "checking group membership of user to run as... " >&6; } # Check whether --with-group was given. if test "${with_group+set}" = set; then : - withval=$with_group; case "${withval}" in + withval=$with_group; + case "${withval}" in yes|no) + as_fn_error "invalid option --with(out)-group - see docs/configure.txt" "$LINENO" 5 ;; *) RUN_AS_GROUP="${withval}" nut_group_given=yes ;; esac + +else + + nut_group_given=no + fi @@ -15457,10 +16212,10 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RUN_AS_GROUP}" >&5 $as_echo "${RUN_AS_GROUP}" >&6; } -if test -n "$nut_user_given" -a -z "$nut_group_given"; then - as_fn_error "\"If you specify --with-user, you also must specify --with-group\"" "$LINENO" 5 -elif test -z "$nut_user_given" -a -n "$nut_group_given"; then - as_fn_error "\"If you specify --with-group, you also must specify --with-user\"" "$LINENO" 5 +if test "${nut_user_given}" = "yes" -a "${nut_group_given}" = "no"; then + as_fn_error "\"If you specify --with-user, you also must specify --with-group\"" "$LINENO" 5 +elif test "${nut_user_given}" = "no" -a "${nut_group_given}" = "yes"; then + as_fn_error "\"If you specify --with-group, you also must specify --with-user\"" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking facility for syslog" >&5 @@ -15468,16 +16223,19 @@ $as_echo_n "checking facility for syslog... " >&6; } # Check whether --with-logfacility was given. if test "${with_logfacility+set}" = set; then : - withval=$with_logfacility; case "${withval}" in + withval=$with_logfacility; + case "${withval}" in yes|no) - LOGFACILITY="LOG_DAEMON" + as_fn_error "invalid option --with(out)-logfacility - see docs/configure.txt" "$LINENO" 5 ;; *) LOGFACILITY="${withval}" ;; esac + else - LOGFACILITY="LOG_DAEMON" + + LOGFACILITY="LOG_DAEMON" fi @@ -15494,11 +16252,10 @@ $as_echo_n "checking which drivers to build... " >&6; } # Check whether --with-drivers was given. if test "${with_drivers+set}" = set; then : - withval=$with_drivers; case "${withval}" in - yes | no) - DRIVER_BUILD_LIST="all" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: all available" >&5 -$as_echo "all available" >&6; } + withval=$with_drivers; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-drivers - see docs/configure.txt" "$LINENO" 5 ;; *) DRIVER_BUILD_LIST=`echo ${withval} | sed "s/,/ /g"` @@ -15513,7 +16270,6 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: all available" >&5 $as_echo "all available" >&6; } - fi if test "${DRIVER_BUILD_LIST}" != "all"; then @@ -15526,11 +16282,11 @@ fi if test "${DRIVER_BUILD_LIST}" != "all"; then - if test -z "${nut_report_feature_flag}"; then + if test -z "${nut_report_feature_flag}"; then nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature fi echo "only build specific drivers: ${DRIVER_BUILD_LIST}" >> conf_nut_report_feature @@ -15539,17 +16295,17 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking which driver man pages to install" >&5 $as_echo_n "checking which driver man pages to install... " >&6; } if test "${DRIVER_BUILD_LIST}" = "all"; then - DRIVER_MAN_LIST=all - { $as_echo "$as_me:${as_lineno-$LINENO}: result: all available" >&5 + DRIVER_MAN_LIST=all + { $as_echo "$as_me:${as_lineno-$LINENO}: result: all available" >&5 $as_echo "all available" >&6; } else - DRIVER_MAN_LIST="" - for i in ${DRIVER_BUILD_LIST}; do - if test -f ${srcdir}/man/$i.8; then - DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8" - fi - done - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${DRIVER_MAN_LIST}" >&5 + DRIVER_MAN_LIST="" + for i in ${DRIVER_BUILD_LIST}; do + if test -f ${srcdir}/docs/man/$i.8; then + DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8" + fi + done + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${DRIVER_MAN_LIST}" >&5 $as_echo "${DRIVER_MAN_LIST}" >&6; } fi @@ -15559,50 +16315,49 @@ $as_echo_n "checking whether to strip debug symbols... " >&6; } if test "${enable_strip+set}" = set; then : enableval=$enable_strip; case "${withval}" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - CFLAGS="${CFLAGS} -s" + CFLAGS="${CFLAGS} -s" ;; esac else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install pkg-config *.pc files" >&5 $as_echo_n "checking whether to install pkg-config *.pc files... " >&6; } # Check whether --with-pkgconfig-dir was given. if test "${with_pkgconfig_dir+set}" = set; then : withval=$with_pkgconfig_dir; - case "${withval}" in - yes|auto) - ;; - no) - pkgconfigdir="" - ;; - *) - pkgconfigdir="${withval}" - ;; - esac + case "${withval}" in + yes|auto) + ;; + no) + pkgconfigdir="" + ;; + *) + pkgconfigdir="${withval}" + ;; + esac fi -echo ${pkgconfigdir} if test -n "${pkgconfigdir}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${pkgconfigdir}" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${pkgconfigdir}" >&5 $as_echo "using ${pkgconfigdir}" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "${pkgconfigdir}"; then @@ -15620,31 +16375,31 @@ $as_echo_n "checking whether to install hotplug rules... " >&6; } # Check whether --with-hotplug-dir was given. if test "${with_hotplug_dir+set}" = set; then : withval=$with_hotplug_dir; - case "${withval}" in - yes) - if test -z "${hotplugdir}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + case "${withval}" in + yes) + if test -z "${hotplugdir}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - as_fn_error "\"hotplug directory requested but not found" "$LINENO" 5 - fi - ;; - auto) - ;; - no) - hotplugdir="" - ;; - *) - hotplugdir="${withval}" - ;; - esac + as_fn_error "\"hotplug directory requested but not found\"" "$LINENO" 5 + fi + ;; + auto) + ;; + no) + hotplugdir="" + ;; + *) + hotplugdir="${withval}" + ;; + esac fi if test -n "${hotplugdir}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${hotplugdir}" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${hotplugdir}" >&5 $as_echo "using ${hotplugdir}" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "${hotplugdir}"; then @@ -15662,31 +16417,31 @@ $as_echo_n "checking whether to install udev rules... " >&6; } # Check whether --with-udev-dir was given. if test "${with_udev_dir+set}" = set; then : withval=$with_udev_dir; - case "${withval}" in - yes) - if test -z "${udevdir}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + case "${withval}" in + yes) + if test -z "${udevdir}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - as_fn_error "\"udev directory requested but not found" "$LINENO" 5 - fi - ;; - auto) - ;; - no) - udevdir="" - ;; - *) - udevdir="${withval}" - ;; - esac + as_fn_error "\"udev directory requested but not found\"" "$LINENO" 5 + fi + ;; + auto) + ;; + no) + udevdir="" + ;; + *) + udevdir="${withval}" + ;; + esac fi if test -n "${udevdir}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${udevdir}" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${udevdir}" >&5 $as_echo "using ${udevdir}" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "${udevdir}"; then @@ -15698,6 +16453,107 @@ else fi +for ac_prog in asciidoc +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 test "${ac_cv_path_ASCIIDOC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $ASCIIDOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_ASCIIDOC="$ASCIIDOC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ASCIIDOC="$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 + + ;; +esac +fi +ASCIIDOC=$ac_cv_path_ASCIIDOC +if test -n "$ASCIIDOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASCIIDOC" >&5 +$as_echo "$ASCIIDOC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ASCIIDOC" && break +done +test -n "$ASCIIDOC" || ASCIIDOC="none" + + if test "x$ASCIIDOC" != "xnone"; then + MANUALUPDATE_TRUE= + MANUALUPDATE_FALSE='#' +else + MANUALUPDATE_TRUE='#' + MANUALUPDATE_FALSE= +fi + +for ac_prog in a2x +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 test "${ac_cv_path_A2X+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $A2X in + [\\/]* | ?:[\\/]*) + ac_cv_path_A2X="$A2X" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_A2X="$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 + + ;; +esac +fi +A2X=$ac_cv_path_A2X +if test -n "$A2X"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A2X" >&5 +$as_echo "$A2X" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$A2X" && break +done +test -n "$A2X" || A2X="none" + + conftemp="${sysconfdir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" @@ -15767,7 +16623,7 @@ _ACEOF -ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile docs/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/Makefile man/Makefile scripts/hal/Makefile scripts/hal/ups-nut-device.fdi scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/python/Makefile scripts/udev/Makefile scripts/udev/nut-usbups.rules scripts/Makefile server/Makefile tools/Makefile Makefile" +ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/man/Makefile docs/website/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/Makefile scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/hal/Makefile scripts/hal/ups-nut-device.fdi scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/python/Makefile scripts/udev/Makefile scripts/udev/nut-usbups.rules scripts/Makefile server/Makefile tools/Makefile Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -15891,6 +16747,26 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${WITH_SERIAL_TRUE}" && test -z "${WITH_SERIAL_FALSE}"; then + as_fn_error "conditional \"WITH_SERIAL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_USB_TRUE}" && test -z "${WITH_USB_FALSE}"; then + as_fn_error "conditional \"WITH_USB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_SNMP_TRUE}" && test -z "${WITH_SNMP_FALSE}"; then + as_fn_error "conditional \"WITH_SNMP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_NEONXML_TRUE}" && test -z "${WITH_NEONXML_FALSE}"; then + as_fn_error "conditional \"WITH_NEONXML\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_LIBPOWERMAN_TRUE}" && test -z "${WITH_LIBPOWERMAN_FALSE}"; then + as_fn_error "conditional \"WITH_LIBPOWERMAN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${WITH_SSL_TRUE}" && test -z "${WITH_SSL_FALSE}"; then as_fn_error "conditional \"WITH_SSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -15903,32 +16779,16 @@ if test -z "${WITH_CGI_TRUE}" && test -z "${WITH_CGI_FALSE}"; then as_fn_error "conditional \"WITH_CGI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${WITH_DEV_TRUE}" && test -z "${WITH_DEV_FALSE}"; then - as_fn_error "conditional \"WITH_DEV\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_SERIAL_TRUE}" && test -z "${WITH_SERIAL_FALSE}"; then - as_fn_error "conditional \"WITH_SERIAL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_SNMP_TRUE}" && test -z "${WITH_SNMP_FALSE}"; then - as_fn_error "conditional \"WITH_SNMP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_USB_TRUE}" && test -z "${WITH_USB_FALSE}"; then - as_fn_error "conditional \"WITH_USB\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${WITH_HAL_TRUE}" && test -z "${WITH_HAL_FALSE}"; then as_fn_error "conditional \"WITH_HAL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${WITH_NEONXML_TRUE}" && test -z "${WITH_NEONXML_FALSE}"; then - as_fn_error "conditional \"WITH_NEONXML\" was never defined. +if test -z "${HAVE_ASCIIDOC_TRUE}" && test -z "${HAVE_ASCIIDOC_FALSE}"; then + as_fn_error "conditional \"HAVE_ASCIIDOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${WITH_LIBPOWERMAN_TRUE}" && test -z "${WITH_LIBPOWERMAN_FALSE}"; then - as_fn_error "conditional \"WITH_LIBPOWERMAN\" was never defined. +if test -z "${WITH_DEV_TRUE}" && test -z "${WITH_DEV_FALSE}"; then + as_fn_error "conditional \"WITH_DEV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SOME_DRIVERS_TRUE}" && test -z "${SOME_DRIVERS_FALSE}"; then @@ -15947,6 +16807,10 @@ if test -z "${WITH_UDEV_TRUE}" && test -z "${WITH_UDEV_FALSE}"; then as_fn_error "conditional \"WITH_UDEV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${MANUALUPDATE_TRUE}" && test -z "${MANUALUPDATE_FALSE}"; then + as_fn_error "conditional \"MANUALUPDATE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 @@ -16355,8 +17219,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by nut $as_me 2.4.3, which was -generated by GNU Autoconf 2.64. Invocation command line was +This file was extended by nut $as_me 2.6.0, which was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -16396,6 +17260,7 @@ 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 @@ -16418,10 +17283,11 @@ Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -nut config.status 2.4.3 -configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +nut config.status 2.6.0 +configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation @@ -16459,6 +17325,8 @@ do 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 ) @@ -16558,10 +17426,10 @@ ac_cv_type_intmax_t="$ac_cv_type_intmax_t" sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' +enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' @@ -16824,13 +17692,24 @@ do "data/html/header.html") CONFIG_FILES="$CONFIG_FILES data/html/header.html" ;; "data/html/Makefile") CONFIG_FILES="$CONFIG_FILES data/html/Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; + "data/driver.list") CONFIG_FILES="$CONFIG_FILES data/driver.list" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; + "docs/man/Makefile") CONFIG_FILES="$CONFIG_FILES docs/man/Makefile" ;; + "docs/website/Makefile") CONFIG_FILES="$CONFIG_FILES docs/website/Makefile" ;; "drivers/Makefile") CONFIG_FILES="$CONFIG_FILES drivers/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "lib/libupsclient-config") CONFIG_FILES="$CONFIG_FILES lib/libupsclient-config" ;; "lib/libupsclient.pc") CONFIG_FILES="$CONFIG_FILES lib/libupsclient.pc" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; - "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; + "scripts/augeas/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/augeas/Makefile" ;; + "scripts/augeas/nutnutconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutnutconf.aug" ;; + "scripts/augeas/nutupsconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsconf.aug" ;; + "scripts/augeas/nutupsdconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsdconf.aug" ;; + "scripts/augeas/nutupsdusers.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsdusers.aug" ;; + "scripts/augeas/nutupsmonconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsmonconf.aug" ;; + "scripts/augeas/nutupsschedconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsschedconf.aug" ;; + "scripts/augeas/nuthostsconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nuthostsconf.aug" ;; + "scripts/augeas/nutupssetconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupssetconf.aug" ;; "scripts/hal/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/hal/Makefile" ;; "scripts/hal/ups-nut-device.fdi") CONFIG_FILES="$CONFIG_FILES scripts/hal/ups-nut-device.fdi" ;; "scripts/hotplug/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/hotplug/Makefile" ;; @@ -16945,7 +17824,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -16959,7 +17838,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -18038,9 +18917,6 @@ available_tags="" # ### BEGIN LIBTOOL CONFIG -# Whether or not to build static libraries. -build_old_libs=$enable_static - # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision @@ -18048,6 +18924,9 @@ macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared +# Whether or not to build static libraries. +build_old_libs=$enable_static + # What type of objects to build. pic_mode=$pic_mode diff --git a/configure.in b/configure.in index 2c1795f..7af73e4 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ dnl | Network UPS Tools: configure.in | dnl +------------------------------------------------------------------+ dnl NUT version number is defined here and *only* here (no more include/version) -AC_INIT(nut, 2.4.3) +AC_INIT(nut, 2.6.0) AC_CONFIG_SRCDIR(server/upsd.c) AC_CONFIG_MACRO_DIR([m4]) echo "Network UPS Tools version ${PACKAGE_VERSION}" @@ -13,9 +13,14 @@ AC_CONFIG_HEADER(include/config.h) AC_PREFIX_DEFAULT(/usr/local/ups) AM_INIT_AUTOMAKE -dnl Require Autoconf 2.60 or better and enable features of Posix that are extensions to C -AC_PREREQ([2.60]) -AC_USE_SYSTEM_EXTENSIONS +dnl we need Autoconf 2.60 or better to enable features of Posix that are extensions to C +AC_MSG_CHECKING(for autoconf macro to enable system extensions) +m4_version_prereq(2.60, [ + AC_MSG_RESULT(yes) + AC_USE_SYSTEM_EXTENSIONS +], [ + AC_MSG_RESULT(no) +]) dnl Use "./configure --enable-maintainer-mode" to keep Makefile.in and Makefile dnl in sync after SVN updates. @@ -83,7 +88,8 @@ AC_C_VARARRAYS AC_CHECK_FUNCS(flock lockf fcvt fcvtl) AC_CHECK_FUNCS(cfsetispeed tcsendbreak) AC_CHECK_FUNCS(seteuid setsid getpassphrase) -AC_CHECK_FUNCS(on_exit strptime) +AC_CHECK_FUNCS(on_exit strptime setlogmask) +AC_CHECK_DECLS(LOG_UPTO, [], [], [#include ]) dnl the following may add stuff to LIBOBJS (is this still needed?) AC_CHECK_FUNCS(vsnprintf snprintf, [], [ @@ -92,7 +98,7 @@ AC_CHECK_FUNCS(vsnprintf snprintf, [], [ AC_TYPE_LONG_LONG_INT ]) -AC_REPLACE_FUNCS(setenv inet_aton strerror atexit) +AC_REPLACE_FUNCS(setenv strerror atexit) dnl dnl Only use these when compiling with gcc @@ -149,24 +155,26 @@ dnl ---------------------------------------------------------------------- dnl check for --with-all (or --without-all, or --with-all=auto) flag AC_MSG_CHECKING(for --with-all) -AC_ARG_WITH(all, -AC_HELP_STRING([--with-all], [enable serial, usb, snmp, hal, cgi, dev, neon, powerman]), -[ if test -n "${withval}"; then +AC_ARG_WITH(all, + AS_HELP_STRING([--with-all], [enable serial, usb, snmp, hal, cgi, dev, neon, powerman]), +[ + if test -n "${withval}"; then dnl Note: we allow "no" as a positive value, because dnl this is what the user expects from --without-all - if test -z "${with_cgi}"; then with_cgi="${withval}"; fi - if test -z "${with_dev}"; then with_dev="${withval}"; fi if test -z "${with_serial}"; then with_serial="${withval}"; fi - if test -z "${with_snmp}"; then with_snmp="${withval}"; fi if test -z "${with_usb}"; then with_usb="${withval}"; fi + if test -z "${with_snmp}"; then with_snmp="${withval}"; fi if test -z "${with_hal}"; then with_hal="${withval}"; fi if test -z "${with_neon}"; then with_neon="${withval}"; fi if test -z "${with_powerman}"; then with_powerman="${withval}"; fi + if test -z "${with_cgi}"; then with_cgi="${withval}"; fi + if test -z "${with_dev}"; then with_dev="${withval}"; fi AC_MSG_RESULT("${withval}") else AC_MSG_RESULT(not given) fi -], [ AC_MSG_RESULT(not given) +], [ + AC_MSG_RESULT(not given) ]) dnl ---------------------------------------------------------------------- @@ -176,9 +184,20 @@ dnl they are listed near the top by "./configure --help" NUT_ARG_WITH([dev], [build and install the development files], [no]) NUT_ARG_WITH([serial], [build and install serial drivers], [yes]) NUT_ARG_WITH([usb], [build and install USB drivers], [auto]) +NUT_ARG_WITH([doc], [build and install documentation], [no]) + +dnl ---------------------------------------------------------------------- +dnl Check for presence and compiler flags of various libraries + +dnl These checks are performed unconditionally, even if the corresponding +dnl --with-* options are not given. This is because we cannot predict +dnl what will be in the --with-drivers argument. + +NUT_CHECK_LIBNETSNMP NUT_CHECK_LIBUSB NUT_ARG_WITH([hal], [build and install HAL support], [no]) NUT_CHECK_LIBHAL +NUT_CONFIG_LIBHAL NUT_ARG_WITH([snmp], [build and install SNMP drivers], [auto]) NUT_CHECK_LIBNETSNMP NUT_ARG_WITH([neon], [build and install neon based XML/HTTP driver], [auto]) @@ -194,7 +213,7 @@ case ${target_os} in solaris2.1* ) echo Checking for Solaris 10 / 11 specific configuration for usb drivers AC_SEARCH_LIBS(nanosleep, rt) - LIBUSB_LDFLAGS="-R/usr/sfw/lib ${LIBUSB_LDFLAGS}" + LIBUSB_LIBS="-R/usr/sfw/lib ${LIBUSB_LIBS}" dnl FIXME: Sun's libusb doesn't support timeout (so blocks notification) dnl and need to call libusb close upon reconnexion AC_DEFINE(SUN_LIBUSB, 1, [Define to 1 for Sun version of the libusb.]) @@ -202,6 +221,78 @@ case ${target_os} in ;; esac + +dnl ---------------------------------------------------------------------- +dnl checks related to --with-serial + +dnl ${nut_with_serial}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_serial}" != "no"; then + nut_with_serial="yes" +fi +AM_CONDITIONAL(WITH_SERIAL, test "${nut_with_serial}" = "yes") +NUT_REPORT_FEATURE([build serial drivers], [${nut_with_serial}]) + +dnl ---------------------------------------------------------------------- +dnl checks related to --with-usb + +dnl ${nut_with_usb}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_usb}" = "yes" -a "${nut_have_libusb}" != "yes"; then + AC_MSG_ERROR(["USB drivers requested, but libusb not found."]) +fi + +if test "${nut_with_usb}" != "no"; then + nut_with_usb="${nut_have_libusb}" +fi + +AM_CONDITIONAL(WITH_USB, test "${nut_with_usb}" = "yes") +NUT_REPORT_FEATURE([build USB drivers], [${nut_with_usb}]) + +dnl ---------------------------------------------------------------------- +dnl checks related to --with-snmp + +dnl ${nut_with_snmp}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then + AC_MSG_ERROR(["Net-SNMP libraries not found, required for SNMP drivers"]) +fi + +if test "${nut_with_snmp}" != "no"; then + nut_with_snmp="${nut_have_libnetsnmp}" +fi + +AM_CONDITIONAL(WITH_SNMP, test "${nut_with_snmp}" = "yes") +NUT_REPORT_FEATURE([build SNMP drivers], [${nut_with_snmp}]) + +dnl ---------------------------------------------------------------------- +dnl checks related to --with-neon + +dnl ${nut_with_neon}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_neon}" = "yes" -a "${nut_have_neon}" != "yes"; then + AC_MSG_ERROR(["neon libraries not found, required for neon based XML/HTTP driver"]) +fi + +if test "${nut_with_neon}" != "no"; then + nut_with_neon="${nut_have_neon}" +fi + +AM_CONDITIONAL(WITH_NEONXML, test "${nut_with_neon}" = "yes") +NUT_REPORT_FEATURE([build neon based XML driver], [${nut_with_neon}]) + +dnl ---------------------------------------------------------------------- + +dnl checks related to --with-powerman + +dnl ${nut_with_powerman}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_powerman}" = "yes" -a "${nut_have_libpowerman}" != "yes"; then + AC_MSG_ERROR(["Powerman client libraries not found, required for Powerman PDU client driver"]) +fi + +if test "${nut_with_powerman}" != "no"; then + nut_with_powerman="${nut_have_libpowerman}" +fi + +AM_CONDITIONAL(WITH_LIBPOWERMAN, test "${nut_with_powerman}" = "yes") +NUT_REPORT_FEATURE([build Powerman PDU client driver], [${nut_with_powerman}]) + dnl ---------------------------------------------------------------------- dnl Check for --with-ssl @@ -246,27 +337,6 @@ fi AM_CONDITIONAL(WITH_WRAP, test "${nut_with_wrap}" = "yes") NUT_REPORT_FEATURE([enable libwrap (tcp-wrappers) support], [${nut_with_wrap}]) -dnl ---------------------------------------------------------------------- -dnl check whether to compile IPv6 features - -NUT_ARG_WITH([ipv6], [enable IPv6 support], [auto]) - -dnl ${nut_with_ipv6}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_ipv6}" != "no"; then - dnl check for IPv6 prerequisites - NUT_CHECK_IPV6 -fi - -if test "${nut_with_ipv6}" = "yes" -a "${nut_have_ipv6}" != "yes"; then - AC_MSG_ERROR(["Some feature required for IPv6 support is missing"]) -fi - -if test "${nut_with_ipv6}" != "no"; then - nut_with_ipv6="${nut_have_ipv6}" -fi - -NUT_REPORT_FEATURE([enable IPv6 support], [${nut_with_ipv6}]) - dnl ---------------------------------------------------------------------- dnl checks related to --with-cgi @@ -289,61 +359,6 @@ fi AM_CONDITIONAL(WITH_CGI, test "${nut_with_cgi}" = "yes") NUT_REPORT_FEATURE([build CGI programs], [${nut_with_cgi}]) -dnl ---------------------------------------------------------------------- -dnl checks related to --with-dev - -dnl ${nut_with_dev}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_dev}" != "no"; then - nut_with_dev="yes" -else - AC_DISABLE_STATIC -fi -AM_CONDITIONAL(WITH_DEV, test "${nut_with_dev}" = "yes") -NUT_REPORT_FEATURE([build and install the development files], [${nut_with_dev}]) - -dnl We only init libtool there to allow AC_DISABLE_STATIC -AC_PROG_LIBTOOL - -dnl ---------------------------------------------------------------------- -dnl checks related to --with-serial - -dnl ${nut_with_serial}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_serial}" != "no"; then - nut_with_serial="yes" -fi -AM_CONDITIONAL(WITH_SERIAL, test "${nut_with_serial}" = "yes") -NUT_REPORT_FEATURE([build serial drivers], [${nut_with_serial}]) - -dnl ---------------------------------------------------------------------- -dnl checks related to --with-snmp - -dnl ${nut_with_snmp}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then - AC_MSG_ERROR(["Net-SNMP libraries not found, required for SNMP drivers"]) -fi - -if test "${nut_with_snmp}" != "no"; then - nut_with_snmp="${nut_have_libnetsnmp}" -fi - -AM_CONDITIONAL(WITH_SNMP, test "${nut_with_snmp}" = "yes") -NUT_REPORT_FEATURE([build SNMP drivers], [${nut_with_snmp}]) - -dnl ---------------------------------------------------------------------- -dnl checks related to --with-usb - -dnl ${nut_with_usb}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_usb}" = "yes" -a "${nut_have_libusb}" != "yes"; then - AC_MSG_ERROR(["USB drivers requested, but libusb not found."]) -fi - -if test "${nut_with_usb}" != "no"; then - nut_with_usb="${nut_have_libusb}" -fi - -AM_CONDITIONAL(WITH_USB, test "${nut_with_usb}" = "yes") -NUT_REPORT_FEATURE([build USB drivers], [${nut_with_usb}]) - dnl ---------------------------------------------------------------------- dnl checks related to --with-hal @@ -368,88 +383,178 @@ AM_CONDITIONAL(WITH_HAL, test "${nut_with_hal}" = "yes") NUT_REPORT_FEATURE([enable HAL support], [${nut_with_hal}]) dnl ---------------------------------------------------------------------- -dnl checks related to --with-neon -dnl ${nut_with_neon}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_neon}" = "yes" -a "${nut_have_neon}" != "yes"; then - AC_MSG_ERROR(["neon libraries not found, required for neon based XML/HTTP driver"]) +dnl checks related to --with-doc + +dnl Always check for AsciiDoc prerequisites, since even if --with-doc +dnl is set to 'no', we may still want to build the website, or some +dnl doc targets manually +NUT_CHECK_ASCIIDOC + +case "${nut_with_doc}" in + yes|all|auto) + nut_doc_build_list="html-single html-chunked pdf" + ;; + no) + nut_doc_build_list="" + ;; + *) + nut_doc_build_list="`echo ${nut_with_doc} | sed 's/,/ /g'`" + ;; +esac + +for nut_doc_build_target in ${nut_doc_build_list}; do + case "${nut_doc_build_target}" in + html-single) + AC_MSG_CHECKING([if asciidoc version can build ${nut_doc_build_target}]) + AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [ + AC_MSG_RESULT(yes) + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + ], [ + AC_MSG_RESULT(no) + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + ]) + ;; + + html-chunked) + AC_MSG_CHECKING([if a2x version can build ${nut_doc_build_target}]) + AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [ + AC_MSG_RESULT(yes) + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + ], [ + AC_MSG_RESULT(no) + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + ]) + ;; + + pdf) + AC_MSG_CHECKING([if dblatex version can build ${nut_doc_build_target}]) + AX_COMPARE_VERSION([${DBLATEX_VERSION}], [ge], [0.2.5], [ + AC_MSG_RESULT(yes) + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + ], [ + AC_MSG_RESULT(no) + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + ]) + ;; + esac +done + +case "${nut_with_doc}" in +auto) + if test -n "${DOC_BUILD_LIST}"; then + nut_with_doc="yes" + else + nut_with_doc="no" + fi + ;; +no) + ;; +*) + if test -z "${DOC_NOBUILD_LIST}"; then + nut_with_doc="yes" + else + AC_MSG_ERROR(["Asciidoc is required for documentation support and missing"]) + fi + ;; +esac + +AC_MSG_CHECKING([if asciidoc version can build website (minimum required 8.6.3)]) +AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [ + AC_MSG_RESULT(yes) + nut_have_asciidoc="yes" +], [ + AC_MSG_RESULT(no) + nut_have_asciidoc="no" +]) + +AC_MSG_CHECKING([if a2x version can build website (minimum required 8.6.3)]) +AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [ + AC_MSG_RESULT(yes) +], [ + AC_MSG_RESULT(no) + nut_have_asciidoc="no" +]) + +AM_CONDITIONAL([HAVE_ASCIIDOC], [test "${nut_have_asciidoc}" = "yes"]) +NUT_REPORT_FEATURE([build and install documentation], [${nut_with_doc}]) + +if test "${nut_with_doc}" = "yes"; then + NUT_REPORT([only build specific documentation format], [${DOC_BUILD_LIST}]) fi -if test "${nut_with_neon}" != "no"; then - nut_with_neon="${nut_have_neon}" -fi +dnl ---------------------------------------------------------------------- +dnl checks related to --with-dev -AM_CONDITIONAL(WITH_NEONXML, test "${nut_with_neon}" = "yes") -NUT_REPORT_FEATURE([build neon based XML driver], [${nut_with_neon}]) +dnl We only init libtool there to allow AC_DISABLE_STATIC +AC_PROG_LIBTOOL + +dnl ${nut_with_dev}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_dev}" != "no"; then + nut_with_dev="yes" +else + AC_DISABLE_STATIC +fi +AM_CONDITIONAL(WITH_DEV, test "${nut_with_dev}" = "yes") +NUT_REPORT_FEATURE([build and install the development files], [${nut_with_dev}]) dnl ---------------------------------------------------------------------- -dnl checks related to --with-powerman - -dnl ${nut_with_powerman}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_powerman}" = "yes" -a "${nut_have_libpowerman}" != "yes"; then - AC_MSG_ERROR(["Powerman client libraries not found, required for Powerman PDU client driver"]) -fi - -if test "${nut_with_powerman}" != "no"; then - nut_with_powerman="${nut_have_libpowerman}" -fi - -AM_CONDITIONAL(WITH_LIBPOWERMAN, test "${nut_with_powerman}" = "yes") -NUT_REPORT_FEATURE([build Powerman PDU client driver], [${nut_with_powerman}]) - -dnl ---------------------------------------------------------------------- AC_MSG_CHECKING(state path) AC_ARG_WITH(statepath, -AC_HELP_STRING([--with-statepath=PATH], [path for ups state files (/var/state/ups)]), -[ case "${withval}" in + AS_HELP_STRING([--with-statepath=PATH], [path for ups state files (/var/state/ups)]), +[ + case "${withval}" in yes|no) + AC_MSG_ERROR(invalid option --with(out)-statepath - see docs/configure.txt) ;; *) STATEPATH="${withval}" ;; - esac], -) -AC_DEFINE_UNQUOTED(STATEPATH, "${STATEPATH}", - [Path for UPS driver state files]) + esac +], []) +AC_DEFINE_UNQUOTED(STATEPATH, "${STATEPATH}", [Path for UPS driver state files]) AC_MSG_RESULT(${STATEPATH}) dnl --------------------------------------------------------------------- dnl The 'alt pid path' is used by the drivers (via main.c) and upsd, since -dnl ideally they do not run as root and won't be able to write to the usual +dnl ideally they do not run as root and will not be able to write to the usual dnl /var/run path. This defaults to the STATEPATH since they should be dnl able to write there. dnl AC_MSG_CHECKING(alt pid path) AC_ARG_WITH(altpidpath, -AC_HELP_STRING([--with-altpidpath=PATH], [path for driver/upsd .pid files ()]), -[ case "${withval}" in + AS_HELP_STRING([--with-altpidpath=PATH], [path for driver/upsd .pid files ()]), +[ + case "${withval}" in yes|no) - ALTPIDPATH="${STATEPATH}" + AC_MSG_ERROR(invalid option --with(out)-altpidpath - see docs/configure.txt) ;; *) ALTPIDPATH="${withval}" ;; - esac], + esac +], [ ALTPIDPATH="${STATEPATH}" -) -AC_DEFINE_UNQUOTED(ALTPIDPATH, "${ALTPIDPATH}", - [Path for pid files of drivers and upsd (usually STATEPATH)]) +]) +AC_DEFINE_UNQUOTED(ALTPIDPATH, "${ALTPIDPATH}", [Path for pid files of drivers and upsd (usually STATEPATH)]) AC_MSG_RESULT(${ALTPIDPATH}) AC_MSG_CHECKING(driver path) AC_ARG_WITH(drvpath, -AC_HELP_STRING([--with-drvpath=PATH], [where to install ups drivers (EPREFIX/bin)]), -[ case "${withval}" in + AS_HELP_STRING([--with-drvpath=PATH], [where to install ups drivers (EPREFIX/bin)]), +[ + case "${withval}" in yes|no) + AC_MSG_ERROR(invalid option --with(out)-drvpath - see docs/configure.txt) ;; *) driverexecdir="${withval}" ;; - esac], -) + esac +], []) conftemp="${driverexecdir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" @@ -458,15 +563,17 @@ AC_MSG_RESULT(${driverexecdir}) AC_MSG_CHECKING(cgi path) AC_ARG_WITH(cgipath, -AC_HELP_STRING([--with-cgipath=PATH], [where to install CGI programs (EPREFIX/cgi-bin)]), -[ case "${withval}" in + AS_HELP_STRING([--with-cgipath=PATH], [where to install CGI programs (EPREFIX/cgi-bin)]), +[ + case "${withval}" in yes|no) + AC_MSG_ERROR(invalid option --with(out)-cgipath - see docs/configure.txt) ;; *) cgiexecdir="${withval}" ;; - esac], -) + esac +], []) conftemp="${cgiexecdir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" @@ -475,15 +582,17 @@ AC_MSG_RESULT(${cgiexecdir}) AC_MSG_CHECKING(html path) AC_ARG_WITH(htmlpath, -AC_HELP_STRING([--with-htmlpath=PATH], [where to install HTML files (PREFIX/html)]), -[ case "${withval}" in + AS_HELP_STRING([--with-htmlpath=PATH], [where to install HTML files (PREFIX/html)]), +[ + case "${withval}" in yes|no) + AC_MSG_ERROR(invalid option --with(out)-htmlpath - see docs/configure.txt) ;; *) htmldir="${withval}" ;; - esac], -) + esac +], []) conftemp="${htmldir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" @@ -492,276 +601,283 @@ AC_MSG_RESULT(${htmldir}) AC_MSG_CHECKING(pidpath) AC_ARG_WITH(pidpath, -AC_HELP_STRING([--with-pidpath=PATH], [path for .pid files (/var/run)]), -[ case "${withval}" in + AS_HELP_STRING([--with-pidpath=PATH], [path for .pid files (/var/run)]), +[ + case "${withval}" in yes|no) + AC_MSG_ERROR(invalid option --with(out)-pidpath - see docs/configure.txt) ;; *) PIDPATH="${withval}" ;; - esac], -) + esac +], []) AC_DEFINE_UNQUOTED(PIDPATH, "${PIDPATH}", [Path where the pid files should go]) AC_MSG_RESULT(${PIDPATH}) AC_MSG_CHECKING(network port number) AC_ARG_WITH(port, -AC_HELP_STRING([--with-port=PORT], [port for network communications (3493)]), -[ case "${withval}" in + AS_HELP_STRING([--with-port=PORT], [port for network communications (3493)]), +[ + case "${withval}" in yes|no) - PORT="3493" + AC_MSG_ERROR(invalid option --with(out)-port - see docs/configure.txt) ;; *) PORT="${withval}" ;; - esac], + esac +], [ PORT="3493" -) +]) AC_DEFINE_UNQUOTED(PORT, ${PORT}, [Port for network communications]) AC_MSG_RESULT(${PORT}) -nut_user_given= AC_MSG_CHECKING(user to run as) AC_ARG_WITH(user, -AC_HELP_STRING([--with-user=username], [user for programs started as root (nobody)]), -[ case "${withval}" in + AS_HELP_STRING([--with-user=username], [user for programs started as root (nobody)]), +[ + case "${withval}" in yes|no) + AC_MSG_ERROR(invalid option --with(out)-user - see docs/configure.txt) ;; *) RUN_AS_USER="${withval}" nut_user_given=yes ;; - esac], -) -AC_DEFINE_UNQUOTED(RUN_AS_USER, "${RUN_AS_USER}", - [User to switch to if started as root]) + esac +], [ + nut_user_given=no +]) +AC_DEFINE_UNQUOTED(RUN_AS_USER, "${RUN_AS_USER}", [User to switch to if started as root]) AC_MSG_RESULT(${RUN_AS_USER}) -nut_group_given= AC_MSG_CHECKING(group membership of user to run as) AC_ARG_WITH(group, -AC_HELP_STRING([--with-group=groupname], [group membership of user for programs started as root (nogroup)]), -[ case "${withval}" in + AS_HELP_STRING([--with-group=groupname], [group membership of user for programs started as root (nogroup)]), +[ + case "${withval}" in yes|no) + AC_MSG_ERROR(invalid option --with(out)-group - see docs/configure.txt) ;; *) RUN_AS_GROUP="${withval}" nut_group_given=yes ;; - esac], -) -AC_DEFINE_UNQUOTED(RUN_AS_GROUP, "${RUN_AS_GROUP}", - [Group membership of user to switch to if started as root]) + esac +], [ + nut_group_given=no +]) +AC_DEFINE_UNQUOTED(RUN_AS_GROUP, "${RUN_AS_GROUP}", [Group membership of user to switch to if started as root]) AC_MSG_RESULT(${RUN_AS_GROUP}) -dnl check that --with-user is given iff --with-group is given. -if test -n "$nut_user_given" -a -z "$nut_group_given"; then - AC_MSG_ERROR(["If you specify --with-user, you also must specify --with-group"]) -elif test -z "$nut_user_given" -a -n "$nut_group_given"; then - AC_MSG_ERROR(["If you specify --with-group, you also must specify --with-user"]) +dnl check that --with-user is given if --with-group is given. +if test "${nut_user_given}" = "yes" -a "${nut_group_given}" = "no"; then + AC_MSG_ERROR(["If you specify --with-user, you also must specify --with-group"]) +elif test "${nut_user_given}" = "no" -a "${nut_group_given}" = "yes"; then + AC_MSG_ERROR(["If you specify --with-group, you also must specify --with-user"]) fi AC_MSG_CHECKING(facility for syslog) AC_ARG_WITH(logfacility, -AC_HELP_STRING([--with-logfacility=FACILITY], [facility for log messages (LOG_DAEMON)]), -[ case "${withval}" in + AS_HELP_STRING([--with-logfacility=FACILITY], [facility for log messages (LOG_DAEMON)]), +[ + case "${withval}" in yes|no) - LOGFACILITY="LOG_DAEMON" + AC_MSG_ERROR(invalid option --with(out)-logfacility - see docs/configure.txt) ;; *) LOGFACILITY="${withval}" ;; - esac], + esac +], [ LOGFACILITY="LOG_DAEMON" -) -AC_DEFINE_UNQUOTED(LOG_FACILITY, ${LOGFACILITY}, - [Desired syslog facility - see syslog(3)]) +]) +AC_DEFINE_UNQUOTED(LOG_FACILITY, ${LOGFACILITY}, [Desired syslog facility - see syslog(3)]) AC_MSG_RESULT(${LOGFACILITY}) +dnl Autoconf versions before 2.62 do not allow consecutive quadrigraphs, +dnl so the help string depends on the version used AC_MSG_CHECKING(which drivers to build) AC_ARG_WITH(drivers, -AC_HELP_STRING([[[[--with-drivers=driver@<:@,driver...@:>@]]]], [Only use specific drivers (all)]), -[ case "${withval}" in - yes | no) - dnl ignore calls without any arguments - DRIVER_BUILD_LIST="all" - AC_MSG_RESULT(all available) + AS_HELP_STRING([m4_version_prereq(2.62, + [@<:@--with-drivers=driver@<:@,driver@:>@@:>@], + [[[[--with-drivers=driver@<:@,driver@:>@]]]])], + [Only use specific drivers (all)]), +[ + case "${withval}" in + yes|no) + AC_MSG_ERROR(invalid option --with(out)-drivers - see docs/configure.txt) ;; *) DRIVER_BUILD_LIST=`echo ${withval} | sed "s/,/ /g"` AC_MSG_RESULT(${DRIVER_BUILD_LIST}) ;; esac -], -[ +], [ DRIVER_BUILD_LIST="all" AC_MSG_RESULT(all available) -] -) +]) AM_CONDITIONAL(SOME_DRIVERS, test "${DRIVER_BUILD_LIST}" != "all") if test "${DRIVER_BUILD_LIST}" != "all"; then - NUT_REPORT([only build specific drivers], [${DRIVER_BUILD_LIST}]) + NUT_REPORT([only build specific drivers], [${DRIVER_BUILD_LIST}]) fi AC_MSG_CHECKING(which driver man pages to install) if test "${DRIVER_BUILD_LIST}" = "all"; then - DRIVER_MAN_LIST=all - AC_MSG_RESULT(all available) + DRIVER_MAN_LIST=all + AC_MSG_RESULT(all available) else - DRIVER_MAN_LIST="" - for i in ${DRIVER_BUILD_LIST}; do - if test -f ${srcdir}/man/$i.8; then - DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8" - fi - done - AC_MSG_RESULT(${DRIVER_MAN_LIST}) + DRIVER_MAN_LIST="" + for i in ${DRIVER_BUILD_LIST}; do + if test -f ${srcdir}/docs/man/$i.8; then + DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8" + fi + done + AC_MSG_RESULT(${DRIVER_MAN_LIST}) fi AC_MSG_CHECKING(whether to strip debug symbols) AC_ARG_ENABLE(strip, -[ --enable-strip Strip debugging symbols from binaries [no]], + AS_HELP_STRING([--enable-strip], [Strip debugging symbols from binaries (no)]), [ case "${withval}" in - no) - AC_MSG_RESULT(no) + no) + AC_MSG_RESULT(no) ;; - *) - AC_MSG_RESULT(yes) - CFLAGS="${CFLAGS} -s" + *) + AC_MSG_RESULT(yes) + CFLAGS="${CFLAGS} -s" ;; esac -], -[ AC_MSG_RESULT(no) +], [ + AC_MSG_RESULT(no) ]) - AC_MSG_CHECKING(whether to install pkg-config *.pc files) AC_ARG_WITH(pkgconfig-dir, - AC_HELP_STRING([--with-pkgconfig-dir=PATH], [where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig)]), - [ - case "${withval}" in - yes|auto) - ;; - no) - pkgconfigdir="" - ;; - *) - pkgconfigdir="${withval}" - ;; - esac - ], - ) -echo ${pkgconfigdir} + AS_HELP_STRING([--with-pkgconfig-dir=PATH], [where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig)]), +[ + case "${withval}" in + yes|auto) + ;; + no) + pkgconfigdir="" + ;; + *) + pkgconfigdir="${withval}" + ;; + esac +], []) if test -n "${pkgconfigdir}"; then - AC_MSG_RESULT(using ${pkgconfigdir}) + AC_MSG_RESULT(using ${pkgconfigdir}) else - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) fi AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgconfigdir}") AC_MSG_CHECKING(whether to install hotplug rules) AC_ARG_WITH(hotplug-dir, - AC_HELP_STRING([--with-hotplug-dir=PATH], [where to install hotplug rules (/etc/hotplug)]), - [ - case "${withval}" in - yes) - if test -z "${hotplugdir}"; then - AC_MSG_RESULT(no) - AC_MSG_ERROR(["hotplug directory requested but not found]) - fi - ;; - auto) - ;; - no) - hotplugdir="" - ;; - *) - hotplugdir="${withval}" - ;; - esac - ], - ) + AS_HELP_STRING([--with-hotplug-dir=PATH], [where to install hotplug rules (/etc/hotplug)]), +[ + case "${withval}" in + yes) + if test -z "${hotplugdir}"; then + AC_MSG_RESULT(no) + AC_MSG_ERROR(["hotplug directory requested but not found"]) + fi + ;; + auto) + ;; + no) + hotplugdir="" + ;; + *) + hotplugdir="${withval}" + ;; + esac +], []) if test -n "${hotplugdir}"; then - AC_MSG_RESULT(using ${hotplugdir}) + AC_MSG_RESULT(using ${hotplugdir}) else - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) fi AM_CONDITIONAL(WITH_HOTPLUG, test -n "${hotplugdir}") AC_MSG_CHECKING(whether to install udev rules) AC_ARG_WITH(udev-dir, - AC_HELP_STRING([--with-udev-dir=PATH], [where to install udev rules (/lib/udev or /etc/udev)]), - [ - case "${withval}" in - yes) - if test -z "${udevdir}"; then - AC_MSG_RESULT(no) - AC_MSG_ERROR(["udev directory requested but not found]) - fi - ;; - auto) - ;; - no) - udevdir="" - ;; - *) - udevdir="${withval}" - ;; - esac - ], - ) + AS_HELP_STRING([--with-udev-dir=PATH], [where to install udev rules (/lib/udev or /etc/udev)]), +[ + case "${withval}" in + yes) + if test -z "${udevdir}"; then + AC_MSG_RESULT(no) + AC_MSG_ERROR(["udev directory requested but not found"]) + fi + ;; + auto) + ;; + no) + udevdir="" + ;; + *) + udevdir="${withval}" + ;; + esac +], []) if test -n "${udevdir}"; then - AC_MSG_RESULT(using ${udevdir}) + AC_MSG_RESULT(using ${udevdir}) else - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) fi AM_CONDITIONAL(WITH_UDEV, test -n "${udevdir}") +AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none]) +AM_CONDITIONAL([MANUALUPDATE], [test "x$ASCIIDOC" != "xnone"]) +AC_PATH_PROGS([A2X], [a2x], [none]) + dnl expand ${sysconfdir} and write it out conftemp="${sysconfdir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" CONFPATH=${conftemp} -AC_DEFINE_UNQUOTED(CONFPATH, "${conftemp}", - [Default path for configuration files]) +AC_DEFINE_UNQUOTED(CONFPATH, "${conftemp}", [Default path for configuration files]) dnl same for datadir conftemp="${datadir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" -AC_DEFINE_UNQUOTED(DATADIR, "${conftemp}", - [Default path for data files]) +AC_DEFINE_UNQUOTED(DATADIR, "${conftemp}", [Default path for data files]) dnl same for bindir conftemp="${bindir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" -AC_DEFINE_UNQUOTED(BINDIR, "${conftemp}", - [Default path for user executables]) +AC_DEFINE_UNQUOTED(BINDIR, "${conftemp}", [Default path for user executables]) AC_SUBST(OS_NAME) AC_SUBST(LIBSSL_CFLAGS) -AC_SUBST(LIBSSL_LDFLAGS) +AC_SUBST(LIBSSL_LIBS) AC_SUBST(LIBGD_CFLAGS) AC_SUBST(LIBGD_LDFLAGS) AC_SUBST(LIBNETSNMP_CFLAGS) -AC_SUBST(LIBNETSNMP_LDFLAGS) +AC_SUBST(LIBNETSNMP_LIBS) AC_SUBST(LIBUSB_CFLAGS) -AC_SUBST(LIBUSB_LDFLAGS) +AC_SUBST(LIBUSB_LIBS) AC_SUBST(LIBNEON_CFLAGS) -AC_SUBST(LIBNEON_LDFLAGS) +AC_SUBST(LIBNEON_LIBS) AC_SUBST(LIBPOWERMAN_CFLAGS) -AC_SUBST(LIBPOWERMAN_LDFLAGS) +AC_SUBST(LIBPOWERMAN_LIBS) +AC_SUBST(DOC_BUILD_LIST) AC_SUBST(LIBWRAP_CFLAGS) -AC_SUBST(LIBWRAP_LDFLAGS) +AC_SUBST(LIBWRAP_LIBS) AC_SUBST(HAL_USER) AC_SUBST(HAL_DEVICE_MATCH_KEY) AC_SUBST(HAL_FDI_PATH) AC_SUBST(HAL_CALLOUTS_PATH) -AC_SUBST(HAVE_GLIB_2_14) AC_SUBST(LIBHAL_CFLAGS) -AC_SUBST(LIBHAL_LDFLAGS) +AC_SUBST(LIBHAL_LIBS) AC_SUBST(DRIVER_BUILD_LIST) AC_SUBST(DRIVER_MAN_LIST) AC_SUBST(DRIVER_INSTALL_TARGET) @@ -789,13 +905,24 @@ AC_OUTPUT([ data/html/header.html data/html/Makefile data/Makefile + data/driver.list docs/Makefile + docs/man/Makefile + docs/website/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/Makefile - man/Makefile + scripts/augeas/Makefile + scripts/augeas/nutnutconf.aug + scripts/augeas/nutupsconf.aug + scripts/augeas/nutupsdconf.aug + scripts/augeas/nutupsdusers.aug + scripts/augeas/nutupsmonconf.aug + scripts/augeas/nutupsschedconf.aug + scripts/augeas/nuthostsconf.aug + scripts/augeas/nutupssetconf.aug scripts/hal/Makefile scripts/hal/ups-nut-device.fdi scripts/hotplug/Makefile diff --git a/data/Makefile.am b/data/Makefile.am index 2b0e953..4b67782 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -2,7 +2,6 @@ SUBDIRS = html -dist_data_DATA = cmdvartab driver.list -EXTRA_DIST = evolution500.dev - -DATA_FILES = cmdvartab driver.list +dist_data_DATA = cmdvartab +nodist_data_DATA = driver.list +EXTRA_DIST = evolution500.seq epdu-managed.dev diff --git a/data/Makefile.in b/data/Makefile.in index 364b18a..fb8e69a 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -39,14 +39,15 @@ host_triplet = @host@ target_triplet = @target@ subdir = data DIST_COMMON = $(dist_data_DATA) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in + $(srcdir)/Makefile.in $(srcdir)/driver.list.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(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_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -56,6 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.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_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -63,7 +65,7 @@ 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 = +CONFIG_CLEAN_FILES = driver.list CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = @@ -95,8 +97,8 @@ am__nobase_list = $(am__nobase_strip_setup); \ 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)$(datadir)" -DATA = $(dist_data_DATA) +am__installdirs = "$(DESTDIR)$(datadir)" "$(DESTDIR)$(datadir)" +DATA = $(dist_data_DATA) $(nodist_data_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -131,9 +133,11 @@ am__relativize = \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -146,8 +150,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -164,7 +170,6 @@ 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@ @@ -175,22 +180,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -287,9 +292,9 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ SUBDIRS = html -dist_data_DATA = cmdvartab driver.list -EXTRA_DIST = evolution500.dev -DATA_FILES = cmdvartab driver.list +dist_data_DATA = cmdvartab +nodist_data_DATA = driver.list +EXTRA_DIST = evolution500.seq epdu-managed.dev all: all-recursive .SUFFIXES: @@ -323,6 +328,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +driver.list: $(top_builddir)/config.status $(srcdir)/driver.list.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo @@ -349,6 +356,26 @@ uninstall-dist_dataDATA: test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(datadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(datadir)" && rm -f $$files +install-nodist_dataDATA: $(nodist_data_DATA) + @$(NORMAL_INSTALL) + test -z "$(datadir)" || $(MKDIR_P) "$(DESTDIR)$(datadir)" + @list='$(nodist_data_DATA)'; test -n "$(datadir)" || 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)$(datadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(datadir)" || exit $$?; \ + done + +uninstall-nodist_dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(nodist_data_DATA)'; test -n "$(datadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(datadir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(datadir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -357,7 +384,7 @@ uninstall-dist_dataDATA: # (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): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -382,7 +409,7 @@ $(RECURSIVE_TARGETS): fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -548,7 +575,7 @@ check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(datadir)"; do \ + for dir in "$(DESTDIR)$(datadir)" "$(DESTDIR)$(datadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -596,7 +623,7 @@ info: info-recursive info-am: -install-data-am: install-dist_dataDATA +install-data-am: install-dist_dataDATA install-nodist_dataDATA install-dvi: install-dvi-recursive @@ -640,7 +667,7 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-dist_dataDATA +uninstall-am: uninstall-dist_dataDATA uninstall-nodist_dataDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive @@ -653,12 +680,13 @@ uninstall-am: uninstall-dist_dataDATA install-data-am install-dist_dataDATA 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 mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-dist_dataDATA + install-nodist_dataDATA 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 \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-dist_dataDATA \ + uninstall-nodist_dataDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/data/driver.list b/data/driver.list deleted file mode 100644 index 15089c8..0000000 --- a/data/driver.list +++ /dev/null @@ -1,725 +0,0 @@ -# Network UPS Tools driver.list -# -# This file is used to build the compat.html on the web server. Any line -# with exactly 4 arguments will be turned into an entry on there. -# Naturally, it is read by parseconf, so the usual escaping tricks are -# allowed if you need to insert something unusual. -# -# If you write a new driver, modify an existing one to add more support, -# or just know about some equipment that isn't listed but should be, -# please send me a patch to update this file. -# -# The format: -# -# -# -# Note that the "upstype=nn" format must be used for genericups entries, -# as they will be parsed by new configuration helper software. -# -# Duplicate text in the last field will be cooked out during the conversion -# to HTML with ROWSPAN magic. They must be an exact match for this to work. - -"Ablerex" "MS-RT" "" "megatec" -"Ablerex" "625L" "USB" "megatec_usb" -"Ablerex" "Hope Office 400/600" "" "megatec" - -"ActivePower" "400VA" "" "megatec" -"ActivePower" "1400VA" "" "megatec" -"ActivePower" "2000VA" "" "megatec" - -"Advice" "TopGuard 2000" "" "megatec" - -"AEC" "MiniGuard UPS 700" "Megatec M2501 cable" "genericups upstype=21" - -"APC" "Back-UPS Pro" "" "apcsmart" -"APC" "Matrix-UPS" "" "apcsmart" -"APC" "Smart-UPS" "" "apcsmart" -"APC" "Back-UPS Pro USB" "USB" "usbhid-ups" -"APC" "Back-UPS USB" "USB" "usbhid-ups" -"APC" "Back-UPS RS USB" "USB" "usbhid-ups" -"APC" "Back-UPS LS USB" "USB" "usbhid-ups" -"APC" "Back-UPS ES/CyberFort 350" "USB" "usbhid-ups" -"APC" "Back-UPS BF500" "USB" "usbhid-ups" -"APC" "BACK-UPS XS LCD" "USB" "usbhid-ups" -"APC" "Smart-UPS USB" "USB" "usbhid-ups" -"APC" "Back-UPS" "940-0095A/C cables" "genericups upstype=1" -"APC" "Back-UPS" "940-0020B/C cables" "genericups upstype=2" -"APC" "Back-UPS" "940-0023A cable" "genericups upstype=9" -"APC" "Back-UPS Office" "940-0119A cable" "genericups upstype=12" -"APC" "Back-UPS RS 500" "custom non-USB cable" "genericups upstype=20" -"APC" "Masterswitch" "Not a UPS - 940-0020 cable" "genericups upstype=12" -"APC" "AP9210" "8 outlets" "powerman-pdu (experimental)" -"APC" "AP79xx" "8 to 24 outlets" "powerman-pdu (experimental)" -"APC" "(various)" "SNMP monitoring card" "snmp-ups (experimental)" - -"Aphel" "PDU" "no report, but various models should be supported" "snmp-ups (experimental)" - -"Apollo" "1000A" "" "genericups upstype=4" -"Apollo" "1000F" "" "genericups upstype=4" - -"Appro" "SWPDU" "48 outlets" "powerman-pdu (experimental)" - -"Atlantis Land" "A03-P826" "" "megatec" - -"Baytech" "RPC3" "8 outlets" "powerman-pdu (experimental)" -"Baytech" "RPC3-20NC" "8 outlets" "powerman-pdu (experimental)" -"Baytech" "RPC28-30NC" "20 outlets" "powerman-pdu (experimental)" -"Baytech" "various RPC" "" "snmp-ups" - -"Belkin" "Active Battery Backup BU30 series" "USB" "megatec_usb" -"Belkin" "Home Office F6H350-SER" "" "genericups upstype=7" -"Belkin" "Home Office F6H500-SER" "" "genericups upstype=7" -"Belkin" "Home Office F6H650-SER" "" "genericups upstype=7" -"Belkin" "F6H375-USB" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups" -"Belkin" "F6H375-USB" "USB (2007 models, vendor id: 0665)" "megatec_usb" -"Belkin" "Office Series F6C550-AVR" "USB" "usbhid-ups" -"Belkin" "Regulator Pro" "F6C525-SER, F6C625-SER" "belkin" -"Belkin" "Resource" "" "genericups upstype=4" -"Belkin" "Small Enterprise F6C1500-TW-RK" "serial port" "belkin" -"Belkin" "Small Enterprise F6C1500-TW-RK" "USB" "usbhid-ups" -"Belkin" "Universal UPS F6C100-UNV" "USB" "usbhid-ups" -"Belkin" "Universal UPS F6C120-UNV" "serial port" "belkinunv" -"Belkin" "Universal UPS F6C120-UNV" "USB" "usbhid-ups" -"Belkin" "Universal UPS F6C800-UNV" "serial port" "belkinunv" -"Belkin" "Universal UPS F6C800-UNV" "USB" "usbhid-ups" -"Belkin" "Universal UPS F6C1100-UNV" "serial port (<= 2005 models)" "belkinunv" -"Belkin" "Universal UPS F6C1100-UNV" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups" -"Belkin" "Universal UPS F6C1100-UNV" "USB (2007 models, vendor id: 0665)" "megatec_usb" -"Belkin" "Universal UPS F6C1200-UNV" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups" -"Belkin" "Universal UPS F6C1200-UNV" "USB (2007 models, vendor id: 0665)" "megatec_usb" -"Belkin" "Universal UPS F6H350deUNV" "serial port" "megatec" -"Belkin" "Universal UPS F6H350ukUNV" "serial port" "megatec" -"Belkin" "Universal UPS F6H500ukUNV" "serial port" "megatec" -"Belkin" "Universal UPS F6H650ukUNV" "serial port" "megatec" - -"Best Power" "Fortress (old)" "" "bestfortress" -"Best Power" "Fortress (newer)" "" "bestups" -"Best Power" "Fortress Telecom" "" "bestups" -"Best Power" "Axxium Rackmount" "" "bestups" -"Best Power" "Patriot Pro" "" "bestups" -"Best Power" "Patriot Pro II" "" "bestups" -"Best Power" "Patriot" "INT51 cable" "genericups upstype=6" -"Best Power" "Micro-Ferrups" "" "bestuferrups" -"Best Power" "Fortress/Ferrups" "f-command support" "bestfcom" - -"Chloride" "Desk Power 650" "serial port" "megatec" - -"Cito Power" "CPG-SR1000" "" "megatec" - -"Clary" "ST-800" "" "gamatronic" - -"Compaq" "T1500h" "" "upscode2 use_pre_lf" -"Compaq" "R3000h" "" "upscode2" -"Compaq" "R3000 XR" "" "bcmxcp" -"Compaq" "R5500 XR" "" "bcmxcp" - -"Cyber Power Systems" "320AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "500AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "650AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "700AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "800AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "850AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "900AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "1250AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "1500AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "Power99" "" "genericups upstype=7" -"Cyber Power Systems" "550SL" "" "genericups upstype=7" -"Cyber Power Systems" "725SL" "" "genericups upstype=7" -"Cyber Power Systems" "CPS825VA" "" "powerpanel" -"Cyber Power Systems" "1100AVR" "" "powerpanel" -"Cyber Power Systems" "1200AVR" "" "powerpanel" -"Cyber Power Systems" "1500AVR-HO" "" "powerpanel" -"Cyber Power Systems" "PR2200" "" "powerpanel" -"Cyber Power Systems" "PR3000E" "" "powerpanel (experimental)" -"Cyber Power Systems" "685AVR" "USB" "usbhid-ups" -"Cyber Power Systems" "800AVR" "USB" "usbhid-ups" -"Cyber Power Systems" "AE550" "USB" "usbhid-ups" -"Cyber Power Systems" "CP 1500C" "USB" "usbhid-ups" -"Cyber Power Systems" "OR2200LCDRM2U" "USB" "usbhid-ups" -"Cyber Power Systems" "Value 400E" "USB" "usbhid-ups" -"Cyber Power Systems" "Value 600E" "USB" "usbhid-ups" -"Cyber Power Systems" "Value 800E" "USB" "usbhid-ups" - -"Cyclades" "PM8" "8 outlets" "powerman-pdu (experimental)" -"Cyclades" "PM10" "10 outlets" "powerman-pdu (experimental)" - -"Dell" "Dell UPS Tower 500W LV / HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Tower 500W LV / HV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack/Tower 1000W LV / HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack/Tower 1000W LV / HV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack/Tower 1500W LV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack/Tower 1500W LV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack/Tower 1920W LV / HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack/Tower 1920W LV / HV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack/Tower 2300W LV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack/Tower 2300W LV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack/Tower 2700W LV / HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack/Tower 2700W LV / HV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Short Depth Rack 2700W High Efficiency Online LV / HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Short Depth Rack 2700W High Efficiency Online LV / HV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack 3750W High Efficiency Online HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack 3750W High Efficiency Online HV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack 4200W High Efficiency Online HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack 4200W High Efficiency Online HV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack 5600W HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack 5600W HV" "Serial port" "newmge-shut" - -"Delta" "GES602N" "" "belkin" - -"Deltec" "PowerRite Pro II" "" "genericups upstype=15" - -"Digital Loggers" "LPC, EPCR2, DIN" "8 outlets" "powerman-pdu (experimental)" - -"Digitus" "DN-170020" "" "megatec" - -"Dynamix" "UPS1700D" "" "megatec" -"Dynamix" "UPS-650VA" "" "megatec ignoreoff" - -"Dynex" "975AVR" "" "genericups upstype=7" -"Dynex" "DX-800U" "USB" "usbhid-ups" - -"Eaton" "Protection Station 500/650/800 VA" "USB" "usbhid-ups" -"Eaton" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups" -"Eaton" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups" -"Eaton" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups" -"Eaton" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups" -"Eaton" "EX 700/1000/1500 VA" "USB port" "usbhid-ups" -"Eaton" "EX 2200/3000/3000 XL VA" "USB port" "usbhid-ups" -"Eaton" "EX 1000 RT2U / 1500 RT2U" "USB port" "usbhid-ups" -"Eaton" "MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups" -"Eaton" "Nova AVR 625/1250" "USB" "usbhid-ups" -"Eaton" "E Series NV UPS 400-2000 VA" "" "megatec_usb" -"Eaton" "E Series DX UPS 1-20 kVA" "" "mge-utalk" -"Eaton" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or newmge-shut" -"Eaton" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or newmge-shut" -"Eaton" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "EX 700/1000/1500 VA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "EX 2200/3000/3000 XL VA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "EX 1000 RT2U / 1500 RT2U" "Serial port" "mge-shut or newmge-shut" -"Eaton" "MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "EX RT 1:1 7/11 kVA" "" "mge-shut or newmge-shut" -"Eaton" "EX RT 3:1 5/7/11 kVA" "" "mge-shut or newmge-shut" -"Eaton" "EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)" -"Eaton" "EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)" -"Eaton" "BladeUPS (SNMP)" "ConnectUPS Web/SNMP Card" "snmp-ups (experimental)" -"Eaton" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" -"Eaton" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" -"Eaton" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" -"Eaton" "various models (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)" -"Eaton" "ePDU Managed" "" "snmp-ups (experimental)" -"Eaton" "ePDU Monitored" "" "snmp-ups or netxml-ups" -"Eaton" "Powerware 9130" "" "bcmxcp or usbhid-ups" - -"Effekta" "MI/MT/MH" "2502 cable" "megatec" -"Effekta" "RM2000MH" "" "megatec" - -"Energy Sistem" "(various)" "" "megatec" - -"ETA" "mini+UPS" "WinNT/Upsoft cable" "genericups upstype=7" -"ETA" "mini+UPS PRO" "UPS Explorer cable" "etapro" - -"Ever UPS" "NET *-DPC" "" "everups" -"Ever UPS" "AP *-PRO" "" "everups" - -"Ever-Power" "625/1000" "" "safenet" - -"Exide" "NetUPS SE" "" "genericups upstype=15" - -"Fenton Technologies" "PowerPal" "P-series" "safenet" -"Fenton Technologies" "PowerPal" "L-series" "megatec" -"Fenton Technologies" "PowerOn" "" "megatec" -"Fenton Technologies" "PowerPure" "" "megatec" - -"Fairstone" "L525/L625/L750" "" "safenet" - -"Fideltronik" "Ares 700 and larger" "" "genericups upstype=6" -"Fideltronik" "Other Ares models" "" "genericups upstype=19" - -"Fiskars" "PowerRite MAX" "" "upscode2" -"Fiskars" "PowerServer 10" "" "upscode2" -"Fiskars" "PowerServer 30" "" "upscode2" -"Fiskars" "9200" "UPS Information Unit" "upscode2" - -"Forza Power Technologies" "SL-1001" "USB" "megatec_usb" - -"Gamatronic" "All models with alarm interface" "" "genericups upstype=22" -"Gamatronic" "G-SmartCompact 2000" "" "megatec" -"Gamatronic" "MP110/210" "" "gamatronic" -"Gamatronic" "MS-T" "" "gamatronic" -"Gamatronic" "MS" "" "gamatronic" -"Gamatronic" "µPS3/1" "" "gamatronic" - -"Geek Squad" "GS1285U" "USB" "usbhid-ups" - -"Gemini" "UPS625/UPS1000" "" "safenet" - -"HP" "PowerTrust 2997A" "HP 5061-2575 cable" "apcsmart" -"HP" "R3000 XR" "" "bcmxcp" -"HP" "R5500 XR" "" "bcmxcp" -"HP" "R1500 G2" "" "bcmxcp" -"HP" "R/T 2200 G2" "" "usbhid-ups" -"HP" "T500" "older models" "bcmxcp_usb" -"HP" "T750 INTL" "" "usbhid-ups" -"HP" "T750" "older models" "bcmxcp_usb" -"HP" "HP3488 Switch/Control Unit" "" "powerman-pdu (experimental)" - -"IBM" "Blade Center Management Module" "15 outlets" "powerman-pdu (experimental)" - -"ICS" "8064 Ethernet Relay Interface" "16 outlets" "powerman-pdu (experimental)" - -"INELT" "Monolith 1000LT" "" "megatec" - -"Inform" "GUARD" "Line Interactive AP model" "powercom" -"Inform" "Guard S 1500AP" "" "megatec" -"Inform" "Informer Compact 1000VA" "" "megatec or blazer_ser" - -"Infosec" "iPEL 350" "" "megatec" -"Infosec" "iPEL 500" "" "megatec" -"Infosec" "iPEL 750" "" "megatec" -"Infosec" "iPEL 1000" "" "megatec" -"Infosec" "500XP" "" "megatec" -"Infosec" "XP 500" "USB" "megatec_usb" -"Infosec" "XP 1000" "" "megatec" - -"IPMI" "" "" "powerman-pdu (experimental)" - -"Ippon" "Back Power Pro 400/500/600/700/800" "" "blazer_ser or megatec" -"Ippon" "Back Power Pro 400/500/600/700/800" "USB" "blazer_usb (experimental)" -"Ippon" "Back Comfo Pro 600/800" "" "blazer_ser or megatec" -"Ippon" "Back Comfo Pro 600/800" "USB" "blazer_usb (experimental)" -"Ippon" "Smart Power Pro 1000/1400/2000" "" "blazer_ser or megatec" -"Ippon" "Smart Power Pro 1000/1400/2000" "USB" "blazer_usb (experimental)" -"Ippon" "Smart Winner 750/1000/1500/2000/3000" "" "blazer_ser or megatec" -"Ippon" "Smart Winner 750/1000/1500/2000/3000" "USB" "blazer_usb (experimental)" -"Ippon" "(various)" "" "blazer_ser or megatec" -"Ippon" "(various)" "USB" "blazer_usb" - -"IVT" "SCD series" "" "ivtscd" - -"Jageson Technology" "Jasuny USPS" "" "genericups upstype=4" - -"Kebo" "1200D/D Series" "" "megatec" - -"Krauler" "UP-D1200VA" "USB" "megatec_usb ignoreoff" -"Krauler" "UP-M500VA" "USB" "megatec_usb" - -"Lestar" "MD-800E" "" "megatec" - -"Liebert" "ITON 600VA" "" "megatec" -"Liebert" "UPStation GXT2" "contact-closure cable" "liebert" -"Liebert" "GXT2-3000RT230" "" "liebertgxt2 (experimental)" -"Liebert" "PowerSure Personal XT" "USB" "usbhid-ups" -"Liebert" "PowerSure PSA" "USB" "usbhid-ups" - -"LNXI" "Icebox" "10 outlets" "powerman-pdu (experimental)" - -"Masterguard" "(various)" "" "masterguard" - -"Maxxtro" "UPS 600 VA" "serial port" "megatec" - -"Mecer" "ME-2000" "" "megatec" - -"Meta System" "HF Line" "1..4 boards" "metasys" -"Meta System" "HF Line \/2" "5..8 boards" "metasys" -"Meta System" "HF Millennium 810" "" "metasys" -"Meta System" "HF Millennium 820" "" "metasys" -"Meta System" "HF TOP Line 910" "" "metasys" -"Meta System" "HF TOP Line 920" "" "metasys" -"Meta System" "HF TOP Line 930" "" "metasys" -"Meta System" "HF TOP Line 940" "" "metasys" -"Meta System" "HF TOP Line 950" "" "metasys" -"Meta System" "HF TOP Line 960" "" "metasys" -"Meta System" "HF TOP Line 970" "" "metasys" -"Meta System" "HF TOP Line 980" "" "metasys" -"Meta System" "ECO Network 750" "" "metasys" -"Meta System" "ECO Network 1000" "" "metasys" -"Meta System" "ECO Network 1050" "" "metasys" -"Meta System" "ECO Network 1500" "" "metasys" -"Meta System" "ECO Network 1800" "" "metasys" -"Meta System" "ECO Network 2000" "" "metasys" -"Meta System" "ECO Network 2100" "" "metasys" -"Meta System" "ECO Network 2500" "" "metasys" -"Meta System" "ECO Network 3000" "" "metasys" -"Meta System" "ECO 305" "" "metasys" -"Meta System" "ECO 308" "" "metasys" -"Meta System" "ECO 311" "" "metasys" -"Meta System" "ECO 511" "" "metasys" -"Meta System" "ECO 516" "" "metasys" -"Meta System" "ECO 519" "" "metasys" -"Meta System" "ECO 522" "" "metasys" -"Meta System" "ally HF 800" "" "metasys" -"Meta System" "ally HF 1000" "" "metasys" -"Meta System" "ally HF 1250" "" "metasys" -"Meta System" "ally HF 1600" "" "metasys" -"Meta System" "ally HF 2000" "" "metasys" -"Meta System" "ally HF 2500" "" "metasys" -"Meta System" "Megaline 1250" "" "metasys" -"Meta System" "Megaline 2500" "" "metasys" -"Meta System" "Megaline 3750" "" "metasys" -"Meta System" "Megaline 5000" "" "metasys" -"Meta System" "Megaline 6250" "" "metasys" -"Meta System" "Megaline 7500" "" "metasys" -"Meta System" "Megaline 8750" "" "metasys" -"Meta System" "Megaline 10000" "" "metasys" - -"MGE Office Protection Systems" "Protection Center 500/675 VA" "USB" "usbhid-ups" -"MGE Office Protection Systems" "Protection Station 500/650/800 VA" "USB" "usbhid-ups" -"MGE Office Protection Systems" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups" -"MGE Office Protection Systems" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups" -"MGE Office Protection Systems" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups" -"MGE Office Protection Systems" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups" -"MGE Office Protection Systems" "Pulsar 700/1000/1500 VA" "USB port" "usbhid-ups" -"MGE Office Protection Systems" "Pulsar M 2200/3000 VA" "USB port" "usbhid-ups" -"MGE Office Protection Systems" "Pulsar MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups" -"MGE Office Protection Systems" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Pulsar 700/1000/1500 VA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Pulsar M 2200/3000 VA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Pulsar MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Comet EX RT 1:1 7/11 kVA" "" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Comet EX RT 3:1 5/7/11 kVA" "" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Comet EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)" -"MGE Office Protection Systems" "Comet EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)" -"MGE Office Protection Systems" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" -"MGE Office Protection Systems" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" -"MGE Office Protection Systems" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" -"MGE Office Protection Systems" "various models (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)" - -"MGE UPS SYSTEMS" "Comet EX RT" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Comet EX RT 3:1" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Protection Center 420" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Protection Center 500" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Protection Center 675" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "NOVA AVR 600 USB" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "NOVA AVR 1100 USB" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar Ellipse USBS" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar Ellipse USB" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar Ellipse Premium USBS" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar Ellipse Premium USB" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse Office 600" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse Office 750" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse Office 1000" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse Office 1500" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse MAX 600" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse MAX 850" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse MAX 1100" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse MAX 1500" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar Evolution" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution 650" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution 850" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution 1150" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution S 1250" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution 1550" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution S 1750" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution 2000" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution S 2500" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution S 3000" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar M 2200" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar M 3000" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar M 3000 XL" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar 700" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar 1000" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar 1500" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar 1000 RT2U" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar 1500 RT2U" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar MX 4000 RT" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar MX 5000 RT" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Comet / Galaxy (USB)" "USB Card (ref 66067)" "usbhid-ups" -"MGE UPS SYSTEMS" "NOVA AVR 600 Serial" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "NOVA AVR 1100 Serial" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar Ellipse USBS" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar Ellipse S" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar Ellipse Premium USBS" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar Ellipse Premium S" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse Office 600" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse Office 750" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse Office 1000" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse Office 1500" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse MAX 600" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse MAX 850" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse MAX 1100" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse MAX 1500" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar EXtreme C / EX RT" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Comet EX RT" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Comet EX RT 3:1" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar Esprit" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution 650" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution 850" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution 1150" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution S 1250" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution 1550" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution S 1750" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution 2000" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution S 2500" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution S 3000" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar M 2200" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar M 3000" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar M 3000 XL" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar 700" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar 1000" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar 1500" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar 1000 RT2U" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar 1500 RT2U" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar MX 4000 RT" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar MX 5000 RT" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar Evolution" "Serial port" "mge-shut or newmge-shut or mge-utalk" -"MGE UPS SYSTEMS" "Pulsar EXtreme C" "" "mge-shut or newmge-shut or mge-utalk" -"MGE UPS SYSTEMS" "Pulsar ES+" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar ESV+" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar SV" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar ESV" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar EX" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar EXL" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar PSX" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar SX" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar EXtreme" "" "mge-utalk" -"MGE UPS SYSTEMS" "Comet EXtreme" "" "mge-utalk" -"MGE UPS SYSTEMS" "Comet / Galaxy (Serial)" "Utalk Serial Card (ref 66060)" "mge-utalk" -"MGE UPS SYSTEMS" "Comet / Galaxy (Serial)" "HID COM Serial Card (ref 66066)" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar / Comet / Galaxy (SNMP)" "SNMP/Web Transverse card (ref 66074)" "snmp-ups (experimental)" -"MGE UPS SYSTEMS" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" -"MGE UPS SYSTEMS" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" -"MGE UPS SYSTEMS" "Pulsar (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" -"MGE UPS SYSTEMS" "Pulsar (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)" -"MGE UPS SYSTEMS" "Pulsar / Comet / Galaxy (SNMP)" "SNMP card (ref 66062)" "snmp-ups (experimental)" -"MGE UPS SYSTEMS" "Pulsar (SNMP)" "SNMP card (ref 66045)" "snmp-ups (experimental)" -"MGE UPS SYSTEMS" "UM-Link (SNMP)" "Not a UPS (ref 66850)" "snmp-ups (experimental)" - -"MicroDowell" "B.Box BP 500" "" "powerpanel" -"MicroDowell" "B.Box BP 750" "" "powerpanel" -"MicroDowell" "B.Box BP 1000" "" "powerpanel" -"MicroDowell" "B.Box BP 1500" "" "powerpanel" -"MicroDowell" "Enterprise B8" "" "microdowell" -"MicroDowell" "Enterprise B10" "" "microdowell" -"MicroDowell" "Enterprise N8" "" "microdowell" -"MicroDowell" "Enterprise N11" "" "microdowell" -"MicroDowell" "Enterprise N15" "" "microdowell" -"MicroDowell" "Enterprise N20" "" "microdowell" -"MicroDowell" "Enterprise N22" "" "microdowell" -"MicroDowell" "Enterprise N30" "" "microdowell" -"MicroDowell" "Enterprise N40" "" "microdowell" -"MicroDowell" "Enterprise N50" "" "microdowell" -"MicroDowell" "Enterprise N60" "" "microdowell" -"MicroDowell" "Enterprise HiBox ST" "" "microdowell" - -"Microsol" "Solis 1.0" "1000VA" "solis" -"Microsol" "Solis 1.5" "1500VA" "solis" -"Microsol" "Solis 2.0" "2000VA" "solis" -"Microsol" "Solis 3.0" "3000VA" "solis" -"Microsol" "Rhino 6.0" "6000VA" "rhino" -"Microsol" "Rhino 7.5" "7500VA" "rhino" -"Microsol" "Rhino 10.0" "10000VA" "rhino" -"Microsol" "Rhino 20.0" "20000VA" "rhino" - -"Mustek" "Powermust" "400VA Plus" "megatec" -"Mustek" "Powermust" "600VA Plus" "megatec" -"Mustek" "Powermust" "800VA Pro" "megatec" -"Mustek" "Powermust" "1000VA Plus" "megatec" -"Mustek" "Powermust" "1400VA Plus" "megatec" -"Mustek" "Powermust" "2000VA USB" "megatec" -"Mustek" "Powermust Office 650" "USB" "megatec_usb" -"Mustek" "PowerMust 424 / 636 / 848" "USB" "blazer_usb" -"Mustek" "Various" "" "megatec" - -"Neus" "400va / 600va" "" "megatec" - -"Nitram" "Elite 500" "" "genericups upstype=8" -"Nitram" "Elite 2002" "" "genericups upstype=16" -"Nitram" "Elite 2005" "" "powerpanel" - -"Oneac" "ON400" "advanced interface" "oneac" -"Oneac" "ON600" "advanced interface" "oneac" -"Oneac" "ON900" "advanced interface" "oneac" -"Oneac" "ON1300" "advanced interface" "oneac" -"Oneac" "EG Series" "advanced interface" "oneac" -"Oneac" "ON700" "advanced interface" "oneac" -"Oneac" "ON700XAU" "advanced interface" "oneac" -"Oneac" "ON700XIU" "advanced interface" "oneac" -"Oneac" "ON1000" "advanced interface" "oneac" -"Oneac" "ON1000XAU" "advanced interface" "oneac" -"Oneac" "ON1000XIU" "advanced interface" "oneac" -"Oneac" "ON1500" "advanced interface" "oneac" -"Oneac" "ON1500XAU" "advanced interface" "oneac" -"Oneac" "ON1500XIU" "advanced interface" "oneac" -"Oneac" "ON2000" "advanced interface" "oneac" -"Oneac" "ON2000XAU" "advanced interface" "oneac" -"Oneac" "ON2000XIU" "advanced interface" "oneac" - -"Online" "P-Series" "" "genericups upstype=14" -"Online" "Zinto D" "" "optiups" - -"OnLite" "AQUA" "50" "megatec" - -"Opti-UPS" "PowerES" "420E" "optiups" - -"Orvaldi Power Protection" "various" "not 400 or 600" "megatec" - -"Phasak" "400VA / 600VA" "" "megatec" - -"Plexus" "500VA" "USB" "megatec_usb ignoreoff" -"Plexus" "1000VA Pro" "USB" "megatec_usb ignoreoff" - -"Powercom" "SMK" "" "megatec" -"Powercom" "SXL" "" "megatec" -"Powercom" "ULT" "" "megatec" -"Powercom" "Trust 425/625" "" "powercom" -"Powercom" "Advice Partner/King Pr750" "" "powercom" -"Powercom" "Black Knight PRO" "" "powercom" -"Powercom" "Black Knight PRO" "USB (2009 models, product id: 00a6)" "usbhid-ups (experimental)" -"Powercom" "Smart KING Pro (all Smart series)" "powercom" -"Powercom" "Smart KING Pro (all Smart series)" "USB (2009 models, product id: 00a3)" "usbhid-ups (experimental)" -"Powercom" "Imperial" "" "powercom" -"Powercom" "Imperial" "USB (2009 models, product id: 00a2)" "usbhid-ups (experimental)" -"Powercom" "Vanguard" "" "megatec" -"Powercom" "Vanguard" "USB (2009 models, product id: 00a5)" "usbhid-ups (experimental)" -"Powercom" "WOW" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)" -"Powercom" "WOW" "USB (2009 models, product id: 00a4)" "usbhid-ups (experimental)" -"Powercom" "(various)" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)" -"Powercom" "(various)" "USB (2009 models, product id: 00a?)" "usbhid-ups (experimental)" - -"PowerGuard" "PG-600" "" "megatec" - -"PowerKinetics" "9001" "" "genericups upstype=17" -"PowerKinetics" "BlackOut Buster" "" "megatec" - -"PowerMan" "RealSmart 800" "" "megatec" -"PowerMan" "RealSmart 1000" "" "megatec" -"PowerMan" "BackPro" "" "genericups upstype=4" - -"PowerTech" "Comp1000" "DTR cable power" "genericups upstype=3" -"PowerTech" "SMK-800" "" "megatec" - -"PowerWalker" "Line-Interactive VI 1000" "" "megatec" -"PowerWalker" "Line-Interactive VI 400/800" "" "megatec" -"PowerWalker" "Line-Interactive VI 600" "" "megatec battvolts=9:13" - -"Powerware" "3110" "" "genericups upstype=7" -"Powerware" "3115" "" "genericups upstype=11" -"Powerware" "5119, 5125" "" "genericups upstype=15" -"Powerware" "5119 RM" "" "genericups upstype=20" -"Powerware" "PW3105" "" "bcmxcp_usb" -"Powerware" "PW5110" "" "bcmxcp_usb" -"Powerware" "PW5115" "Serial port" "bcmxcp" -"Powerware" "PW5115" "USB port" "bcmxcp_usb" -"Powerware" "PW5125" "" "bcmxcp" -"Powerware" "PW9120" "Serial port" "bcmxcp" -"Powerware" "PW9120" "USB port" "bcmxcp_usb" -"Powerware" "PW9125" "" "bcmxcp" -"Powerware" "PW9315" "3-phase" "bcmxcp" -"Powerware" "9110" "" "upscode2" -"Powerware" "9120" "" "upscode2" -"Powerware" "9150" "" "upscode2" -"Powerware" "9305" "" "upscode2" -"Powerware" "BladeUPS (SNMP)" "ConnectUPS Web/SNMP Card" "snmp-ups (experimental)" -"Powerware" "(various)" "ConnectUPS Web/SNMP card" "snmp-ups (experimental)" - -"Powerwell" "PM525A/-625A/-800A/-1000A/-1250A" "" "safenet" - -"Phantom" "Rackable Systems" "1 outlets" "powerman-pdu (experimental)" - -"Raritan" "Intelligent PDU - Dominion PX" "no report, but should be supported" "snmp-ups (experimental)" -"Raritan" "Metered PDU - Raritan PM" "no report, but should be supported" "snmp-ups (experimental)" -"Raritan" "Switched PDU - Raritan RPC" "no report, but should be supported" "snmp-ups (experimental)" - -"Repotec" "RPF525/625/800/1000" "" "safenet" -"Repotec" "RPT-800A" "" "genericups upstype=13" -"Repotec" "RPT-162A" "" "genericups upstype=13" - -"SmartLabs" "2412S Power Line Modem" "for X10/Insteon" "powerman-pdu (experimental)" - -"SMS (Brazil)" "Manager III" "" "megatec" - -"SOLA" "305" "cable INT-0025C" "genericups upstype=7" -"SOLA" "325" "" "bestups" -"SOLA" "520" "" "bestups" -"SOLA" "610" "use ID= in ups.conf" "bestups" -"SOLA" "620" "" "bestups" -"SOLA" "330" "" "megatec" - -"SOLA/BASIC Mexico" "various" "ISBMEX protocol" "isbmex" - -"Socomec" "NeTYS-PE 600VA" "megatec" -"Socomec Sicon" "Egys" "420 VA" "powercom" -"Socomec Sicon" "Netvision" "UPS equipped with Netvision WEB/SNMP card/external box" "snmp-ups (experimental)" - -"Soltec" "Winmate 525/625/800/1000" "" "safenet" - -"Soyntec" "Sekury C 500" "" "megatec" -"Soyntec" "Sekury C 800" "" "megatec" - -"SquareOne Power" "QP1000" "" "megatec" - -"Sun" "ILOM Management Module" "1 outlet" "powerman-pdu (experimental)" - -"SuperPower" "HP360, Hope-550" "" "megatec" - -"SVEN" "Power Pro+ series" "USB" "megatec_usb" -"SVEN" "Power Smart RM 2000" "USB" "megatec_usb" - -"Sweex" "500/1000" "smart - shipped with SafeNet" "safenet" -"Sweex" "500/1000" "" "genericups upstype=7" -"Sweex" "1000" "USB" "richcomm_usb" -"Sweex" "(various)" "" "megatec" - -"Sysgration" "UPGUARDS Pro650" "" "megatec" - -"Tecnoware" "Easy Power 1200" "" "megatec" - -"Tripp-Lite" "INTERNETOFFICE700" "USB" "tripplite_usb" -"Tripp-Lite" "OMNIVS1000" "USB" "tripplite_usb" -"Tripp-Lite" "OMNIVS1500XL" "USB" "tripplite_usb" -"Tripp-Lite" "SMART700USB" "USB" "tripplite_usb" -"Tripp-Lite" "SMART1500RM2U" "USB" "tripplite_usb" -"Tripp-Lite" "SMART550USB" "USB" "tripplite_usb" -"Tripp-Lite" "SMART2200RMXL2U" "USB, older models" "tripplite_usb (experimental)" -"Tripp-Lite" "SmartUPS" "" "tripplite" -"Tripp-Lite" "SmartOnline" "" "tripplitesu" -"Tripp-Lite" "(various)" "Lan 2.2 interface - black 73-0844 cable" "genericups upstype=5" -"Tripp-Lite" "OMNI1000LCD" "USB" "usbhid-ups" -"Tripp-Lite" "OMNI900LCD" "USB" "usbhid-ups" -"Tripp-Lite" "OMNI650LCD" "USB" "usbhid-ups" -"Tripp-Lite" "1500 LCD" "USB" "usbhid-ups" -"Tripp-Lite" "AVR550U" "USB" "usbhid-ups" -"Tripp-Lite" "AVR750U" "USB" "usbhid-ups" -"Tripp-Lite" "ECO550UPS" "USB" "usbhid-ups" -"Tripp-Lite" "SmartOnline SU1500RTXL2ua" "USB" "usbhid-ups" -"Tripp-Lite" "smart2200RMXL2U" "USB, newer models" "usbhid-ups" - -"Trust" "UPS 1000 Management PW-4105" "" "megatec" -"Trust" "UPS 1200VA Management PW-4120M" "" "megatec" -"Trust" "UPS 1300VA Management PW-4130M" "" "megatec" - -"UNITEK" "ALPHA 500 IC" "" "megatec dtr=0 rts=1" -"UNITEK" "Alpha 1000is" "" "megatec" -"UNITEK" "Alpha 500" "" "megatec" -"UNITEK" "Alpha 500 ipE" "" "megatec" -"UNITEK" "Alpha 2600" "" "megatec" -"UNITEK" "Alpha 1200Sx" "USB" "megatec_usb" -"UNITEK" "Alpha 1250xD" "USB" "megatec_usb" - -"UPSonic" "CXR1000" "" "megatec" -"UPSonic" "LAN Saver 600" "" "genericups upstype=0" -"UPSonic" "Power Guardian" "" "genericups upstype=7" -"UPSonic" "PrOffice 650" "USB" "megatec_usb" -"UPSonic" "DS-800" "USB" "megatec_usb" - -"Various" "(various)" "SEC protocol" "gamatronic" -"Various" "(various)" "Generic RUPS model" "genericups upstype=4" -"Various" "(various)" "Generic RUPS 2000 (Megatec M2501 cable)" "genericups upstype=21" -"Various" "(various)" "Q1 / Megatec protocol" "megatec" -"Various" "(various)" "PhoenixTec protocol" "bestups" -"Various" "(various)" "SNMP - RFC 1628" "snmp-ups (experimental)" -"Various" "(various)" "Safenet software" "safenet" - -"Victron/IMV" "(various)" "" "victronups" -"Victron/IMV" "Lite" "crack cable" "genericups upstype=10" - -"Viewsonic" "PowerES" "420E" "optiups" - -"WinPower" "CPM-800" "" "megatec" - -"WTI" "RPS-10" "10 outlets" "powerman-pdu (experimental)" -"WTI" "NPS" "8 outlets" "powerman-pdu (experimental)" diff --git a/data/driver.list.in b/data/driver.list.in new file mode 100644 index 0000000..f5501c7 --- /dev/null +++ b/data/driver.list.in @@ -0,0 +1,761 @@ +# Network UPS Tools - @PACKAGE_VERSION@ - Hardware Compatibility List +# version=2 +# +# This file is used for various purposes, like building the HTML compatibility +# list or displaying information in NUT configuration tools. +# +# If you write a new driver, modify an existing one to add more support, +# or just know about some equipment that isn't listed but should be, +# please send us a patch to update this file. +# +# Format: +# ======= +# +# +# Details: +# ======== +# - device type: +# "ups" for Uninterruptible Power Supply +# "pdu" for Power Distributions Unit +# "scd" for Solar Controlers Device +# +# - support level: a number from "1" to "5" (stars) meaning: +# * protocol based on reverse engineering +# ** based on fragments of publicly available protocol +# *** based on publicly available protocol +# **** vendor provided protocol +# ***** vendor provided protocol and hardware +# +# - driver [parameters]: mention the driver(s) (separated by "or" if there are +# several possibilities. Any mandatory parameter(s) must be referenced, as +# they will be parsed by configuration helper softwares. +# For example, genericups entries must mention the "upstype=nn" format. +# +# Duplicate text in the last field will be cooked out during the conversion +# to HTML with ROWSPAN magic. They must be an exact match for this to work. + +"Ablerex" "ups" "2" "MS-RT" "" "blazer_ser" +"Ablerex" "ups" "2" "625L" "USB" "blazer_usb" +"Ablerex" "ups" "2" "Hope Office 400/600" "" "blazer_ser" + +"ActivePower" "ups" "2" "400VA" "" "blazer_ser" +"ActivePower" "ups" "2" "1400VA" "" "blazer_ser" +"ActivePower" "ups" "2" "2000VA" "" "blazer_ser" + +"Advice" "ups" "2" "TopGuard 2000" "" "blazer_ser" + +"AEC" "ups" "1" "MiniGuard UPS 700" "Megatec M2501 cable" "genericups upstype=21" + +"APC" "ups" "1" "Back-UPS Pro" "" "apcsmart" +"APC" "ups" "1" "Matrix-UPS" "" "apcsmart" +"APC" "ups" "1" "Smart-UPS" "" "apcsmart" +"APC" "ups" "2" "Back-UPS Pro USB" "USB" "usbhid-ups" +"APC" "ups" "2" "Back-UPS USB" "USB" "usbhid-ups" +"APC" "ups" "2" "Back-UPS RS USB" "USB" "usbhid-ups" +"APC" "ups" "2" "Back-UPS LS USB" "USB" "usbhid-ups" +"APC" "ups" "2" "Back-UPS ES/CyberFort 350" "USB" "usbhid-ups" +"APC" "ups" "2" "Back-UPS BF500" "USB" "usbhid-ups" +"APC" "ups" "2" "BACK-UPS XS LCD" "USB" "usbhid-ups" +"APC" "ups" "2" "Smart-UPS USB" "USB" "usbhid-ups" +"APC" "ups" "1" "Back-UPS" "940-0095A/C cables" "genericups upstype=1" +"APC" "ups" "1" "Back-UPS" "940-0020B/C cables" "genericups upstype=2" +"APC" "ups" "1" "Back-UPS" "940-0023A cable" "genericups upstype=9" +"APC" "ups" "1" "Back-UPS Office" "940-0119A cable" "genericups upstype=12" +"APC" "ups" "1" "Back-UPS RS 500" "custom non-USB cable" "genericups upstype=20" +"APC" "pdu" "1" "Masterswitch" "940-0020 cable" "genericups upstype=12" +"APC" "pdu" "1" "AP9210" "8 outlets" "powerman-pdu (experimental)" +"APC" "pdu" "1" "AP79xx" "8 to 24 outlets" "powerman-pdu (experimental)" +"APC" "pdu" "3" "(various)" "SNMP monitoring card" "snmp-ups (experimental)" + +"Aphel" "pdu" "3" "various PDU" "" "snmp-ups (experimental)" + +"Apollo" "ups" "1" "1000A" "" "genericups upstype=4" +"Apollo" "ups" "1" "1000F" "" "genericups upstype=4" + +"Appro" "pdu" "1" "SWPDU" "48 outlets" "powerman-pdu (experimental)" + +"Atlantis Land" "ups" "2" "A03-P826" "" "blazer_ser" + +"Baytech" "pdu" "1" "RPC3" "8 outlets" "powerman-pdu (experimental)" +"Baytech" "pdu" "1" "RPC3-20NC" "8 outlets" "powerman-pdu (experimental)" +"Baytech" "pdu" "1" "RPC28-30NC" "20 outlets" "powerman-pdu (experimental)" +"Baytech" "pdu" "3" "various RPC" "" "snmp-ups" + +"Belkin" "ups" "2" "Active Battery Backup BU30 series" "USB" "blazer_usb" +"Belkin" "ups" "1" "Home Office F6H350-SER" "" "genericups upstype=7" +"Belkin" "ups" "1" "Home Office F6H500-SER" "" "genericups upstype=7" +"Belkin" "ups" "1" "Home Office F6H650-SER" "" "genericups upstype=7" +"Belkin" "ups" "2" "F6H375-USB" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups" +"Belkin" "ups" "2" "F6H375-USB" "USB (2007 models, vendor id: 0665)" "blazer_usb" +"Belkin" "ups" "2" "Office Series F6C550-AVR" "USB" "usbhid-ups" +"Belkin" "ups" "2" "Regulator Pro" "F6C525-SER, F6C625-SER" "belkin" +"Belkin" "ups" "1" "Resource" "" "genericups upstype=4" +"Belkin" "ups" "2" "Small Enterprise F6C1500-TW-RK" "serial port" "belkin" +"Belkin" "ups" "2" "Small Enterprise F6C1500-TW-RK" "USB" "usbhid-ups" +"Belkin" "ups" "2" "Universal UPS F6C100-UNV" "USB" "usbhid-ups" +"Belkin" "ups" "1" "Universal UPS F6C120-UNV" "serial port" "belkinunv" +"Belkin" "ups" "2" "Universal UPS F6C120-UNV" "USB" "usbhid-ups" +"Belkin" "ups" "1" "Universal UPS F6C800-UNV" "serial port" "belkinunv" +"Belkin" "ups" "2" "Universal UPS F6C800-UNV" "USB" "usbhid-ups" +"Belkin" "ups" "1" "Universal UPS F6C1100-UNV" "serial port (<= 2005 models)" "belkinunv" +"Belkin" "ups" "2" "Universal UPS F6C1100-UNV" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups" +"Belkin" "ups" "2" "Universal UPS F6C1100-UNV" "USB (2007 models, vendor id: 0665)" "blazer_usb" +"Belkin" "ups" "2" "Universal UPS F6C1200-UNV" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups" +"Belkin" "ups" "2" "Universal UPS F6C1200-UNV" "USB (2007 models, vendor id: 0665)" "blazer_usb" +"Belkin" "ups" "2" "Universal UPS F6H350deUNV" "serial port" "blazer_ser" +"Belkin" "ups" "2" "Universal UPS F6H350ukUNV" "serial port" "blazer_ser" +"Belkin" "ups" "2" "Universal UPS F6H500ukUNV" "serial port" "blazer_ser" +"Belkin" "ups" "2" "Universal UPS F6H650ukUNV" "serial port" "blazer_ser" + +"Best Power" "ups" "1" "Fortress (older)" "" "bestfortress" +"Best Power" "ups" "1" "Fortress (newer)" "" "bestups" +"Best Power" "ups" "1" "Fortress Telecom" "" "bestups" +"Best Power" "ups" "1" "Axxium Rackmount" "" "bestups" +"Best Power" "ups" "1" "Patriot Pro" "" "bestups" +"Best Power" "ups" "1" "Patriot Pro II" "" "bestups" +"Best Power" "ups" "1" "Patriot" "INT51 cable" "genericups upstype=6" +"Best Power" "ups" "1" "Micro-Ferrups" "" "bestuferrups" +"Best Power" "ups" "1" "Fortress/Ferrups" "f-command support" "bestfcom" + +"Chloride" "ups" "2" "Desk Power 650" "serial port" "blazer_ser" + +"Cito Power" "ups" "2" "CPG-SR1000" "" "blazer_ser" + +"Clary" "ups" "4" "ST-800" "" "gamatronic" + +"Compaq" "ups" "4" "T1500h" "" "upscode2 use_pre_lf" +"Compaq" "ups" "4" "R3000h" "" "upscode2" +"Compaq" "ups" "4" "R3000 XR" "" "bcmxcp" +"Compaq" "ups" "4" "R5500 XR" "" "bcmxcp" + +"Cyber Power Systems" "ups" "1" "320AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "500AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "650AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "700AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "800AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "850AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "900AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "1250AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "1500AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "Power99" "" "genericups upstype=7" +"Cyber Power Systems" "ups" "1" "550SL" "" "genericups upstype=7" +"Cyber Power Systems" "ups" "1" "725SL" "" "genericups upstype=7" +"Cyber Power Systems" "ups" "1" "CPS825VA" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "1100AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "1200AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "1500AVR-HO" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "PR2200" "" "powerpanel" +"Cyber Power Systems" "ups" "2" "PR3000E" "" "powerpanel" +"Cyber Power Systems" "ups" "2" "685AVR" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "800AVR" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "AE550" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "3" "CP 1500C" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "3" "OR2200LCDRM2U" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "Value 400E" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "Value 600E" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "Value 800E" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "CP1350AVRLCD" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "CP1500AVRLCD" "USB" "usbhid-ups" + +"Cyclades" "pdu" "1" "PM8" "8 outlets" "powerman-pdu (experimental)" +"Cyclades" "pdu" "1" "PM10" "10 outlets" "powerman-pdu (experimental)" + +"Dell" "ups" "5" "Tower 500W LV / HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Tower 500W LV / HV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack/Tower 1000W LV / HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 1000W LV / HV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack/Tower 1500W LV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 1500W LV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack/Tower 1920W LV / HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 1920W LV / HV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack/Tower 2300W LV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 2300W LV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack/Tower 2700W LV / HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 2700W LV / HV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Short Depth Rack 2700W Online LV / HV" "High Efficiency, USB port" "usbhid-ups" +"Dell" "ups" "5" "Short Depth Rack 2700W Online LV / HV" "High Efficiency, Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack 3750W High Efficiency Online HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack 3750W High Efficiency Online HV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack 4200W High Efficiency Online HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack 4200W High Efficiency Online HV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack 5600W HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack 5600W HV" "Serial port" "newmge-shut" + +"Delta" "ups" "1" "GES602N" "" "belkin" + +"Deltec" "ups" "1" "PowerRite Pro II" "" "genericups upstype=15" + +"Digital Loggers" "pdu" "1" "LPC, EPCR2, DIN" "8 outlets" "powerman-pdu (experimental)" + +"Digitus" "ups" "2" "DN-170020" "" "blazer_ser" + +"Dynamix" "ups" "2" "UPS1700D" "" "blazer_ser" +"Dynamix" "ups" "2" "UPS-650VA" "" "blazer_ser" + +"Dynex" "ups" "1" "975AVR" "" "genericups upstype=7" +"Dynex" "ups" "2" "DX-800U" "USB" "usbhid-ups" + +"Eaton" "ups" "5" "Protection Station 500/650/800 VA" "USB" "usbhid-ups" +"Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups" +"Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups" +"Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups" +"Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups" +"Eaton" "ups" "5" "EX 700/1000/1500 VA" "USB port" "usbhid-ups" +"Eaton" "ups" "5" "EX 2200/3000/3000 XL VA" "USB port" "usbhid-ups" +"Eaton" "ups" "5" "EX 1000 RT2U / 1500 RT2U" "USB port" "usbhid-ups" +"Eaton" "ups" "5" "MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups" +"Eaton" "ups" "5" "Nova AVR 625/1250" "USB" "usbhid-ups" +"Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "EX 700/1000/1500 VA" "Serial port" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "EX 2200/3000/3000 XL VA" "Serial port" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "EX 1000 RT2U / 1500 RT2U" "Serial port" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "EX RT 1:1 7/11 kVA" "" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "EX RT 3:1 5/7/11 kVA" "" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)" +"Eaton" "ups" "5" "EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)" +"Eaton" "ups" "5" "E Series NV UPS 400-2000 VA" "" "blazer_usb" +"Eaton" "ups" "5" "E Series DX UPS 1-20 kVA" "" "mge-utalk" +"Eaton" "ups" "5" "BladeUPS (SNMP)" "ConnectUPS Web/SNMP Card" "snmp-ups (experimental)" +"Eaton" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" +"Eaton" "ups" "5" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" +"Eaton" "ups" "5" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" +"Eaton" "ups" "5" "various models (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)" +"Eaton" "pdu" "5" "ePDU Managed" "" "snmp-ups (experimental)" +"Eaton" "pdu" "5" "ePDU Monitored" "" "snmp-ups or netxml-ups" +"Eaton" "ups" "5" "Powerware 9130" "" "bcmxcp or usbhid-ups" +"Eaton" "ups" "5" "Powerware 5130" "" "usbhid-ups" +"Eaton" "ups" "5" "9395" "Serial port" "bcmxcp" +"Eaton" "ups" "5" "Best Ferrups" "older ConnectUPS" "snmp-ups" +"Eaton" "ups" "5" "ConnectUPS X / BD / E Slot" "Serial Pass-through mode" "bcmxcp" +"Eaton" "ups" "5" "ConnectUPS X / BD / E Slot" "Network port" "snmp-ups" + +"Effekta" "ups" "2" "MI/MT/MH" "2502 cable" "blazer_ser" +"Effekta" "ups" "2" "RM2000MH" "" "blazer_ser" + +"Energy Sistem" "ups" "2" "(various)" "" "blazer_ser" + +"ETA" "ups" "1" "mini+UPS" "WinNT/Upsoft cable" "genericups upstype=7" +"ETA" "ups" "1" "mini+UPS PRO" "UPS Explorer cable" "etapro" + +"Ever UPS" "ups" "1" "NET *-DPC" "" "everups" +"Ever UPS" "ups" "1" "AP *-PRO" "" "everups" + +"Ever-Power" "ups" "1" "625/1000" "" "safenet" + +"Exide" "ups" "1" "NetUPS SE" "" "genericups upstype=15" + +"Fenton Technologies" "ups" "1" "PowerPal" "P-series" "safenet" +"Fenton Technologies" "ups" "5" "PowerPal" "L-series" "blazer_ser" +"Fenton Technologies" "ups" "5" "PowerOn" "" "blazer_ser" +"Fenton Technologies" "ups" "5" "PowerPure" "" "blazer_ser" + +"Fairstone" "ups" "1" "L525/L625/L750" "" "safenet" + +"Fideltronik" "ups" "1" "Ares 700 and larger" "" "genericups upstype=6" +"Fideltronik" "ups" "1" "Other Ares models" "" "genericups upstype=19" + +"Fiskars" "ups" "4" "PowerRite MAX" "" "upscode2" +"Fiskars" "ups" "4" "PowerServer 10" "" "upscode2" +"Fiskars" "ups" "4" "PowerServer 30" "" "upscode2" +"Fiskars" "ups" "4" "9200" "UPS Information Unit" "upscode2" + +"Forza Power Technologies" "ups" "2" "SL-1001" "USB" "blazer_usb" + +"FSP" "ups" "2" "EP650" "USB" "blazer_usb" + +"Gamatronic" "ups" "5" "All models with alarm interface" "" "genericups upstype=22" +"Gamatronic" "ups" "2" "G-SmartCompact 2000" "" "blazer_ser" +"Gamatronic" "ups" "5" "MP110/210" "" "gamatronic" +"Gamatronic" "ups" "5" "MS-T" "" "gamatronic" +"Gamatronic" "ups" "5" "MS" "" "gamatronic" +"Gamatronic" "ups" "5" "µPS3/1" "" "gamatronic" + +"Geek Squad" "ups" "2" "GS1285U" "USB" "usbhid-ups" + +"Gemini" "ups" "1" "UPS625/UPS1000" "" "safenet" + +"HP" "ups" "1" "PowerTrust 2997A" "HP 5061-2575 cable" "apcsmart" +"HP" "ups" "4" "R3000 XR" "" "bcmxcp" +"HP" "ups" "4" "R5500 XR" "" "bcmxcp" +"HP" "ups" "2" "R1500 G2" "" "bcmxcp" +"HP" "ups" "2" "R/T 2200 G2" "" "usbhid-ups" +"HP" "ups" "2" "T500" "older models" "bcmxcp_usb" +"HP" "ups" "2" "T750 INTL" "" "usbhid-ups" +"HP" "ups" "2" "T750" "older models" "bcmxcp_usb" +"HP" "ups" "2" "T1000 INTL" "" "usbhid-ups" +"HP" "ups" "2" "T1500 INTL" "" "usbhid-ups" +"HP" "ups" "2" "T750 G2" "" "usbhid-ups" +"HP" "ups" "2" "R1500 G2 INTL" "" "usbhid-ups" +"HP" "pdu" "1" "HP3488 Switch/Control Unit" "" "powerman-pdu (experimental)" + +"IBM" "pdu" "1" "Blade Center Management Module" "15 outlets" "powerman-pdu (experimental)" + +"ICS" "pdu" "1" "8064 Ethernet Relay Interface" "16 outlets" "powerman-pdu (experimental)" + +"iDowell" "ups" "2" "iBox UPS" "" "usbhid-ups" + +"INELT" "ups" "2" "Monolith 1000LT" "" "blazer_ser" +"INELT" "ups" "2" "Monolith 3000RT" "" "blazer_ser" + +"Inform" "ups" "1" "GUARD" "Line Interactive AP model" "powercom" +"Inform" "ups" "2" "Guard S 1500AP" "" "blazer_ser" +"Inform" "ups" "2" "Informer Compact 1000VA" "" "blazer_ser" + +"Infosec" "ups" "2" "iPEL 350" "" "blazer_ser" +"Infosec" "ups" "2" "iPEL 500" "" "blazer_ser" +"Infosec" "ups" "2" "iPEL 750" "" "blazer_ser" +"Infosec" "ups" "2" "iPEL 1000" "" "blazer_ser" +"Infosec" "ups" "2" "500XP" "" "blazer_ser" +"Infosec" "ups" "2" "XP 500" "USB" "blazer_usb" +"Infosec" "ups" "2" "XP 1000" "" "blazer_ser" + +"IPMI" "pdu" "1" "" "" "powerman-pdu (experimental)" + +"Ippon" "ups" "2" "Back Power Pro 400/500/600/700/800" "" "blazer_ser" +"Ippon" "ups" "2" "Back Power Pro 400/500/600/700/800" "USB" "blazer_usb (experimental)" +"Ippon" "ups" "2" "Back Comfo Pro 600/800" "" "blazer_ser" +"Ippon" "ups" "2" "Back Comfo Pro 600/800" "USB" "blazer_usb (experimental)" +"Ippon" "ups" "2" "Smart Power Pro 1000/1400/2000" "" "blazer_ser" +"Ippon" "ups" "2" "Smart Power Pro 1000/1400/2000" "USB" "blazer_usb (experimental)" +"Ippon" "ups" "2" "Smart Winner 750/1000/1500/2000/3000" "" "blazer_ser" +"Ippon" "ups" "2" "Smart Winner 750/1000/1500/2000/3000" "USB" "blazer_usb (experimental)" +"Ippon" "ups" "2" "(various)" "" "blazer_ser" +"Ippon" "ups" "2" "(various)" "USB" "blazer_usb" + +"IVT" "scd" "1" "SCD series" "" "ivtscd" + +"Jageson Technology" "ups" "1" "Jasuny USPS" "" "genericups upstype=4" + +"Kebo" "ups" "2" "1200D/D Series" "" "blazer_ser" + +"Krauler" "ups" "2" "UP-D1200VA" "USB" "blazer_usb" +"Krauler" "ups" "2" "UP-M500VA" "USB" "blazer_usb" + +"Lestar" "ups" "2" "MD-800E" "" "blazer_ser" + +"Liebert" "ups" "2" "ITON 600VA" "" "blazer_ser" +"Liebert" "ups" "5" "UPStation GXT2" "contact-closure cable" "liebert" +"Liebert" "ups" "1" "GXT2-3000RT230" "" "liebert-esp2 (experimental)" +"Liebert" "ups" "2" "PowerSure Personal XT" "USB" "usbhid-ups" +"Liebert" "ups" "2" "PowerSure PSA" "USB" "usbhid-ups" + +"LNXI" "pdu" "1" "Icebox" "10 outlets" "powerman-pdu (experimental)" + +"Masterguard" "ups" "1" "(various)" "" "masterguard" + +"Maxxtro" "ups" "2" "UPS 600 VA" "serial port" "blazer_ser" + +"Mecer" "ups" "2" "ME-2000" "" "blazer_ser" + +"Meta System" "ups" "1" "HF Line" "1..4 boards" "metasys" +"Meta System" "ups" "1" "HF Line \/2" "5..8 boards" "metasys" +"Meta System" "ups" "1" "HF Millennium 810" "" "metasys" +"Meta System" "ups" "1" "HF Millennium 820" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 910" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 920" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 930" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 940" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 950" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 960" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 970" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 980" "" "metasys" +"Meta System" "ups" "1" "ECO Network 750" "" "metasys" +"Meta System" "ups" "1" "ECO Network 1000" "" "metasys" +"Meta System" "ups" "1" "ECO Network 1050" "" "metasys" +"Meta System" "ups" "1" "ECO Network 1500" "" "metasys" +"Meta System" "ups" "1" "ECO Network 1800" "" "metasys" +"Meta System" "ups" "1" "ECO Network 2000" "" "metasys" +"Meta System" "ups" "1" "ECO Network 2100" "" "metasys" +"Meta System" "ups" "1" "ECO Network 2500" "" "metasys" +"Meta System" "ups" "1" "ECO Network 3000" "" "metasys" +"Meta System" "ups" "1" "ECO 305" "" "metasys" +"Meta System" "ups" "1" "ECO 308" "" "metasys" +"Meta System" "ups" "1" "ECO 311" "" "metasys" +"Meta System" "ups" "1" "ECO 511" "" "metasys" +"Meta System" "ups" "1" "ECO 516" "" "metasys" +"Meta System" "ups" "1" "ECO 519" "" "metasys" +"Meta System" "ups" "1" "ECO 522" "" "metasys" +"Meta System" "ups" "1" "ally HF 800" "" "metasys" +"Meta System" "ups" "1" "ally HF 1000" "" "metasys" +"Meta System" "ups" "1" "ally HF 1250" "" "metasys" +"Meta System" "ups" "1" "ally HF 1600" "" "metasys" +"Meta System" "ups" "1" "ally HF 2000" "" "metasys" +"Meta System" "ups" "1" "ally HF 2500" "" "metasys" +"Meta System" "ups" "1" "Megaline 1250" "" "metasys" +"Meta System" "ups" "1" "Megaline 2500" "" "metasys" +"Meta System" "ups" "1" "Megaline 3750" "" "metasys" +"Meta System" "ups" "1" "Megaline 5000" "" "metasys" +"Meta System" "ups" "1" "Megaline 6250" "" "metasys" +"Meta System" "ups" "1" "Megaline 7500" "" "metasys" +"Meta System" "ups" "1" "Megaline 8750" "" "metasys" +"Meta System" "ups" "1" "Megaline 10000" "" "metasys" + +"MGE Office Protection Systems" "ups" "5" "Protection Center 500/675 VA" "USB" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Protection Station 500/650/800 VA" "USB" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "USB port" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "USB port" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "Serial port" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "Serial port" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Comet EX RT 1:1 7/11 kVA" "" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Comet EX RT 3:1 5/7/11 kVA" "" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Comet EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)" +"MGE Office Protection Systems" "ups" "5" "Comet EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)" +"MGE Office Protection Systems" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" +"MGE Office Protection Systems" "ups" "5" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" +"MGE Office Protection Systems" "ups" "5" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" +"MGE Office Protection Systems" "ups" "5" "various models (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)" + +"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT 3:1" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Protection Center 420" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Protection Center 500" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Protection Center 675" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 600 USB" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 1100 USB" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USBS" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USB" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USBS" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USB" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 600" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 750" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1000" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1500" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 600" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 850" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1100" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1500" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Evolution" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 650" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 850" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 1150" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1250" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 1550" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1750" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 2000" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 2500" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 3000" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 2200" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000 XL" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 700" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000 RT2U" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500 RT2U" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (USB)" "USB Card (ref 66067)" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 600 Serial" "" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 1100 Serial" "" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USBS" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse S" "" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USBS" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium S" "" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 600" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 750" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1000" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1500" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 600" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 850" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1100" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1500" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C / EX RT" "" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT 3:1" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Esprit" "" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 650" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 850" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 1150" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1250" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 1550" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1750" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 2000" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 2500" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 3000" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 2200" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000 XL" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 700" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000 RT2U" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500 RT2U" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Evolution" "Serial port" "mge-shut or newmge-shut or mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C" "" "mge-shut or newmge-shut or mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar ES+" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar ESV+" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar SV" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar ESV" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar EX" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXL" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar PSX" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar SX" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Comet EXtreme" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "Utalk Serial Card (ref 66060)" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "HID COM Serial Card (ref 66066)" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar / Comet / Galaxy (SNMP)" "SNMP/Web Transverse card (ref 66074)" "snmp-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar / Comet / Galaxy (SNMP)" "SNMP card (ref 66062)" "snmp-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar (SNMP)" "SNMP card (ref 66045)" "snmp-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "UM-Link (SNMP)" "Not a UPS (ref 66850)" "snmp-ups (experimental)" + +"MicroDowell" "ups" "1" "B.Box BP 500" "" "powerpanel" +"MicroDowell" "ups" "1" "B.Box BP 750" "" "powerpanel" +"MicroDowell" "ups" "1" "B.Box BP 1000" "" "powerpanel" +"MicroDowell" "ups" "1" "B.Box BP 1500" "" "powerpanel" +"MicroDowell" "ups" "5" "Enterprise B8" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise B10" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N8" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N11" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N15" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N20" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N22" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N30" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N40" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N50" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N60" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise HiBox ST" "" "microdowell" + +"Microsol" "ups" "4" "Solis 1.0" "1000VA" "solis" +"Microsol" "ups" "4" "Solis 1.5" "1500VA" "solis" +"Microsol" "ups" "4" "Solis 2.0" "2000VA" "solis" +"Microsol" "ups" "4" "Solis 3.0" "3000VA" "solis" +"Microsol" "ups" "5" "Rhino 6.0" "6000VA" "rhino" +"Microsol" "ups" "5" "Rhino 7.5" "7500VA" "rhino" +"Microsol" "ups" "5" "Rhino 10.0" "10000VA" "rhino" +"Microsol" "ups" "5" "Rhino 20.0" "20000VA" "rhino" + +"Mustek" "ups" "2" "Powermust" "400VA Plus" "blazer_ser" +"Mustek" "ups" "2" "Powermust" "600VA Plus" "blazer_ser" +"Mustek" "ups" "2" "Powermust" "800VA Pro" "blazer_ser" +"Mustek" "ups" "2" "Powermust" "1000VA Plus" "blazer_ser" +"Mustek" "ups" "2" "Powermust" "1400VA Plus" "blazer_ser" +"Mustek" "ups" "2" "Powermust" "2000VA USB" "blazer_ser" +"Mustek" "ups" "2" "Powermust Office 650" "USB" "blazer_usb" +"Mustek" "ups" "2" "PowerMust 424 / 636 / 848" "USB" "blazer_usb" +"Mustek" "ups" "2" "Various" "" "blazer_ser" + +"Neus" "ups" "2" "400va / 600va" "" "blazer_ser" + +"Nitram" "ups" "1" "Elite 500" "" "genericups upstype=8" +"Nitram" "ups" "1" "Elite 2002" "" "genericups upstype=16" +"Nitram" "ups" "1" "Elite 2005" "" "powerpanel" + +"Oneac" "ups" "1" "ON400" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON600" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON900" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON1300" "advanced interface" "oneac" +"Oneac" "ups" "1" "EG Series" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON700" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON700XAU" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON700XIU" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON1000" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON1000XAU" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON1000XIU" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON1500" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON1500XAU" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON1500XIU" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON2000" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON2000XAU" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON2000XIU" "advanced interface" "oneac" + +"Online" "ups" "1" "P-Series" "" "genericups upstype=14" +"Online" "ups" "1" "Zinto D" "" "optiups" + +"OnLite" "ups" "2" "AQUA" "50" "blazer_ser" + +"Opti-UPS" "ups" "1" "PowerES" "420E" "optiups" + +"Orvaldi Power Protection" "ups" "2" "various" "not 400 or 600" "blazer_ser" + +"Phasak" "ups" "2" "400VA / 600VA" "" "blazer_ser" + +"Plexus" "ups" "2" "500VA" "USB" "blazer_usb" +"Plexus" "ups" "2" "1000VA Pro" "USB" "blazer_usb" + +"Powercom" "ups" "4" "SMK" "" "blazer_ser" +"Powercom" "ups" "4" "SXL" "" "blazer_ser" +"Powercom" "ups" "4" "ULT" "" "blazer_ser" +"Powercom" "ups" "4" "Trust 425/625" "" "powercom" +"Powercom" "ups" "4" "Advice Partner/King Pr750" "" "powercom" +"Powercom" "ups" "4" "Black Knight PRO" "" "powercom" +"Powercom" "ups" "5" "Black Knight PRO" "USB (2009 models, product id: 00a6)" "usbhid-ups (experimental)" +"Powercom" "ups" "4" "Smart KING Pro (all Smart series)" "" "powercom" +"Powercom" "ups" "5" "Smart KING Pro (all Smart series)" "USB (2009 models, product id: 00a3)" "usbhid-ups (experimental)" +"Powercom" "ups" "4" "Imperial" "" "powercom" +"Powercom" "ups" "5" "Imperial" "USB (2009 models, product id: 00a2)" "usbhid-ups (experimental)" +"Powercom" "ups" "4" "Vanguard" "" "blazer_ser" +"Powercom" "ups" "5" "Vanguard" "USB (2009 models, product id: 00a5)" "usbhid-ups (experimental)" +"Powercom" "ups" "4" "WOW" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)" +"Powercom" "ups" "5" "WOW" "USB (2009 models, product id: 00a4)" "usbhid-ups (experimental)" +"Powercom" "ups" "4" "(various)" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)" +"Powercom" "ups" "5" "(various)" "USB (2009 models, product id: 00a?)" "usbhid-ups (experimental)" + +"PowerGuard" "ups" "2" "PG-600" "" "blazer_ser" + +"PowerKinetics" "ups" "1" "9001" "" "genericups upstype=17" +"PowerKinetics" "ups" "2" "BlackOut Buster" "" "blazer_ser" + +"PowerMan" "ups" "2" "RealSmart 800" "" "blazer_ser" +"PowerMan" "ups" "2" "RealSmart 1000" "" "blazer_ser" +"PowerMan" "ups" "1" "BackPro" "" "genericups upstype=4" + +"PowerTech" "ups" "1" "Comp1000" "DTR cable power" "genericups upstype=3" +"PowerTech" "ups" "2" "SMK-800" "" "blazer_ser" + +"PowerWalker" "ups" "2" "Line-Interactive VI 1000" "" "blazer_ser" +"PowerWalker" "ups" "2" "Line-Interactive VI 400/800" "" "blazer_ser" +"PowerWalker" "ups" "2" "Line-Interactive VI 600" "" "blazer_ser" +"PowerWalker" "ups" "2" "Line-Interactive VI 1400" "" "blazer_usb" + +"Powerware" "ups" "4" "3110" "" "genericups upstype=7" +"Powerware" "ups" "4" "3115" "" "genericups upstype=11" +"Powerware" "ups" "4" "5119, 5125" "" "genericups upstype=15" +"Powerware" "ups" "4" "5119 RM" "" "genericups upstype=20" +"Powerware" "ups" "5" "5119 RM" "" "upscode2" +"Powerware" "ups" "5" "PW3105" "" "bcmxcp_usb" +"Powerware" "ups" "5" "PW5110" "" "bcmxcp_usb" +"Powerware" "ups" "5" "PW5115" "Serial port" "bcmxcp" +"Powerware" "ups" "5" "PW5115" "USB port" "bcmxcp_usb" +"Powerware" "ups" "5" "PW5125" "" "bcmxcp" +"Powerware" "ups" "5" "PW9120" "Serial port" "bcmxcp" +"Powerware" "ups" "5" "PW9120" "USB port" "bcmxcp_usb" +"Powerware" "ups" "5" "PW9125" "" "bcmxcp" +"Powerware" "ups" "5" "PW9315" "3-phase" "bcmxcp" +"Powerware" "ups" "5" "9110" "" "upscode2" +"Powerware" "ups" "5" "9120" "" "upscode2" +"Powerware" "ups" "5" "9150" "" "upscode2" +"Powerware" "ups" "5" "9305" "" "upscode2" +"Powerware" "ups" "5" "BladeUPS (SNMP)" "ConnectUPS Web/SNMP Card" "snmp-ups (experimental)" +"Powerware" "ups" "5" "(various)" "ConnectUPS Web/SNMP card" "snmp-ups (experimental)" + +"Powerwell" "ups" "1" "PM525A/-625A/-800A/-1000A/-1250A" "" "safenet" + +"Phantom" "pdu" "1" "Rackable Systems" "1 outlets" "powerman-pdu (experimental)" + +"Raritan" "pdu" "3" "Intelligent PDU - Dominion PX" "no report, but should be supported" "snmp-ups (experimental)" +"Raritan" "pdu" "3" "Metered PDU - Raritan PM" "no report, but should be supported" "snmp-ups (experimental)" +"Raritan" "pdu" "3" "Switched PDU - Raritan RPC" "no report, but should be supported" "snmp-ups (experimental)" + +"Repotec" "ups" "1" "RPF525/625/800/1000" "" "safenet" +"Repotec" "ups" "1" "RPT-800A" "" "genericups upstype=13" +"Repotec" "ups" "1" "RPT-162A" "" "genericups upstype=13" + +"Rocketfish" "ups" "2" "RF-1000VA / RF-1025VA" "" "usbhid-ups" + +"SmartLabs" "pdu" "1" "2412S Power Line Modem" "for X10/Insteon" "powerman-pdu (experimental)" + +"SMS (Brazil)" "ups" "2" "Manager III" "" "blazer_ser" + +"SOLA" "ups" "1" "305" "cable INT-0025C" "genericups upstype=7" +"SOLA" "ups" "1" "325" "" "bestups" +"SOLA" "ups" "1" "520" "" "bestups" +"SOLA" "ups" "1" "610" "use ID= in ups.conf" "bestups" +"SOLA" "ups" "1" "620" "" "bestups" +"SOLA" "ups" "4" "330" "" "blazer_ser" + +"SOLA/BASIC Mexico" "ups" "1" "various" "ISBMEX protocol" "isbmex" + +"Socomec" "ups" "2" "NeTYS-PE 600VA" "" "blazer_ser" +"Socomec Sicon" "ups" "1" "Egys" "420 VA" "powercom" +"Socomec Sicon" "ups" "3" "Netvision" "UPS equipped with Netvision WEB/SNMP card/external box" "snmp-ups (experimental)" + +"Soltec" "ups" "1" "Winmate 525/625/800/1000" "" "safenet" + +"Soyntec" "ups" "2" "Sekury C 500" "" "blazer_ser" +"Soyntec" "ups" "2" "Sekury C 800" "" "blazer_ser" + +"SquareOne Power" "ups" "2" "QP1000" "" "blazer_ser" + +"Sun" "pdu" "1" "ILOM Management Module" "1 outlet" "powerman-pdu (experimental)" + +"SuperPower" "ups" "2" "HP360, Hope-550" "" "blazer_ser" + +"SVEN" "ups" "2" "Power Pro+ series" "USB" "blazer_usb" +"SVEN" "ups" "2" "Power Smart RM 2000" "USB" "blazer_usb" + +"Sweex" "ups" "1" "500/1000" "smart - shipped with SafeNet" "safenet" +"Sweex" "ups" "1" "500/1000" "" "genericups upstype=7" +"Sweex" "ups" "1" "1000" "USB" "richcomm_usb" +"Sweex" "ups" "2" "(various)" "" "blazer_ser" + +"Sysgration" "ups" "2" "UPGUARDS Pro650" "" "blazer_ser" + +"Tecnoware" "ups" "2" "Easy Power 1200" "" "blazer_ser" + +"Tripp-Lite" "ups" "1" "INTERNETOFFICE700" "USB" "tripplite_usb" +"Tripp-Lite" "ups" "2" "OMNIVS1000" "USB" "tripplite_usb" +"Tripp-Lite" "ups" "1" "OMNIVS1500XL" "USB" "tripplite_usb" +"Tripp-Lite" "ups" "1" "SMART700USB" "USB" "tripplite_usb" +"Tripp-Lite" "ups" "1" "SMART1500RM2U" "USB" "tripplite_usb" +"Tripp-Lite" "ups" "1" "SMART550USB" "USB" "tripplite_usb" +"Tripp-Lite" "ups" "1" "SMART2200RMXL2U" "USB, older models" "tripplite_usb (experimental)" +"Tripp-Lite" "ups" "1" "SmartUPS" "" "tripplite" +"Tripp-Lite" "ups" "1" "SmartOnline" "" "tripplitesu" +"Tripp-Lite" "ups" "1" "(various)" "Lan 2.2 interface - black 73-0844 cable" "genericups upstype=5" +"Tripp-Lite" "ups" "2" "OMNI1000LCD" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "OMNI900LCD" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "OMNI650LCD" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "1500 LCD" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "AVR550U" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "AVR750U" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "ECO550UPS" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "SmartOnline SU1500RTXL2ua" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "smart2200RMXL2U" "USB, newer models" "usbhid-ups" + +"Trust" "ups" "2" "UPS 1000 Management PW-4105" "" "blazer_ser" +"Trust" "ups" "2" "UPS 1200VA Management PW-4120M" "" "blazer_ser" +"Trust" "ups" "2" "UPS 1300VA Management PW-4130M" "" "blazer_ser" + +"UNITEK" "ups" "2" "ALPHA 500 IC" "" "blazer_ser" +"UNITEK" "ups" "2" "Alpha 1000is" "" "blazer_ser" +"UNITEK" "ups" "2" "Alpha 500" "" "blazer_ser" +"UNITEK" "ups" "2" "Alpha 500 ipE" "" "blazer_ser" +"UNITEK" "ups" "2" "Alpha 2600" "" "blazer_ser" +"UNITEK" "ups" "2" "Alpha 1200Sx" "USB" "blazer_usb" +"UNITEK" "ups" "2" "Alpha 1250xD" "USB" "blazer_usb" + +"UPSonic" "ups" "2" "CXR1000" "" "blazer_ser" +"UPSonic" "ups" "1" "LAN Saver 600" "" "genericups upstype=0" +"UPSonic" "ups" "1" "Power Guardian" "" "genericups upstype=7" +"UPSonic" "ups" "2" "PrOffice 650" "USB" "blazer_usb" +"UPSonic" "ups" "2" "DS-800" "USB" "blazer_usb" + +"Various" "ups" "4" "(various)" "SEC protocol" "gamatronic" +"Various" "ups" "1" "(various)" "Generic RUPS model" "genericups upstype=4" +"Various" "ups" "1" "(various)" "Generic RUPS 2000 (Megatec M2501 cable)" "genericups upstype=21" +"Various" "ups" "2" "(various)" "Q1 / Megatec protocol" "blazer_ser" +"Various" "ups" "2" "(various)" "PhoenixTec protocol" "bestups" +"Various" "ups" "3" "(various)" "SNMP - RFC 1628" "snmp-ups (experimental)" +"Various" "ups" "1" "(various)" "Safenet software" "safenet" + +"Victron/IMV" "ups" "1" "(various)" "" "victronups" +"Victron/IMV" "ups" "1" "Lite" "crack cable" "genericups upstype=10" + +"Viewsonic" "ups" "1" "PowerES" "420E" "optiups" + +"WinPower" "ups" "2" "CPM-800" "" "blazer_ser" + +"WTI" "pdu" "1" "RPS-10" "10 outlets" "powerman-pdu (experimental)" +"WTI" "pdu" "1" "NPS" "8 outlets" "powerman-pdu (experimental)" diff --git a/data/epdu-managed.dev b/data/epdu-managed.dev new file mode 100644 index 0000000..731b738 --- /dev/null +++ b/data/epdu-managed.dev @@ -0,0 +1,70 @@ +# dummy-ups example device definition file +# +# Generated using: +# $ upsc ups@host > epdu-managed.dev + +device.mfr: EATON | Powerware +device.model: DBQ10634/5 +device.serial: ADO6750531 +device.type: pdu +driver.name: snmp-ups +driver.parameter.pollinterval: 2 +driver.parameter.port: somewhere.org +driver.version: 2.3.0-1540MS +driver.version.internal: 0.44 (mib: aphel_revelation 0.2) +outlet.1.current: 0.00 +outlet.1.current.maximum: 0.00 +outlet.1.desc: Outlet 1 +outlet.1.id: 1 +outlet.1.power: 0.00 +outlet.1.powerfactor: 0.05 +outlet.1.realpower: 0.00 +outlet.1.status: on +outlet.1.switchable: 0.00 +outlet.1.voltage: 247.00 +outlet.2.current: 0.00 +outlet.2.current.maximum: 0.16 +outlet.2.desc: Outlet 2 +outlet.2.id: 2 +outlet.2.power: 0.00 +outlet.2.powerfactor: 0.01 +outlet.2.realpower: 0.00 +outlet.2.status: on +outlet.2.switchable: 1.00 +outlet.2.voltage: 247.00 +outlet.3.current: 0.00 +outlet.3.current.maximum: 0.16 +outlet.3.desc: Outlet 3 +outlet.3.id: 3 +outlet.3.power: 0.00 +outlet.3.powerfactor: 0.13 +outlet.3.realpower: 0.00 +outlet.3.status: on +outlet.3.switchable: 2.00 +outlet.3.voltage: 247.00 +outlet.4.current: 0.19 +outlet.4.current.maximum: 0.56 +outlet.4.desc: Outlet 4 +outlet.4.id: 2 +outlet.4.power: 46.00 +outlet.4.powerfactor: 0.60 +outlet.4.realpower: 28.00 +outlet.4.status: on +outlet.4.switchable: 3.00 +outlet.4.voltage: 247.00 +outlet.count: 4.00 +outlet.current: 0.19 +outlet.desc: All outlets +outlet.id: 0 +outlet.power: 46.00 +outlet.realpower: 28.00 +outlet.voltage: 247.00 +ups.firmware: 01.01.00 +ups.id: my_device234 +ups.macaddr: +ups.mfr: EATON | Powerware +ups.model: DBQ10634/5 +ups.serial: ADO6750531 +ups.status: +ups.temperature: 49.00 +device.type: pdu diff --git a/data/evolution500.dev b/data/evolution500.seq similarity index 86% rename from data/evolution500.dev rename to data/evolution500.seq index 697d2a1..60e7966 100644 --- a/data/evolution500.dev +++ b/data/evolution500.seq @@ -1,4 +1,9 @@ -# dummy-ups example definition file ; generated with "upsc ups@host > evolution500.dev" +# dummy-ups example power sequence file +# +# Base is the same as .dev files, generated using: +# $ upsc ups@host > evolution500.seq +# +# TIMER have then been added to generate power events. battery.charge: 90 battery.charge.low: 30 diff --git a/data/html/Makefile.in b/data/html/Makefile.in index 09ccc72..7685a37 100644 --- a/data/html/Makefile.in +++ b/data/html/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -39,12 +39,13 @@ subdir = data/html DIST_COMMON = README $(am__dist_html_DATA_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/header.html.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(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_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -54,6 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.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_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -90,9 +92,11 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(htmldir)" DATA = $(dist_html_DATA) $(nodist_html_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -105,8 +109,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -123,7 +129,6 @@ 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@ @@ -134,22 +139,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/docs/FAQ b/docs/FAQ deleted file mode 100644 index 0a48607..0000000 --- a/docs/FAQ +++ /dev/null @@ -1,822 +0,0 @@ -Desc: Frequently Asked Questions -File: FAQ -Date: 20 January 2006 -Auth: Russell Kroll - Arnaud Quette - ------------------------------------------------------------------------------ - - Q: I just upgraded, and ... - - A: You have read UPGRADING in the base directory of the distribution, - right? If not, go read it now, then come back to this file if your - question wasn't answered in there. - ------------------------------------------------------------------------------ - - Q: upsstats says "Error: can't open template file (upsstats.html)". - How do I fix this? - - A: Go into your configuration path (/usr/local/ups/etc by default) and - copy the sample template files over to their real names. The sample - template files are installed with 'make install-cgi-conf' and can - also be found inside the source distribution in the conf directory. - ------------------------------------------------------------------------------ - - Q: upsmon fails the login and says "username required" now. - - A: Go read the UPGRADING file again. - ------------------------------------------------------------------------------ - - Q: My 1.4 CGI programs won't talk to my 2.0 upsd. What should I do? - - A: Upgrade the CGI programs to 2.0. While 1.4 was intended as a - compatibility tree that used the new protocol by default, the CGI - programs were not upgraded at the same time. The 1.4 versions - still use the old REQ protocol, and your 2.0 upsd expects GET. - ------------------------------------------------------------------------------ - - Q: I just upgraded from 1.2 and upsmon now fails to start, saying - "Fatal error: insufficient power configured!". Why? - - A: You didn't read the top of the error, where upsmon says that it - ignored the invalid MONITOR line because UPS directives now require - a UPS name. It also means you didn't see the same warning in - UPGRADING. - - At least you saw this in the FAQ before asking the list. - ------------------------------------------------------------------------------ - - Q: My UPS driver now says it's "broken", and won't start. What now? - - Q: My favorite UPS driver disappeared after an upgrade. What now? - - A: Drivers are occasionally removed from the tree if they are no longer - receiving maintenance, or sometimes renamed to better reflect their - hardware support scope or replaced by a more generic driver. - There have been several architectural changes to the driver code - in recent times, and drivers which were not converted by someone - are eventually dropped. - - This is called progress. We do this in order to avoid a situation - where someone believes that a driver is being maintained when it is - actually rotting slowly in the tree. It also keeps the tree free of - old compatibility hacks for code that nobody actually uses anyway. - - To get a driver back into current releases, you need to convert it - yourself or get someone to do it for you. This is not difficult. - The hardest part of any driver is decoding the protocol, and that's - already been done in the old version. - ------------------------------------------------------------------------------ - - Q: I just upgraded and now I can't talk to older versions. - - A: Version 2.0 can't communicate with anything before 1.4 due to the - protocol changes. Version 1.4 can communicate with both 2.0 and - most older versions since it was a transitional release and has - compatibility code for both protocols. - ------------------------------------------------------------------------------ - - Q: My UPS driver program won't work. I'm starting it as root, and root - owns the device, so what's the problem? - - A: The drivers drop root privileges long before the serial port is - opened. You'll need to change the permissions on that port so that - their new user id can access it. Normally this is "nobody", but it - may be changed at compile-time by using configure --with-user. - - Read the error message. If you have a permissions mismatch, then - you'll see something like this: - - Network UPS Tools - APC Smart protocol driver 0.60 (1.1.7) - This program is currently running as youruid (UID 1234) - /dev/ttyS2 is owned by user root (UID 0), mode 0600 - Change the port name, or fix the permissions or ownership - of /dev/ttyS2 and try again. - Unable to open /dev/ttyS2: Permission denied - - Now is a good time to point out that using "nobody" is a bad idea, - since it's a hack for NFS access. You should create a new role - account (perhaps called "ups" or "nut"), and use that instead. - - Also, scroll down to the "security domains" question to see an - even better way of restricting privileged operations. Neither the - drivers nor upsd ever need root powers, and that answer tells you - how to make it work. - - A: You can also specify a user with "user=" in the global part of - ups.conf. Just define it before any of your [sections]: - - user = nut - - [myups] - driver = mge-shut - port = /dev/ttyS0 - ------------------------------------------------------------------------------ - - Q: upsc, upsstats, and the other clients say "access denied". The device - communication port (serial, USB or network) permissions are fine, so what - gives? - - A: In this case, "access denied" means the access to upsd, not the device - communication port. You're being denied since the system has no - permission to speak to upsd according to the access controls. - - There can be various reasons. To fix it, check: - - the LISTEN directive in upsd.conf. It should allow your local or remote - access method, - - your firewall rules. Port 3493/tcp must be opened to incoming connexions, - - your tcp-wrappers configuration (hosts.allow and hosts.deny). - - Refer to the upsd(8) and upsd.conf(5) manpages for more information. - ------------------------------------------------------------------------------ - - Q: I have an APC Smart-UPS connected with a grey APC cable and it won't - work. The Back-UPS type in the genericups driver works but then I - don't get to use all the nifty features in there. Why doesn't the - right driver work? - - A: The problem lies in your choice of cable. APC's grey cables - generally only do "dumb" signalling - very basic yes/no info about - the battery and line status. While that is sufficient to detect a - low battery condition while on battery, you miss out on all the - goodies that you paid for. - - Note that the 940-0095B happens to be a grey cable, but it is actually - a dual mode cable and can be used in smart mode. If you have - this cable, you need to edit your ups.conf to look like this: - - [myups] - driver = apcsmart - port = /dev/whatever - cable = 940-0095B - - All other grey cables from APC are assumed to be "dumb". - - If your grey cable isn't the 940-0095B, the solution is to dump that - cable and find one that supports APC's "smart" signalling. Typically - these come with the UPS and are black. If your smart cable has - wandered off, one can be built rather easily with some connectors and - cable - there's no fancy wiring or resistors. - - See this URL for a handy diagram: - - http://random.networkupstools.org/cables/940-0024C.jpg - - There is also a text version of that diagram in the docs/cables - directory of the NUT source distribution. Either one should allow - you to build a good clone of APC's 940-0024C cable. - - There are simpler solutions involving 3 wires that work just fine - too, but Powerchute won't find the loopback DTR-DCD and RTS-CTS and - will be annoyed. If you don't ever plan to use Powerchute, 3 wires - (RxD, TxD, GND) are sufficient. - - It should also be noted that the genericups driver has no way to - detect the UPS, so it will fire up quite happily if it can open the - serial port. Merely having it start up is not necessarily an - indication of success. You should start it and then check the - status with upsc or similar to be sure that it's reading the - hardware properly. - ------------------------------------------------------------------------------ - - Q: Why does configure fail to find gd? - - A: Recent versions of gd should be detected automatically through the - gdlib-config script. Note that gd 2.0.5 through 2.0.7 have an - unusable script, so upgrade to the newest version if you have one - of those installed. - - If you're stuck with an older version of gd, you can use it if you - specify the flags manually. Look in gd's Makefile for "LIBS=", - then use that value when you call configure: - - ./configure --with-gd-libs="" --with-cgi - - If you don't have gd's Makefile available for some reason, you're - in for a lot of trial and error. - ------------------------------------------------------------------------------ - - Q: Why PNG? You used to generate GIF bars with upsimage back in 1998 - or 1999... - - A: http://www.burnallgifs.org/ - ------------------------------------------------------------------------------ - - Q: Why doesn't upsd implement the functionality of upsmon? I have to - run THREE programs to monitor my UPS! - - A: I try to follow the "tool for the job" philosophy. It may mean - more programs running, but the flexibility you get is usually - worth it. - - Yes, the machine with the UPS attached will generally have 3 - processes (driver, upsd, upsmon) running, but this design allows a - much bigger setup. Imagine a data room with a bunch of machines - all drawing power from the same UPS. The rest of them just run - upsmon. - - Besides, if upsmon were rolled into upsd, upsd would get even - bigger than it is now. You'd have one less process, but the - RAM consumption would be pretty close to now. - - See data-room.txt for more configuration ideas and explanations. - - A: If this really bothers you, roll up your sleeves and use the - sockdebug code to write a "upsmon" type program that sits on top of - the state sockets. It won't work over the network, but it means - you don't need upsd. It also means only one host can monitor the - UPS. - - This is also a good option to consider if you can't use networked - monitoring code for security or safety reasons. - - See ideas.txt for more on this and other related topics. - ------------------------------------------------------------------------------ - - Q: Why isn't upssched part of upsmon? - - A: Most users will never have any reason to use upssched. It's - complicated, and getting it right for your situation can be tricky. - Having it live in a separate program saves resources and lets most - people avoid it completely. - ------------------------------------------------------------------------------ - - Q: Why doesn't upsmon send a SIGPWR signal to init so it can deal with - power events? - - A: New versions of the init man page taken from the sysvinit package - are saying that usage of SIGPWR is discouraged, since /dev/initctl - control channel is the preferred way of communication. - - A: The name of the game is portability. Not everyone's init handles - that kind of signalling gracefully. What's more, some admins - might want to do things differently even if they have that kind of - init running. - - So, to be compatible, upsmon just invokes a shell command. If you - want to use init's SIGPWR stuff, just put the right "kill" line in - a shell script and make upsmon call it. Everyone wins. - ------------------------------------------------------------------------------ - - Q: Why can't upsset read my upsset.passwd file? - - A: You have an old version of upsset installed, since the current - version doesn't use that file. Install a new version and then try - it again. - - Be sure to secure your CGI directory as instructed in the - upsset.conf. - ------------------------------------------------------------------------------ - - Q: Why won't bestups talk to my Best Fortress UPS? - - A: There are at least two different protocols being used for hardware - with very similar names. The bestups driver tends to support the - units built around the newer "PhoenixTec" protocol. - - Previous releases of this software included a driver called - bestfortress which supported the older Best hardware. See the - earlier entries about updating old drivers which have been removed - from the tree. - ------------------------------------------------------------------------------ - - Q: What's this about "data stale"? - - A: It means your UPS driver hasn't updated things in a little while. - upsd refuses to serve up data that isn't fresh, so you get the - errors about staleness. - - If this happens to you, make sure your driver is still running. - Also look at the syslog. Sometimes the driver loses the connection - to the UPS, and that will also make the data go stale. - - Note: some very slow machines have trouble keeping up with the - serial ports during periods of extreme load. My old 486 used to - flip between "stale" and "OK" while running backups. - - If this happens a lot, you might consider cranking up DEADTIME - in the upsmon.conf to suppress some of the warnings for shorter - intervals. Use caution when adjusting this number, since it - directly affects how long you run on battery without knowing - what's going on with the UPS. - - Note: some drivers occasionally need more time to update than the - default value of MAXAGE (in upsd.conf) allows. As a result, they - are temporarily marked stale even though everything is fine. This - can happen with MGE Ellipse equipment - see the mge-shut man page. - In such cases, you can raise the value of MAXAGE to avoid these - warnings; try a value like 25 or 30. - ------------------------------------------------------------------------------ - - Q: Why do the client programs say "Driver not connected" when I try - to run them? - - A: This means that upsd can't connect to the driver for some reason. - Your ups.conf entry might be wrong, or the driver might not be - running. Maybe your state path is not configured properly. - - Check your syslog. upsd will complain regularly if it can't - connect to a driver, and it should say why it can't connect. - - Note: if you jumped in with both feet and didn't follow the INSTALL - document, you probably started upsd by itself. You have to run - 'upsdrvctl start' to start the drivers after configuring ups.conf. - ------------------------------------------------------------------------------ - - Q: Everything works perfectly during the shutdown, and the UPS comes - back on, but my system stays off. What's happening? - - A: Assuming you don't have the problem in the next question, then you - probably have an ATX motherboard, have APM or ACPI enabled in your - kernel (assuming Linux here), and are reaching the 'halt' at the - bottom of your shutdown scripts. - - Your machine obeys and shuts down, and stays down, since it - remembers the 'last state' when the UPS restarts. - - One solution is to change your shutdown scripts so you never reach - that point. You *want* the system to die without reaching the - part where the kernel tells it to shut down. A possible script - might look like this: - - # other shutdown stuff here (mount -o remount,ro ...) - - if (test -f /etc/killpower) - then - /usr/local/ups/bin/upsdrvctl shutdown - - sleep 600 # this should never return - - # uh oh, we never got shut down! (power race?) - reboot - fi - - halt -p - - The other solution is to change your BIOS setting to "always power - on" instead of "last state", assuming that's possible. - ------------------------------------------------------------------------------ - - Q: My system has an ATX power supply. It will power off just fine, but - it doesn't turn back on. What can I do to fix this? - - A: This depends on how clueful your motherboard manufacturer is, and - isn't a matter of the OS. You have to do one of the following - things depending on what's supported: - - - Set a jumper on the motherboard that means "return after outage" - - - Set something in the BIOS that says "power up after power failure" - - - Try using something (like a capacitor) across the power button - to "push" it for you - this might not work if it needs a delay - - - Hack the cable between the power supply and the motherboard to fool - it into powering up whenever line power is present - - - Teach a monkey to watch the machine and press the power button - when the outage is over. - - This might work, but it creates high produce bills. - - If you can't use one of the first two options, give the board to - an enemy. Let them worry about it. - ------------------------------------------------------------------------------ - - Q: My PowerMac G4 won't power back up by itself (into Linux) after the - UPS shuts down. What can I do about this? - - A: This is about the same situation as the ATX question above, only - worse. Earlier Macs apparently supported a hack where you could - cat some magic characters at /dev/adb to enable "server mode". - This would instruct the system to reboot while unattended. - - From Usenet post <6boftzxz51.fsf@ecc-office.sp.cs.cmu.edu>: - - # Send packet over the ADB bus to the PowerMac CUDA chip - # telling it to reboot automatically when power is restored - # after a power failure. - - cat /etc/local/autoboot.adb > /dev/adb - - autoboot.adb contains these three bytes (in hex): 01 13 01 - - Unfortunately, the hardware has evolved and there is no good - equivalent for this hack on today's systems. - - If you find out how to do this, please send me some mail, since - this affects one of my systems and my stop-gap solution is getting - cranky. - - Note: this question has been in the FAQ for over a year and - there's still no answer. Let me guess: everyone who runs a server - on Mac hardware has a team of trained monkeys, and feeds them - by growing bananas in the tropical environment formed by waste heat - from the equipment. - - The rest of us are still waiting for the answer. Booting into the - Mac OS to frob the "file server" panel is not an acceptable - solution. - - A: If you're on OS X, this is relatively simple to fix. Go to system - preferences, click on energy saver, click on the options tab, check - "Restart automatically after a power failure". - - If you're on some other OS, hope they've figured out how to duplicate - the above in a non-simian manner. - ------------------------------------------------------------------------------ - - Q: I want to keep the drivers and upsd in their own security domains. - How can this be accomplished? - - A: Using a few role accounts and a common group, you can limit access - to resources such as the serial port(s) leading to the UPS - hardware. - - This is just an example. Change the values to suit your systems. - - Create a user called 'nutdev' and another called 'nutsrv'. Put - them both in a group called 'nut'. - - Change the owner of any serial ports that will be used to nutdev, - and set the mode to 0600. Then change the ownership of your state - directory (usually /var/state/ups) to nutdev.nut. - - For my development system this yields the following /dev entries: - - 0 crw------- 1 nutdev tty 4, 64 Sep 3 17:11 /dev/ttyS0 - 0 crw------- 1 nutdev tty 4, 65 Sep 3 17:11 /dev/ttyS1 - - Switch to root, then start the drivers: - - # /usr/local/ups/bin/upsdrvctl -u nutdev start - - The listing for /var/state/ups then looks like this: - - 4 drwxrwx--- 2 nutdev nut 4096 Aug 20 18:37 . - 4 drwxr-xr-x 4 root root 4096 May 14 21:20 .. - 4 srw-rw---- 1 nutdev nut 0 Sep 3 17:10 apcsmart-ttyS0 - 4 srw-rw---- 1 nutdev nut 0 Sep 3 17:10 megatec-ttyS1 - - You may have to remove old socket or state files first if you are - changing to this security scheme from an older version. The drivers - will create new files with the right owners and modes. - - Note that /var/state/ups is group writable since upsd will - place the upsd.pid file here. - - You may have to change the groups of upsd.conf and upsd.users to - make them readable. These files should not be owned by nutsrv, - since someone could compromise the daemon and change the config - files. Instead, put nutsrv in a group ("nut" in this example), then - make the files owned by root.nut, with mode 0640. - - Once the config files are ready, start upsd: - - # /usr/local/ups/sbin/upsd -u nutsrv - - Check your syslog to be sure everything's happy, then be sure to - update your startup scripts so it uses this procedure on your next - boot. - - If you like this, you'll probably also find the chroot process to - be useful and interesting. See chroot.txt for more details. - ------------------------------------------------------------------------------ - - Q: What's the point of that 'security domains' concept above? - - A: The point is limiting your losses. If someone should happen to - break into upsd in that environment, they should only gain access - to that one user account. Direct access to the serial device is - not possible, since that is owned by another user. - - There is also the possibility of running the drivers and upsd in a - chroot jail. See the chroot.txt provided in the source - distribution for an example implementation. - - Why give would-be vandals any sort of help? - - Put it this way - I *wrote* good chunks of this stuff, and I still - run the programs this way locally. You should definitely consider - using this technique. - ------------------------------------------------------------------------------ - - Q: How can I make upsmon shut down my system after some fixed interval? - - A: You probably don't want to do this, since it doesn't maximize your - runtime on battery. Assuming you have a good reason for it (see - the next entry), then look at upssched.txt or the upssched man - page for some ideas. - ------------------------------------------------------------------------------ - - Q: Why doesn't upsmon shut down my system? I pulled the plug and nothing - happened. - - A: Wait. upsmon doesn't consider a UPS to be critical until it's both - 'on battery' and 'low battery' at the same time. This is by design. - Nearly every UPS supports the notion of detecting the low battery - all by itself. When the voltage drops below a certain point, it - _will_ let you know about it. - - If your system has a really complicated shutdown procedure, you - might need to shut down before the UPS raises the low battery flag. - For most users, however, the default behavior is adequate. - - Ask yourself this: why buy a nice big UPS with the matching battery - and corresponding runtime and then shutdown early? If anything, I'd - rather have a few more minutes running on battery during which the - power might return. Once the power's back, it's business as usual - with no visible interruption in service. - - If you purposely shut down early, you guarantee an interruption in - service by bringing down the box. - - See upssched.txt for information on how you can shutdown early if - this is what you really want to do. - ------------------------------------------------------------------------------ - - Q: The CGI programs report "access to that host is not authorized" - - what's going on? - - A: Those programs need to see a host in your hosts.conf before they - will attempt communications. This keeps people from feeding it - random "host=" settings, which would annoy others with outgoing - connection attempts from your system. - - If your hosts.conf turns out to be configured correctly with - MONITOR entries and all that, check the permissions. Your web - server may be running the CGI programs as a user that can't read - the file. - - If you run your web server in a chroot jail, make sure the programs - can still read hosts.conf. You may have to copy it into the jail - for this to work. If you do that, make sure it's not writable by - any of the user accounts which run inside the jail. - ------------------------------------------------------------------------------ - - Q: upsd is running, so why can't I connect to it? - - A: Assuming you haven't changed the TCP port number on the command line - or at compile-time, then you probably have some sort of firewall - blocking the connection. - - upsd listens on TCP port 3493 by default. - ------------------------------------------------------------------------------ - - Q: How do you make upsmon reload the config file? - - Q: How do you make upsd reload the config file? - - A: Either find the pid of the background process and send it a SIGHUP, - or just start it again with '-c reload'. - - If you send the signals yourself instead of using -c, be sure you - hit the right process. There are usually two upsmons, and you - should only send signals to one of them. To be safe, read the pid - file. - ------------------------------------------------------------------------------ - - Q: I just bought a new WhizBang UPS that has a USB connector. How do - I monitor it? - - A: There are several driver to support USB models. - - - usbhid-ups supports various manufacturers complying to the HID standard, - - tripplite_usb supports various Tripp-Lite units, - - bcmxcp_usb supports various Powerware units. - - Refer to the "driver-name" (8) manpage for more information. - ------------------------------------------------------------------------------ - - Q: What is this usbhid-ups (formerly newhidups) about? - - A: The basic USB UPS support was done until NUT 2.2 using hidups. To allow - a wider support accross platforms for USB/HID compliant devices, - usbhid-ups driver uses libusb (which is available for a wide range of - operating systems) and libhid (currently, a modified internal version - of it). - - As of NUT 2.2, usbhid-ups completely replaces the legacy hidups driver - and provide support for various manufacturers. At that time, it will - be renamed to usbhid-ups. - - usbhid-ups is built automatically if possible (libusb development files - need to be installed) and installed by the "make install" command. - ------------------------------------------------------------------------------ - - Q: Why doesn't my package work? - - Q: I can't run this because there's no package for it. Why isn't this - in a package yet? - - A: Sorry, can't help you there. All official releases are source code - and are posted on http://www.networkupstools.org/ along with PGP - signatures for verification. - - This means all packages have been built by a third party. If you - have an issue that's related to packaging, you will need to seek - help with whoever built it for you. - ------------------------------------------------------------------------------ - - Q: Why are there two copies of upsmon running? - - A: It's not really two complete copies if your OS forks efficiently. - - By default, upsmon runs most of the grunt work as an unprivileged - user and keeps a stub process around with root powers that can - only shut down the system when necessary. This should make it much - harder to gain root in the event a hole is ever discovered in - upsmon. - - If this really bothers you and you like running lots of code as - root, start upsmon with -p and it will go back to being one big - process. This is not recommended, so don't blame me if something - bad happens in this mode. - ------------------------------------------------------------------------------ - - Q: I have with ... - - A: Get the latest stable release, and see if it still happens. If it - goes away, it means someone else reported it and got it fixed a - long time ago. - - If that doesn't work, try the latest development version. - - If your problem is STILL there, then contact the mailing lists. - - Hint: check the release date on the version you have. If it's more - than about 6 months old, there's probably a newer stable tree - version out there. - ------------------------------------------------------------------------------ - - Q: Do you have to use a serial connection to monitor the UPS? - What about direct network connections (SNMP or otherwise)? - - A: No. NUT currently support USB communication through usbhid-ups, - tripplite_usb and bcmxcp_usb, and SNMP communication through snmp-ups. - - Any time there is a gap in features, it's usually because the - group of people who own that hardware and the group of people who - write code don't overlap. The fix is to make them overlap - - turn an owner into a developer or vice-versa. - ------------------------------------------------------------------------------ - - Q: What happened to the patch I sent? - - A: If a release goes by and your patch hasn't been included, it was - probably dropped. There can be a lot of patches waiting for - inclusion at some points, and occasionally some have to be - rejected. - - Design issues or severe coding style problems can be the reason - for this. I try to point out what the problems are, but there are - limits. See developers.txt for some pointers on submitting - patches. - - Sometimes patches are put on hold due to a feature freeze. If it - doesn't show up once the new version opens up, send it again. - ------------------------------------------------------------------------------ - - Q: I'm not much of a programmer. How can I help? - - A: There's always work to be done outside of the realm of code bashing. - Documentation might not always be so clear. A user's perspective - is sometimes needed to appreciate this. Bug reports on a project's - documentation are just as valuable as those for the actual source. - - Fielding questions on the mailing lists is also helpful. This - lets other people to focus on coding issues while allowing the - original poster to get some information at the same time. It's - quite a relief to open that mailbox and find that someone else - has already handled it successfully. - ------------------------------------------------------------------------------ - - Q: I replaced the battery in my APC Smart-UPS and now it thinks the - battery is low all the time. How do you fix this? - - Q: My APC UPS keeps reporting "OL LB", even after it's been charging - for many hours. What can I do about this? - - A: This happened to me, and some other people too. The combination of - our experiences should prove useful to you. - - First, you need to realize that the UPS apparently stores data about - the battery, load, and runtime. After replacing the battery, it - needs to be clued in to the new situation. If the traditional - runtime calibration doesn't work, you have to try something a - little more drastic. - - You need to *completely* drain the UPS while it has a good ground. - This means you can't just pull the plug. You also have to - disconnect it from the computer so this software won't shut it - down. - - The easiest way to do this is to first unplug your computer(s) from - it, and plug in a token load like a lamp. Also, move the UPS to a - power strip that doesn't switch the ground line or an outlet that - you can switch off at your panel. - - Once the UPS is up at 100% charge (this is important), disconnect - the power. It _must_ remain connected to the ground, or the - results may not be accurate. Ignore the sounds it makes, and go - away until it's done. Don't do anything to the front panel while - this is happening. - - After all of this, put things back the way they should be and let - it charge up. You should find that it again gives reasonable - values and behavior, as it was when it was new. - - Thanks to Matthew Dharm for helping me nail down this procedure. - ------------------------------------------------------------------------------ - - Q: multimon.cgi seems to be stuck at an old version, even though I - just installed a new one. - - A: multimon was removed during the 1.1 development cycle. upsstats - now does everything it used to do, and then some. You should just - delete those files and start using upsstats directly. - ------------------------------------------------------------------------------ - - Q: OK, I switched to upsstats. Now it's giving me Celsius. I like - Fahrenheit. Where's the config file to switch it back? - - A: Temperature scales are handled by the template files, so edit your - upsstats.html and change it from TEMPC to TEMPF. - ------------------------------------------------------------------------------ - - Q: Why is the mailing list ignoring me? - - A: You probably asked a question that's answered in this FAQ or - somewhere else in the documentation and nobody wants to quote it - for you. - - Convincing the other subscribers that you've actually read down this - far might be useful. You might mention "queequeg" for better results. - - This URL may also be helpful: - - http://www.catb.org/~esr/faqs/smart-questions.html - ------------------------------------------------------------------------------ - - Q: I found some information about another kind of UPS protocol you - don't support yet, but I don't know what to do with it. Can you - help? - - A: If you're not a programmer, you can still help others by making - that protocol available. You might host the document somewhere and - send the URL to one of the mailing lists. - ------------------------------------------------------------------------------ - - Q: How can you answer questions to situations that nobody's encountered - yet? Isn't this a frequently asked questions file? - - A: Magic. - - A: It's both that and a frequently *anticipated* questions file, too. - - The idea is to write it up in here so that nobody asks the mailing - list when it finally does get released. - ------------------------------------------------------------------------------ diff --git a/docs/FAQ.txt b/docs/FAQ.txt new file mode 100644 index 0000000..fb913e4 --- /dev/null +++ b/docs/FAQ.txt @@ -0,0 +1,735 @@ +ifndef::external_title[] +NUT Frequently Asked Questions +============================== +endif::external_title[] + +== I just upgraded, and ... +You have read link:UPGRADING[UPGRADING] in the base directory of the distribution, +right? + +If not, go read it now, then come back to this file if your +question wasn't answered in there. + +== upsstats says 'Error: can't open template file (upsstats.html)'. +Go into your configuration path (/usr/local/ups/etc by default) and +copy the sample template files over to their real names. The sample +template files are installed with 'make install' and can +also be found inside the source distribution in the conf directory. + +== upsmon fails the login and says 'username required' now. +Go read the link:UPGRADING[UPGRADING] file again. + +== My UPS driver now says it's 'broken', and won't start. What now? +Or a variation like... + +== My favorite UPS driver disappeared after an upgrade. What now? + +Drivers are occasionally removed from the tree if they are no longer +receiving maintenance, or sometimes renamed to better reflect their +hardware support scope or replaced by a more generic driver. +There have been several architectural changes to the driver code +in recent times, and drivers which were not converted by someone +are eventually dropped. + +This is called progress. We do this in order to avoid a situation +where someone believes that a driver is being maintained when it is +actually rotting slowly in the tree. It also keeps the tree free of +old compatibility hacks for code that nobody actually uses anyway. + +To get a driver back into current releases, you need to convert it +yourself or get someone to do it for you. This is not difficult. +The hardest part of any driver is decoding the protocol, and that's +already been done in the old version. + +== My UPS driver program won't work. I'm starting it as root, and root owns the device, so what's the problem? + +*Answer 1* + +The drivers drop root privileges long before the serial port is +opened. You'll need to change the permissions on that port so that +their new user id can access it. Normally this is "nobody", but it +may be changed at compile-time by using configure --with-user. + +Read the error message. If you have a permissions mismatch, then +you'll see something like this: + + Network UPS Tools - APC Smart protocol driver 0.60 (1.1.7) + This program is currently running as youruid (UID 1234) + /dev/ttyS2 is owned by user root (UID 0), mode 0600 + Change the port name, or fix the permissions or ownership + of /dev/ttyS2 and try again. + Unable to open /dev/ttyS2: Permission denied + +Now is a good time to point out that using "nobody" is a bad idea, +since it's a hack for NFS access. You should create a new role +account (perhaps called "ups" or "nut"), and use that instead. + +Also, scroll down to the "security domains" question to see an +even better way of restricting privileged operations. Neither the +drivers nor upsd ever need root powers, and that answer tells you +how to make it work. + +*Answer 2* + +You can also specify a user with "user=" in the global part of +ups.conf. Just define it before any of your [sections]: + + user = nut + + [myups] + driver = mge-shut + port = /dev/ttyS0 + +== upsc, upsstats, and the other clients say 'access denied'. The device communication port (serial, USB or network) permissions are fine, so what gives? + +In this case, "access denied" means the access to upsd, not the device +communication port. You're being denied since the system has no +permission to speak to upsd according to the access controls. + +There can be various reasons. To fix it, check: + +- the LISTEN directive in upsd.conf. It should allow your local or remote +access method, +- your firewall rules. Port 3493/tcp must be opened to incoming connexions, +- your tcp-wrappers configuration (hosts.allow and hosts.deny). + +Refer to the upsd(8) and upsd.conf(5) manpages for more information. + +== I have an APC Smart-UPS connected with a grey APC serial cable and it won't work. + +The Back-UPS type in the genericups driver works but then I don't get to use +all the nifty features in there. Why doesn't the right driver work? + +The problem lies in your choice of cable. APC's grey cables +generally only do "dumb" signalling - very basic yes/no info about +the battery and line status. While that is sufficient to detect a +low battery condition while on battery, you miss out on all the +goodies that you paid for. + +Note that the 940-0095B happens to be a grey cable, but it is actually +a dual mode cable and can be used in smart mode. If you have +this cable, you need to edit your ups.conf to look like this: + + [myups] + driver = apcsmart + port = /dev/whatever + cable = 940-0095B + +All other grey cables from APC are assumed to be "dumb". + +If your grey cable isn't the 940-0095B, the solution is to dump that +cable and find one that supports APC's "smart" signalling. Typically +these come with the UPS and are black. If your smart cable has +wandered off, one can be built rather easily with some connectors and +cable - there's no fancy wiring or resistors. + +See this URL for a handy diagram: http://www.networkupstools.org/cables/940-0024C.jpg + +There is also a text version of that diagram in the docs/cables +directory of the NUT source distribution. Either one should allow +you to build a good clone of APC's 940-0024C cable. + +There are simpler solutions involving 3 wires that work just fine +too, but Powerchute won't find the loopback DTR-DCD and RTS-CTS and +will be annoyed. If you don't ever plan to use Powerchute, 3 wires +(RxD, TxD, GND) are sufficient. + +It should also be noted that the genericups driver has no way to +detect the UPS, so it will fire up quite happily if it can open the +serial port. Merely having it start up is not necessarily an +indication of success. You should start it and then check the +status with upsc or similar to be sure that it's reading the +hardware properly. + +== Why doesn't upsd implement the functionality of upsmon? I have to run THREE programs to monitor my UPS! + +*Answer 1* + +I try to follow the "tool for the job" philosophy. It may mean +more programs running, but the flexibility you get is usually +worth it. + +Yes, the machine with the UPS attached will generally have 3 +processes (driver, upsd, upsmon) running, but this design allows a +much bigger setup. Imagine a data room with a bunch of machines +all drawing power from the same UPS. The rest of them just run +upsmon. + +Besides, if upsmon were rolled into upsd, upsd would get even +bigger than it is now. You'd have one less process, but the +RAM consumption would be pretty close to now. + +See data-room.txt for more configuration ideas and explanations. + +*Answer 2* + +If this really bothers you, roll up your sleeves and use the +sockdebug code to write a "upsmon" type program that sits on top of +the state sockets. It won't work over the network, but it means +you don't need upsd. It also means only one host can monitor the +UPS. + +This is also a good option to consider if you can't use networked +monitoring code for security or safety reasons. + +See ideas.txt for more on this and other related topics. + +== Why isn't upssched part of upsmon? + +Most users will never have any reason to use upssched. It's +complicated, and getting it right for your situation can be tricky. +Having it live in a separate program saves resources and lets most +people avoid it completely. + +It is also coherent with the answer to the previous question. + +== Why doesn't upsmon send a SIGPWR signal to init so it can deal with power events? + +*Answer 1* + +New versions of the init man page taken from the sysvinit package +are saying that usage of SIGPWR is discouraged, since /dev/initctl +control channel is the preferred way of communication. + +*Answer 2* + +The name of the game is portability. Not everyone's init handles +that kind of signalling gracefully. What's more, some admins +might want to do things differently even if they have that kind of +init running. + +So, to be compatible, upsmon just invokes a shell command. If you +want to use init's SIGPWR stuff, just put the right "kill" line in +a shell script and make upsmon call it. Everyone wins. + +== Why won't bestups talk to my Best Fortress UPS? + +There are at least two different protocols being used for hardware +with very similar names. The bestups driver tends to support the +units built around the newer "PhoenixTec" protocol. + +Previous releases of this software included a driver called +bestfortress which supported the older Best hardware. See the +earlier entries about updating old drivers which have been removed +from the tree. + +== What's this about 'data stale'? + +It means your UPS driver hasn't updated things in a little while. +upsd refuses to serve up data that isn't fresh, so you get the +errors about staleness. + +If this happens to you, make sure your driver is still running. +Also look at the syslog. Sometimes the driver loses the connection +to the UPS, and that will also make the data go stale. + +Note: some very slow machines have trouble keeping up with the +serial ports during periods of extreme load. My old 486 used to +flip between "stale" and "OK" while running backups. + +If this happens a lot, you might consider cranking up DEADTIME +in the upsmon.conf to suppress some of the warnings for shorter +intervals. Use caution when adjusting this number, since it +directly affects how long you run on battery without knowing +what's going on with the UPS. + +Note: some drivers occasionally need more time to update than the +default value of MAXAGE (in upsd.conf) allows. As a result, they +are temporarily marked stale even though everything is fine. This +can happen with MGE Ellipse equipment - see the mge-shut man page. +In such cases, you can raise the value of MAXAGE to avoid these +warnings; try a value like 25 or 30. + +== Why do the client programs say 'Driver not connected' when I try to run them? + +This means that upsd can't connect to the driver for some reason. +Your ups.conf entry might be wrong, or the driver might not be +running. Maybe your state path is not configured properly. + +Check your syslog. upsd will complain regularly if it can't +connect to a driver, and it should say why it can't connect. + +Note: if you jumped in with both feet and didn't follow the INSTALL +document, you probably started upsd by itself. You have to run +'upsdrvctl start' to start the drivers after configuring ups.conf. + +== Everything works perfectly during the shutdown, and the UPS comes back on, but my system stays off. What's happening? + +Assuming you don't have the problem in the next question, then you +probably have an ATX motherboard, have APM or ACPI enabled in your +kernel (assuming Linux here), and are reaching the 'halt' at the +bottom of your shutdown scripts. + +Your machine obeys and shuts down, and stays down, since it +remembers the 'last state' when the UPS restarts. + +One solution is to change your shutdown scripts so you never reach +that point. You *want* the system to die without reaching the +part where the kernel tells it to shut down. A possible script +might look like this: + + # other shutdown stuff here (mount -o remount,ro ...) + + if (test -f /etc/killpower) + then + /usr/local/ups/bin/upsdrvctl shutdown + + sleep 600 # this should never return + + # uh oh, we never got shut down! (power race?) + reboot + fi + + halt -p + +The other solution is to change your BIOS setting to "always power +on" instead of "last state", assuming that's possible. + +== My system has an ATX power supply. It will power off just fine, but it doesn't turn back on. What can I do to fix this? + +This depends on how clueful your motherboard manufacturer is, and +isn't a matter of the OS. You have to do one of the following +things depending on what's supported: + +- Set a jumper on the motherboard that means "return after outage" +- Set something in the BIOS that says "power up after power failure" +- Try using something (like a capacitor) across the power button + to "push" it for you - this might not work if it needs a delay +- Hack the cable between the power supply and the motherboard to fool + it into powering up whenever line power is present +- Teach a monkey to watch the machine and press the power button + when the outage is over. + + This might work, but it creates high produce bills. + +If you can't use one of the first two options, give the board to +an enemy. Let them worry about it. + +== My PowerMac G4 won't power back up by itself (into Linux) after the UPS shuts down. What can I do about this? + +*Answer 1* + +This is about the same situation as the ATX question above, only +worse. Earlier Macs apparently supported a hack where you could +cat some magic characters at /dev/adb to enable "server mode". +This would instruct the system to reboot while unattended. + +From Usenet post <6boftzxz51.fsf@ecc-office.sp.cs.cmu.edu>: + + # Send packet over the ADB bus to the PowerMac CUDA chip + # telling it to reboot automatically when power is restored + # after a power failure. + + cat /etc/local/autoboot.adb > /dev/adb + + autoboot.adb contains these three bytes (in hex): 01 13 01 + +Unfortunately, the hardware has evolved and there is no good +equivalent for this hack on today's systems. + +If you find out how to do this, please send me some mail, since +this affects one of my systems and my stop-gap solution is getting +cranky. + +Note: this question has been in the FAQ for over a year and +there's still no answer. Let me guess: everyone who runs a server +on Mac hardware has a team of trained monkeys, and feeds them +by growing bananas in the tropical environment formed by waste heat +from the equipment. + +The rest of us are still waiting for the answer. Booting into the +Mac OS to frob the "file server" panel is not an acceptable +solution. + +*Answer 2* + +If you're on OS X, this is relatively simple to fix. Go to system +preferences, click on energy saver, click on the options tab, check +"Restart automatically after a power failure". + +If you're on some other OS, hope they've figured out how to duplicate +the above in a non-simian manner. + +== I want to keep the drivers and upsd in their own security domains. How can this be accomplished? + +Using a few role accounts and a common group, you can limit access +to resources such as the serial port(s) leading to the UPS +hardware. + +This is just an example. Change the values to suit your systems. + +- Create a user called 'nutdev' and another called 'nutsrv'. Put +them both in a group called 'nut'. + +- Change the owner of any serial ports that will be used to nutdev, +and set the mode to 0600. Then change the ownership of your state +directory (usually /var/state/ups) to nutdev.nut. + +For my development system this yields the following /dev entries: + + 0 crw------- 1 nutdev tty 4, 64 Sep 3 17:11 /dev/ttyS0 + 0 crw------- 1 nutdev tty 4, 65 Sep 3 17:11 /dev/ttyS1 + +- Switch to root, then start the drivers: + + # /usr/local/ups/bin/upsdrvctl -u nutdev start + +- The listing for /var/state/ups then looks like this: + + 4 drwxrwx--- 2 nutdev nut 4096 Aug 20 18:37 . + 4 drwxr-xr-x 4 root root 4096 May 14 21:20 .. + 4 srw-rw---- 1 nutdev nut 0 Sep 3 17:10 apcsmart-ups1 + 4 srw-rw---- 1 nutdev nut 0 Sep 3 17:10 blazer_ser-ups2 + +You may have to remove old socket or state files first if you are +changing to this security scheme from an older version. The drivers +will create new files with the right owners and modes. + +Note that /var/state/ups is group writable since upsd will +place the upsd.pid file here. + +You may have to change the groups of upsd.conf and upsd.users to +make them readable. These files should not be owned by nutsrv, +since someone could compromise the daemon and change the config +files. Instead, put nutsrv in a group ("nut" in this example), then +make the files owned by root.nut, with mode 0640. + +Once the config files are ready, start upsd: + + # /usr/local/ups/sbin/upsd -u nutsrv + +Check your syslog to be sure everything's happy, then be sure to +update your startup scripts so it uses this procedure on your next +boot. + +If you like this, you'll probably also find the chroot process to +be useful and interesting. See security.txt for more details. + +== What's the point of that 'security domains' concept above? + +The point is limiting your losses. If someone should happen to +break into upsd in that environment, they should only gain access +to that one user account. Direct access to the serial device is +not possible, since that is owned by another user. + +There is also the possibility of running the drivers and upsd in a +chroot jail. See the chroot.txt provided in the source +distribution for an example implementation. + +Why give would-be vandals any sort of help? + +Put it this way - I *wrote* good chunks of this stuff, and I still +run the programs this way locally. You should definitely consider +using this technique. + +== How can I make upsmon shut down my system after some fixed interval? + +You probably don't want to do this, since it doesn't maximize your +runtime on battery. Assuming you have a good reason for it (see +the next entry), then look at scheduling.txt or the upssched(8) man +page for some ideas. + +///////////////////////////////////////////////////////////////// +TODO: figure out how to link to the upssched man page above. +///////////////////////////////////////////////////////////////// + + +== Why doesn't upsmon shut down my system? I pulled the plug and nothing happened. + +Wait. upsmon doesn't consider a UPS to be critical until it's both +'on battery' and 'low battery' at the same time. This is by design. +Nearly every UPS supports the notion of detecting the low battery +all by itself. When the voltage drops below a certain point, it +_will_ let you know about it. + +If your system has a really complicated shutdown procedure, you +might need to shut down before the UPS raises the low battery flag. +For most users, however, the default behavior is adequate. + +Ask yourself this: why buy a nice big UPS with the matching battery +and corresponding runtime and then shutdown early? If anything, I'd +rather have a few more minutes running on battery during which the +power might return. Once the power's back, it's business as usual +with no visible interruption in service. + +If you purposely shut down early, you guarantee an interruption in +service by bringing down the box. + +See upssched.txt for information on how you can shutdown early if +this is what you really want to do. + +== The CGI programs report 'access to that host is not authorized' - what's going on? + +Those programs need to see a host in your hosts.conf before they +will attempt communications. This keeps people from feeding it +random "host=" settings, which would annoy others with outgoing +connection attempts from your system. + +If your hosts.conf turns out to be configured correctly with +MONITOR entries and all that, check the permissions. Your web +server may be running the CGI programs as a user that can't read +the file. + +If you run your web server in a chroot jail, make sure the programs +can still read hosts.conf. You may have to copy it into the jail +for this to work. If you do that, make sure it's not writable by +any of the user accounts which run inside the jail. + +== upsd is running, so why can't I connect to it? + +Assuming you haven't changed the TCP port number on the command line +or at compile-time, then you probably have some sort of firewall +blocking the connection. + +upsd listens on TCP port 3493 by default. + +== How do you make upsmon reload the config file? + +Or a variation like... + +== How do you make upsd reload the config file? + +Either find the pid of the background process and send it a SIGHUP, +or just start it again with '-c reload'. + +If you send the signals yourself instead of using -c, be sure you +hit the right process. There are usually two upsmons, and you +should only send signals to one of them. To be safe, read the pid +file. + +== I just bought a new WhizBang UPS that has a USB connector. How do I monitor it? + +There are several driver to support USB models. + +- usbhid-ups supports various manufacturers complying to the HID standard, +- tripplite_usb supports various Tripp-Lite units, +- bcmxcp_usb supports various Powerware units, +- blazer_usb supports various manufacturers that use the Megatec / Q1 protocol. + +Refer to the 'driver-name' (8) manpage for more information. + +== What is this usbhid-ups (formerly newhidups) about? + +The basic USB UPS support was done until NUT 2.2 using hidups. To allow +a wider support accross platforms for USB/HID compliant devices, +usbhid-ups driver uses libusb (which is available for a wide range of +operating systems) and libhid (currently, a modified internal version +of it). + +As of NUT 2.2, usbhid-ups completely replaces the legacy hidups driver +and provide support for various manufacturers. At that time, it will +be renamed to usbhid-ups. + +usbhid-ups is built automatically if possible (libusb development files +need to be installed) and installed by the "make install" command. + +== Why doesn't my package work? + +Or a variation like... + +== I can't run this because there's no package for it. Why isn't this in a package yet? + +Sorry, can't help you there. All official releases are source code +and are posted on http://www.networkupstools.org/ along with PGP +signatures for verification. + +This means all packages have been built by a third party. If you +have an issue that's related to packaging, you will need to seek +help with whoever built it for you. + +== Why are there two copies of upsmon running? + +It's not really two complete copies if your OS forks efficiently. + +By default, upsmon runs most of the grunt work as an unprivileged +user and keeps a stub process around with root powers that can +only shut down the system when necessary. This should make it much +harder to gain root in the event a hole is ever discovered in +upsmon. + +If this really bothers you and you like running lots of code as +root, start upsmon with -p and it will go back to being one big +process. This is not recommended, so don't blame us if something +bad happens in this mode. + +== I have 'some problem' with 'some old version' ... + +Get the latest stable release, and see if it still happens. If it +goes away, it means someone else reported it and got it fixed a +long time ago. + +If that doesn't work, try the latest development version. + +If your problem is STILL there, then contact the mailing lists. + +NOTE: check the release date on the version you have. If it's more +than about 6 months old, there's probably a newer stable tree +version out there. + +== Do I have to use a serial connection to monitor the UPS? What about direct network connections (SNMP or otherwise)? + +No. NUT currently support USB communication through several drivers, +and also SNMP and XML/HTTP (Eaton and MGE) communications. + +Since NUT is very extensible, support for a new communication bus can be added +easily. + +Any time there is a gap in features, it's usually because the +group of people who own that hardware and the group of people who +write code don't overlap. The fix is to make them overlap - +turn an owner into a developer or vice-versa. + +== What happened to the patch I sent? + +If a release goes by and your patch hasn't been included, it was +probably dropped. There can be a lot of patches waiting for +inclusion at some points, and occasionally some have to be +rejected. + +Design issues or severe coding style problems can be the reason +for this. I try to point out what the problems are, but there are +limits. See developers.txt for some pointers on submitting +patches. + +Sometimes patches are put on hold due to a feature freeze. If it +doesn't show up once the new version opens up, send it again. + +== I'm not much of a programmer. How can I help? + +There's always work to be done outside of the realm of code bashing. +Documentation might not always be so clear. A user's perspective +is sometimes needed to appreciate this. Bug reports on a project's +documentation are just as valuable as those for the actual source. + +Fielding questions on the mailing lists is also helpful. This +lets other people to focus on coding issues while allowing the +original poster to get some information at the same time. It's +quite a relief to open that mailbox and find that someone else +has already handled it successfully. + +== I replaced the battery in my APC Smart-UPS and now it thinks the battery is low all the time. How do you fix this? + +Or a variation like... + +== My APC UPS keeps reporting 'OL LB', even after it's been charging for many hours. What can I do about this? + +This happened to me, and some other people too. The combination of +our experiences should prove useful to you. + +First, you need to realize that the UPS apparently stores data about +the battery, load, and runtime. After replacing the battery, it +needs to be clued in to the new situation. If the traditional +runtime calibration doesn't work, you have to try something a +little more drastic. + +You need to *completely* drain the UPS while it has a good ground. +This means you can't just pull the plug. You also have to +disconnect it from the computer so this software won't shut it +down. + +The easiest way to do this is to first unplug your computer(s) from +it, and plug in a token load like a lamp. Also, move the UPS to a +power strip that doesn't switch the ground line or an outlet that +you can switch off at your panel. + +Once the UPS is up at 100% charge (this is important), disconnect +the power. It _must_ remain connected to the ground, or the +results may not be accurate. Ignore the sounds it makes, and go +away until it's done. Don't do anything to the front panel while +this is happening. + +After all of this, put things back the way they should be and let +it charge up. You should find that it again gives reasonable +values and behavior, as it was when it was new. + +Thanks to Matthew Dharm for helping us nail down this procedure. + +== upsstats returns temperatures in Celsius. I like Fahrenheit. Where's the config file to switch it back? + +Temperature scales are handled by the template files, so edit your +upsstats.html and change it from TEMPC to TEMPF. + +== Why is the mailing list ignoring me? + +You probably asked a question that's answered in this FAQ or +somewhere else in the documentation and nobody wants to quote it +for you. + +Convincing the other subscribers that you've actually read down this +far might be useful. You might mention "queequeg" for better results. + +This URL may also be helpful: + +http://www.catb.org/~esr/faqs/smart-questions.html + +== I found some information about another kind of UPS protocol you don't support yet, but I don't know what to do with it. Can you help? + +If you're not a programmer, you can still help others by making +that protocol available. You might host the document somewhere and +send the URL to one of the mailing lists. + +== How can you answer questions to situations that nobody's encountered yet? Isn't this a frequently asked questions file? + +*Answer 1* + +It's a kind of Magic. + +*Answer 2* + +It's both that and a frequently *anticipated* questions file, too. + +The idea is to write it up in here so that nobody asks the mailing +list when it finally does get released. + +== My UPS powers up immediately after a power failure instead of waiting for the batteries to recharge! + +You can rig up a little hack to handle this issue in software. + +Essentially, you need to test for the POWERDOWNFLAG in your *startup* scripts +while the filesystems are still read-only. If it's there, you know your last +shutdown was caused by a power failure and the UPS battery is probably still +quite weak. + +In this situation, your best bet is to sleep it off. Pausing in your startup +script to let the batteries recharge with the filesystems in a safe state is +recommended. This way, if the power goes out again, you won't face a situation +where there's not enough battery capacity left for upsmon to do its thing. + +Exactly how long to wait is a function of your UPS hardware, and will require +careful testing. + +If this is too evil for you, buy another kind of UPS that will either wait for a +minimum amount of charge, a minimum amount of time, or both. + +== I'm facing a power race +Or a variation like... + +== The power came back during the shutdown, but before the UPS power off. Now the UPS does not reboot, and my computer stays off. How can I fix that? + +There is a situation where the power may return during the shutdown process. +This is known as a race. Here's how we handle it. + +"Smart" UPSes typically handle this by using a command that forces the UPS to +power the load off and back on. This way, you are assured that the systems will +restart even if the power returns at the worst possible moment. + +Contact closure units (ala genericups), on the other hand, have the potential +for a race when feeding multiple systems. This is due to the design of most +contact closure UPSes. Typically, the "kill power" line only functions when +running on battery. As a result, if the line power returns during the shutdown +process, there is no way to power down the load. + +The workaround is to force your systems to reboot after some interval. This way, +they won't be stuck in the halted state with the UPS running on line power. + +Implement this by modifying your shutdown script like this: + + if (test -f /etc/killpower) + then + /usr/local/ups/bin/upsdrvctl shutdown + + sleep 120 + + # uh oh, we never got shut down! (power race?) + reboot + fi diff --git a/docs/Makefile.am b/docs/Makefile.am index 18f67de..c14f090 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,13 +1,108 @@ -# nothing to build here, but still need a Makefile to define which -# files to distribute +SHARED_DEPS = nut-names.txt asciidoc.conf -EXTRA_DIST = acpi.txt big-servers.txt chroot.txt \ - commands.txt config-files.txt configure.txt contact-closure.txt \ - data-room.txt design.txt developers.txt FAQ hid-subdrivers.txt \ - ideas.txt macros.txt megatec.txt new-drivers.txt new-names.txt \ - nut-hal.txt osd-notify.txt \ - pager.txt powersaving.txt protocol.txt README shutdown.txt snmp.txt \ - sock-protocol.txt ssl.txt upssched.txt cables/apc-rs500-serial.txt \ +IMAGE_FILES = images/asciidoc.png \ + images/eaton-logo.png \ + images/nut_layering.png \ + images/note.png \ + images/warning.png \ + images/blue-arrow.png \ + images/simple.png \ + images/advanced.png \ + images/bigbox.png \ + images/bizarre.png \ + images/old-cgi.png + +USER_MANUAL_DEPS = acknowledgements.txt cables.txt config-notes.txt \ + configure.txt download.txt documentation.txt features.txt history.txt \ + outlets.txt scheduling.txt security.txt support.txt user-manual.txt \ + stable-hcl.txt + +DEVELOPER_GUIDE_DEPS = contact-closure.txt design.txt developers.txt \ + developer-guide.txt hid-subdrivers.txt macros.txt \ + new-clients.txt new-drivers.txt net-protocol.txt sock-protocol.txt + +CABLES_DEPS = cables/apc-rs500-serial.txt \ cables/apc.txt cables/ge-imv-victron.txt cables/imv.txt \ cables/mgeups.txt cables/powerware.txt cables/repotec.txt \ cables/sms.txt + +CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \ + images/cables/belkin-f6cx-rkm-xu-cable.jpg images/cables/Lansafecable.jpg \ + images/cables/mac-940-0024C.png images/cables/mge-66049.png \ + images/cables/mge-db9-rj12.jpg images/cables/mge-db9-rj45.jpg \ + images/cables/SOLA-330.png + +EXTRA_DIST = $(SHARED_DEPS) $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ + $(CABLES_DEPS) FAQ.txt nut-hal.txt nut-qa.txt packager-guide.txt snmp.txt \ + $(IMAGE_FILES) $(CABLES_IMAGES) docinfo.xml + +ASCIIDOC_HTML_SINGLE = user-manual.html \ + developer-guide.html \ + packager-guide.html \ + FAQ.html + +ASCIIDOC_HTML_CHUNKED = user-manual.chunked \ + developer-guide.chunked \ + packager-guide.chunked \ + FAQ.html + +ASCIIDOC_PDF = user-manual.pdf \ + developer-guide.pdf \ + packager-guide.pdf \ + FAQ.pdf + +# Force build in ./ and man/ before website +SUBDIRS = . man website +SUFFIXES = .txt .html .pdf + +all: doc + +doc: @DOC_BUILD_LIST@ + +pdf: $(ASCIIDOC_PDF) +# also build the HTML manpages with these targets +html-single: $(ASCIIDOC_HTML_SINGLE) +html-chunked: $(ASCIIDOC_HTML_CHUNKED) + +if HAVE_ASCIIDOC +website: html-chunked pdf +else !HAVE_ASCIIDOC +website: + @echo "Not building website documentation since 'asciidoc' was not found." +endif !HAVE_ASCIIDOC + +clean-local: + rm -rf *.pdf *.html *.chunked docbook-xsl.css + +### TODO: automatic dependency generation +FULL_USER_MANUAL_DEPS = $(USER_MANUAL_DEPS) $(SHARED_DEPS) ../README \ + ../INSTALL cables.txt ../UPGRADING ../TODO +FULL_DEVELOPER_GUIDE_DEPS = $(DEVELOPER_GUIDE_DEPS) $(SHARED_DEPS) \ + ../scripts/augeas/README + +user-manual.html user-manual.chunked user-manual.pdf: $(FULL_USER_MANUAL_DEPS) +developer-guide.html developer-guide.chunked developer-guide.pdf: $(FULL_DEVELOPER_GUIDE_DEPS) +packager-guide.html packager-guide.chunked packager-guide.pdf: packager-guide.txt asciidoc.conf + +# Note: without the "-v", asciidoc (circa 8.6.2) sometimes hangs when +# generating the chunked HTML. In this case, export the environment +# variable ASCIIDOC_VERBOSE to "-v", ie: +# $ ASCIIDOC_VERBOSE=-v make +A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \ + --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ + --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + --attribute iconsdir=$(srcdir)/images \ + --attribute=badges \ + --attribute=external_title \ + -a toc -a numbered --destination-dir=. + +.txt.html: + $(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml $< + +.txt.chunked: + $(A2X) $(A2X_COMMON_OPTS) --attribute=chunked_format --format=chunked $< + +.txt.pdf: docinfo.xml + $(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 $< + +.PHONY: html html-single pdf website diff --git a/docs/Makefile.in b/docs/Makefile.in index 849a6ce..d39db23 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -14,9 +14,6 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - -# nothing to build here, but still need a Makefile to define which -# files to distribute VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -38,14 +35,15 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = docs -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(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_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -55,6 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.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_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -66,10 +65,52 @@ 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 +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" +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -82,8 +123,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -100,7 +143,6 @@ 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@ @@ -111,22 +153,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -222,20 +264,87 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ -EXTRA_DIST = acpi.txt big-servers.txt chroot.txt \ - commands.txt config-files.txt configure.txt contact-closure.txt \ - data-room.txt design.txt developers.txt FAQ hid-subdrivers.txt \ - ideas.txt macros.txt megatec.txt new-drivers.txt new-names.txt \ - nut-hal.txt osd-notify.txt \ - pager.txt powersaving.txt protocol.txt README shutdown.txt snmp.txt \ - sock-protocol.txt ssl.txt upssched.txt cables/apc-rs500-serial.txt \ +SHARED_DEPS = nut-names.txt asciidoc.conf +IMAGE_FILES = images/asciidoc.png \ + images/eaton-logo.png \ + images/nut_layering.png \ + images/note.png \ + images/warning.png \ + images/blue-arrow.png \ + images/simple.png \ + images/advanced.png \ + images/bigbox.png \ + images/bizarre.png \ + images/old-cgi.png + +USER_MANUAL_DEPS = acknowledgements.txt cables.txt config-notes.txt \ + configure.txt download.txt documentation.txt features.txt history.txt \ + outlets.txt scheduling.txt security.txt support.txt user-manual.txt \ + stable-hcl.txt + +DEVELOPER_GUIDE_DEPS = contact-closure.txt design.txt developers.txt \ + developer-guide.txt hid-subdrivers.txt macros.txt \ + new-clients.txt new-drivers.txt net-protocol.txt sock-protocol.txt + +CABLES_DEPS = cables/apc-rs500-serial.txt \ cables/apc.txt cables/ge-imv-victron.txt cables/imv.txt \ cables/mgeups.txt cables/powerware.txt cables/repotec.txt \ cables/sms.txt -all: all-am +CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \ + images/cables/belkin-f6cx-rkm-xu-cable.jpg images/cables/Lansafecable.jpg \ + images/cables/mac-940-0024C.png images/cables/mge-66049.png \ + images/cables/mge-db9-rj12.jpg images/cables/mge-db9-rj45.jpg \ + images/cables/SOLA-330.png + +EXTRA_DIST = $(SHARED_DEPS) $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ + $(CABLES_DEPS) FAQ.txt nut-hal.txt nut-qa.txt packager-guide.txt snmp.txt \ + $(IMAGE_FILES) $(CABLES_IMAGES) docinfo.xml + +ASCIIDOC_HTML_SINGLE = user-manual.html \ + developer-guide.html \ + packager-guide.html \ + FAQ.html + +ASCIIDOC_HTML_CHUNKED = user-manual.chunked \ + developer-guide.chunked \ + packager-guide.chunked \ + FAQ.html + +ASCIIDOC_PDF = user-manual.pdf \ + developer-guide.pdf \ + packager-guide.pdf \ + FAQ.pdf + + +# Force build in ./ and man/ before website +SUBDIRS = . man website +SUFFIXES = .txt .html .pdf + +### TODO: automatic dependency generation +FULL_USER_MANUAL_DEPS = $(USER_MANUAL_DEPS) $(SHARED_DEPS) ../README \ + ../INSTALL cables.txt ../UPGRADING ../TODO + +FULL_DEVELOPER_GUIDE_DEPS = $(DEVELOPER_GUIDE_DEPS) $(SHARED_DEPS) \ + ../scripts/augeas/README + + +# Note: without the "-v", asciidoc (circa 8.6.2) sometimes hangs when +# generating the chunked HTML. In this case, export the environment +# variable ASCIIDOC_VERBOSE to "-v", ie: +# $ ASCIIDOC_VERBOSE=-v make +A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \ + --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ + --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + --attribute iconsdir=$(srcdir)/images \ + --attribute=badges \ + --attribute=external_title \ + -a toc -a numbered --destination-dir=. + +all: all-recursive .SUFFIXES: +.SUFFIXES: .txt .html .pdf .chunked $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -272,12 +381,141 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs + +# 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: 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: 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'`; \ @@ -309,19 +547,48 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + 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-am +check: check-recursive all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +installdirs: installdirs-recursive +installdirs-am: +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-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -338,86 +605,119 @@ distclean-generic: 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: clean-recursive -clean-am: clean-generic clean-libtool mostlyclean-am +clean-am: clean-generic clean-libtool clean-local mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f Makefile -distclean-am: clean-am distclean-generic +distclean-am: clean-am distclean-generic distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: install-data-am: -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: -install-html: install-html-am +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool -pdf: pdf-am - pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: -.MAKE: install-am install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive -.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-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 \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + clean-local ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags 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-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am +all: doc + +doc: @DOC_BUILD_LIST@ + +pdf: $(ASCIIDOC_PDF) +# also build the HTML manpages with these targets +html-single: $(ASCIIDOC_HTML_SINGLE) +html-chunked: $(ASCIIDOC_HTML_CHUNKED) + +@HAVE_ASCIIDOC_TRUE@website: html-chunked pdf +@HAVE_ASCIIDOC_FALSE@website: +@HAVE_ASCIIDOC_FALSE@ @echo "Not building website documentation since 'asciidoc' was not found." + +clean-local: + rm -rf *.pdf *.html *.chunked docbook-xsl.css + +user-manual.html user-manual.chunked user-manual.pdf: $(FULL_USER_MANUAL_DEPS) +developer-guide.html developer-guide.chunked developer-guide.pdf: $(FULL_DEVELOPER_GUIDE_DEPS) +packager-guide.html packager-guide.chunked packager-guide.pdf: packager-guide.txt asciidoc.conf + +.txt.html: + $(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml $< + +.txt.chunked: + $(A2X) $(A2X_COMMON_OPTS) --attribute=chunked_format --format=chunked $< + +.txt.pdf: docinfo.xml + $(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 $< + +.PHONY: html html-single pdf website + # 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: diff --git a/docs/README b/docs/README deleted file mode 100644 index 7d65e67..0000000 --- a/docs/README +++ /dev/null @@ -1,9 +0,0 @@ -When creating files in here, use the following 4 headers: - -Desc: A brief description of the document -File: The filename (this is for tracking which one is the original) -Date: The date of last modification -Auth: The author, i.e. "First Last ". - -Note: anything in the form <.*@.*> will be removed when converted to HTML -to reduce the number of e-mail addresses harvested from the web servers. diff --git a/docs/acknowledgements.txt b/docs/acknowledgements.txt new file mode 100644 index 0000000..01afa7f --- /dev/null +++ b/docs/acknowledgements.txt @@ -0,0 +1,150 @@ +ifndef::external_title[] +Acknowledgements +================ +endif::external_title[] + +This project is the result of years of work by many individuals and companies. + +Many people have written or tweaked the software; the drivers, clients, server +and documentation have all received valuable attention from numerous sources. + +Many of them are listed within the source code, AUTHORS file, release notes, and +mailing list archives, but some prefer to be anonymous. +This software would not be possible without their help. + + +The NUT Team +------------ + +Active members +~~~~~~~~~~~~~~ + +- Arnaud Quette: project leader (since 2005), Debian packager and jack of all trades +- Arjen de Korte: senior lieutenant +- Charles Lepple: senior lieutenant +- Kjell Claesson: senior developer +- Alexander Gordeev: junior developer +- David Goncalves: Python developer +- Eric S. Raymond: Documentation consultant +- Oden Eriksson: Mandriva packager +- Stanislav Brabec: Novell / Suse packager +- Michal Hlavinka: Redhat packager + +Retired members +~~~~~~~~~~~~~~~ + +- Russell Kroll: Founder, and project leader from 1996 to 2005 +- Peter Selinger: senior lieutenant +- Carlos Rodrigues: author of the "megatec" drivers, removing the numerous +drivers for Megatec / Q1 protocol. These drivers have now been replaced by +blazer_ser and blazer_usb +- Niels Baggesen: ported and heavily extended upscode2 to NUT 2.0 driver model +- Niklas Edmundsson: has worked on 3-phase support, and upscode2 updates +- Martin Loyer: has worked a bit on mge-utalk +- Jonathan Dion: MGE internship (summer 2006), who has worked on configuration +- Doug Reynolds: has worked on CyberPower support (powerpanel driver) +- Jon Gough: has worked on porting the megatec driver to USB (megatec_usb) +- Dominique Lallement: Consultant (chairman of the USB/HID PDC Forum) +- Julius Malkiewicz: junior developer +- Tomas Smetana: former Redhat packager (2007-2008) + +[[Eaton]] +Our main supporter: Eaton +------------------------- + +Through the acquisition of MGE Office Protection Systems (a carve out of +the MGE UPS SYSTEMS small systems, up to 10 KVA), Eaton has been supporting +NUT, and more generally the Free/Libre Opensource Software Community +since around 2002. + +This support includes the following actions: + +- providing extensive technical documents (Eaton protocols library), +- providing units to developers of NUT and related projects, +- hosting the networkupstools.org webserver, +- providing artwork, +- promoting NUT in general. + +For more detailed information on Eaton's Opensource commitment, please refer to +link:http://opensource.eaton.com[Eaton Opensource website]. + +Supporting manufacturers +------------------------ + +UPS manufacturers +~~~~~~~~~~~~~~~~~ + +- link:http://powerquality.eaton.com[Eaton], our main supporter, as presented in +the <>. + +- link:http://www.gamatronic.com[Gamatronic], through Nadav Moskovitch, has +revived the 'sec' driver (as gamatronic), and expanded a bit genericups for its +UPSs with alarm interface. + +- link:http://www.microdowell.com[Microdowell], through Elio Corbolante, has +created the 'microdowell' driver to support the Enterprise Nxx/Bxx serial devices. +They also proposes NUT as an alternative to its software for +link:http://www.microdowell.com/fra/download.html[Linux / Unix]. + +- link:http://pcmups.com.tw[Powercom], through Alexey Morozov, has provided +link:ups-protocol.html[extensive information] on its USB/HID devices, along +with development units. + +Appliances manufacturers +~~~~~~~~~~~~~~~~~~~~~~~~ + +- link:http://www.opengear.com[OpenGear] has worked with NUT's leader to +successfully develop and integrate PDU support. Opengear, through Scott Burns, +and Robert Waldie, has submitted several patches. + +Other contributors +------------------ + +- Pavel Korensky's original apcd provided the inspiration for pursuing APC's +smart protocol in 1996 +- Eric Lawson provided scans of the OneAC protocol +- John Marley used OCR software to transform the SEC protocol scans into a HTML +document +- Chris McKinnon scanned and converted the Fortress protocol documentation +- Tank provided documentation on the Belkin/Delta protocol +- Potrans provided a Fenton PowerPal 600 (P series) for development of the +safenet driver. + +Older entries (before 2005) +--------------------------- + +- MGE UPS SYSTEMS was the previous NUT sponsor. They provided protocols +information, many units for development of NUT-related projects. +Several drivers such as mge-utalk, mge-shut, snmp-ups, hidups, and usbhid-ups +are the result of this collaboration, in addition to the WMNut, MGE HID Parser +the libhid projects, ... through Arnaud. +All the MGE supporters have now gone with Eaton (through MGE Office +Protection Systems), which is the new NUT sponsor. + +- Fenton Technologies contributed a PowerPal 660 to the project. Their open +stance and quick responses to technical inquiries were appreciated for +making the development of the fentonups driver possible. +Fenton has since been acquired by link:http://www.metapo.com[Metapo]. + +- Bo Kersey of link:http://www.vircio.com[VirCIO] provided a Best Power Fortress +750 to facilitate the bestups driver. + +- Invensys Energy Systems provided the SOLA/Best "Phoenixtec" protocol +document. SOLA has since been acquired by Eaton. + +- PowerKinetics technical support provided documentation on their MiniCOL +protocol, which is archived in the NUT protocol library. +PowerKinetics was acquired by the link:http://www.jst.cc[JST Group] in June 2003. + +- link:http://www.cyberpowersystems.com[Cyber Power Systems] contributed a +700AVR model for testing and development of the cyberpower driver. + +- link:http://www.liebert.com[Liebert Corporation] supplied serial test boxes +and a UPStation GXT2 with the Web/SNMP card for development of the liebert +driver and expansion of the existing snmp-ups driver. +Liebert has since been acquired by link:http://www.emerson.com[Emerson]. + +NOTE: If a company or individual isn't listed here, then we probably don't have +enough information about the situation. Developers are requested to report vendor +contributions to the NUT team so this list may reflect their help. +If we have left you out, send us some mail. diff --git a/docs/acpi.txt b/docs/acpi.txt deleted file mode 100644 index 9cd9371..0000000 --- a/docs/acpi.txt +++ /dev/null @@ -1,32 +0,0 @@ -Desc: Equivalence between ACPI and NUT variable naming -File: acpi.txt -Date: 30 September 2005 -Auth: Arnaud Quette - -This document presents an equivalence table between ACPI data -and NUT variable naming. - - -+-------------------------------------------------------+---------------------------------------+ -|PowerSummary.CapacityMode | percent | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.DesignCapacity | 100 | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.FullChargeCapacity | 100 | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.Rechargeable | true / yes / 1 | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.ConfigVoltage | output.voltage.nominal | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.WarningCapacityLimit | ? battery.charge.low | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.RemainingCapacityLimit | battery.charge.low | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.CapacityGranularity1 | ? | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.CapacityGranularity2 | ? | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.iProduct | ups.model | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.iSerialNumber | ups.serial | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.iDeviceChemistry | battery.type | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.iOEMInformation | ? | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.Discharging | ups.status = DISCHRG | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.Charging | ups.status = CHRG | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.BelowRemainingCapacityLimit | ups.status = LB | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.Current | ? output.current | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.RemainingCapacity | battery.charge | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.Voltage | output.voltage | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.RemainingCapacityLimit | battery.charge.low | +-------------------------------------------------------+---------------------------------------+ -| PowerSummary.ACPresent | ups.status = OL | -+-------------------------------------------------------+---------------------------------------+ \ No newline at end of file diff --git a/docs/asciidoc.conf b/docs/asciidoc.conf new file mode 100644 index 0000000..fedf952 --- /dev/null +++ b/docs/asciidoc.conf @@ -0,0 +1,55 @@ +## NUT macros: linkman, linkdoc +# +# Usage: linkman:command[manpage-section] +# This macro allows to handle variable manpage location, depending on the +# document type +# +# Note, {0} is the manpage section, while {target} is the command. +# +# Example: linkman:ups.conf[5] +# +# Show NUT link as: (
); if section is defined, else just show +# the command. +# +################################################################################ +# +# Usage: linkdoc:document[display title,[anchor]] +# This macro allows to handle variable NUT documentation location, depending +# on the document type +# +# Note, {1} is the display title, {2} is the optional anchor name, +# {0} is the whole set of args ({1}...{n}) and {target} is the +# base document name. +# Example: +# linkdoc:user-manual[user manual,NUT_Security] +# linkdoc:developer-guide[developer guide,_status_data] + +[macros] +(?su)[\\]?(?Plinkman):(?P\S*?)\[(?P.*?)\]= +(?su)[\\]?(?Plinkdoc):(?P\S*?)\[(?P.*?)\]= + +ifdef::basebackend-docbook[] +ifdef::xhtml11_format[] +[linkman-inlinemacro] +{target}{0?({0})} +[linkdoc-inlinemacro] +{1} +endif::xhtml11_format[] + +# FIXME: linkdoc does not support 'anchor' +ifdef::chunked_format[] +[linkman-inlinemacro] +{target}{0?({0})} +[linkdoc-inlinemacro] +{1} +endif::chunked_format[] + +# PDF output points online versions +# FIXME: linkdoc does not support 'anchor' +ifdef::pdf_format[] +[linkman-inlinemacro] +{target}{0?({0})} +[linkdoc-inlinemacro] +{1} +endif::pdf_format[] +endif::basebackend-docbook[] diff --git a/docs/big-servers.txt b/docs/big-servers.txt deleted file mode 100644 index 525a424..0000000 --- a/docs/big-servers.txt +++ /dev/null @@ -1,68 +0,0 @@ -Desc: Typical setups for big servers -File: big-servers.txt -Date: 14 March 2004 -Auth: Russell Kroll - -By using multiple MONITOR statements in upsmon.conf, you can configure -an environment where a large machine with redundant power monitors -multiple separate UPSes. For the examples in this document, I will use -a HP NetServer LH4 in the stock configuration with 3 of the 4 power -supplies installed. - -Compared to some systems, the LH4 is unusual because it has common power -cords for multiple power supplies. One cord feeds two supplies. As a -result, each UPS drives two of the power supplies, so losing that UPS -affects both at the same time. - -For our examples, UPS "Alpha" is connected to the cord that drives the -two power supplies, and ups "Beta" is connected to the other with just a -single power supply. - -Since the server needs two supplies to stay alive, we can lose "Beta" at -any time, but losing "Alpha" is a showstopper. We make a note of them -when configuring upsmon: - - MONITOR ups-alpha@myhost 2 monuser mypass master - MONITOR ups-beta@myhost 1 monuser mypass master - MINSUPPLIES 2 - -With that configuration, upsmon will only shut down when Alpha reaches -a critical (on battery + low battery) condition, since Beta by itself -is not enough to keep the system running. Beta, on the other hand, -can go up and down as much as it wants and nothing will happen as long -as the other one keeps working. - -The MINSUPPLIES line tells upsmon that we need at least 2 power supplies -to be receiving power from a good UPS (on line or on battery, just not -on battery and low battery). - -Adding redundancy -================= - -The above example assumed the stock hardware configuration. Let's say -we have successfully cajoled the boss into providing the money for a -fourth power supply. Now both power cords run two power supplies, and -the system is maxed out in terms of redundancy. - -The upsmon.conf must be updated to reflect this: - - MONITOR ups-alpha@myhost 2 monuser mypass master - MONITOR ups-beta@myhost 2 monuser mypass master - MINSUPPLIES 2 - -Beta is now driving two power supplies, so we upgrade its power value. -This means that either Alpha *or* Beta can totally shut down and the -server will be able to keep running. - -As an added bonus, this means you can move a running server from one UPS -to another without bringing it down since the minimum power will be -provided at all times. - -Other configurations -==================== - -There are a lot of ways to handle this and they all come down to how many -power supplies, power cords and independent UPS connections you have. A -system with a 1:1 cord:supply ratio has more wires stuffed behind it, but -it's much easier to move things around since any given UPS drives a smaller -percentage of the overall power. diff --git a/docs/cables.txt b/docs/cables.txt new file mode 100644 index 0000000..976bd57 --- /dev/null +++ b/docs/cables.txt @@ -0,0 +1,120 @@ +ifdef::website[] +Cables +====== +endif::website[] + +APC +--- + +940-0024C clone +~~~~~~~~~~~~~~~ + +*From D. Stimits* + +image::images/cables/940-0024C.jpg[APCC 940-0024C clone diagram] + +NOTE: The original 940-0024C diagram was contributed by Steve Draper. + +940-0024C clone for Macs +~~~~~~~~~~~~~~~~~~~~~~~~ + +*From Miguel Howard* + +image::images/cables/mac-940-0024C.png[APCC 940-0024C clone cable for Macs] + +Belkin +------ + +OmniGuard F6C***-RKM +~~~~~~~~~~~~~~~~~~~~ + +*From "Daniel"* + +A straight-through RS-232 cable (with pins 2-7 connected through) should work +with the following models: + +- F6C110-RKM-2U +- F6C150-RKM-2U +- F6C230-RKM-2U +- F6C320-RKM-3U + +image::images/cables/belkin-f6cx-rkm-xu-cable.jpg[Belkin OmniGuard F6C***-RKM cable] + +Eaton +----- + +Documents in this section are provided courtesy of Eaton. + +MGE Office Protection Systems +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The two first cables also applies to MGE UPS SYSTEMS. + +DB9-DB9 cable (ref 66049) +^^^^^^^^^^^^^^^^^^^^^^^^^ + +This is the standard serial cable, used on most units. + +image::images/cables/mge-66049.png[DB9-DB9 cable] + +DB9-RJ45 cable +^^^^^^^^^^^^^^ + +This cable is used on the more recent models, including Ellipse MAX, Protection +Station, ... + +image::images/cables/mge-db9-rj45.jpg[DB9-RJ45 cable] + +DB9-RJ12 cable +^^^^^^^^^^^^^^ + +This cable is used on some older Ellipse models. + +image::images/cables/mge-db9-rj12.jpg[DB9-RJ12 cable] + +Powerware LanSafe +~~~~~~~~~~~~~~~~~ + +image::images/cables/Lansafecable.jpg[Powerware LanSafe cable] + +SOLA-330 +~~~~~~~~ + +Just uses a normal serial cable, with pin 1-1 through to 9-9. + +image::images/cables/SOLA-330.png[SOLA-330 cable] + + +HP - Compaq +----------- + +Older Compaq UPS Family +~~~~~~~~~~~~~~~~~~~~~~~ + +This cable can be used with the following models: + +T700, T1000, T1500, T1500j, T700h, T1000h, T1500h, R1500, R1500j, +R1500h, T2000, T2000j, T2400h, T2400h-NA, R3000 / R3000j, R3000h, +R3000h-International, R3000h-NA, R6000h-NA, R6000i, R6000j. + +UPS PC 9 pin connector + + 1 --------- 3 + 2 --------- 2 + 4 -\ + 4 --------- 5 | + 6 -/ + 6 --------- 7 + +Contributed by Kjell Claesson and Arnaud Quette. + + +Tripp-Lite +---------- + +*From Tripp-Lite, via Bryan Kolodziej* + +This cable (black 73-0844 cable) is used on various models, using the "Lan 2.2 interface" +and the genericups driver (upstype=5). + +image::images/cables/73-0724.png[73-0724 cable] diff --git a/docs/cables/ge-imv-victron.txt b/docs/cables/ge-imv-victron.txt index db2f76f..bffed19 100644 --- a/docs/cables/ge-imv-victron.txt +++ b/docs/cables/ge-imv-victron.txt @@ -10,7 +10,7 @@ Data cable 1 for UPS: Driver: victronups (newvictronups) -UPS PC 9 pin [2~connector +UPS PC 9 pin connector 1 --------- 3 2 --------- 2 5 --------- 5 GND diff --git a/docs/cables/sms.txt b/docs/cables/sms.txt index b81e517..6d7ab73 100644 --- a/docs/cables/sms.txt +++ b/docs/cables/sms.txt @@ -13,4 +13,4 @@ FEMEA DB9 MACHO DB9 - This cable is working with Manager III 1300 VA and 650 VA, SMS Ups's - Jump in computer side pins 4/8 and conect to pin 1 in UPS side -- Use megatec driver from Nut Package +- Use NUT blazer_ser driver diff --git a/docs/chroot.txt b/docs/chroot.txt deleted file mode 100644 index 41dce61..0000000 --- a/docs/chroot.txt +++ /dev/null @@ -1,110 +0,0 @@ -Desc: chrooting and other forms of paranoia -File: chroot.txt -Date: 24 August 2003 -Auth: Russell Kroll - -It has been possible to run the drivers and upsd in a chrooted jail for -some time, but it involved a number of evil hacks. The 1.3 series adds -much saner chroot behavior, using BIND 9 as an inspiration. - -The old way involved creating an entire tree, complete with libraries, a -shell (!), and many auxiliary files. This was hard to maintain and -could have become an interesting playground for an intruder. The new -way is minimal, and leaves little in the way of usable materials within -the jail. - -This document assumes that you already have created at least one user -account for the software to use. If you're still letting it fall back -on "nobody", stop right here and go figure that out first. It also -assumes that you have everything else configured and running happily all -by itself. - -Essentially, you need to create your configuration directory and state -path in their own little world, plus a special device or two. - -For the purposes of this example, the chroot jail is /chroot/nut. The -programs have been built with the default prefix, so they are using -/usr/local/ups. First, create the confpath and bring over a few files. - - mkdir -p /chroot/nut/usr/local/ups/etc - cd /chroot/nut/usr/local/ups/etc - cp -a /usr/local/ups/etc/upsd.users . - cp -a /usr/local/ups/etc/upsd.conf . - cp -a /usr/local/ups/etc/ups.conf . - -I'm using 'cp -a' to maintain the permissions on those files. - -Now bring over your state path, maintaining the same permissions as -before. - - mkdir -p /chroot/nut/var/state - cp -a /var/state/ups /chroot/nut/var/state - -Next we must put /etc/localtime inside the jail, or you may get very -strange readings in your syslog. You'll know you have this problem if -upsd shows up as UTC in the syslog while the rest of the system doesn't. - - mkdir -p /chroot/nut/etc - cp /etc/localtime /chroot/nut/etc - -Note that this is not "cp -a", since we want to copy the *content*, not -the symlink that it may be on some systems. - -Finally, create a tiny bit of /dev so the programs can enter the -background properly - they redirect fds into the bit bucket to make sure -nothing else grabs 0-2. - - mkdir -p /chroot/nut/dev - cp -a /dev/null /chroot/nut/dev - -Try to start your driver(s) and make sure everything fires up as before. - - upsdrvctl -r /chroot/nut -u nutdev start - -Once your drivers are running properly, try starting upsd. - - upsd -r /chroot/nut -u nutsrv - -Check your syslog. If nothing is complaining, try running clients like -upsc and upsmon. If they seem happy, then you're done. - -symlinks --------- - -After you do this, you will have two copies of many things, like the -confpath and the state path. I recommend deleting the 'real' -/var/state/ups, replacing it with a symlink to -/chroot/nut/var/state/ups. That will let other programs reference the -.pid files without a lot of hassle. - -You can also do this with your confpath and point /usr/local/ups/etc at -/chroot/nut/usr/local/ups/etc unless you're worried about something -hurting the files inside that directory. In that case, you should -maintain a 'master' copy and push it into the chroot path after -making changes. - -upsdrvctl itself does not chroot, so the ups.conf still needs to be in -the usual confpath. - -upsmon ------- - -This has not yet been applied to upsmon, since it can be quite -complicated when there are notifiers that need to be run. One -possibility would be for upsmon to have three instances: - - - privileged root parent that listens for a shutdown command - - - unprivileged child that listens for notify events - - - unprivileged chrooted child that does network I/O - -This one is messy, and may not happen for some time, if ever. - -Config files ------------- - -You may now set chroot= and user= in the global section of ups.conf. - -upsd chroots before opening any config files, so there is no way to -add support for that in upsd.conf at the present time. diff --git a/docs/commands.txt b/docs/commands.txt deleted file mode 100644 index a6af1b8..0000000 --- a/docs/commands.txt +++ /dev/null @@ -1,62 +0,0 @@ -Desc: Commands sent to the UPS drivers -File: commands.txt -Date: 9 January 2004 -Auth: Russell Kroll - -upsd can call drivers to store values in read/write variables and to kick -off instant commands. This is how you register handlers for those events. - -The driver core (drivers/main.c) has a structure called upsh. You -should populate it with function pointers in your upsdrv_initinfo() -function. Right now, there are only two possibilities: - - - setvar = setting UPS variables (SET VAR protocol command) - - instcmd = instant UPS commands (INSTCMD protocol command) - -SET ---- - -If your driver's function for handling variable set events is called -my_ups_set(), then you'd do this to add the pointer: - - upsh.setvar = my_ups_set; - -my_ups_set() will receive two parameters: - - const char * - the variable being changed - const char * - the new value - -You should return either STAT_SET_HANDLED if your driver recognizes the -command, or STAT_SET_UNKNOWN if it doesn't. Other possibilities will be -added at some point in the future. - -INSTCMD -------- - -This works just like the set process, with slightly different values -arriving from the server. - - upsh.instcmd = my_ups_cmd; - -Your function will receive two args: - - const char * - the command name - const char * - (reserved) - -You should return either STAT_INSTCMD_HANDLED or STAT_INSTCMD_UNKNOWN -depending on whether your driver can handle the requested command. - -Notes ------ - -Use strcasecmp. The command names arriving from upsd should be treated -without regards to case. - -Responses ---------- - -Drivers will eventually be expected to send responses to commands. -Right now, there is no channel to get these back through upsd to -the client, so this is not implemented. - -This will probably be implemented with a polling scheme in the clients. diff --git a/docs/config-files.txt b/docs/config-files.txt deleted file mode 100644 index 98c6b61..0000000 --- a/docs/config-files.txt +++ /dev/null @@ -1,64 +0,0 @@ -Desc: Details about the configuration files -File: config-files.txt -Date: 30 April 2003 -Auth: Russell Kroll - -All configuration files within this package are parsed with a common -state machine, which means they all can use a number of extras described -in this file. - -First, most of the programs use an uppercase word to declare a -configuration directive. This may be something like MONITOR, NOTIFYCMD, -or ACCESS. The case does matter here. "monitor" won't be recognized. - -Next, the parser does not care about whitespace between words. If you -like to indent things with tabs or spaces, feel free to do it here. - -If you need to set a value to something containing spaces, it has to be -contained within "quotes" to keep the parser from splitting up the line. -That is, you want to use something like this: - - SHUTDOWNCMD "/sbin/shutdown -h +0" - -Without the quotes, it would only see the first word on the line. - -OK, so let's say you really need to embed that kind of quote within your -configuration directive for some reason. You can do that too. - - NOTIFYCMD "/bin/notifyme -foo -bar \"hi there\" -baz" - -In other words, \ can be used to escape the ". - -Finally, for the situation where you need to put the \ character into your -string, you just escape it. - - NOTIFYCMD "/bin/notifyme c:\\dos\\style\\path" - -The \ can actually be used to escape any character, but you only really -need it for \, ", and # as they have special meanings to the parser. - -# is the comment character. Anything after an unescaped # is ignored. - -Something like this... - - identity = my#1ups - -... will actually turn into "identity = my", since the # stops the -parsing. If you really need to have a # in your configuration, then -escape it. - - identity = my\#1ups - -Much better. - -Line spanning -============= - -You can put a backslash at the end of the line to join it to the next -one. This creates one virtual line that is composed of more than one -physical line. - -Also, if you leave the "" quote container open before a newline, it will -keep scanning until it reaches another one. If you see bizarre behavior -in your configuration files, check for an unintentional instance of -quotes spanning multiple lines. diff --git a/docs/config-notes.txt b/docs/config-notes.txt new file mode 100644 index 0000000..e8a3299 --- /dev/null +++ b/docs/config-notes.txt @@ -0,0 +1,798 @@ +Configuration notes +=================== + +This chapter describe most of the configuration and use aspects of NUT, +including establishing communication with the device and configuring safe +shutdowns when the UPS battery runs out of power. + +There are many programs and <> in this +package. You should check out the <> +and other accompanying documentation to see how it all works. + +NOTE: NUT does not currently provide proper graphical configuration tools. +However, there is now support for linkdoc:developer-guide[Augeas,augeas_user]. + +Details about the configuration files +------------------------------------- + +Generalities +~~~~~~~~~~~~ + +All configuration files within this package are parsed with a common +state machine, which means they all can use a number of extras described here. + +First, most of the programs use an uppercase word to declare a +configuration directive. This may be something like MONITOR, NOTIFYCMD, +or ACCESS. The case does matter here. "monitor" won't be recognized. + +Next, the parser does not care about whitespace between words. If you +like to indent things with tabs or spaces, feel free to do it here. + +If you need to set a value to something containing spaces, it has to be +contained within "quotes" to keep the parser from splitting up the line. +That is, you want to use something like this: + + SHUTDOWNCMD "/sbin/shutdown -h +0" + +Without the quotes, it would only see the first word on the line. + +OK, so let's say you really need to embed that kind of quote within your +configuration directive for some reason. You can do that too. + + NOTIFYCMD "/bin/notifyme -foo -bar \"hi there\" -baz" + +In other words, \ can be used to escape the ". + +Finally, for the situation where you need to put the \ character into your +string, you just escape it. + + NOTIFYCMD "/bin/notifyme c:\\dos\\style\\path" + +The \ can actually be used to escape any character, but you only really +need it for \, ", and # as they have special meanings to the parser. + +# is the comment character. Anything after an unescaped # is ignored. + +Something like this... + + identity = my#1ups + +... will actually turn into "identity = my", since the # stops the +parsing. If you really need to have a # in your configuration, then +escape it. + + identity = my\#1ups + +Much better. + +Line spanning +~~~~~~~~~~~~~ + +You can put a backslash at the end of the line to join it to the next +one. This creates one virtual line that is composed of more than one +physical line. + +Also, if you leave the "" quote container open before a newline, it will +keep scanning until it reaches another one. If you see bizarre behavior +in your configuration files, check for an unintentional instance of +quotes spanning multiple lines. + + +Basic configuration +------------------- + +This chapter describe the base configuration to establish communication with +the device. + +This will be sufficient for PDU. But for UPS and SCD, you will also need to +configure <>. + +image:images/simple.png[] + +[[Driver_configuration]] +Driver configuration +~~~~~~~~~~~~~~~~~~~~ + +Create one section per UPS in /usr/local/ups/etc/ups.conf + +To find out which driver to use, check the <>, +or data/driver.list. + +Once you have picked a driver, create a section for your UPS in +ups.conf. You must supply values for "driver" and "port". + +Some drivers may require other flags or settings. The "desc" value +is optional, but is recommended to provide a better description of +what your UPS is supporting. + +A typical device without any extra settings looks like this: + + [mydevice] + driver = mydriver + port = /dev/ttyS1 + desc = "Workstation" + +NOTE: USB drivers (usbhid-ups, bcmxcp_usb, tripplite_usb, blazer_usb and +richcomm_usb) are special cases and ignore the 'port' value. +You must still set this value, but it does not matter what you set +it to; a common and good practice is to set 'port' to *auto*, but you can +put whatever you like. If you only own one UBS UPS, the driver will +find it automatically. If you own more than one, refer to the driver's +manual page for more information on matching a specific device. + +References: linkman:ups.conf[5], +linkman:nutupsdrv[8], +linkman:bcmxcp_usb[8], +linkman:blazer[8], +linkman:richcomm_usb[8], +linkman:tripplite_usb[8], +linkman:usbhid-ups[8] + + +[[Starting_drivers]] +Starting the driver(s) +~~~~~~~~~~~~~~~~~~~~~~ + +Start the driver(s) for your hardware: + + /usr/local/ups/bin/upsdrvctl start + +Make sure the driver doesn't report any errors. It should show a +few details about the hardware and then enter the background. You +should get back to the command prompt a few seconds later. For +reference, a successful start of the `usbhid-ups` driver looks like this: + + # /usr/local/ups/bin/upsdrvctl start + Network UPS Tools - Generic HID driver 0.34 (2.4.1) + USB communication driver 0.31 + Using subdriver: MGE HID 1.12 + Detected EATON - Ellipse MAX 1100 [ADKK22008] + +If the driver doesn't start cleanly, make sure you have picked the +right one for your hardware. You might need to try other drivers +by changing the "driver=" value in ups.conf. + +Be sure to check the driver's man page to see if it needs any extra +settings in ups.conf to detect your hardware. + +If it says "can't bind /var/state/ups/..." or similar, then your +state path probably isn't writable by the driver. Check the +<>. + +After making changes, try the <> step again. + +References: man pages: linkman:nutupsdrv[8], linkman:upsdrvctl[8] + + +Data server configuration (upsd) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Configure upsd, which serves data from the drivers to the clients. + +First, edit upsd.conf to allow access to your client systems. By +default, upsd will only listen to localhost port 3493/tcp. If you want +to connect to it from other machines, you must specify each interface you +want upsd to listen on for connections, optionally with a port number. + + LISTEN 127.0.0.1 3493 + LISTEN ::1 3493 + +NOTE: Refer to the NUT user manual <> for +information on how to access and secure upsd clients connections. + +Next, create upsd.users. For now, this can be an empty file. +You can come back and add more to it later when it's time to +configure upsmon or run one of the management tools. + +Do not make either file world-readable, since they both hold +access control data and passwords. They just need to be readable by +the user you created in the preparation process. + +The suggested configuration is to chown it to root, chgrp it to the +group you created, then make it readable by the group. + + chown root:nut upsd.conf upsd.users + chmod 0640 upsd.conf upsd.users + +References: man pages: linkman:upsd.conf[5], +linkman:upsd.users[5], +linkman:upsd[8] + +[[Starting_upsd]] +Starting the data server +~~~~~~~~~~~~~~~~~~~~~~~~ + +Start the network data server: + + /usr/local/ups/sbin/upsd + +Make sure it is able to connect to the driver(s) on your system. +A successful run looks like this: + + # /usr/local/ups/sbin/upsd + Network UPS Tools upsd 2.4.1 + listening on 127.0.0.1 port 3493 + listening on ::1 port 3493 + Connected to UPS [eaton]: usbhid-ups-eaton + +upsd prints dots while it waits for the driver to respond. Your +system may print more or less depending on how many drivers you +have and how fast they are. + +NOTE: if upsd says that it can't connect to a UPS or that the data +is stale, then your ups.conf is not configured correctly, or you +have a driver that isn't working properly. You must fix this before +going on to the next step. + +Reference: man page: linkman:upsd[8] + +Check the UPS data +~~~~~~~~~~~~~~~~~~ + +Status data +^^^^^^^^^^^ + +Make sure that the UPS is providing good status data. + + /usr/local/ups/bin/upsc myupsname@localhost ups.status + +You should see just one line in response: + + OL + +OL means your system is running on line power. If it says something +else (like OB - on battery, or LB - low battery), your driver was +probably misconfigured during the <> +step. If you reconfigure the driver, use 'upsdrvctl stop' to stop it, then +start it again as shown in the <> step. + +Reference: man page: linkman:upsc[8] + + +All data +^^^^^^^^ + +Look at all of the status data which is being monitored. + + /usr/local/ups/bin/upsc myupsname@localhost + +What happens now depends on the kind of device and driver you have. +In the list, you should see ups.status with the same value you got +above. A sample run on a UPS (Eaton Ellipse MAX 1100) looks like this: + + battery.charge: 100 + battery.charge.low: 20 + battery.runtime: 2525 + battery.type: PbAc + device.mfr: EATON + device.model: Ellipse MAX 1100 + device.serial: ADKK22008 + device.type: ups + driver.name: usbhid-ups + driver.parameter.pollfreq: 30 + driver.parameter.pollinterval: 2 + driver.parameter.port: auto + driver.version: 2.4.1-1988:1990M + driver.version.data: MGE HID 1.12 + driver.version.internal: 0.34 + input.sensitivity: normal + input.transfer.boost.low: 185 + input.transfer.high: 285 + input.transfer.low: 165 + input.transfer.trim.high: 265 + input.voltage.extended: no + outlet.1.desc: PowerShare Outlet 1 + outlet.1.id: 2 + outlet.1.status: on + outlet.1.switchable: no + outlet.desc: Main Outlet + outlet.id: 1 + outlet.switchable: no + output.frequency.nominal: 50 + output.voltage: 230.0 + output.voltage.nominal: 230 + ups.beeper.status: enabled + ups.delay.shutdown: 20 + ups.delay.start: 30 + ups.firmware: 5102AH + ups.load: 0 + ups.mfr: EATON + ups.model: Ellipse MAX 1100 + ups.power.nominal: 1100 + ups.productid: ffff + ups.serial: ADKK22008 + ups.status: OL CHRG + ups.timer.shutdown: -1 + ups.timer.start: -1 + ups.vendorid: 0463 + +Reference: man page: linkman:upsc[8], +<> + +Startup scripts +~~~~~~~~~~~~~~~ + +NOTE: This step is not need if you installed from packages. + +Edit your startup scripts, and make sure upsdrvctl and upsd are run every time +your system starts. + +[[UPS_shutdown]] +Configuring automatic shutdowns for low battery events +------------------------------------------------------ + +The whole point of UPS software is to bring down the OS cleanly when you +run out of battery power. Everything else is roughly eye candy. + +To make sure your system shuts down properly, you will need to perform some +additional configuration and run upsmon. Here are the basics. + +[[Shutdown_design]] +Shutdown design +~~~~~~~~~~~~~~~ + +When your UPS batteries get low, the operating system needs to be brought +down cleanly. Also, the UPS load should be turned off so that all devices +that are attached to it are forcibly rebooted. + +Here are the steps that occur when a critical power event happens: + +1. The UPS goes on battery + +2. The UPS reaches low battery (a "critical" UPS) + +3. The upsmon master notices and sets "FSD" - the "forced shutdown" + flag to tell all slave systems that it will soon power down the load. ++ +(If you have no slaves, skip to step 6) + +4. upsmon slave systems see "FSD" and: + + - generate a NOTIFY_SHUTDOWN event + - wait FINALDELAY seconds - typically 5 + - call their SHUTDOWNCMD + - disconnect from upsd + +5. The upsmon master system waits up to HOSTSYNC seconds (typically 15) + for the slaves to disconnect from upsd. If any are connected after + this time, upsmon stops waiting and proceeds with the shutdown + process. + +6. The upsmon master: + + - generates a NOTIFY_SHUTDOWN event + - waits FINALDELAY seconds - typically 5 + - creates the POWERDOWNFLAG file - usually /etc/killpower + - calls the SHUTDOWNCMD + +7. On most systems, init takes over, kills your processes, syncs and + unmounts some filesystems, and remounts some read-only. + +8. init then runs your shutdown script. This checks for the + POWERDOWNFLAG, finds it, and tells the UPS driver(s) to power off + the load. + +9. The system loses power. + +10. Time passes. The power returns, and the UPS switches back on. + +11. All systems reboot and go back to work. + + +How you set it up +~~~~~~~~~~~~~~~~~ + +[[NUT_user_creation]] +NUT user creation +^^^^^^^^^^^^^^^^^ + +Create a upsd user for upsmon to use while monitoring this UPS. + +Edit upsd.users and create a new section. upsmon will connect +to upsd and use this user name (in brackets) and password to +authenticate. This example is for a user called "monuser": + + [monuser] + password = mypass + upsmon master + # or upsmon slave + +References: linkman:upsd[8], linkman:upsd.users[5] + +Reloading the data server +^^^^^^^^^^^^^^^^^^^^^^^^^ + +Reload upsd. Depending on your configuration, you may be able to +do this without stopping upsd: + + /usr/local/ups/sbin/upsd -c reload + +If that doesn't work (check the syslog), just restart it: + + /usr/local/ups/sbin/upsd -c stop + /usr/local/ups/sbin/upsd + +NOTE: if you want to make reloading work later, see the entry in the +link:FAQ.html[FAQ] about starting upsd as a different user. + +Power Off flag file +^^^^^^^^^^^^^^^^^^^ + +Set the POWERDOWNFLAG location for upsmon. + +In upsmon.conf, add a POWERDOWNFLAG directive with a filename. +upsmon will create this file when the UPS needs to be powered off +during a power failure when low battery is reached. + +We will test for the presence of this file in a later step. + + POWERDOWNFLAG /etc/killpower + +References: man pages: linkman:upsmon[8], +linkman:upsmon.conf[5] + +Securing upsmon.conf +^^^^^^^^^^^^^^^^^^^^ + +The recommended setting is to have it owned by root:nut, then make it readable +by the group and not world. This file contains passwords that could be used by +an attacker to start a shutdown, so keep it secure. + + chown root:nut upsmon.conf + chmod 0640 upsmon.conf + +This step has been placed early in the process so you secure this file before +adding sensitive data in the next step. + + +Create a MONITOR directive for upsmon +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Edit upsmon.conf and create a MONITOR line with the UPS definition +(@), username and password from the <> +step, and the master or slave setting. + +If it's the master (i.e., it's connected to this UPS directly): + + MONITOR myupsname@mybox 1 monuser mypass master + +If it's just monitoring this UPS over the network, and some other system is the +master: + + MONITOR myupsname@mybox 1 monuser mypass slave + +The number "1" here is the power value. This should always be set to 1 unless +you have a very special (read: expensive) system with redundant power supplies. +In such cases, refer to the User Manual: + +- <>, +- <>. + +References: linkman:upsmon[8], linkman:upsmon.conf[5] + +Define a SHUTDOWNCMD for upsmon +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Still in upsmon.conf, add a directive that tells upsmon how to shut down your +system. This example seems to work on most systems: + + SHUTDOWNCMD "/sbin/shutdown -h +0" + +Notice the presence of "quotes" here to keep it together. + +If your system has special needs, you may want to set this to a script which +does local shutdown tasks before calling init. + + +Start upsmon +^^^^^^^^^^^^ + + /usr/local/ups/sbin/upsmon + +If it complains about something, then check your configuration. + +Checking upsmon +^^^^^^^^^^^^^^^ + +Look for messages in the syslog to indicate success. It should look something +like this: + + May 29 01:11:27 mybox upsmon[102]: Startup successful + May 29 01:11:28 mybox upsd[100]: Client monuser@192.168.50.1 + logged into UPS [myupsname] + +Any errors seen here are probably due to an error in the config files of either +`upsmon` or `upsd`. You should fix them before continuing. + + +Startup scripts +^^^^^^^^^^^^^^^ + +NOTE: This step is not need if you installed from packages. + +Edit your startup scripts, and add a call to `upsmon`. + +Make sure `upsmon` starts when your system comes up. Do it after `upsdrvctl` +and `upsd`, or it will complain about not being able to contact the server. + +You may delete the POWERDOWNFLAG in the startup scripts, but it is not +necessary. `upsmon` will clear that file for you when it starts. + +NOTE: Init script examples are provide in the 'scripts' directory of +the NUT source tree, and in the various <<_binary_packages,packages>> +that exist. + +Shutdown scripts +^^^^^^^^^^^^^^^^ + +NOTE: This step is not need if you installed from packages. + +Edit your shutdown scripts, and add `upsdrvctl shutdown`. + +You should configure your system to power down the UPS after the filesystems are +remounted read-only. Have it look for the presence of the POWERDOWNFLAG (from +linkman:upsmon.conf[5]), using this as an example: + +-------------------------------------------------------------------------------- + + if (test -f /etc/killpower) + then + echo "Killing the power, bye!" + /usr/local/ups/bin/upsdrvctl shutdown + + sleep 120 + + # uh oh... the UPS power-off failed + # you probably want to reboot here so you don't get stuck! + # *** see also the section on power races in the FAQ! *** + fi + +-------------------------------------------------------------------------------- + +[WARNING] +================================================================================ +- Be careful that upsdrvctl command will probably power off your machine. +Don't use it unless your system is ready to be halted by force. +If you run RAID, read the <<_raid_warning,RAID warning>> below! + +- Make sure the filesystem(s) containing upsdrvctl, ups.conf and your UPS +driver(s) are mounted (possibly in read-only mode) when the system gets to this +point. Otherwise it won't be able to figure out what to do. +================================================================================ + + +[[Testing_shutdowns]] +Testing shutdowns +^^^^^^^^^^^^^^^^^ + +UPS equipment varies from manufacturer to manufacturer and even within +model lines. You should test the shutdown sequence on your systems before +leaving them unattended. A successful sequence is one where the OS halts +before the battery runs out, and the system restarts when power returns. + +The first step is to see how upsdrvctl will behave without actually turning off +power. To do so, use the '-t' argument: + + /usr/local/ups/bin/upsdrvctl -t shutdown + +It will display the sequence without actually calling the drivers. + + +You can finally test a forced shutdown sequence (FSD) using: + + /usr/local/ups/sbin/upsmon -c fsd + +This will execute a full shutdown sequence, as presented in +<>, starting from the 3rd step. + +If everything works correctly, the computer will be forcibly powered +off, may remain off for a few seconds to a few minutes (depending on +the driver and UPS type), then will power on again. + +If your UPS just sits there and never resets the load, you are vulnerable +to a power race and should add the "reboot after timeout" hack at the very +least. + +Also refer to the section on power races in the link:FAQ.html[FAQ]. + +Using suspend to disk +~~~~~~~~~~~~~~~~~~~~~ + +Support for suspend to RAM and suspend to disk has been available in +the Linux kernel for a while now. For obvious reasons, suspending to +RAM isn't particularly useful when the UPS battery is getting low, +but suspend to disk may be an interesting concept. + +This approach minimizes the amount of disruption which would be caused +by an extended outage. The UPS goes on battery, then reaches low +battery, and the system takes a snapshot of itself and halts. Then it +is turned off and waits for the power to return. + +Once the power is back, the system reboots, pulls the snapshot back in, +and keeps going from there. If the user happened to be away when it +happened, they may return and have no idea that their system actually +shut down completely in the middle. + +In order for this to work, you need to shutdown NUT (UPS driver, upsd +server and upsmon client) in the suspend script and start them again in +the resume script. Don't try to keep them running. The upsd server +will latch the FSD state (so it won't be useable after resuming) and so +will the upsmon client. Some drivers may work after resuming, but many +don't and some UPS'es will require re-initialization, so it's best not +to keep this running either. + +After stopping driver, server and client you'll have to send the UPS +the command to shutdown only if the POWERDOWNFLAG is present. Note +that most likely you'll have to allow for a grace period after sending +'upsdrvctl shutdown' since the system will still have to take a +snapshot of itself after that. Not all drivers support this, so before +going down this road, make sure that the one you're using does. + +RAID warning +~~~~~~~~~~~~ + +If you run any sort of RAID equipment, make sure your arrays are either halted +(if possible) or switched to "read-only" mode. Otherwise you may suffer a long +resync once the system comes back up. + +The kernel may not ever run its final shutdown procedure, so you must take care +of all array shutdowns in userspace before upsdrvctl runs. + +If you use software RAID (md) on Linux, get mdadm and try using +'mdadm --readonly' to put your arrays in a safe state. This has to +happen after your shutdown scripts have remounted the filesystems. + +On hardware RAID or other kernels, you have to do some detective work. It may +be necessary to contact the vendor or the author of your driver to find out +how to put the array in a state where a power loss won't leave it "dirty". + +Our understanding is that most if not all RAID devices on Linux will be fine +unless there are pending writes. Make sure your filesystems are remounted +read-only and you should be covered. + + +[[DataRoom]] +Typical setups for enterprise networks and data rooms +----------------------------------------------------- + +The split nature of this UPS monitoring software allows a wide variety of +power connections. This chapter will help you identify how things should +be configured using some general descriptions. + +There are two main elements: + +1. There's a UPS attached to a communication (serial, USB or network) port on +this system. +2. This system depends on a UPS for power. + +You can play "mix and match" with those two to arrive at these descriptions +for individual hosts: + +- A: 1 but not 2 +- B: 2 but not 1 +- C: 1 and 2 + +A small to medium sized data room usually has one C and a bunch of Bs. +This means that there's a system (type C) hooked to the UPS which depends +on it for power. There are also some other systems in there (type B) +which depend on that same UPS for power, but aren't directly connected to +it. + +Larger data rooms or those with multiple UPSes may have several "clusters" +of the "single C, many Bs" depending on how it's all wired. + +Finally, there's a special case. Type A systems are connected to a UPS's +serial port, but don't depend on it for power. This usually happens when +a UPS is physically close to a box and can reach the serial port, but +the wiring is such that it doesn't actually feed it. + +Once you identify a system's type, use this list to decide which of the +programs need to be run for monitoring: + +- A: driver and upsd +- B: upsmon (as slave) +- C: driver, upsd, and upsmon (as master) + +To further complicate things, you can have a system that is hooked to +multiple UPSes, but only depends on one for power. This particular +situation makes it an "A" relative to one UPS, and a "C" relative to the +other. The software can handle this - you just have to tell it what to do. + +NOTE: NUT can also serve as a data proxy to increase the number of clients, +or share the communication load between several upsd instances. + +image:images/advanced.png[] + +If you are running large server-class systems that have more than one +power feed, see the next section for information on how to handle it +properly. + +[[BigServers]] +Typical setups for big servers with UPS redundancy +-------------------------------------------------- + +By using multiple MONITOR statements in upsmon.conf, you can configure an +environment where a large machine with redundant power monitors multiple +separate UPSes. + +image:images/bigbox.png[] + +Example configuration +~~~~~~~~~~~~~~~~~~~~~ + +For the examples in this section, we will use a server with four power supplies +installed. + +Two UPS, 'Alpha' and 'Beta', are each driving two of the power supplies. +This means that either 'Alpha' *or* 'Beta' can totally shut down and the +server will be able to keep running. + +The upsmon.conf configuration that reflect this is the following: + + MONITOR ups-alpha@myhost 2 monuser mypass master + MONITOR ups-beta@myhost 2 monuser mypass master + MINSUPPLIES 2 + +With that configuration, upsmon will only shut down when both UPS reaches +a critical (on battery + low battery) condition, since 'Alpha' and 'Beta' +provide the same power value. + +As an added bonus, this means you can move a running server from one UPS +to another (for maintenance purpose for example) without bringing it down since +the minimum power will be provided at all times. + +The MINSUPPLIES line tells upsmon that we need at least 2 power supplies +to be receiving power from a good UPS (on line or on battery, just not +on battery and low battery). + +NOTE: we could have used a 'Power Value' of 1 for both UPS, and MINSUPPLIES +set to 1 too. These values are purely arbitrary, so you are free to use your +own rules. Here, we have linked these values to the number of power supplies +that each UPS is feeding (2). + + +Multiple UPS shutdowns ordering +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you have multiple UPSes connected to your system, chances are that you +need to shut them down in a specific order. The goal is to shut down +everything but the one keeping upsmon alive at first, then you do that one +last. + +To set the order in which your UPSes receive the shutdown commands, define +the 'sdorder' value in your ups.conf. + + [bigone] + driver = usbhid-ups + port = auto + sdorder = 2 + + [littleguy] + driver = mge-shut + port = /dev/ttyS0 + sdorder = 1 + + [misc] + driver = blazer_ser + port = /dev/ttyS1 + sdorder = 0 + +The order runs from 0 to the highest number available. So, for this +configuration, the order of shutdowns would be 'misc', 'littleguy', and then +'bigone'. + +NOTE: If you have a UPS that shouldn't be shutdown when running 'upsdrvctl +shutdown', set the *sdorder* to *-1*. + + +Other redundancy configurations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are a lot of ways to handle redundancy and they all come down to how many +power supplies, power cords and independent UPS connections you have. A +system with a 1:1 cord:supply ratio has more wires stuffed behind it, but +it's much easier to move things around since any given UPS drives a smaller +percentage of the overall power. + +More information can be found in the linkdoc:user-manual[NUT user manual], +and the various link:man/index.html[user manual pages]. diff --git a/docs/configure.txt b/docs/configure.txt index 44cdf88..31ffed3 100644 --- a/docs/configure.txt +++ b/docs/configure.txt @@ -1,327 +1,345 @@ -Desc: Configure options -File: configure.txt -Date: 24 December 2008 -Auth: Russell Kroll -Auth: Peter Selinger -Auth: Arnaud Quette +ifdef::website[] +Configure options +================= +endif::website[] -There are a few options that can be given to configure to tweak compiles. +There are a few options that can be given to configure to tweak compiles. See also "./configure --help" for a current and complete listing. -Contents: -========= +Driver selection +---------------- -1. Driver selection -2. Optional features -3. Other configuration options -4. Installation directories -5. Directories used by NUT at run-time -6. Things the compiler might need to find + --with-serial -1. Driver selection: -==================== +Build and install the serial drivers (default: yes) - --with-serial + --with-usb - Build and install the serial drivers (default: yes) +Build and install the USB drivers (default: auto-detect) +Note that you need to install the libusb development package or files. - --with-usb + --with-snmp - Build and install the USB drivers (default: auto-detect) - Note that you need to install the libusb development package or files. +Build and install the SNMP drivers (default: auto-detect) +Note that you need to install libsnmp development package or files. - --with-snmp + --with-neon - Build and install the SNMP drivers (default: auto-detect) - Note that you need to install libsnmp development package or files. +Build and install the XML drivers (default: auto-detect) +Note that you need to install neon development package or files. - --with-neon + --with-drivers=,,... - Build and install the XML drivers (default: auto-detect) - Note that you need to install neon development package or files. +Specify exactly which driver or drivers to build and install (this +works for serial, usb, and snmp drivers, and overrides the +preceding three options). - --with-drivers=,,... +As of the time of this writing (2010), there are 46 UPS drivers +available. Most users will only need one, a few will need two or +three, and very few people will need all of them. - Specify exactly which driver or drivers to build and install (this - works for serial, usb, and snmp drivers, and overrides the - preceding three options). - - As of the time of this writing (2006), there are 47 UPS drivers - available. Most users will only need one, a few will need two or - three, and very few people will need all of them. - - To save time during the compile and disk space later on, you can - use this option to just build and install a subset of the drivers. - To select apcsmart and usbhid-ups, you'd do this: +To save time during the compile and disk space later on, you can +use this option to just build and install a subset of the drivers. +To select mge-shut and usbhid-ups, you'd do this: --with-drivers=apcsmart,usbhid-ups - If you need to build more drivers later on, you will need to rerun - configure with a different list. To make it build all of the - drivers from scratch again, run 'make clean' before starting. +If you need to build more drivers later on, you will need to rerun +configure with a different list. To make it build all of the +drivers from scratch again, run 'make clean' before starting. -2. Optional features: -===================== + --with-doc= (default: no) - --with-cgi (default: no) +Build and install NUT documentation file(s). +The possible values are "html-single" for single page HTML, "html-chunked" +for multi pages HTML, "pdf" for a PDF file or "auto" to build all the +possible previous documentation formats. +Verbose output can be enabled using: ASCIIDOC_VERBOSE=-v make - Build and install the optional CGI programs, HTML files, and sample - CGI configuration files. This is not enabled by default, as they - are only useful on web servers. See data/html/README for additional - information on how to set up CGI programs. +This feature requires AsciiDoc 8.6.3 (http://www.methods.co.nz/asciidoc). - --with-lib (default: no) - Build and install the upsclient library and header files. +Optional features +----------------- - --with-all (no default) + --with-cgi (default: no) - Build and install all of the above (the serial, USB, and SNMP - drivers, the CGI programs and HTML files, and the upsclient - library). +Build and install the optional CGI programs, HTML files, and sample +CGI configuration files. This is not enabled by default, as they +are only useful on web servers. See data/html/README for additional +information on how to set up CGI programs. - --with-ssl (default: auto-detect) + --with-lib (default: no) - Enable SSL development code. Read docs/ssl.txt for instructions on - SSL support. +Build and install the upsclient library and header files. - --with-wrap (default: auto-detect) + --with-all (no default) - Enable libwrap (tcp-wrappers) support. Refer to upsd man page for - more information. +Build and install all of the above (the serial, USB, and SNMP +drivers, the CGI programs and HTML files, and the upsclient +library). - --with-ipv6 (default: auto-detect) + --with-ssl (default: auto-detect) - Enable IPv6 support. +Enable SSL development code. Read the section "Configuring SSL" in +docs/security.txt for instructions on SSL support. - --with-hal (default: no) + --with-wrap (default: auto-detect) - Build and install Hardware Abstraction Layer support. - If you own a USB unit, only protect your local system and run the - Gnome or KDE desktop, this will enable a full Plug & Play usage. - See docs/nut-hal.txt for additional information on how to set up - and use HAL support. +Enable libwrap (tcp-wrappers) support. Refer to upsd man page for +more information. - --with-powerman (default: auto-detect) + --with-ipv6 (default: auto-detect) - Build and install Powerman PDU client driver. - This allows to interact with the Powerman daemon, and the numerous - Power Distribution Units (PDU) supported by the project. +Enable IPv6 support. -3. Other configuration options: -=============================== + --with-hal (default: no) - --with-port=PORT +Build and install Hardware Abstraction Layer support. +If you own a USB unit, only protect your local system and run the +Gnome or KDE desktop, this will enable a full Plug & Play usage. +See docs/nut-hal.txt for additional information on how to set up +and use HAL support. + + --with-powerman (default: auto-detect) - Change the TCP port used by the network code. Default is 3493. +Build and install Powerman PDU client driver. +This allows to interact with the Powerman daemon, and the numerous +Power Distribution Units (PDU) supported by the project. - Ancient versions of upsd used port 3305. NUT 2.0 and up use a - substantially different network protocol and are not able to - communicate with anything older than the 1.4 series. - If you have to monitor a mixed environment, use the last 1.4 version, - as it contains compatibility code for both the old "REQ" and the new - "GET" versions of the protocol. +Other configuration options +--------------------------- - --with-user= - --with-group= + --with-port=PORT - Programs started as root will setuid() to for somewhat - safer operation. You can override this with -u in several - programs, including upsdrvctl (and all drivers by extension), upsd, - and upsmon. The "user" directive in ups.conf overrides this at run - time for the drivers. +Change the TCP port used by the network code. Default is 3493. - Note: upsmon does not totally drop root because it may need to - initiate a shutdown. There is always at least a stub process - remaining with root powers. The network code runs in another - (separate) process as the new user. +Ancient versions of upsd used port 3305. NUT 2.0 and up use a +substantially different network protocol and are not able to +communicate with anything older than the 1.4 series. - The is used for the permissions of some files, - particularly the hotplugging rules for USB. The idea is that the - device files for any UPS devices should be readable and writable by - members of that group. +If you have to monitor a mixed environment, use the last 1.4 version, +as it contains compatibility code for both the old "REQ" and the new +"GET" versions of the protocol. - The default value for both the username and groupname is "nobody". - This was done since it's slightly better than staying around as - root. Running things as nobody is not a good idea, since it's a - hack for NFS access. You should create at least one separate user - for this software. + --with-user= + --with-group= - If you use one of the --with-user and --with-group options, then - you have to use the other one too. +Programs started as root will setuid() to for somewhat +safer operation. You can override this with -u in several +programs, including upsdrvctl (and all drivers by extension), upsd, +and upsmon. The "user" directive in ups.conf overrides this at run +time for the drivers. - See the INSTALL document and the FAQ for more on this topic. +NOTE: upsmon does not totally drop root because it may need to +initiate a shutdown. There is always at least a stub process +remaining with root powers. The network code runs in another +(separate) process as the new user. - --with-logfacility=FACILITY +The is used for the permissions of some files, +particularly the hotplugging rules for USB. The idea is that the +device files for any UPS devices should be readable and writable by +members of that group. - Change the facility used when writing to the log file. Read the man - page for openlog to get some idea of what's available on your system. - Default is LOG_DAEMON. +The default value for both the username and groupname is "nobody". +This was done since it's slightly better than staying around as +root. Running things as nobody is not a good idea, since it's a +hack for NFS access. You should create at least one separate user +for this software. -4. Installation directories: -============================ +If you use one of the --with-user and --with-group options, then +you have to use the other one too. - --prefix=PATH +See the INSTALL document and the FAQ for more on this topic. - This is a fairly standard option with GNU autoconf, and it sets the - base path for most of the other install directories. The default - is /usr/local/ups, which puts everything but the state sockets in one - easy place. + --with-logfacility=FACILITY - If you like having things to be at more of a "system" level, setting - the prefix to /usr/local or even /usr might be better. +Change the facility used when writing to the log file. Read the man +page for openlog to get some idea of what's available on your system. +Default is LOG_DAEMON. - --exec_prefix=PATH - This sets the base path for architecture dependent files. By - default, it is the same as . +Installation directories +------------------------ - --sysconfdir=PATH + --prefix=PATH - Changes the location where NUT's configuration files are stored. - By default this path is /etc. Setting this to /etc or - /etc/ups might be useful. +This is a fairly standard option with GNU autoconf, and it sets the +base path for most of the other install directories. The default +is /usr/local/ups, which puts everything but the state sockets in one +easy place. - The NUT_CONFPATH environment variable overrides this at run time. +If you like having things to be at more of a "system" level, setting +the prefix to /usr/local or even /usr might be better. - --bindir=PATH - --sbindir=PATH + --exec_prefix=PATH - Where executable files will be installed. Files that are normally - executed by root (upsd, upsmon, upssched) go to sbindir, all others - to bindir. The defaults are /bin and /sbin. +This sets the base path for architecture dependent files. By +default, it is the same as . - --datadir=PATH + --sysconfdir=PATH - Change the data directory, i.e., where architecture independent - read-only data is installed. By default this is /share, - i.e., /usr/local/ups/share. At the moment, this directory only - holds two files - the optional cmdvartab and driver.list. +Changes the location where NUT's configuration files are stored. +By default this path is /etc. Setting this to /etc or +/etc/ups might be useful. - --mandir=PATH +The NUT_CONFPATH environment variable overrides this at run time. - Sets the base directories for the man pages. The default is - /man, i.e., /usr/local/ups/man. + --bindir=PATH + --sbindir=PATH - --includedir=PATH +Where executable files will be installed. Files that are normally +executed by root (upsd, upsmon, upssched) go to sbindir, all others +to bindir. The defaults are /bin and /sbin. - Sets the path for include files to be installed when --with-lib is - selected. For example, upsclient.h is installed here. The default - is /include. + --datadir=PATH - --libdir=PATH +Change the data directory, i.e., where architecture independent +read-only data is installed. By default this is /share, +i.e., /usr/local/ups/share. At the moment, this directory only +holds two files - the optional cmdvartab and driver.list. - Sets the installation path for libraries. This is just the - upsclient library for now. The default is /lib. + --mandir=PATH - --with-drvpath=PATH +Sets the base directories for the man pages. The default is +/man, i.e., /usr/local/ups/man. - The UPS drivers will be installed to this path. By default they - install to "/bin", i.e., /usr/local/ups/bin. + --includedir=PATH - The "driverpath" global directive in the ups.conf file overrides this - at run time. +Sets the path for include files to be installed when --with-lib is +selected. For example, upsclient.h is installed here. The default +is /include. - --with-cgipath=PATH + --libdir=PATH - The CGI programs will be installed to this path. By default, they - install to "/cgi-bin", which is usually /usr/local/ups/cgi-bin. +Sets the installation path for libraries. This is just the +upsclient library for now. The default is /lib. - If you set the prefix to something like /usr, you should set the - cgipath to something else, because /usr/cgi-bin is pretty ugly and - non-standard. + --with-drvpath=PATH - The CGI programs are not built or installed by default. Use - "./configure --with-cgi" to request that they are built and - installed. +The UPS drivers will be installed to this path. By default they +install to "/bin", i.e., /usr/local/ups/bin. - --with-htmlpath=PATH +The "driverpath" global directive in the ups.conf file overrides this +at run time. - HTML files will be installed to this path. By default, this is - "/html". Note that HTML files are only installed if - --with-cgi is selected. + --with-cgipath=PATH - --with-pkgconfig-dir=PATH +The CGI programs will be installed to this path. By default, they +install to "/cgi-bin", which is usually /usr/local/ups/cgi-bin. - Where to install pkg-config *.pc files. This option only has an - effect if --with-lib is selected, and causes a pkg-config file to - be installed in the named location. The default is - /pkgconfig. +If you set the prefix to something like /usr, you should set the +cgipath to something else, because /usr/cgi-bin is pretty ugly and +non-standard. - Use --without-pkgconfig-dir to disable this feature altogether. +The CGI programs are not built or installed by default. Use +"./configure --with-cgi" to request that they are built and +installed. - --with-hotplug-dir=PATH + --with-htmlpath=PATH - Where to install Linux 2.4 hotplugging rules. The default is - /etc/hotplug, if that directory exists, and not to install it - otherwise. Note that this installation directory is not a - subdirectory of by default. When installing NUT as a - non-root user, you may have to override this option. +HTML files will be installed to this path. By default, this is +"/html". Note that HTML files are only installed if +--with-cgi is selected. - Use --without-hotplug-dir to disable this feature altogether. + --with-pkgconfig-dir=PATH - --with-udev-dir=PATH +Where to install pkg-config *.pc files. This option only has an +effect if --with-lib is selected, and causes a pkg-config file to +be installed in the named location. The default is +/pkgconfig. - Where to install Linux 2.6 hotplugging rules, for kernels that have - the "udev" mechanism. The default is /etc/udev, if that directory - exists, and not to install it otherwise. Note that this - installation directory is not a subdirectory of by - default. When installing NUT as a non-root user, you may have to - override this option. +Use --without-pkgconfig-dir to disable this feature altogether. - Use --without-udev-dir to disable this feature altogether. + --with-hotplug-dir=PATH -5. Directories used by NUT at run-time: -======================================= +Where to install Linux 2.4 hotplugging rules. The default is +/etc/hotplug, if that directory exists, and not to install it +otherwise. Note that this installation directory is not a +subdirectory of by default. When installing NUT as a +non-root user, you may have to override this option. - --with-pidpath=PATH +Use --without-hotplug-dir to disable this feature altogether. - Changes the directory where pid files are stored. By default this is - /var/run. Certain programs like upsmon will leave files here. + --with-udev-dir=PATH - --with-altpidpath=PATH +Where to install Linux 2.6 hotplugging rules, for kernels that have +the "udev" mechanism. The default is /etc/udev, if that directory +exists, and not to install it otherwise. Note that this +installation directory is not a subdirectory of by +default. When installing NUT as a non-root user, you may have to +override this option. - Programs that normally don't have root powers, like the drivers and - upsd, write their pid files here. By default this is whatever the - statepath is, as those programs should be able to write there. +Use --without-udev-dir to disable this feature altogether. - --with-statepath=PATH - Change the default location of the state sockets created by the - drivers. +Directories used by NUT at run-time +----------------------------------- - The NUT_STATEPATH environment variable overrides this at run time. + --with-pidpath=PATH - Default is /var/state/ups. +Changes the directory where pid files are stored. By default this is +/var/run. Certain programs like upsmon will leave files here. -6. Things the compiler might need to find: -========================================== + --with-altpidpath=PATH - --with-gd-includes="-I/foo/bar" +Programs that normally don't have root powers, like the drivers and +upsd, write their pid files here. By default this is whatever the +statepath is, as those programs should be able to write there. - If you installed gd in some place where your C preprocessor can't - find the header files, use this switch to add additional -I flags. + --with-statepath=PATH - --with-gd-libs="-L/foo/bar -labcd -lxyz" +Change the default location of the state sockets created by the +drivers. - If your copy of gd isn't linking properly, use this to give the - proper -L and -l flags to make it work. See LIBS= in gd's Makefile. +The NUT_STATEPATH environment variable overrides this at run time. - Note: the --with-gd switches are not necessary if you have gd 2.0.8 - or higher installed properly. The gdlib-config script will be - detected and used by default in that situation. +Default is /var/state/ups. - --with-ssl-includes, --with-usb-includes, --with-snmp-includes, - --with-neon-includes, --with-powerman-includes="-I/foo/bar" - If your system doesn't have pkg-config and support for any of the - above libraries isn't found (but you know it is installed), you must - specify the compiler flags that are needed. +Things the compiler might need to find +-------------------------------------- - --with-ssl-libs, --with-usb-libs, --with-snmp-libs, - --with-neon-libs, --with-powerman-libs="-L/foo/bar -labcd -lxyz" + --with-gd-includes="-I/foo/bar" - If your system doesn't have pkg-config and support for any of the - above libraries isn't found (but you know it is installed), you must - specify the linker flags that are needed. +If you installed gd in some place where your C preprocessor can't +find the header files, use this switch to add additional -I flags. + + --with-gd-libs="-L/foo/bar -labcd -lxyz" + +If your copy of gd isn't linking properly, use this to give the +proper -L and -l flags to make it work. See LIBS= in gd's Makefile. + +NOTE: the --with-gd switches are not necessary if you have gd 2.0.8 +or higher installed properly. The gdlib-config script will be +detected and used by default in that situation. + + --with-ssl-includes, --with-usb-includes, --with-snmp-includes, + --with-neon-includes, --with-powerman-includes="-I/foo/bar" + +If your system doesn't have pkg-config and support for any of the above +libraries isn't found (but you know it is installed), you must specify the +compiler flags that are needed. + + --with-ssl-libs, --with-usb-libs, --with-snmp-libs, + --with-neon-libs, --with-powerman-libs="-L/foo/bar -labcd -lxyz" + +If your system doesn't have pkg-config and support for any of the above +libraries isn't found (but you know it is installed), you must specify the +linker flags that are needed. + +HAL addons (deprecated) +----------------------- + + --with-hal-includes="-DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal \ + -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include" + --with-hal-libs="-lhal -ldbus-1 -lpthread" + --with-hal-user="haldaemon" + --with-hal-device-match-key="info.bus" + --with-hal-callouts-path="${libdir}/hal" + --with-hal-fdi-path="${datarootdir}/hal/fdi/information/20thirdparty" + +If system doesn't have pkg-config or it fails to provides hints for some of the +settings that are needed to set it up properly and the build in defaults are +not right, you can specify the right variables here. diff --git a/docs/contact-closure.txt b/docs/contact-closure.txt index cbaba7b..deba8b9 100644 --- a/docs/contact-closure.txt +++ b/docs/contact-closure.txt @@ -1,13 +1,11 @@ -Desc: Contact closure hardware -File: contact-closure.txt -Date: 14 March 2004 -Auth: Russell Kroll +Contact closure hardware information +------------------------------------ This is a collection of notes that apply to contact closure UPS hardware, specifically those monitored by the genericups driver. Definitions ------------ +~~~~~~~~~~~ "Contact closure" refers to a situation where one line is connected to another inside UPS hardware to indicate some sort of situation. These @@ -25,7 +23,7 @@ not require cable power. These signals just appear on the right lines without any special configuration on the PC side. Bad levels ----------- +~~~~~~~~~~ Some evil cabling and UPS equipment uses the transmit or receive lines as their reference points for these signals. This is not sufficient to @@ -34,7 +32,7 @@ reading certain signals on your system, make sure your UPS isn't trying to do this. Signals -------- +~~~~~~~ Unlike their smarter cousins, this kind of UPS can only give you very simple yes/no answers. Due to the limited number of serial port lines @@ -53,7 +51,7 @@ a way that it only works when running on battery. Most hardware or cabling will ignore the shutdown signal when running on line power. New genericups types --------------------- +~~~~~~~~~~~~~~~~~~~~ If none of the existing types in the genericups driver work completely, make a note of which ones (if any) manage to work partially. This can @@ -76,15 +74,15 @@ When editing the genericups.h, the values have the following meanings: Outgoing lines: -line_norm = what to set to make the line "normal" - i.e. cable power -line_sd = what to set to make the UPS shut down the load +- line_norm = what to set to make the line "normal" - i.e. cable power +- line_sd = what to set to make the UPS shut down the load Incoming lines: -line_ol = flag that appears for on line / on battery -val_ol = value of that flag when the UPS is on battery -line_bl = flag that appears for low battery / battery OK -val_bl = value of that flag when the battery is low +- line_ol = flag that appears for on line / on battery +- val_ol = value of that flag when the UPS is on battery +- line_bl = flag that appears for low battery / battery OK +- val_bl = value of that flag when the battery is low This may seem a bit confusing to have two variables per value that we want to read, but here's how it works. If you set line_ol to @@ -95,14 +93,15 @@ the result will be 0. So, if line_ol = foo, then val_ol can only be foo or 0. -As a general case, if line_ol == val_ol, then the value you're reading +As a general case, if 'line_ol == val_ol', then the value you're reading is active high. Otherwise, it's active low. Check out the guts of upsdrv_updateinfo() to see how it really works. Custom definitions ------------------- +~~~~~~~~~~~~~~~~~~ Late in the 1.3 cycle, a feature was merged which allows you to create custom monitoring settings without editing the model table. Just set upstype to something close, then use settings in ups.conf to adjust the -rest. See the genericups man page for more details. +rest. See the linkman:genericups[8] man page for more +details. diff --git a/docs/data-room.txt b/docs/data-room.txt deleted file mode 100644 index 574050d..0000000 --- a/docs/data-room.txt +++ /dev/null @@ -1,54 +0,0 @@ -Desc: Typical setups for data rooms -File: data-room.txt -Date: 27 May 2002 -Auth: Russell Kroll - -The split nature of this UPS monitoring software allows a wide variety of -power connections. This document will help you identify how things should -be configured using some general descriptions. - -There are two main elements: - -1. There's a UPS attached to a serial port on this system. -2. This system depends on a UPS for power. - -You can play "mix and match" with those two to arrive at these descriptions -for individual hosts: - -A: 1 but not 2 -B: 2 but not 1 -C: 1 and 2 - -A small to medium sized data room usually has one C and a bunch of Bs. -This means that there's a system (type C) hooked to the UPS which depends -on it for power. There are also some other systems in there (type B) -which depend on that same UPS for power, but aren't directly connected to -it. - -Larger data rooms or those with multiple UPSes may have several "clusters" -of the "single C, many Bs" depending on how it's all wired. - -Finally, there's a special case. Type A systems are connected to a UPS's -serial port, but don't depend on it for power. This usually happens when -a UPS is physically close to a box and can reach the serial port, but -the wiring is such that it doesn't actually feed it. - -Once you identify a system's type, use this list to decide which of the -programs need to be run for monitoring: - -A: driver and upsd -B: upsmon (as slave) -C: driver, upsd, and upsmon (as master) - -To further complicate things, you can have a system that is hooked to -multiple UPSes, but only depends on one for power. This particular -situation makes it an "A" relative to one UPS, and a "C" relative to the -other. The software can handle this - you just have to tell it what to -do. - -Multi-power supply boxes -======================== - -If you are running large server-class systems that have more than one -power feed, see big-servers.txt for information on how to handle it -properly. diff --git a/docs/design.txt b/docs/design.txt index f4c32fe..dfaeae8 100644 --- a/docs/design.txt +++ b/docs/design.txt @@ -1,34 +1,21 @@ -Desc: Network UPS Tools design document -File: design.txt -Date: 14 March 2004 -Auth: Russell Kroll +NUT design document +=================== This software is designed around a layered scheme with drivers, a server and clients. These layers communicate with text-based protocols for easier maintenance and diagnostics. The layering -============ +------------ - CLIENTS: upsmon, upsc, upsrw, upsstats, upsset, etc. (via upsclient) - - < network: TCP sockets, typically on port 3493 > +image:images/nut_layering.png[NUT layering] - SERVER: upsd - - < Unix domain sockets with text-based messages > - - DRIVERS: apcsmart, bestups, powercom, etc. - - < serial communications, SNMP, USB, etc. > - -EQUIPMENT: Smart-UPS 700, Fenton PowerPal 660, etc. (actual UPS hardware) How information gets around -=========================== +--------------------------- From the equipment ------------------- +~~~~~~~~~~~~~~~~~~ DRIVERS talk to the EQUIPMENT and receive updates. For most hardware this is polled (DRIVER asks EQUIPMENT about a variable), but forced updates are @@ -36,7 +23,7 @@ also possible. The exact method is not important, as it is abstracted by the driver. From the driver ---------------- +~~~~~~~~~~~~~~~ The core of all DRIVERS maintains internal storage for every variable that is known along with the auxiliary data for those variables. It @@ -55,7 +42,7 @@ It continues to listen on the socket for additional updates. This protocol is documented in sock-protocol.txt. From the server ---------------- +~~~~~~~~~~~~~~~ The SERVER's internal storage maintains a complete copy of the data which is in the DRIVER, so it is capable of answering any request @@ -66,7 +53,7 @@ requested data if it is available. The format for requests from the CLIENT is documented in protocol.txt. Instant commands -================ +---------------- Instant commands is the term given to a set of actions that result in something happening to the UPS. Some of the common ones are @@ -86,7 +73,7 @@ timing issues. Remember that upsd services clients in a round-robin fashion, so all queries must be lightweight and speedy. Setting variables -================= +----------------- Some variables in the DRIVER or EQUIPMENT can be changed, and carry the FLAG_RW flag. Upon receiving a SET command from the CLIENT, the SERVER @@ -102,7 +89,7 @@ command's completion from the DRIVER. This, too, is planned for a future release. Example data path -================= +----------------- Here's the path a piece of data might take through this architecture. The event is a UPS going on battery, and the final result is a pager @@ -171,13 +158,12 @@ This scenario requires some configuration, obviously: CMDSCRIPT /path/to/upssched-cmd -8. upssched-cmd knows what to do with "upsonbatt" as its first argument +9. upssched-cmd knows what to do with "upsonbatt" as its first argument (A quick case..esac construct, see the examples) -============================================================================== History -======= +------- The oldest versions of this software (1998) had no separation between the driver and the network server and only supported the latest APC diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt new file mode 100644 index 0000000..b3fc2c8 --- /dev/null +++ b/docs/developer-guide.txt @@ -0,0 +1,115 @@ +:titles.underlines: "__","==","--","~~","^^" + +Network UPS Tools Developer Guide +_________________________________ +:Author: Russell_Kroll,_Arnaud_Quette,_Charles_Lepple_and_Peter_Selinger +:Author Initials: RK, AQ, CL & PS + +Introduction +============ + +NUT is both a powerful toolkit and framework that provides support for Power +Devices, such as Uninterruptible Power Supplies, Power Distribution Units +and Solar Controllers. + +This document intend to describe how NUT is designed, and the way to +develop new device drivers and client applications. + + +[[design]] + +include::design.txt[] + + +[[developers]] + +include::developers.txt[] + + +[[new-drivers]] + +include::new-drivers.txt[] + + +[[sock-protocol]] + +include::sock-protocol.txt[] + + +[[augeas]] + +include::../scripts/augeas/README[] + +[[new-clients]] + +include::new-clients.txt[] + + +[[net-protocol]] + +include::net-protocol.txt[] + + +[[dev-tools]] + +NUT developers tools +==================== + +NUT provides several tools for clients and core developers, and QA people. + +Device simulation +----------------- + +The dummy-ups driver propose a simulation mode, also known as 'Dummy Mode'. +This mode allows to simulate any kind of devices, even non existing ones. + +Using this method, you can either replay a real life sequence, +<>, or directly interact +through upsrw or by editing the device file. + +For more information, refer to linkman:dummy-ups[8] +manual page. + + +[[dev-recording]] + +Device recording +---------------- + +To complete dummy-ups, NUT provides a device recorder script called +'device-recorder.sh' and located in the 'tools/' directory of the +NUT source tree. + +This script uses 'upsc' to record device information, and stores +these in a differential fashion every 5 seconds (by default). + +Its usage is the following: + + Usage: dummy-recorder.sh [output-file] [interval] + +For example, to record information from the device 'myups' every 10 seconds: + + tools/device-recorder.sh myups@localhost myups.seq 10 + + + +NUT core development and maintenance +==================================== + +This section is intended to people who want to develop new core features, +or to do some maintenance. + + +include::macros.txt[] + + +[[roadmap]] + +include::../TODO[] + + +[[nut-names]] +Appendix A: NUT command and variable naming scheme +================================================== + +include::nut-names.txt[] diff --git a/docs/developers.txt b/docs/developers.txt index 86990de..f26dd17 100644 --- a/docs/developers.txt +++ b/docs/developers.txt @@ -1,16 +1,14 @@ -Desc: Information for developers -File: developers.txt -Date: 18 February 2004 -Auth: Russell Kroll +Information for developers +========================== This document is intended to explain some of the more useful things within the tree and provide a standard for working on the code. General stuff - common subdirectory -=================================== +----------------------------------- String handling ---------------- +~~~~~~~~~~~~~~~ Use snprintf. It's even provided with a compatibility module if the target host doesn't have it natively. @@ -24,7 +22,7 @@ that allows you to append to char * with a format string and all the usual string length checking of snprintf. Error reporting ---------------- +~~~~~~~~~~~~~~~ Don't call syslog() directly. Use upslog_with_errno() and upslogx(). They may write to the syslog, stderr, or both as appropriate. This @@ -38,21 +36,21 @@ fatal_with_errno and fatalx work the same way, but they exit(EXIT_FAILURE) afterwards. Don't call exit() directly. Debugging information ---------------------- +~~~~~~~~~~~~~~~~~~~~~ upsdebug_with_errno(), upsdebugx() and upsdebug_hex() use the global nut_debug_level so you don't have to mess around with printfs yourself. Use them. Memory allocation ------------------ +~~~~~~~~~~~~~~~~~ xmalloc, xcalloc, xrealloc and xstrdup all check the results of the base calls before continuing, so you don't have to. Don't use the raw calls directly. Config file parsing -------------------- +~~~~~~~~~~~~~~~~~~~ The configuration parser, called parseconf, is now up to its fourth major version. It has multiple entry points, and can handle many @@ -67,7 +65,7 @@ Escaping special characters and quoting multiple-word elements is all handled by the state machine. Using the same code for all config files avoids code duplication. -Note: this does not apply to drivers. Driver authors should use the +NOTE: this does not apply to drivers. Driver authors should use the upsdrv_makevartable() scheme to pick up values from ups.conf. Drivers should not have their own config files. @@ -78,56 +76,63 @@ under normal circumstances. This technique might be used to add more hardware support to a driver without recompiling. vs. -------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~ This is already handled by autoconf, so just include "timehead.h" and you will get the right headers on every system. -UPS drivers - main.c -==================== +Device drivers - main.c +----------------------- -The UPS drivers use main.c as their core. The only exception is -dummycons, which only looks like a driver by using the same dstate -function calls. +The device drivers use main.c as their core. The only exceptions are the +HAL-based drivers, which use the same dstate function calls while integrating +with the DBUS event loop. To write a new driver, you create a file with a series of support functions that will be called by main. These all have names that start -with "upsdrv_", and they will be called at different times by main +with `upsdrv_`, and they will be called at different times by main depending on what needs to happen. -See new-drivers.txt for information on writing drivers, and also refer -to the skeletal driver in skel.c. +See the <> for information on writing +drivers, and also refer to the skeletal driver in skel.c. Portability -=========== +----------- Avoid things that will break on other systems. All the world is not an x86 Linux box. There are still older systems out there that don't do C++ style comments. -That means you have to comment /* like this */, and // this is right out. + +-------------------------------------- +/* Comments look like this. */ +// Not like this. +-------------------------------------- Newer versions of gcc allow you to declare a variable inside a function somewhat like the way C++ operates, like this: - function do_stuff(void) - { - check_something(); +-------------------------------------------------------------------------------- +function do_stuff(void) +{ + check_something(); - int a; + int a; - a = do_something_else(); - } + a = do_something_else(); +} +-------------------------------------------------------------------------------- While this will compile and run on these newer versions, it will fail miserably for anyone on an older system. That means you must not use it. gcc only warns about this with -pedantic. Coding style -============ +------------ -This is how I do things. +This is how we do things: +-------------------------------------------------------------------------------- int open_subspace(char *ship, int privacy) { if (!privacy) @@ -138,8 +143,7 @@ int open_subspace(char *ship, int privacy) return secure_channel(ship); } - -(The example that used to be in this file wasn't particularly clear) +-------------------------------------------------------------------------------- The basic idea is that I try to group things into functions, and then find ways to drop out of them when we can't go any further. There's @@ -159,7 +163,7 @@ easier to read, and it enables tools (such as indent and emacs) to display the source code correctly. Indenting with tabs vs. spaces ------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Another thing to notice is that the indenting happens with tabs instead of spaces. This lets everyone have their personal tab-width setting @@ -180,7 +184,7 @@ kernel - Documentation/CodingStyle. He's done a far better job of explaining this. Line breaks ------------ +~~~~~~~~~~~ It is better to have lines that are longer than 80 characters than to wrap lines in random places. This makes it easier to work with tools @@ -193,13 +197,17 @@ long when there is a better alternative (see the note on pretentiousVariableNamingSchemes above). Certainly there should not be more than one statement per line. Please do not use - if (condition) break; +-------------------------------------------------------------------------------- +if (condition) break; +-------------------------------------------------------------------------------- but use the following: - if (condition) { - break; - } +-------------------------------------------------------------------------------- +if (condition) { + break; +} +-------------------------------------------------------------------------------- Miscellaneous coding style tools -------------------------------- @@ -207,12 +215,12 @@ Miscellaneous coding style tools You can go a long way towards converting your source code to the NUT coding style by piping it through the following command: - indent -kr -i8 -T FILE -l1000 -nhnl + indent -kr -i8 -T FILE -l1000 -nhnl This next command does a reasonable job of converting most C++ style comments (but not URLs and DOCTYPE strings): - sed 's#\(^\|[ \t]\)//[ \t]*\(.*\)[ \t]*#/* \2 */#' + sed 's#\(^\|[ \t]\)//[ \t]*\(.*\)[ \t]*#/* \2 */#' Emacs users can adjust how tabs are displayed. For example, it is possible to set a tab stop to be 3 spaces, rather than the usual 8. @@ -222,25 +230,27 @@ rendered on screen). It is even possible to set this on a per-directory basis, by putting something like this into your .emacs file: - ;; NUT style +-------------------------------------------------------------------------------- +;; NUT style - (defun nut-c-mode () - "C mode with adjusted defaults for use with the NUT sources." - (interactive) - (c-mode) - (c-set-style "K&R") - (setq c-basic-offset 3) ;; 3 spaces C-indentation - (setq tab-width 3)) ;; 3 spaces per tab +(defun nut-c-mode () + "C mode with adjusted defaults for use with the NUT sources." + (interactive) + (c-mode) + (c-set-style "K&R") + (setq c-basic-offset 3) ;; 3 spaces C-indentation + (setq tab-width 3)) ;; 3 spaces per tab - ;; apply NUT style to all C source files in all subdirectories of nut/ +;; apply NUT style to all C source files in all subdirectories of nut/ - (setq auto-mode-alist (cons '(".*/nut/.*\\.[ch]$". nut-c-mode) - auto-mode-alist)) +(setq auto-mode-alist (cons '(".*/nut/.*\\.[ch]$". nut-c-mode) + auto-mode-alist)) +-------------------------------------------------------------------------------- Finishing touches ------------------ +~~~~~~~~~~~~~~~~~ -I like code that uses const and static liberally. If you don't need to +We like code that uses const and static liberally. If you don't need to expose a function or global variable to the outside world, static is your friend. If nobody should edit the contents of some buffer that's behind a pointer, const keeps them honest. @@ -250,25 +260,23 @@ find implementation flaws. Functions that attempt to modify a constant or access something outside their scope will throw a warning or even fail to compile in some cases. This is what we want. -Spaghetti ---------- -If you use a goto, expect me to drop it when my head stops spinning. -It gives me flashbacks to the BASIC code I wrote on the 8 bit systems of -the 80s. I've tried to clean up my act, and you should make the effort +Spaghetti +~~~~~~~~~ + +If you use a goto, expect us to drop it when our head stops spinning. +It gives us flashbacks to the very old code we wrote. +We've tried to clean up our act, and you should make the effort as well. -I'm not making a blanket statement about gotos, since everything +We're not making a blanket statement about gotos, since everything probably has at least one good use. There are a few cases where a goto is more efficient than any other approach, but you probably won't -encounter them in this software. +encounter them very often in this software. -Hint: there *was* a good use of a goto in upsd until the 1.3 series. At -this point we are back to zero gotos since that code was replaced by -another technique that doesn't need it. Legacy code ------------ +~~~~~~~~~~~ There are parts of the source tree that do not yet conform to these specs. Part of this is due to the fact that the coding style has been @@ -278,74 +286,94 @@ since then. Don't worry - it'll get cleaned up the next time something in the vicinity gets a visit. Memory leak checking --------------------- +~~~~~~~~~~~~~~~~~~~~ -I can't say enough good things about valgrind. If you do anything with +We can't say enough good things about valgrind. If you do anything with dynamic memory in your code, you need to use this. Just compile with -g and start the program inside valgrind. Run it through the suspected area and then exit cleanly. valgrind will tell you if you've done anything dodgy like freeing regions twice, reading uninitialized memory, or if you've leaked memory anywhere. - http://valgrind.kde.org/ +For more information, refer to the link:http://valgrind.kde.org[Valgrind] +project. Conclusion ----------- +~~~~~~~~~~ -The summary: please be kind to my eyes. There's a lot of stuff in here. +The summary: please be kind to our eyes. There's a lot of stuff in here, +and many people have put a lot of time and energy to improve it. Submitting patches -================== +------------------ -Patches that arrive in unified format (diff -u) as plain text with no -HTML, no attachments and a brief summary at the top are the easiest to -handle. They show the context, explain what's going on, and get saved as -one message. Everything stays together until it's time to merge. +Patches that arrive in unified format (diff -u) as plain text attachments with +no HTML and a brief summary at the top are the easiest to handle. -Patches that arrive as attachments have to be moved around as separate -files - the body of the message is one, and the patch is in another. -This is not my preferred mode of operation. +If a patch is sent to the nut-upsdev mailing list, it stands a better chance of +being seen immediately. However, it is likely to be dropped if any issues +cannot be resolved quickly. If your code might not work for others, or if it is +a large change, your best bet is to submit a +link:https://alioth.debian.org/tracker/?atid=411544&group_id=30602&func=browse[ticket on Alioth]. -When sending patches to the lists, be sure to add me as an explicit -recipient to make sure it is considered for merging. A patch which only -goes to a list is generally treated as a RFC and is relatively low -priority. +This allows us to track the patches over a longer period of time, and it is +less likely that a patch will fall through the cracks. Posting a reminder to +the developers (via the nut-upsdev list) about a patch on the tracker is fair +game. -If your mailer is brain dead and rewrites tabs into spaces, wraps your -patch body, or anything else like that, just attach the patch. I'd -rather deal with an attachment instead of a patch that has tab damage, -rewrapped lines, or worse. Patch cohesion -============== +-------------- Patches should have some kind of unifying element. One patch set is one message, and it should all touch similar things. If you have to edit 6 files to add support for neutrino detection in UPS hardware, that's fine. -However, sending one huge patch that does massive separate changes -all over the tree is not recommended. That kind of patch has to be -split up and evaluated separately, assuming I care enough to do that +However, sending one huge patch that does massive separate changes all over +the tree is not recommended. That kind of patch has to be split up and +evaluated separately, assuming the core developers care enough to do that instead of just dropping it. If you have to make big changes in lots of places, send multiple patches - one per item. -Man pages -========= +The completion touch: manual pages and device entry in HCL +---------------------------------------------------------- If you change something that involves an argument to a program or configuration file parsing, the man page is probably now out of date. -If you don't update it, I have to, and I have enough to do as it is. +If you don't update it, we have to, and we have enough to do as it is. -If you write a new driver, send in the man page when you send me the -source code for your driver. Otherwise, I will be forced to write a +If you write a new driver, send in the man page when you send us the +source code for your driver. Otherwise, we will be forced to write a skeletal man page that will probably miss many of the finer points of the driver and hardware. +The same remark goes for device entries: if you add support for new models, +remember to also complete the hardware compatibility list, present +in data/driver.list.in. This will be used to generate both textual, static +HTML and dynamic searchable HTML for the website. + +Source code management +---------------------- + +We currently use a Subversion (SVN) repository hosted at Alioth to track +changes to the NUT source code. To obtain permission to commit to the SVN +repository, you must be prepared to spend a fair amount of time contributing to +the NUT codebase. For occasional contributions over time, you may wish to +investigate one of the <<_distributed_scm_systems,distributed SCM tools>> +listed below. + +Anonymous SVN checkouts are possible: + + svn co svn://svn.debian.org/nut/trunk nut-svn-readonly + +If you change a file in the SVN working copy, you can use `svn diff` to +generate a patch to send to the nut-upsdev mailing list. + Repository etiquette and quality assurance -========================================== +------------------------------------------ Please keep the SVN trunk in working condition at all times. The trunk may be used to generate daily tarballs, and should not contain broken @@ -353,22 +381,103 @@ code if possible. If you need to commit incremental changes that leave the system in a broken state, please do so in a separate branch and merge the changes back to the trunk once they are complete. -Before committing, please remember to: +Before committing, please remember to run "make distcheck-light". This checks +that the Makefiles are not broken, that all the relevant files are distributed, +and that there are no compilation or installation errors. -* update the ChangeLog, if appropriate. Dates are listed in UTC - ("date --utc"). - -* run "make distcheck-light". This checks that the Makefiles are not - broken, that all the relevant files are distributed, and that there - are no compilation or installation errors. - -Running "make distcheck-light" is especially important if you have -added or removed files, or updated configure.in or some Makefile.am. -Remember: simply adding a file to SVN does not mean it will be -distributed. To distribute a file, you must update the corresponding -Makefile.am. +Running "make distcheck-light" is especially important if you have added or +removed files, or updated configure.in or some Makefile.am. Remember: simply +adding a file to SVN does not mean it will be distributed. To distribute a +file, you must update the corresponding Makefile.am. There is also "make distcheck", which runs an even stricter set of tests, but will not work unless you have all the optional libraries and features installed. +Distributed SCM systems +----------------------- + +Git and Mercurial (Hg) are two popular distributed SCM tools which provide a +bridge to a SVN repository. This makes it possible for a new developer to stay +synchronized with the latest changes to NUT, while keeping a local version +history of their changes before they are merged by the core NUT developers. + +A complete introduction to either Git or Mercurial is beyond the scope of this +document, but many others have written excellent tutorials on both the DSCM +tools, and their SVN interfaces. + +Git and SVN +~~~~~~~~~~~ + +The `git svn` tool synchronizes a Git repository with a +link:http://www.kernel.org/pub/software/scm/git/docs/git-svn.html[SVN repository]. + +In many cases, NUT developers will not need access to the entire repository +history - a snapshot starting at the most recent revision will work nicely: + + git svn clone --revision HEAD svn://svn.debian.org/nut/trunk nut-git + +From the resulting nut-git directory, you may use all of the Git commands to +record your changes, and even create new branches for working on different +aspects of the code. + +Git offers a little more flexibility than the `svn update` command. You may +fetch other developers' changes from SVN into your repository, but hold off on +actually combining them with your branch until you have compared the two +branches (for instance, with `gitk --all`). + +To import the new SVN revisions, simply run the following command from any +directory under your Git checkout (`nut-git` in the example above). Note that +this only changes the history stored in your repository - it does not touch +your checked-out files. + + git svn fetch + +Initially, the Git `master` branch tracks the SVN `trunk`. The `git svn` +command updates the `remotes/trunk` reference every time you run `git svn +fetch`, but it does not adjust the `master` branch automatically. To update +your master branch with new SVN revisions, you can run the following commands: + + git checkout master + git svn fetch # (optional; this gets commits other than on your current branch) + git svn rebase + +You may create as many branches as you like in your local Git repository. When +using `git svn`, the preferred way to combine your changes with SVN changes is +to use `git rebase` on your local branch. This re-applies your branch's changes +to the new SVN changes, much as though your branch were a series of patches. + +-------------------------------------------------------------------------------- + git checkout master + git branch my-new-feature + git checkout my-new-feature + + # Hack away + + git add changed-file.c + git commit + + # Someone committed something to SVN. Fetch it. + + git svn fetch + git rebase remotes/trunk +-------------------------------------------------------------------------------- + +You are encouraged to use `git rebase -i` on your private Git branches to +separate your changes into <<_patch_cohesion,logical changes>>. + +From there, you can generate patches for the Tracker, or the nut-upsdev list. + +If you are new to Git, but are familiar with SVN, the +link:http://git-scm.com/course/svn.html[following link] may be of use. + + +Mercurial and SVN +~~~~~~~~~~~~~~~~~ + +Synchronizing a Mercurial repository against the NUT SVN repository should be +similar in spirit to the Git method discussed above. +link:http://mercurial.selenic.com/wiki/WorkingWithSubversion[This wiki page] +discusses your options. + +We would welcome any feedback about this process on the nut-upsdev mailing list. diff --git a/docs/docinfo.xml b/docs/docinfo.xml new file mode 100644 index 0000000..a8650ec --- /dev/null +++ b/docs/docinfo.xml @@ -0,0 +1,10 @@ + + + 2.6.0 + 2011-01-14 + + + First release of AsciiDoc documentation for Network UPS Tools (NUT). + + + diff --git a/docs/documentation.txt b/docs/documentation.txt new file mode 100644 index 0000000..2d21868 --- /dev/null +++ b/docs/documentation.txt @@ -0,0 +1,70 @@ +ifdef::website[] +Documentation +============= +endif::website[] + +User Documentation +------------------ + +ifdef::website[] +- FAQ - Frequently Asked Questions (link:docs/FAQ.html[online]) (link:docs/FAQ.pdf[PDF]) +- NUT User Manual (link:docs/user-manual.chunked/index.html[online]) (link:docs/user-manual.pdf[PDF]) +- Cables information (link:cables.html[online]) (link:cables.pdf[PDF]) +- link:docs/man/index.html#User_man[User manual pages] +endif::website[] +ifndef::website[] +- link:../FAQ.html[FAQ - Frequently Asked Questions] +- linkdoc:user-manual[NUT user manual] +- <> +- link:../man/index.html#User_man[User manual pages] +endif::website[] + +Developer Documentation +----------------------- + +ifdef::website[] +- NUT Developer Guide (link:docs/developer-guide.chunked/index.html[online]) (link:docs/developer-guide.pdf[PDF]) +- NUT Packager Guide (link:docs/packager-guide.chunked/index.html[online]) (link:docs/packager-guide.pdf[PDF]) +- link:ups-protocols.html[UPS protocols library] +- link:docs/man/index.html#Developer_man[Developer manual pages] +- link:nut-qa.html[NUT Quality Assurance] +endif::website[] +ifndef::website[] +- linkdoc:developer-guide[NUT Developer Guide] +- linkdoc:packager-guide[NUT Packager Guide] +- link:ups-protocols.html[UPS protocols library] +- link:../man/index.html#Developer_man[Developer manual pages] +- link:nut-qa.html[NUT Quality Assurance] +endif::website[] + +Offsite Links +------------- + +[[general_powerdev_info]] +These are general information about UPS and PDU. + +- link:http://tldp.org/HOWTO/UPS-HOWTO/[UPS HOWTO] (The Linux Documentation Project) +- link:http://en.wikipedia.org/wiki/Uninterruptible_power_supply[UPS on Wikipedia] +- link:http://en.wikipedia.org/wiki/Power_distribution_unit[PDU on Wikipedia] +- link:http://www.pcguide.com/ref/power/ext/ups/over.htm[UPS on The PC Guide] + +These are writeups by users of the software. + +- link:http://www.dimat.unina2.it/LCS/MonitoraggioUpsNutUbuntu10-eng.htm[Deploying NUT on an Ubuntu 10.04 cluster] '(Stefano Angelone)' +- link:http://blog.shadypixel.com/monitoring-a-ups-with-nut-on-debian-or-ubuntu-linux[Monitoring a UPS with nut on Debian or Ubuntu Linux] '(Avery Fay)' +- link:http://linux.developpez.com/cours/upsusb/[Installation et gestion d'un UPS USB en réseau sous linux] '(Olivier Van Hoof, french)' +- link:http://boxster.ghz.cc/projects/nut/wiki/NutOnMacOSX[Network UPS Tools (NUT) on Mac OS X (10.4.10)] '(Andy Poush)' +- link:http://www.llondel.org/ups.shtml[Interfacing a Contact-Closure UPS to Mac OS X and Linux] '(David Hough)' +- link:http://fedoranews.org/contributors/kazutoshi_morioka/nut/[How to use UPS with nut on RedHat / Fedora Core] '(Kazutoshi Morioka)' +- link:http://people.freebsd.org/~thierry/nut_FreeBSD_HowTo.txt[FreeBSD installation procedure] '(Thierry Thomas, from FreeBSD)' +- link:http://www.usebox.net/jjm/ups-obsd/[Gestionando un SAI desde OpenBSD con NUT] '(Juan J. Martinez, spanish)' +- link:http://forums.gentoo.org/viewtopic-p-2663684.html[HOWTO: MGE Ellipse 300 on gentoo] '(nielchiano)' +- link:http://deschis.blogspot.com/2006/07/cum-se-configureaz-un-ups-apollo-seria.html[Cum se configurează un UPS Apollo seria 1000F pe Linux] '(deschis, Romanian)' +- link:http://buffalo.nas-central.org/wiki/Install_a_UPS_%28nut%29[Install a UPS (nut) on a Buffalo NAS] '(various authors)' +- link:http://blog.pointbre.com/2903/nutnetwork-ups-tool-korean-guidebook.html[NUT Korean GuideBook] '(PointBre)' + +News articles and Press releases +-------------------------------- + +- link:http://www.crn.com/white-box/199000818?pgno=1[Linux UPS Without Tears] '(A. Lizard)' +- link:http://networking.earthweb.com/netsysm/article.php/10954_3295841_1[Graceful UPS shutdowns on Linux] '(Carla Schroder)' diff --git a/docs/download.txt b/docs/download.txt new file mode 100644 index 0000000..c551902 --- /dev/null +++ b/docs/download.txt @@ -0,0 +1,117 @@ +Download information +==================== + +This section presents the different methods to download NUT. + +Source code +----------- + +[NOTE] +================================================================================ +You should always use PGP/GPG to verify the signatures before using any source code. + +You can use the +ifdef::website[] +link:docs/user-manual.chunked/ar01s09.html#verifySourceSig[following procedure] +endif::website[] +ifndef::website[] +- Else, you can read the <>. +endif::website[] +to do so. +================================================================================ + +Stable tree: 2.6 +~~~~~~~~~~~~~~~~ + +link:http://www.networkupstools.org/source/2.6/nut-2.6.0.tar.gz[nut-2.6.0.tar.gz] +link:http://www.networkupstools.org/source/2.6/nut-2.6.0.tar.gz.sig[signature] +link:http://www.networkupstools.org/source/2.6/new-2.6.0.txt[release notes] +link:http://www.networkupstools.org/source/2.6/ChangeLog[ChangeLog] + +You can also browse the link:http://www.networkupstools.org/source/2.6/[stable source directory]. + + +Testing tree: 2.6.x-pre +~~~~~~~~~~~~~~~~~~~~~~~ + +There is currently no testing release. + + +Development tree: 2.7 +~~~~~~~~~~~~~~~~~~~~~ + +Code repository +^^^^^^^^^^^^^^^ + +The development tree is available through a Subversion repository hosted on the +link:http://alioth.debian.org/[Debian Alioth server]. + +To retrieve the current development tree, use the following command: + + $ svn co svn://svn.debian.org/nut/trunk + +To generate the build scripts, you must call, from the 'trunk' directory: + + $ ./autogen.sh + +Then refer to the +ifdef::website[] +link:docs/user-manual.chunked/index.html[NUT user manual] +endif::website[] +ifndef::website[] +linkdoc:user-manual[NUT user manual] +endif::website[] + for more information. + +NOTE: Users that need the latest developments to support new devices *must* +use <>. + +Browse code +^^^^^^^^^^^ + +You can also browse the code with link:http://svn.debian.org/wsvn/nut/trunk/?rev=0&sc=0[WebSvn]. + +Or through the link:http://boxster.ghz.cc/projects/nut[Trac mirror], +kindly hosted and maintained by Charles Lepple. + +[[Snapshots]] +Snapshots +^^^^^^^^^ + +The latest Subversion developments are available through link:http://buildbot.networkupstools.org/public/nut/waterfall?branch=trunk&builder=Debian-etch-x86&reload=none[snapshots on the Buildbot]. +Look for the latest *[tarball]* link on the top of the page. + +Older versions +~~~~~~~~~~~~~~ + +link:http://www.networkupstools.org/source/[Browse source directory] + + +Binary packages +--------------- + +NOTE: The only official releases from this project are source code. + +NUT is already available in the following systems: + +- Linux: +link:http://aur.archlinux.org/packages.php?ID=5379[Arch Linux], +link:http://packages.debian.org/nut[Debian], +link:http://packages.gentoo.org/package/sys-power/nut[Gentoo Linux], +Mandriva, +link:https://admin.fedoraproject.org/pkgdb/acls/name/nut[Red Hat / Fedora], +link:http://software.opensuse.org/search[Novell Suse / openSUSE], +link:https://forum.openwrt.org/viewtopic.php?id=26269[OpenWrt] +link:http://packages.ubuntu.com/nut[Ubuntu]. + +- BSD systems: +link:http://www.FreeBSD.org/cgi/ports.cgi?query=^nut-&stype=name[FreeBSD], +link:ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/sysutils/ups-nut/README.html[NetBSD], +link:http://www.openbsd.org/cgi-bin/cvsweb/ports/sysutils/nut/[OpenBSD]. + +- Mac OS X: +link:http://pdb.finkproject.org/pdb/package.php/nut[Fink], +link:http://trac.macports.org/browser/trunk/dports/sysutils/nut/Portfile[MacPorts] + +- Windows (client side only): +link:http://csociety.ecn.purdue.edu/~delpha/winnut/[WinNUT] diff --git a/docs/features.txt b/docs/features.txt new file mode 100644 index 0000000..5e49483 --- /dev/null +++ b/docs/features.txt @@ -0,0 +1,239 @@ +Features +======== + +NUT provides many features, and is always improving. +Thus this list may lag behind the current code. + +Features frequently appear during the development cycles, so be sure to look at +the link:http://www.networkupstools.org/download.html[release notes and change logs] +to see the latest additions. + +//////////////////////////////////////////////////////////////////////////////// +*FIXME* statement that NUT is *the* de facto standard on Opensource system. +all Linux distributors have standardized the Power Devices support using NUT. +More and more appliances manufacturers are bundling NUT... +=> add an Appendix NUT Device Integration in the User Manual +//////////////////////////////////////////////////////////////////////////////// + +Multiple manufacturer and device support +---------------------------------------- + +- Monitors many UPS, PDU and SCD models from more than 100 manufacturers with a +unified interface (link:stable-hcl.html[Hardware Compatibility List]). + +- Various communication types are supported with the same common interface: + * serial, + * USB, + * network (SNMP, Eaton / MGE XML/HTTP). + +Multiple architecture support +----------------------------- + +- Cross-platform - different flavors of Unix can be managed together with a +common set of tools, even crossing architectures. + +- This software has been reported to run on Linux distributions, the BSDs, Apple's +OS X, Solaris, IRIX, HP/UX, Tru64 Unix, and AIX. + +- Windows users may be able to build it directly with Cygwin. +There is also a port of the client-side monitoring to Windows called WinNUT. + +- Your system will probably run it too. You just need a good C compiler and +possibly some more packages to gain access to the serial ports. +Other features, such as USB / SNMP / whatever, will also need extra software +installed. + +Layered and modular design with multiple processes +-------------------------------------------------- + +- Three layers: drivers, server, clients. + +- Drivers run on the same host as the server, and clients communicate with the +server over the network. + +- This means clients can monitor any UPS anywhere as long as there is a network +path between them. + +WARNING: Be sure to plug your network's physical hardware (switches, hubs, +routers, bridges, ...) into the UPS! + + +//////////////////////////////////////////////////////////////////////////////// +*FIXME* to be removed? + +- This has also allowed us to create easily the Power Management integration. + +=== Power Management integration === + +- Thanks to its modular design, NUT can feed data to the FreeDesktop Hardware Abstraction Layer (HAL).[[BR]] + This allow a seemless integration of USB UPSs, at a small cost (around 200 Kb), reusing the standard Power Management GUIs and providing to users a full Plug & Play system. + +- The added bonus is that this is the best Power Management existing, surpassing the one that exist on Windows and Mac OS, both in terms of devices supported and of features. +//////////////////////////////////////////////////////////////////////////////// + +Redundancy support - Hot swap/high availability power supplies +-------------------------------------------------------------- + +- upsmon can handle high-end servers which receive power from multiple UPSes +simultaneously. + +- upsmon won't initiate a shutdown until the total power situation across all +source UPSes becomes critical (on battery and low battery). + +- You can lose a UPS completely as long as you still have at least the minimum +number of sources available. The minimum value is configurable. + +Security and access control +--------------------------- + +- Manager functions are granted with per-user granularity. The admin can have +full powers, while the admin's helper can only do specific non-destructive tasks +such as a battery test. + +- The drivers, server, and monitoring client (upsmon) can all run as separate +user IDs if this is desired for privilege separation. + +- Only one tiny part of one program has root powers. +upsmon starts as root and forks an unprivileged process which does the actual +monitoring over the network. +They remain connected over a pipe. When a shutdown is necessary, a single +character is sent to the privileged process. It then calls the predefined +shutdown command. In any other case, the privileged process exits. +This was inspired by the auth mechanism in Solar Designer's excellent popa3d. + +- The drivers and network server may be run in a chroot jail for further +security benefits. This is supported directly since version 1.4 and beyond with +the 'chroot=' configuration directive. + +- IP-based access control relies on the local firewall and +link:http://en.wikipedia.org/wiki/TCP_Wrapper[TCP Wrapper]. + +- SSL is available as a build option ("--with-ssl"). +It encrypts sessions with upsd and can also be used to authenticate servers. + +Web-based monitoring +-------------------- + +- Comes stock with CGI-based web interface tools for UPS monitoring and +management, including graphical status displays. + +- Custom status web pages may be generated with the CGI programs, since they use +templates to create the pages. This allows you to have status pages which fit +the look and feel of the rest of your site. + +Free software +------------- + +- That's free beer and free speech. Licensed under the GNU General Public +License version 2 or later. + +- Know your systems - all source code is available for inspection, so there are +no mysteries or secrets in your critical monitoring tools. + +UPS management and control +-------------------------- + +- Writable variables may be edited on higher end equipment for local customizations + +- Status monitoring can generate notifications (email/pager/SMS/...) on alert conditions + +- Alert notices may be dampened to only trigger after a condition persists. This +avoids the usual pager meltdown when something happens and no delay is used. + +- Maintenance actions such as battery runtime calibration are available where +supported by the UPS hardware. + +- Power statistics can be logged in custom formats for later retrieval and analysis + +- All drivers are started and stopped with one common program. Starting one is +as easy as starting ten: 'upsdrvctl start'. + +- Shutdowns and other procedures may be tested without stressing actual UPS +hardware by simulating status values with the dummy-ups pseudo-driver. Anything +which can happen in a driver can be replicated with dummy-ups. + +Monitoring diagrams +------------------- + +These are the most common situations for monitoring UPS hardware. Other ways are +possible, but they are mostly variants on these four. + +NOTE: these examples show serial communications for simplicity, but USB or SNMP +or any other monitoring is also possible. + +"Simple" configuration +~~~~~~~~~~~~~~~~~~~~~~ + +image:images/simple.png[] + +One UPS, one computer. This is also known as "Standalone" configuration. + +This is the configuration that most users will use. You need at least a driver, +upsd, and upsmon running. + +"Advanced" configuration +~~~~~~~~~~~~~~~~~~~~~~~~ + +image:images/advanced.png[] + +One UPS, multiple computers. Only one of them can actually talk to the UPS +directly. That's where the network comes in. The Master system runs the driver, +upsd, and upsmon in master mode. The Slave systems only run upsmon in slave mode. + +This is useful when you have a very large UPS that's capable of running multiple +systems simultaneously. There is no longer the need to buy a bunch of individual +UPSes or "sharing" hardware, since this software will handle the sharing for you. + +//////////////////////////////////////////////////////////////////////////////// +*FIXME* remainder +=== One UPS, many clients === + +- Multiple systems may monitor a single UPS using only their network connections - no special "UPS sharing" hardware is required. + +- "Slave and master" monitoring design synchronizes shutdowns so that slaves can bring down their operating systems cleanly before the master switches off the power. + +=== Many UPSes, many clients === + +- Each upsd process can serve status data for multiple UPSes to many clients. + +- Each upsmon process can monitor multiple UPSes for status data. + +//////////////////////////////////////////////////////////////////////////////// + +"Big Box" configuration +~~~~~~~~~~~~~~~~~~~~~~~ + +image:images/bigbox.png[] + +Some systems have multiple power supplies and cords. You typically find this on +high-end servers that allow hot-swap and other fun features. In this case, you +run multiple drivers (one per UPS), a single upsd, and a single upsmon (as +master for both UPS 1 and UPS 2) + +This software understands that some of these servers can also run with some of +the supplies gone. For this reason, every UPS is assigned a "power value" - the +quantity of power supplies that it feeds on a system. +The total available "power value" is compared to the minimum that is required +for that hardware. For example, if you have 3 power supplies and 3 UPSes, but +only 2 supplies must be running at any given moment, the minimum would be 2. +This means that you can safely lose any one UPS and the software will handle it +properly by remaining online. + +"Bizarre" configuration +~~~~~~~~~~~~~~~~~~~~~~~ + +image:images/bizarre.png[] + +You can even have a UPS that has the serial port connected to a system that it's +not feeding. Sometimes a PC will be close to a UPS that needs to be monitored, +so it's drafted to supply a serial port for the purpose. This PC may in fact be +getting power from some other UPS. This is not a problem. + +The first system ("mixed") is a Master for UPS 1, but is only monitoring UPS 2. +The other systems are Slaves of UPS 2. + +Image credits +------------- + +Thanks to Luc Descotils and Arnaud Quette at Eaton for providing shiny +cleaned-up graphics. diff --git a/docs/hid-subdrivers.txt b/docs/hid-subdrivers.txt index fe5b621..b625b02 100644 --- a/docs/hid-subdrivers.txt +++ b/docs/hid-subdrivers.txt @@ -1,10 +1,8 @@ -Desc: How to make a new subdriver to support another USB/HID UPS -File: hid-subdrivers.txt -Date: 08 January 2007 -Auth: Peter Selinger +How to make a new subdriver to support another USB/HID UPS +---------------------------------------------------------- Overall concept -=============== +~~~~~~~~~~~~~~~ USB (Universal Serial Port) devices can be divided into several different classes (audio, imaging, mass storage etc). Almost all UPS @@ -15,7 +13,7 @@ for reading and writing information (such as x/y coordinates and button states, in case of a mouse, or voltages and status information, in case of a UPS). -The Nut "usbhid-ups" driver is a meta-driver that handles all HID UPS +The NUT "usbhid-ups" driver is a meta-driver that handles all HID UPS devices. It consists of a core driver that handles most of the work of talking to the USB hardware, and several sub-drivers to handle specific UPS manufacturers (MGE, APC, and Belkin are currently @@ -31,7 +29,7 @@ add support for such a device, read new-drivers.txt and see the tripplite_usb driver for inspiration. HID Usage Tree -============== +~~~~~~~~~~~~~~ From the point of view of writing a HID subdriver, a HID device consists of a bunch of variables. Some variables (such as the current @@ -44,14 +42,17 @@ for a typical APC device. Variable components are separated by ".". Typical values for each variable are also shown for illustrative purposes. -UPS.Battery.Voltage 11.4 V -UPS.Battery.ConfigVoltage 12 V -UPS.Input.Voltage 117 V -UPS.Input.ConfigVoltage 120 V -UPS.AudibleAlarmControl 2 (=enabled) -UPS.PresentStatus.Charging 1 (=yes) -UPS.PresentStatus.Discharging 0 (=no) -UPS.PresentStatus.ACPresent 1 (=yes) +[width="35%"] +|================================================ +|UPS.Battery.Voltage | 11.4 V +|UPS.Battery.ConfigVoltage | 12 V +|UPS.Input.Voltage | 117 V +|UPS.Input.ConfigVoltage | 120 V +|UPS.AudibleAlarmControl | 2 (=enabled) +|UPS.PresentStatus.Charging | 1 (=yes) +|UPS.PresentStatus.Discharging | 0 (=no) +|UPS.PresentStatus.ACPresent | 1 (=yes) +|================================================ As you can see, variables that describe the battery status might be grouped together under "Battery", variables that describe the input @@ -78,10 +79,11 @@ strings, but as numbers (called "usages" in HID terminology). These numbers are defined in the "HID Usage Tables", available from http://www.usb.org/developers/hidpage/. The standard usages for UPS devices are defined in a document called "Usage Tables for HID Power -Devices". +Devices" (the Power Device Class [PDC] specification). -For example, +For example: +-------------------------------------------------------------------------------- 0x00840010 = UPS 0x00840012 = Battery 0x00840030 = Voltage @@ -89,25 +91,28 @@ For example, 0x0084001a = Input 0x0084005a = AudibleAlarmControl 0x00840002 = PresentStatus - 0x00850044 = Charging + 0x00850044 = Charging 0x00850045 = Discharging 0x008500d0 = ACPresent +-------------------------------------------------------------------------------- -Thus, the above usage tree is internally represented as +Thus, the above usage tree is internally represented as: -00840010.00840012.00840030 -00840010.00840012.00840040 -00840010.0084001a.00840030 -00840010.0084001a.00840040 -00840010.0084005a -00840010.00840002.00850044 -00840010.00840002.00850045 -00840010.00840002.008500d0 +-------------------------------------------------------------------------------- + 00840010.00840012.00840030 + 00840010.00840012.00840040 + 00840010.0084001a.00840030 + 00840010.0084001a.00840040 + 00840010.0084005a + 00840010.00840002.00850044 + 00840010.00840002.00850045 + 00840010.00840002.008500d0 +-------------------------------------------------------------------------------- To make matters worse, most manufacturers define their own additional usages, even in cases where standard usages could have been used. for -example Belkin defines 00860040 = ConfigVoltage (which is incidentally -a violation of the USB specification, as 00860040 is reserved for +example Belkin defines `00860040` = ConfigVoltage (which is incidentally +a violation of the USB PDC specification, as `00860040` is reserved for future use). Thus, subdrivers generally need to provide: @@ -120,8 +125,9 @@ such as custom implementations of specific instant commands (load.off, shutdown.restart), and conversions of manufacturer specific data formats. + Writing a subdriver -=================== +~~~~~~~~~~~~~~~~~~~ In preparation for writing a subdriver for a device that is currently unsupported, run usbhid-ups with the following command line: @@ -143,7 +149,7 @@ CUSTOMIZATION below). Use the script as follows: - scripts/subdriver/path-to-subdriver.sh < /tmp/info + scripts/subdriver/path-to-subdriver.sh < /tmp/info where /tmp/info is the file where you previously saved the debugging information. @@ -168,16 +174,22 @@ attempts to monitor some UPS variables. To make this driver useful, you must examine the NUT variables of the form "unmapped.*" in the hid_info_t data structure, and map them to actual NUT variables and instant commands. There are currently no step-by-step instructions for -how to do this. Please look at the files +how to do this. Please look at the files to see how the currently implemented +subdrivers are written.: -mge-hid.c/h -apc-hid.c/h -belkin-hid.c/h +- apc-hid.c/h +- belkin-hid.c/h +- cps-hid.c/h +- explore-hid.c/h +- libhid.c/h +- liebert-hid.c/h +- mge-hid.c/h +- powercom-hid.c/h +- tripplite-hid.c/h -to see how the currently implemented subdrivers are written. Shutting down the UPS -===================== +~~~~~~~~~~~~~~~~~~~~~ It is desireable to support shutting down the UPS. Usually (for devices that follow the HID Power Device Class specification), this @@ -191,31 +203,31 @@ commands to the UPS in response to sending one NUT command to the driver, this is handled by the driver. In order to make this work, you need to define the following four NUT values: - ups.delay.start (variable, R/W) - ups.delay.shutdown (variable, R/W) - load.off.delay (command) - load.on.delay (command) + ups.delay.start (variable, R/W) + ups.delay.shutdown (variable, R/W) + load.off.delay (command) + load.on.delay (command) If the UPS supports it, the following variables can be used to show the countdown to start/shutdown: - ups.timer.start (variable, R/O) - ups.timer.shutdown (variable, R/O) + ups.timer.start (variable, R/O) + ups.timer.shutdown (variable, R/O) -The 'load.on' and 'load.off' commands will be defined implicitly by +The `load.on` and `load.off` commands will be defined implicitly by the driver (using a delay value of '0'). Define these commands yourself, if your UPS requires a different value to switch on/off the load without delay. -Note that the driver expects the 'load.off.delay' and 'load.on.delay' +Note that the driver expects the `load.off.delay` and `load.on.delay` to follow the HID Power Device Class specification, which means that -the 'load.on.delay' command should NOT switch on the load in the +the `load.on.delay` command should NOT switch on the load in the absence of mains power. If your UPS switches on the load regardless of the mains status, DO NOT define this command. You probably want to -define the 'shutdown.return' and/or 'shutdown.stayoff' commands in +define the `shutdown.return` and/or `shutdown.stayoff` commands in that case. Commands defined in the subdriver will take precedence over the ones that are composed in the driver. When running the driver with the '-k' flag, it will first attempt to -send a 'shutdown.return' command and if that fails, will fallback to -'shutdown.reboot'. +send a `shutdown.return` command and if that fails, will fallback to +`shutdown.reboot`. diff --git a/docs/history.txt b/docs/history.txt new file mode 100644 index 0000000..da66cec --- /dev/null +++ b/docs/history.txt @@ -0,0 +1,335 @@ +ifdef::website[] +Project history +=============== +endif::website[] + +This page is an attempt to document how everything came together. + +The Network UPS Tools team would like to warmly thank Russell Kroll. + +Russell initially started this project, maintaining and improving it for +over 8 years (1996 - mid 2005). + +Prototypes and experiments +-------------------------- + +May 1996: early status hacks +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +APC's Powerchute was running on kadets.d20.co.edu (a BSD/OS box) with +SCO binary emulation. Early test versions ran in cron, pulled status +from the log files and wrote them to a .plan file. You could see the +results by fingering `pwrchute@kadets.d20.co.edu` while it lasted: + +------------------------------------------------------------------------ + + Last login Sat May 11 21:33 (MDT) on ttyp0 from intrepid.rmi.net + Plan: + Welcome to the UPS monitor service at kadets.d20.co.edu. + The Smart-UPS attached to kadets generated a report at 14:24:01 on 05/17/96. + During the measured period, the following data points were taken: + Voltage ranged from 115.0 VAC to 116.3 VAC. + The UPS generated 116.3 VAC at 60.00 Hz. + The battery level was at 27.60 volts. + The load placed on the UPS was 024.9 percent. + UPS temperature was measured at 045.0 degrees Celsius. + Measurements are taken every 10 minutes by the upsd daemon. + This report is generated by a script written by Russell Kroll. + Modified for compatibility with the BSD/OS cron daemon by Neil Schroeder + +------------------------------------------------------------------------ + +This same status data could also be seen with a web browser, since we +had rigged up a CGI wrapper script which called finger. + + +January 1997: initial protocol tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Initial tests with a freestanding non-daemon program provided a few +basic status registers from the UPS. The 940-0024C cable was not yet +understood, so this happened over the [attachment:apcevilhack.jpg evil +two-wire serial hack]. + +------------------------------------------------------------------------ + Communicating with SMART-UPS 700 S/N WS9643050926 [10/17/96] + Input voltage range: 117.6 VAC - 118.9 VAC + Load is 010.9% of capacity, battery is charged to 100.0% of capacity +------------------------------------------------------------------------ + +Note that today's apcsmart driver still displays the serial number when +it starts, since it is derived from this original code. + +September 1997: first client/server code +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The first split daemon/client code was written. upsd spoke directly to +the UPS (APC Smart models only) and communicated with upsc by sending +binary structures in UDP datagrams. + +The first CGI interface existed, but it was all implemented with shell +scripts. The main script would call upsc to retrieve status values. Then +it would cat a template file through sed to plug them into the page. + +image::images/old-cgi.png[Old CGI screenshot] + +upsstats actually has since returned to using templates, despite having +a period in the middle when it used hardcoded HTML. + +The images were also created with shell scripts. Each script would call +upsc to get the right value (utility, upsload, battcap). It then took +the value, plugged it into a command file with sed, and passed that into +'fly', a program which used an interpreted language to create images. +fly actually uses gd, just like upsimage does today. + +This code later evolved into Smart UPS Tools 0.10. + +Smart UPS Tools +--------------- + +March 1998: first public release +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Version 0.10 was released on March 10, 1998. It used the same design as +the pre-release prototype. This made expansion difficult as the binary +structure used for network communications would break any time a new +variable was added. Due to byte-ordering and struct alignment issues, +the code usually couldn't talk over the network to a system with a +different architecture. It was also hopelessly bound to one type of UPS +hardware. + +Five more releases followed with this design followed. The last was +0.34, released October 27, 1998. + +June 1999: Redesigned, rewritten +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Following a long period of inactivity and two months of prerelease +testing versions, 0.40.0 was released on June 5, 1999. It featured a +complete redesign and rewrite of all of the code. The layering was now +in three pieces, with the single driver (smartups) separate from the +server (upsd). + +Clients remained separate as before and still used UDP to talk to the +server, but they now used a text-based protocol instead of the brittle +binary structs. A typical request like "REQ UTILITY" would be answered +with "ANS UTILITY 120.0". + +The ups-trust425-625 driver appeared shortly after the release of +0.40.0, marking the first expansion beyond APC hardware. + +Over the months that followed, the backupspro driver would be forked +from the smartups driver to handle the APC Back-UPS Pro line. Then the +backups driver was written to handle the APC Back-UPS contact-closure +models. These drivers would later be renamed and recombined, with +smartups and backupspro becoming apcsmart, and backups became genericups. + +The drivers stored status data in an array. At first, they passed this data to +upsd by saving it to a file. upsd would reread this file every few seconds to +keep a copy for itself. This was later expanded to allow shared memory mode, +where only a stub would remain on the disk. The drivers and server then passed +data through the shared memory space. + +upsd picked up the ability to monitor multiple drivers on the system, and the +"upsname@hostname" scheme was born. Access controls were added, and then the +network code was expanded to allow TCP communications, which at this point were +on port 3305. + + +Network UPS Tools +----------------- + +September 1999: new name, new URL +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Several visitors to the web page and subscribers to the mailing lists provided +suggestions to rename the project. The old name no longer accurately described +it, and it was perilously close to APC's "Smart-UPS" trademark. Rather than risk +problems in the future, the name was changed. Kern Sibbald provided the winner: +Network UPS Tools, which captures the essence of the project and makes for great +short tarball filenames: nut-x.y.z.tar.gz. + +The new name was first applied to 0.42.0, released October 31, 1999. This is +also when the web pages moved from the old `http://www.exploits.org/~rkroll/smartupstools/` +URL to the replacement at `http://www.exploits.org/nut/` to coincide with the +name change. + +More drivers were written and the hardware support continued to grow. upsmon +picked up the concepts of "master" and "slave", and could now handle +environments where multiple systems get power from a single UPS. Manager mode +was added to allow changing the value of read/write variables in certain UPS +models. + +June 2001: common driver core +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Up to this point, all of the drivers compiled into freestanding programs, each +providing their own implementation of main(). This meant they all had to check +the incoming arguments and act uniformly. Unfortunately, not all of the programs +behaved the same way, and it was hard to document and use consistently. It also +meant that startup scripts had to be edited depending on what kind of hardware +was attached. + +Starting in 0.45.0, released June 11, 2001, there was a new common core for all drivers called main.c. It provided the main function and called back to the upsdrv_* functions provided by the hardware-specific part of the drivers. This allowed driver authors to focus on the UPS hardware without worrying about the housekeeping stuff that needs to happen. + +This new design provided an obvious way to configure drivers from one file, and ups.conf was born. This eventually spawned upsdrvctl, and now all drivers based on this common core could be started or stopped with one command. Startup scripts now could contain "upsdrvctl start", and it didn't matter what kind of hardware or how many UPSes you had on one system. + +Interestingly, at the end of this month, Arnaud Quette entered the UPS world, as a subcontractor of the now defunct MGE UPS SYSTEMS. +This marks the start of a future successful collaboration. + +May 2002: casting off old drivers, IANA port, towards 1.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +During the 0.45.x series, both the old standalone drivers and the ones which had been converted to the common core were released together. Before the release of 0.50.0 on May 24, 2002, all of the old drivers were removed. While this shrank the list of supported hardware, it set the precedent for removing code which isn't receiving regular maintenance. The assumption is that the code will be brought back up to date by someone if they actually need it. Otherwise, it's just dead weight in the tree. + +This change meant that all drivers could be controlled with upsdrvctl and ups.conf, allowing the documentation to be greatly simplified. There was no longer any reason to say "do this, unless you have this driver, then do this". + +IANA granted an official port number to the project, and the network code switched to port 3493. It had previously been on 3305 which is assigned to odette-ftp. 3305 was probably picked in 1997 because it was the fifth project to spawn from some common UDP server code. + +After 0.50.1, the 0.99 tree was created to provide a tree which would receive nothing but bug fixes in preparation for the release of 1.0. As it turned out, very few things required fixing, and there were only three releases in this tree. + +Leaving 0.x territory +--------------------- + +August 2002: first stable tree: NUT 1.0.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +After nearly 5 years of having a 0.x version number, 1.0.0 was released on August 19, 2002. This milestone meant that all of the base features that you would expect to find were intact: good hardware support, a network server with security controls, and system shutdowns that worked. + +The design was showing signs of wear from the rapid expansion, but this was intentionally ignored for the moment. The focus was on getting a good version out that would provide a reasonable base while the design issues could be addressed in the future, and I'm confident that we succeeded. + +November 2002: second stable tree: NUT 1.2.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +One day after the release of 1.0.0, 1.1.0 started the new development tree. During that development cycle, the CGI programs were rewritten to use templates instead of hard-coded HTML, thus bringing back the flexibility of the original unreleased prototype from 5 years before. multimon was removed from the tree, as the new upsstats could do both jobs by loading different templates. + +A new client library called upsclient was created, and it replaced upsfetch. This new library only supported TCP connections, and used an opaque context struct to keep state for each connection. As a result, client programs could now do things that used multiple connections without any conflicts. This was done primarily to allow OpenSSL support, but there were other benefits from the redesign. + +upsd and the clients could now use OpenSSL for basic authentication and encryption, but this was not included by default. This was provided as a bonus feature for those users who cared to read about it and enable the option, as the initial setup was complex. + +After the 1.1 tree was frozen and deemed complete, it became the second stable tree with the release of 1.2.0 on November 5, 2002. + +April 2003: new naming scheme, better driver glue, and an overhauled protocol +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Following an extended period with no development tree, 1.3.0 got things moving again on April 13, 2003. The focus of this tree was to rewrite the driver-server communication layer and replace the static naming scheme for variables and commands. + +Up to this point, all variables had names like STATUS, UTILITY, and OUTVOLT. They had been created as drivers were added to the tree, and there was little consistency. For example, it probably should have been INVOLT and OUTVOLT, but there was no OUTVOLT originally, so UTILITY was all we had. This same pattern repeated with ACFREQ - is it incoming or outgoing? - and many more. + +To solve this problem, all variables and commands were renamed to a hierarchical scheme that had obvious grouping. STATUS became ups.status. UTILITY turned into input.voltage, and OUTVOLT is output.voltage. ACFREQ is input.frequency, and the new output.frequency is also now supported. Every other variable or command was renamed in this fashion. + +These variables had been shared between the drivers and upsd as values. That is, for each name like STATUS, there was a #define somewhere in the tree with an INFO_ prefix that gave it a number. INFO_STATUS was 0x0006, INFO_UTILITY was 0x0004, and so on, with each name having a matching number. This number was stored in an int within a structure which was part of the array that was either written to disk or shared memory. + +That structure had several restrictions on expansion and was dropped as the data sharing method between the drivers and the server. It was replaced by a new system of text-based messages over Unix domain sockets. Drivers now accepted a short list of commands from upsd, and would push out updates asynchronously. upsd no longer had to poll the state files or shared memory. It could just select all of the driver and client fds and act on events. + +At the same time, the network protocol on port 3493 was overhauled to take advantage of the new naming scheme. The existing "REQ STATUS@su700", "ANS STATUS@su700 OL" scheme was showing signs of age, and it really only supported the UPS name (@su700) as an afterthought. The new protocol would now use commands like GET and LIST, leading to exchanges like "GET VAR su700 ups.status" and "VAR su700 ups.status OL". The responses contain enough data to stand alone, so clients can now handle them asynchronously. + +July 2003: third stable tree: NUT 1.4.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +On July 25, 2003, 1.4.0 was released. It contained support for both the old "REQ" style protocol (with names like STATUS), and the new "GET" style protocol (with names like ups.status). This tree is provided to bridge the gap between all of the old releases and the upcoming 2.0. + +2.0 will be released without support for the old REQ/STATUS protocol. The hope is that client authors and those who have implemented their own monitoring software will use the 1.4 cycle to change to the new protocol. The 1.4 releases contain a lot of compatibility code to make sure both work at the same time. + +July 2003: pushing towards 2.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1.5.0 forked from 1.4.0 and was released on July 29, 2003. The first changes were to throw out anything which was providing compatibilty with the older versions of the software. This means that 1.5 and the eventual 2.0 will not talk to anything older than 1.4. + +This tree continues to evolve with new serial routines for the drivers which are intended to replace the aging upscommon code which dates back to the early 0.x releases. The original routines would call alarm and read in a tight loop while fetching characters. The new functions are much cleaner, and wait for data with select. This makes for much cleaner code and easier strace/ktrace logs, since the number of syscalls has been greatly reduced. + +There has also been a push to make sure the data from the UPS is well-formed and is actually usable before sending updates out to upsd. This started during 1.3 as drivers were adapted to use the dstate functions and the new variable/command names. Some drivers which were not converted to the new naming scheme or didn't do sanity checks on the incoming UPS data from the serial port were dropped from the tree. + +This tree was released as 2.0.0. + +networkupstools.org +------------------- + +November 2003: a new URL +~~~~~~~~~~~~~~~~~~~~~~~~ + +The bandwidth demands of a project like this have slowly been forcing me to offload certain parts to other servers. The download links have pointed offsite for many months, and other large things like certain UPS protocols have followed. As the traffic grows, it's clear that having the project attached to exploits.org is not going to work. + +The solution was to register a new domain and set up mirrors. There are two initial web servers, with more on the way. The main project URL has changed from `http://www.exploits.org/nut/` to http://www.networkupstools.org. The actual content is hosted on various mirrors which are updated regularly with rsync, so the days of dribbling bits through my DSL should be over. + +This is also when all of the web pages were redesigned to have a simpler look with fewer links on the left side. The old web pages used to have 30 or more links on the top page, and most of them vanished when you dropped down one level. The links are now constant on the entire site, and the old links now live in their own groups in separate directories. + +Second major version +-------------------- + +March 2004: NUT 2.0.0 +~~~~~~~~~~~~~~~~~~~~~ + +NUT 2.0.0 arrived on March 23, 2004. The jump to version 2 shows the difference +in the protocols and naming that happened during the 1.3 and 1.5 development +series. 2.0 no longer ships with backwards compatibility code, so it's smaller +and cleaner than 1.4. + + +The change of leadership +------------------------ + +February 2005: NUT 2.0.1 +~~~~~~~~~~~~~~~~~~~~~~~~ + +The year 2004 was marked by a release slowdown, since Russell was busy with +personal subjects. But the patches queue was still growing quickly. + +At that time, the development process was still centralized. There was no +revision control system (like the current Subversion repository), nor trackers +to interact with NUT development. +Russell was receiving all the patches and requests, and doing all the work on +his own, including releases. + +Russell was more and more thinking about giving the project leadership to +Arnaud Quette, which finally happened with the 2.0.1 release in February 2005. + +This marked a new era for NUT... + +First, Arnaud aimed at opening up the development by creating a project on the +http://www.debian.org/[Debian] http://alioth.debian.org/projects/nut/[Alioth Forge]. +This allowed to build the team of hackers that Russell dreamed about. +It also allows to ensure NUT's continuation, whatever happens to +the leader. And that would most of all boost the projects contributions. + + +//////////////////////////////////////////////////////////////////////// +*sandbox* + +TO BE COMPLETED + ADD A LINK TO IDEA / FUTURE + +link on the team + history + +mention: +- MGE supporting officially, +- USB / SNMP / XML drivers (first non serial drivers), +- Power Management (HAL) bridging, +- PDU support, +- perl / python support... +- client history and evolution (wmnut: 01/01/2002) + +release history +
  • July 7, 2008: Client activity: new client NUT-Monitor +
  • June 27, 2008: Client activity: new Python class PyNUT +
  • June 19, 2008: Client activity: KNutClient 0.9.4 +
  • May 7, 2008: 2.2.2 released +
  • December 21, 2007: 2.2.1 released +
  • August 31, 2007: Client activity: UPS Monitor link update +
  • August 31, 2007: Client activity: Windows NUT client 1.5.0 +
  • July 5, 2007: 2.2.0 released +
  • June 5, 2007: Client activity: collectd NUT plugin +
  • April 10, 2007: Client activity: KNutClient 0.9.3 +
  • January 15, 2007: 2.0.5 released +
  • January 8, 2007: Client activity: Windows NUT client +cJpoL9iz}h-UHx#g zI-H;`7(OmfXbryuCvttxN)-W~LPy9Yl~aFp%zjZoDyyt4P;u_!=i|8i@&4SYF&}-P z%vCt~ygmfbC>#%ctQlBMq3?Ow>5%4JWj-6}fxt{TcY#N@Z^g1@BIlnn2A*p)F@{dp zQadYd)#39|pnEK+bLXtNG*H5qQ*Xj#boeMoD|D^NSW~tkke3atN+^G>hwYSANJaX9 zv}fJgL+zwK&?abgAAT8}SQ`Y<-fVjhi)stvs9<&Gd$8eW`f!#eBkvSV{^W9q?+1C1 z<^uw;$awVESesdg#xU0MNyY63vx`MKgmF?KUHqa5Z^Dvy7uTKo@)W2}-t!An&i!9> z0=mHHN{+WLGBA6yp?FThtuv{0o=Zl=Zg_|e`jZREIWUguaG)dXW$Pv_)EsJ!U?)}4 z?aIZ0M|d@(XB(P%AL04QU7vq!+1FHJR&%hg3R`9|-p}(Unw)u&d!cm%MX%N5^!Mo^ zF8Z%lyKprIWL<;!kSr>ysw5LT;LAO!Wi`9cb6{H#EVzCLXRt1;FVCWHDE~$opKxN8 zm&SXGTXQN@K!fhyoTMwp{tN^q`rw#?DW5@X>PnFI-IPZ*7p@@eZAY$WYUw?h4hNnN zXN&cNA7H=av@~A8AXmFn6Zr}4ID96@@HJhRKe*YrlHP$@yfLSHtx0eIyy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0E~zbkyt-# zpQs+SIn0db4jg3nt}!Z=%7OqWPF0rk)D zr>8l2s>1lB@$ff)#?*sGJVnVz0zW@d(3twxNo#p`CGHJ_WD_uk{2YrQse z#LSqPnK|p?*UYHb>#ak)bB-iQNRot7sf73b^6y4fwdLW$YlU&m+vcV=Lw@G-xp$l1 z`?IJaBE%S5qeD}ZB)L2a{V&M>_pg-y4e|OV literal 0 HcmV?d00001 diff --git a/docs/images/nut_layering.png b/docs/images/nut_layering.png new file mode 100644 index 0000000000000000000000000000000000000000..ff451b4bc4db1e403ab32e20d4f2213fa1655862 GIT binary patch literal 83521 zcmXtf18^tL^Y-Tx8yDNQZQJHW7u$AnF)p@k+qP{x7d!8LfB$-Gt7~ezXP$a`W@>i3 zxA(WAyaYT9HVgm&fR~aKRR#cnCjaCC3gVvz#z({WUjuYfmJkM1Pvf5byMZv0kq`xZ z|99nfl_dVtK-)`dIsG&A{3k&0SK0S}N=RoZIWfp}7+eGbZu;RIsedXgXE9A@5jz_j zQ(I?%h@b`!d=az}8c30!M#phvmPY)|I zU2CG)8w>;=%5>r$IK!Iu_6%jodRt(jm>e%7Bn}r9bCidrO*3^{Gj-Y?+xk3z9=V>J zo|ND8@0atjm3Mu6%vjmc&{L~9U!ox;4o~uYqLu{rhXokI03N{n>8A+b2dU&8A{M^! z%K(bd08@Y>2!IA?sQ*)_Mx@R;uny`ly9-tx!v6$l_yYj-mn&Q)b04*&_75z80kjt} zzA%kgN`1cdvh-Yq?2=@cB~59tJQ8;@`+w>=5w} zVbM(aKWnExL9^69tA;%&z#Gb8$NqmqT~K}C0EnpgmRJ2qA}|ME;3pvcBeRDz#hju4 zH<-wo08`m zxY%nz!VY`C8s!;`Dm`?l6_8%W@D8f~u`OefLIiw+`FjOv|HH&E2O3fUOorWuu4h_h@su=f#gt7{by#mGh-Nlj*%aqxhCvE49OCdlPM<(lRDd>^V*_JM2hIPOoUN*m`_~|1 z5wXz6{U6{AQ5*^}^x>WeYoPjs{k?0+ep3UaMK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+ZTgMr{_sjXgUSJLe!E@CJq?mJALJ)8NwObErC<>Fn^K3=NM3L0_^(`MSu zB}R17F0>Al%fNFvkL4wkF1^=3AI?RC-@qQv&?+BwtUOP+-dGdxv!;D{{HN7yiZ-X1 z5_s;T|9c75od@CCxUlabB?!qlHL)PA`xomj(#39R8mUcuexFH53AYn^4tSz`EZuBc zeoH^b**gn9c0$Z;xntwX3eOcwrRIX!7uRu)az6F=%&4)M_g6i_*F{%Q7w4m`P&OFx ztLpv8dVk+7RS4K#y}s!6MaKmm=8kH3Yfkz0))QqvO>F=5u0%$&3RM%F5ZskF0W zBN{!t_SGJhlJ+N*t9rv=(a$nuuRe0`XAVG>4FUk5=JY=>LVwQ@l~=1uaPW!^i?q-x z1njI#lZm#>nuy^!v3PwkSS0=%tN(e?S6c1$_#(~vLr5BZ9YeHjb4L*lj z7a}vSQ>r4CDxGq_kX*+4%oSA--OyGc2lekqGDVW*!j;Wgu$=G@Av}}`@$^umxn^)f z;J`itKgB)Pxd|WdoXW$iIrGcXPDkH;hHv?VyKH9VX*B6REXQi@f$EK#bE*0&QL1~M zt-O;PiT@yy>(XxCrQg4g$V3*LR&@~#PORq5mUe+@qbyf-D(u9wLZ-&U4Q}g{%oa8E zHS1`x*siN@lR;HBFfo%t6!+ zZfX+5%9v0|bjz%ESw|p9-RKs!dp9K{V?ULxv#tI6&x?O<;s0;KU)a)7^sjIE3iwQE z2dgQOa}DzxI&n#>w>ptM*#W?9edC*D*PY`2 E3%(Y_v;Y7A literal 0 HcmV?d00001 diff --git a/docs/images/simple.png b/docs/images/simple.png new file mode 100644 index 0000000000000000000000000000000000000000..d30355f3cd163fca81d9e9d484cc20b4bcbd44ab GIT binary patch literal 10145 zcmV;SCtlczP)Mg6P=?G5gT7W)(t1d15V( z!^K8;H+F&&MlG<_G4{xzH3de(4j18BO^m}i52FajMn7OZFjE2g0Z~FoGD0mOH4>%} zKSH$H*p>k|7D6D@fDrm?gb~;gH7E0{Jbmikn>RBnv#PRNed5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wx5p#WOYM|Vd%-kx@(9zeg6p1_=Eo?+ghLxjWOB#dzcVlNC3 zc||KMEaZpBj#0R9Vba8tfYrbgKQ8A_e>{)w_hN%Lww}v46qni4aIM)a{Qx%0u<_#J-|LF~+{;*#Y|d`%`Yuc(>#nSlT zpAVxq!|i;RMx%1~x^+DK_S;A)(RDq}xQe0-K1r&o8rgy4$B$E9UYs5%<>D zGwHzxlTvE|@Dy-I4=lLvF;2bzuXwvV2>E^V_jJbqHqdieCEODX^OV}uasx}F67kw+e(yu6%g)21=QeJn=_W~}DwAg{S;F#9J^?_}w79;;#zxk!U!M}Z&1O>u!&y~TB`+_J zl9Cek?c2xl<;(GSJaOOwii?Z6@2$5eo;PoZD`t949DnEH#c9DeG&E3IS(z3*B%A}W zBwl*yCAMtY!i5VLl47Eyq=X0FeV5zj&CBT4mQJTX{4h^^`e|D58#ZiU*|KG6!9$wo z^+b0{7ZZJbeSB74&NpYzCiM*`(|`0MRu3eEMDXX%onyz29h8-o4GBIifkYBJckZOB zs)`35cwn$U_PbQi9+^lqRmRHs^XJ*Rbt@}YtQZ#jkOUG*)YR1Q?6c1@fByVoL1h9w zm7G6+p68x>j^)djGiAz@VZjeeAdy5}T^)}<{x}sC6*mQbsQ%NZPjm3#!HnEyLC^LFIoa=8#f zux8B~N=r*e1b##W;5!m6EiGKTc8$KizQH%j|BFO_H=Z(O3X>;K&KNw5kN`wT1cO2P z`ufl`EvXd08BtZ0tgI~Z^Yh8c$w5`sjDPI>U*&+9vOrPmY5)KL07*qoM6N<$f*8*h AfdBvi literal 0 HcmV?d00001 diff --git a/docs/macros.txt b/docs/macros.txt index dd55481..95aed93 100644 --- a/docs/macros.txt +++ b/docs/macros.txt @@ -1,66 +1,72 @@ -Desc: NUT-specific autoconf macros -File: macros.txt -Date: 27 December 2006 -Auth: Peter Selinger +NUT-specific autoconf macros +---------------------------- The following NUT-specific autoconf macros are defined in the m4/ directory. - - Macro: NUT_TYPE_SOCKLEN_T - - Macro: NUT_TYPE_UINT8_T - - Macro: NUT_TYPE_UINT16_T - Check for the corresponding type in the system header files, and - #define a replacement if necessary. +- NUT_TYPE_SOCKLEN_T +- NUT_TYPE_UINT8_T +- NUT_TYPE_UINT16_T - - Macro: NUT_CHECK_LIBGD - - Macro: NUT_CHECK_LIBHAL - - Macro: NUT_CHECK_LIBNEON - - Macro: NUT_CHECK_LIBNETSNMP - - Macro: NUT_CHECK_LIBPOWERMAN - - Macro: NUT_CHECK_LIBSSL - - Macro: NUT_CHECK_LIBUSB - - Macro: NUT_CHECK_LIBWRAP - Determine the compiler flags for the corresponding library. On - success, set nut_have_libxxx="yes" and set LIBXXX_CFLAGS and - LIBXXX_LDFLAGS. On failure, set nut_have_libxxx="no". This macro - can be run multiple times, but will do the checking only once. - Here "xxx" should of course be replaced by the respective library name. + Check for the corresponding type in the system header files, and + #define a replacement if necessary. - The checks for each library grow organically to compensate for - various bugs in the libraries, pkg-config, etc. This is why we have - a separate macro for each library. +- NUT_CHECK_LIBGD +- NUT_CHECK_LIBHAL +- NUT_CHECK_LIBNEON +- NUT_CHECK_LIBNETSNMP +- NUT_CHECK_LIBPOWERMAN +- NUT_CHECK_LIBSSL +- NUT_CHECK_LIBUSB +- NUT_CHECK_LIBWRAP - - Macro: NUT_CHECK_IPV6 - Check for various features required to compile the IPv6 support. - dnl Check for various features required for IPv6 support. Define a - preprocessor symbol for each individual feature (HAVE_GETADDRINFO, - HAVE_FREEADDRINFO, HAVE_STRUCT_ADDRINFO, HAVE_SOCKADDR_STORAGE, - SOCKADDR_IN6, IN6_ADDR, HAVE_IN6_IS_ADDR_V4MAPPED, - HAVE_AI_ADDRCONFIG). Also set the shell variable nut_have_ipv6=yes - if all the required features are present. Set nut_have_ipv6=no - otherwise. + Determine the compiler flags for the corresponding library. On + success, set nut_have_libxxx="yes" and set LIBXXX_CFLAGS and + LIBXXX_LDFLAGS. On failure, set nut_have_libxxx="no". This macro + can be run multiple times, but will do the checking only once. + Here "xxx" should of course be replaced by the respective library name. - - Macro: NUT_CHECK_OS - Check for the exact system name and type. - This was only used in the past to determine the packaging rule to be used - through the OS_NAME variable, but may be useful for other purposes in the - future. + The checks for each library grow organically to compensate for + various bugs in the libraries, pkg-config, etc. This is why we have + a separate macro for each library. - - Macro: NUT_REPORT_FEATURE(FEATURE, VALUE) - Schedule a line for the end-of-configuration feature summary. The - FEATURE is a descriptive string such that the sentence "Checking - whether to FEATURE" makes sense, and VALUE describes the decision - taken (typically yes or no). The feature is also reported to the - terminal. +- NUT_CHECK_IPV6 - - Macro: NUT_REPORT(FEATURE, VALUE) - Schedule a line for the end-of-configuration feature summary, without - printing anything to the terminal immediately. + Check for various features required to compile the IPv6 support. + dnl Check for various features required for IPv6 support. Define a + preprocessor symbol for each individual feature (HAVE_GETADDRINFO, + HAVE_FREEADDRINFO, HAVE_STRUCT_ADDRINFO, HAVE_SOCKADDR_STORAGE, + SOCKADDR_IN6, IN6_ADDR, HAVE_IN6_IS_ADDR_V4MAPPED, + HAVE_AI_ADDRCONFIG). Also set the shell variable nut_have_ipv6=yes + if all the required features are present. Set nut_have_ipv6=no + otherwise. - - Macro: NUT_PRINT_FEATURE_REPORT - Print out a list of the features that have been reported by - previous NUT_REPORT_FEATURE macro calls. +- NUT_CHECK_OS - - Macro: NUT_ARG_WITH(FEATURE, DESCRIPTION, DEFAULT) - Declare a simple --with-FEATURE option with the given DESCRIPTION - and DEFAULT. Sets the variable nut_with_FEATURE. + Check for the exact system name and type. + This was only used in the past to determine the packaging rule to be used + through the OS_NAME variable, but may be useful for other purposes in the + future. + +- NUT_REPORT_FEATURE(FEATURE, VALUE) + + Schedule a line for the end-of-configuration feature summary. The + FEATURE is a descriptive string such that the sentence "Checking + whether to FEATURE" makes sense, and VALUE describes the decision + taken (typically yes or no). The feature is also reported to the + terminal. + +- NUT_REPORT(FEATURE, VALUE) + + Schedule a line for the end-of-configuration feature summary, without + printing anything to the terminal immediately. + +- NUT_PRINT_FEATURE_REPORT + + Print out a list of the features that have been reported by + previous NUT_REPORT_FEATURE macro calls. + +- NUT_ARG_WITH(FEATURE, DESCRIPTION, DEFAULT) + + Declare a simple --with-FEATURE option with the given DESCRIPTION + and DEFAULT. Sets the variable nut_with_FEATURE. diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am new file mode 100644 index 0000000..b82f7b5 --- /dev/null +++ b/docs/man/Makefile.am @@ -0,0 +1,452 @@ +# Network UPS Tools: man +# + +# Notes: +# - sources (.txt) and groff formats are both distributed, +# - only sources are versioned ; groff files are generated at worst +# during 'make dist' +# - HTML files are built upon request, if AsciiDoc is available, +# - groff update will only happen if AsciiDoc is available too, +# - all this can probably (and hopefully) by improved, but I've not +# found a way to do pattern replacement on the fly for target deps! +# - Ref: http://www.gnu.org/software/hello/manual/automake/Man-pages.html + +# Base configuration and client manpages, always installed +SRC_CONF_PAGES = \ + nut.conf.txt \ + ups.conf.txt \ + upsd.conf.txt \ + upsd.users.txt \ + upsmon.conf.txt \ + upssched.conf.txt + +MAN_CONF_PAGES = \ + nut.conf.5 \ + ups.conf.5 \ + upsd.conf.5 \ + upsd.users.5 \ + upsmon.conf.5 \ + upssched.conf.5 + +man5_MANS = $(MAN_CONF_PAGES) + +HTML_CONF_MANS = \ + nut.conf.html \ + ups.conf.html \ + upsd.conf.html \ + upsd.users.html \ + upsmon.conf.html \ + upssched.conf.html + +SRC_CLIENT_PAGES = \ + nutupsdrv.txt \ + upsc.txt \ + upscmd.txt \ + upsd.txt \ + upsdrvctl.txt \ + upslog.txt \ + upsmon.txt \ + upsrw.txt \ + upssched.txt + +MAN_CLIENT_PAGES = \ + nutupsdrv.8 \ + upsc.8 \ + upscmd.8 \ + upsd.8 \ + upsdrvctl.8 \ + upslog.8 \ + upsmon.8 \ + upsrw.8 \ + upssched.8 + +man8_MANS = $(MAN_CLIENT_PAGES) + +HTML_CLIENT_MANS = \ + nutupsdrv.html \ + upsc.html \ + upscmd.html \ + upsd.html \ + upsdrvctl.html \ + upslog.html \ + upsmon.html \ + upsrw.html \ + upssched.html + + +# CGI (--with-cgi) related manpages +SRC_CGI_PAGES = \ + hosts.conf.txt \ + upsset.conf.txt \ + upsstats.html.txt \ + upsset.cgi.txt \ + upsstats.cgi.txt \ + upsimage.cgi.txt + +MAN5_CGI_PAGES = \ + hosts.conf.5 \ + upsset.conf.5 \ + upsstats.html.5 + +MAN8_CGI_PAGES = \ + upsset.cgi.8 \ + upsstats.cgi.8 \ + upsimage.cgi.8 + +if WITH_CGI + man5_MANS += $(MAN5_CGI_PAGES) + + man8_MANS += $(MAN8_CGI_PAGES) +endif + +HTML_CGI_MANS = \ + hosts.conf.html \ + upsset.conf.html \ + upsstats.html.html \ + upsset.cgi.html \ + upsstats.cgi.html \ + upsimage.cgi.html + + +# Development (--with-dev) related manpages +SRC_DEV_PAGES = \ + upsclient.txt \ + upscli_connect.txt \ + upscli_disconnect.txt \ + upscli_fd.txt \ + upscli_get.txt \ + upscli_list_next.txt \ + upscli_list_start.txt \ + upscli_readline.txt \ + upscli_sendline.txt \ + upscli_splitaddr.txt \ + upscli_splitname.txt \ + upscli_ssl.txt \ + upscli_strerror.txt \ + upscli_upserror.txt \ + libupsclient-config.txt \ + skel.txt + +MAN3_DEV_PAGES = \ + upsclient.3 \ + upscli_connect.3 \ + upscli_disconnect.3 \ + upscli_fd.3 \ + upscli_get.3 \ + upscli_list_next.3 \ + upscli_list_start.3 \ + upscli_readline.3 \ + upscli_sendline.3 \ + upscli_splitaddr.3 \ + upscli_splitname.3 \ + upscli_ssl.3 \ + upscli_strerror.3 \ + upscli_upserror.3 + +MAN1_DEV_PAGES = \ + libupsclient-config.1 + +if WITH_DEV + man3_MANS = $(MAN3_DEV_PAGES) + +if !WITH_PKG_CONFIG + man1_MANS = $(MAN1_DEV_PAGES) +endif +# WITH_DEV +endif + +HTML_DEV_MANS = \ + upsclient.html \ + upscli_connect.html \ + upscli_disconnect.html \ + upscli_fd.html \ + upscli_get.html \ + upscli_list_next.html \ + upscli_list_start.html \ + upscli_readline.html \ + upscli_sendline.html \ + upscli_splitaddr.html \ + upscli_splitname.html \ + upscli_ssl.html \ + upscli_strerror.html \ + upscli_upserror.html \ + libupsclient-config.html \ + skel.html + + +# Drivers related manpages + +# (--with-drivers=...) +if SOME_DRIVERS + man8_MANS += $(DRIVER_MAN_LIST) + +else + +# (--with-serial) +SRC_SERIAL_PAGES = \ + apcsmart.txt \ + bcmxcp.txt \ + belkin.txt \ + belkinunv.txt \ + bestfortress.txt \ + bestuferrups.txt \ + bestups.txt \ + bestfcom.txt \ + blazer.txt \ + clone.txt \ + dummy-ups.txt \ + etapro.txt \ + everups.txt \ + gamatronic.txt \ + genericups.txt \ + isbmex.txt \ + ivtscd.txt \ + liebert.txt \ + liebert-esp2.txt \ + masterguard.txt \ + metasys.txt \ + mge-shut.txt \ + mge-utalk.txt \ + oneac.txt \ + microdowell.txt \ + optiups.txt \ + powercom.txt \ + powerpanel.txt \ + rhino.txt \ + safenet.txt \ + solis.txt \ + tripplite.txt \ + tripplitesu.txt \ + upscode2.txt \ + victronups.txt + +MAN_SERIAL_PAGES = \ + apcsmart.8 \ + bcmxcp.8 \ + belkin.8 \ + belkinunv.8 \ + bestfortress.8 \ + bestuferrups.8 \ + bestups.8 \ + bestfcom.8 \ + blazer.8 \ + clone.8 \ + dummy-ups.8 \ + etapro.8 \ + everups.8 \ + gamatronic.8 \ + genericups.8 \ + isbmex.8 \ + ivtscd.8 \ + liebert.8 \ + liebert-esp2.8 \ + masterguard.8 \ + metasys.8 \ + mge-shut.8 \ + mge-utalk.8 \ + oneac.8 \ + microdowell.8 \ + optiups.8 \ + powercom.8 \ + powerpanel.8 \ + rhino.8 \ + safenet.8 \ + solis.8 \ + tripplite.8 \ + tripplitesu.8 \ + upscode2.8 \ + victronups.8 + +if WITH_SERIAL + man8_MANS += $(MAN_SERIAL_PAGES) +endif + +HTML_SERIAL_MANS = \ + apcsmart.html \ + bcmxcp.html \ + belkin.html \ + belkinunv.html \ + bestfortress.html \ + bestuferrups.html \ + bestups.html \ + bestfcom.html \ + blazer.html \ + clone.html \ + dummy-ups.html \ + etapro.html \ + everups.html \ + gamatronic.html \ + genericups.html \ + isbmex.html \ + ivtscd.html \ + liebert.html \ + liebert-esp2.html \ + masterguard.html \ + metasys.html \ + mge-shut.html \ + mge-utalk.html \ + oneac.html \ + microdowell.html \ + optiups.html \ + powercom.html \ + powerpanel.html \ + rhino.html \ + safenet.html \ + solis.html \ + tripplite.html \ + tripplitesu.html \ + upscode2.html \ + victronups.html + +# (--with-snmp) +SRC_SNMP_PAGES = snmp-ups.txt +MAN_SNMP_PAGES = snmp-ups.8 + +if WITH_SNMP + man8_MANS += $(MAN_SNMP_PAGES) +endif + +HTML_SNMP_MANS = snmp-ups.html + +# (--with-usb) +SRC_USB_LIBUSB_PAGES = \ + bcmxcp_usb.txt \ + richcomm_usb.txt \ + tripplite_usb.txt \ + usbhid-ups.txt + +MAN_USB_LIBUSB_PAGES = \ + bcmxcp_usb.8 \ + richcomm_usb.8 \ + tripplite_usb.8 \ + usbhid-ups.8 + +if WITH_USB + man8_MANS += $(MAN_USB_LIBUSB_PAGES) +endif + +HTML_USB_LIBUSB_MANS = \ + bcmxcp_usb.html \ + richcomm_usb.html \ + tripplite_usb.html \ + usbhid-ups.html + +# (--with-neon) +SRC_NETXML_PAGES = netxml-ups.txt +MAN_NETXML_PAGES = netxml-ups.8 + +if WITH_NEONXML + man8_MANS += $(MAN_NETXML_PAGES) +endif + +HTML_NETXML_MANS = netxml-ups.html + +# (--with-powerman) +SRC_POWERMAN_PAGES = powerman-pdu.txt +MAN_POWERMAN_PAGES = powerman-pdu.8 + +if WITH_LIBPOWERMAN + man8_MANS += $(MAN_POWERMAN_PAGES) +endif + +HTML_POWERMAN_MANS = powerman-pdu.html + +# SOME_DRIVERS +endif + +MAN_MANS = \ + $(MAN_CONF_PAGES) \ + $(MAN_CLIENT_PAGES) \ + $(MAN5_CGI_PAGES) \ + $(MAN8_CGI_PAGES) \ + $(MAN1_DEV_PAGES) \ + $(MAN3_DEV_PAGES) \ + $(MAN_SERIAL_PAGES) \ + $(MAN_SNMP_PAGES) \ + $(MAN_USB_LIBUSB_PAGES) \ + $(MAN_NETXML_PAGES) \ + $(MAN_POWERMAN_PAGES) + +# distribute everything, even those not installed by default +# Note that 'dist' target requires AsciiDoc! +EXTRA_DIST = \ + $(SRC_CONF_PAGES) \ + $(SRC_CLIENT_PAGES) \ + $(SRC_CGI_PAGES) \ + $(SRC_DEV_PAGES) \ + $(SRC_SERIAL_PAGES) \ + $(SRC_SNMP_PAGES) \ + $(SRC_USB_LIBUSB_PAGES) \ + $(SRC_NETXML_PAGES) \ + $(SRC_POWERMAN_PAGES) \ + $(MAN_MANS) \ + asciidoc.conf + +HTML_MANS = \ + $(HTML_CONF_MANS) \ + $(HTML_CLIENT_MANS) \ + $(HTML_CGI_MANS) \ + $(HTML_DEV_MANS) \ + $(HTML_SERIAL_MANS) \ + $(HTML_SNMP_MANS) \ + $(HTML_USB_LIBUSB_MANS) \ + $(HTML_NETXML_MANS) \ + $(HTML_POWERMAN_MANS) + +all: + +man-index.html: index.html + cp -f $< $@ + +html-man: $(HTML_MANS) man-index.html + +CLEANFILES = *.xml *.html + +SUFFIXES = .txt .html .1 .3 .5 .8 + +if HAVE_ASCIIDOC + +.txt.html: + $(ASCIIDOC) --backend=xhtml11 \ + --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ + --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + -o $@ $< + +### The --destination-dir flag doesn't seem to affect the intermediate .xml file. +### Hence, the copying dance below. +A2X_MANPAGE_OPTS = -f manpage --attribute nutversion="@PACKAGE_VERSION@" + +.txt.1: + test -f `basename $<` || cp -p $< . + $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +.txt.3: + test -f `basename $<` || cp -p $< . + $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +.txt.5: + test -f `basename $<` || cp -p $< . + $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +.txt.8: + test -f `basename $<` || cp -p $< . + $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +else !HAVE_ASCIIDOC + +.txt.html: + @echo "Not (re)building $@ manual page, since 'asciidoc' was not found." + +.txt.1: + @echo "Using existing $@ manual page, since 'asciidoc' was not found." + +.txt.3: + @echo "Using existing $@ manual page, since 'asciidoc' was not found." + +.txt.5: + @echo "Using existing $@ manual page, since 'asciidoc' was not found." + +.txt.8: + @echo "Using existing $@ manual page, since 'asciidoc' was not found." + +endif !HAVE_ASCIIDOC diff --git a/man/Makefile.in b/docs/man/Makefile.in similarity index 58% rename from man/Makefile.in rename to docs/man/Makefile.in index 8031353..78a79f9 100644 --- a/man/Makefile.in +++ b/docs/man/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,17 @@ @SET_MAKE@ # Network UPS Tools: man +# + +# Notes: +# - sources (.txt) and groff formats are both distributed, +# - only sources are versioned ; groff files are generated at worst +# during 'make dist' +# - HTML files are built upon request, if AsciiDoc is available, +# - groff update will only happen if AsciiDoc is available too, +# - all this can probably (and hopefully) by improved, but I've not +# found a way to do pattern replacement on the fly for target deps! +# - Ref: http://www.gnu.org/software/hello/manual/automake/Man-pages.html VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -36,24 +47,28 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@WITH_DEV_TRUE@@WITH_PKG_CONFIG_FALSE@am__append_1 = libupsclient-config.1 -@WITH_CGI_TRUE@am__append_2 = $(CGI_PAGES) -@WITH_DEV_TRUE@am__append_3 = $(LIB_PAGES) -@SOME_DRIVERS_TRUE@am__append_4 = $(DRIVER_MAN_LIST) -@SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_5 = $(SERIAL_PAGES) -@SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__append_6 = $(SNMP_PAGES) -@SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_7 = $(USB_LIBUSB_PAGES) -@SOME_DRIVERS_FALSE@@WITH_NEONXML_TRUE@am__append_8 = $(NETXML_PAGES) -@SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_9 = $(POWERMAN_PAGES) -subdir = man +@WITH_CGI_TRUE@am__append_1 = $(MAN5_CGI_PAGES) +@WITH_CGI_TRUE@am__append_2 = $(MAN8_CGI_PAGES) + +# Drivers related manpages + +# (--with-drivers=...) +@SOME_DRIVERS_TRUE@am__append_3 = $(DRIVER_MAN_LIST) +@SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_4 = $(MAN_SERIAL_PAGES) +@SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__append_5 = $(MAN_SNMP_PAGES) +@SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_6 = $(MAN_USB_LIBUSB_PAGES) +@SOME_DRIVERS_FALSE@@WITH_NEONXML_TRUE@am__append_7 = $(MAN_NETXML_PAGES) +@SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_8 = $(MAN_POWERMAN_PAGES) +subdir = docs/man DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(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_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -63,6 +78,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.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_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -102,11 +118,13 @@ man3dir = $(mandir)/man3 man5dir = $(mandir)/man5 man8dir = $(mandir)/man8 NROFF = nroff -MANS = $(man_MANS) +MANS = $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -119,8 +137,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -137,7 +157,6 @@ 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@ @@ -148,22 +167,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -259,77 +278,357 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ -LIB_PAGES = upsclient.3 upscli_connect.3 upscli_disconnect.3 \ - upscli_readline.3 upscli_sendline.3 upscli_splitaddr.3 \ - upscli_splitname.3 upscli_strerror.3 upscli_fd.3 upscli_get.3 \ - upscli_list_next.3 upscli_list_start.3 upscli_ssl.3 \ - upscli_upserror.3 $(am__append_1) -CONF_PAGES = nut.conf.5 ups.conf.5 upssched.conf.5 upsd.conf.5 \ - upsmon.conf.5 upsd.users.5 -CLIENT_PAGES = upsc.8 upsrw.8 upscmd.8 upslog.8 upssched.8 \ - upsmon.8 upsd.8 nutupsdrv.8 upsdrvctl.8 +# Base configuration and client manpages, always installed +SRC_CONF_PAGES = \ + nut.conf.txt \ + ups.conf.txt \ + upsd.conf.txt \ + upsd.users.txt \ + upsmon.conf.txt \ + upssched.conf.txt -CGI_PAGES = hosts.conf.5 upsset.conf.5 upsstats.html.5 \ - upsset.cgi.8 upsstats.cgi.8 upsimage.cgi.8 +MAN_CONF_PAGES = \ + nut.conf.5 \ + ups.conf.5 \ + upsd.conf.5 \ + upsd.users.5 \ + upsmon.conf.5 \ + upssched.conf.5 -SERIAL_PAGES = \ - apcsmart.8 \ - bcmxcp.8 \ - belkin.8 \ - belkinunv.8 \ - bestfortress.8 \ - bestuferrups.8 \ - bestups.8 \ - bestfcom.8 \ - blazer.8 \ - dummy-ups.8 \ - etapro.8 \ - everups.8 \ - gamatronic.8 \ - genericups.8 \ - isbmex.8 \ - ivtscd.8 \ - liebert.8 \ - liebertgxt2.8 \ - masterguard.8 \ - metasys.8 \ - mge-shut.8 \ - mge-utalk.8 \ - oneac.8 \ - microdowell.8 \ - optiups.8 \ - powercom.8 \ - powerpanel.8 \ - megatec.8 \ - rhino.8 \ - safenet.8 \ - solis.8 \ - tripplite.8 \ - tripplitesu.8 \ - upscode2.8 \ - victronups.8 \ - clone.8 +man5_MANS = $(MAN_CONF_PAGES) $(am__append_1) +HTML_CONF_MANS = \ + nut.conf.html \ + ups.conf.html \ + upsd.conf.html \ + upsd.users.html \ + upsmon.conf.html \ + upssched.conf.html -SNMP_PAGES = snmp-ups.8 -USB_LIBUSB_PAGES = usbhid-ups.8 bcmxcp_usb.8 tripplite_usb.8 megatec_usb.8 richcomm_usb.8 -NETXML_PAGES = netxml-ups.8 -POWERMAN_PAGES = powerman-pdu.8 +SRC_CLIENT_PAGES = \ + nutupsdrv.txt \ + upsc.txt \ + upscmd.txt \ + upsd.txt \ + upsdrvctl.txt \ + upslog.txt \ + upsmon.txt \ + upsrw.txt \ + upssched.txt -# decide which pages to install -man_MANS = $(CONF_PAGES) $(CLIENT_PAGES) $(am__append_2) \ - $(am__append_3) $(am__append_4) $(am__append_5) \ - $(am__append_6) $(am__append_7) $(am__append_8) \ - $(am__append_9) +MAN_CLIENT_PAGES = \ + nutupsdrv.8 \ + upsc.8 \ + upscmd.8 \ + upsd.8 \ + upsdrvctl.8 \ + upslog.8 \ + upsmon.8 \ + upsrw.8 \ + upssched.8 -# distribute everything, even that which is not installed by default -EXTRA_DIST = $(LIB_PAGES) $(CONF_PAGES) $(CLIENT_PAGES) \ - $(CGI_PAGES) $(SERIAL_PAGES) $(SNMP_PAGES) $(USB_LIBUSB_PAGES) \ - $(NETXML_PAGES) $(POWERMAN_PAGES) libupsclient-config.1 skel.8 +man8_MANS = $(MAN_CLIENT_PAGES) $(am__append_2) $(am__append_3) \ + $(am__append_4) $(am__append_5) $(am__append_6) \ + $(am__append_7) $(am__append_8) +HTML_CLIENT_MANS = \ + nutupsdrv.html \ + upsc.html \ + upscmd.html \ + upsd.html \ + upsdrvctl.html \ + upslog.html \ + upsmon.html \ + upsrw.html \ + upssched.html + +# CGI (--with-cgi) related manpages +SRC_CGI_PAGES = \ + hosts.conf.txt \ + upsset.conf.txt \ + upsstats.html.txt \ + upsset.cgi.txt \ + upsstats.cgi.txt \ + upsimage.cgi.txt + +MAN5_CGI_PAGES = \ + hosts.conf.5 \ + upsset.conf.5 \ + upsstats.html.5 + +MAN8_CGI_PAGES = \ + upsset.cgi.8 \ + upsstats.cgi.8 \ + upsimage.cgi.8 + +HTML_CGI_MANS = \ + hosts.conf.html \ + upsset.conf.html \ + upsstats.html.html \ + upsset.cgi.html \ + upsstats.cgi.html \ + upsimage.cgi.html + + +# Development (--with-dev) related manpages +SRC_DEV_PAGES = \ + upsclient.txt \ + upscli_connect.txt \ + upscli_disconnect.txt \ + upscli_fd.txt \ + upscli_get.txt \ + upscli_list_next.txt \ + upscli_list_start.txt \ + upscli_readline.txt \ + upscli_sendline.txt \ + upscli_splitaddr.txt \ + upscli_splitname.txt \ + upscli_ssl.txt \ + upscli_strerror.txt \ + upscli_upserror.txt \ + libupsclient-config.txt \ + skel.txt + +MAN3_DEV_PAGES = \ + upsclient.3 \ + upscli_connect.3 \ + upscli_disconnect.3 \ + upscli_fd.3 \ + upscli_get.3 \ + upscli_list_next.3 \ + upscli_list_start.3 \ + upscli_readline.3 \ + upscli_sendline.3 \ + upscli_splitaddr.3 \ + upscli_splitname.3 \ + upscli_ssl.3 \ + upscli_strerror.3 \ + upscli_upserror.3 + +MAN1_DEV_PAGES = \ + libupsclient-config.1 + +@WITH_DEV_TRUE@man3_MANS = $(MAN3_DEV_PAGES) +@WITH_DEV_TRUE@@WITH_PKG_CONFIG_FALSE@man1_MANS = $(MAN1_DEV_PAGES) +# WITH_DEV +HTML_DEV_MANS = \ + upsclient.html \ + upscli_connect.html \ + upscli_disconnect.html \ + upscli_fd.html \ + upscli_get.html \ + upscli_list_next.html \ + upscli_list_start.html \ + upscli_readline.html \ + upscli_sendline.html \ + upscli_splitaddr.html \ + upscli_splitname.html \ + upscli_ssl.html \ + upscli_strerror.html \ + upscli_upserror.html \ + libupsclient-config.html \ + skel.html + + +# (--with-serial) +@SOME_DRIVERS_FALSE@SRC_SERIAL_PAGES = \ +@SOME_DRIVERS_FALSE@ apcsmart.txt \ +@SOME_DRIVERS_FALSE@ bcmxcp.txt \ +@SOME_DRIVERS_FALSE@ belkin.txt \ +@SOME_DRIVERS_FALSE@ belkinunv.txt \ +@SOME_DRIVERS_FALSE@ bestfortress.txt \ +@SOME_DRIVERS_FALSE@ bestuferrups.txt \ +@SOME_DRIVERS_FALSE@ bestups.txt \ +@SOME_DRIVERS_FALSE@ bestfcom.txt \ +@SOME_DRIVERS_FALSE@ blazer.txt \ +@SOME_DRIVERS_FALSE@ clone.txt \ +@SOME_DRIVERS_FALSE@ dummy-ups.txt \ +@SOME_DRIVERS_FALSE@ etapro.txt \ +@SOME_DRIVERS_FALSE@ everups.txt \ +@SOME_DRIVERS_FALSE@ gamatronic.txt \ +@SOME_DRIVERS_FALSE@ genericups.txt \ +@SOME_DRIVERS_FALSE@ isbmex.txt \ +@SOME_DRIVERS_FALSE@ ivtscd.txt \ +@SOME_DRIVERS_FALSE@ liebert.txt \ +@SOME_DRIVERS_FALSE@ liebert-esp2.txt \ +@SOME_DRIVERS_FALSE@ masterguard.txt \ +@SOME_DRIVERS_FALSE@ metasys.txt \ +@SOME_DRIVERS_FALSE@ mge-shut.txt \ +@SOME_DRIVERS_FALSE@ mge-utalk.txt \ +@SOME_DRIVERS_FALSE@ oneac.txt \ +@SOME_DRIVERS_FALSE@ microdowell.txt \ +@SOME_DRIVERS_FALSE@ optiups.txt \ +@SOME_DRIVERS_FALSE@ powercom.txt \ +@SOME_DRIVERS_FALSE@ powerpanel.txt \ +@SOME_DRIVERS_FALSE@ rhino.txt \ +@SOME_DRIVERS_FALSE@ safenet.txt \ +@SOME_DRIVERS_FALSE@ solis.txt \ +@SOME_DRIVERS_FALSE@ tripplite.txt \ +@SOME_DRIVERS_FALSE@ tripplitesu.txt \ +@SOME_DRIVERS_FALSE@ upscode2.txt \ +@SOME_DRIVERS_FALSE@ victronups.txt + +@SOME_DRIVERS_FALSE@MAN_SERIAL_PAGES = \ +@SOME_DRIVERS_FALSE@ apcsmart.8 \ +@SOME_DRIVERS_FALSE@ bcmxcp.8 \ +@SOME_DRIVERS_FALSE@ belkin.8 \ +@SOME_DRIVERS_FALSE@ belkinunv.8 \ +@SOME_DRIVERS_FALSE@ bestfortress.8 \ +@SOME_DRIVERS_FALSE@ bestuferrups.8 \ +@SOME_DRIVERS_FALSE@ bestups.8 \ +@SOME_DRIVERS_FALSE@ bestfcom.8 \ +@SOME_DRIVERS_FALSE@ blazer.8 \ +@SOME_DRIVERS_FALSE@ clone.8 \ +@SOME_DRIVERS_FALSE@ dummy-ups.8 \ +@SOME_DRIVERS_FALSE@ etapro.8 \ +@SOME_DRIVERS_FALSE@ everups.8 \ +@SOME_DRIVERS_FALSE@ gamatronic.8 \ +@SOME_DRIVERS_FALSE@ genericups.8 \ +@SOME_DRIVERS_FALSE@ isbmex.8 \ +@SOME_DRIVERS_FALSE@ ivtscd.8 \ +@SOME_DRIVERS_FALSE@ liebert.8 \ +@SOME_DRIVERS_FALSE@ liebert-esp2.8 \ +@SOME_DRIVERS_FALSE@ masterguard.8 \ +@SOME_DRIVERS_FALSE@ metasys.8 \ +@SOME_DRIVERS_FALSE@ mge-shut.8 \ +@SOME_DRIVERS_FALSE@ mge-utalk.8 \ +@SOME_DRIVERS_FALSE@ oneac.8 \ +@SOME_DRIVERS_FALSE@ microdowell.8 \ +@SOME_DRIVERS_FALSE@ optiups.8 \ +@SOME_DRIVERS_FALSE@ powercom.8 \ +@SOME_DRIVERS_FALSE@ powerpanel.8 \ +@SOME_DRIVERS_FALSE@ rhino.8 \ +@SOME_DRIVERS_FALSE@ safenet.8 \ +@SOME_DRIVERS_FALSE@ solis.8 \ +@SOME_DRIVERS_FALSE@ tripplite.8 \ +@SOME_DRIVERS_FALSE@ tripplitesu.8 \ +@SOME_DRIVERS_FALSE@ upscode2.8 \ +@SOME_DRIVERS_FALSE@ victronups.8 + +@SOME_DRIVERS_FALSE@HTML_SERIAL_MANS = \ +@SOME_DRIVERS_FALSE@ apcsmart.html \ +@SOME_DRIVERS_FALSE@ bcmxcp.html \ +@SOME_DRIVERS_FALSE@ belkin.html \ +@SOME_DRIVERS_FALSE@ belkinunv.html \ +@SOME_DRIVERS_FALSE@ bestfortress.html \ +@SOME_DRIVERS_FALSE@ bestuferrups.html \ +@SOME_DRIVERS_FALSE@ bestups.html \ +@SOME_DRIVERS_FALSE@ bestfcom.html \ +@SOME_DRIVERS_FALSE@ blazer.html \ +@SOME_DRIVERS_FALSE@ clone.html \ +@SOME_DRIVERS_FALSE@ dummy-ups.html \ +@SOME_DRIVERS_FALSE@ etapro.html \ +@SOME_DRIVERS_FALSE@ everups.html \ +@SOME_DRIVERS_FALSE@ gamatronic.html \ +@SOME_DRIVERS_FALSE@ genericups.html \ +@SOME_DRIVERS_FALSE@ isbmex.html \ +@SOME_DRIVERS_FALSE@ ivtscd.html \ +@SOME_DRIVERS_FALSE@ liebert.html \ +@SOME_DRIVERS_FALSE@ liebert-esp2.html \ +@SOME_DRIVERS_FALSE@ masterguard.html \ +@SOME_DRIVERS_FALSE@ metasys.html \ +@SOME_DRIVERS_FALSE@ mge-shut.html \ +@SOME_DRIVERS_FALSE@ mge-utalk.html \ +@SOME_DRIVERS_FALSE@ oneac.html \ +@SOME_DRIVERS_FALSE@ microdowell.html \ +@SOME_DRIVERS_FALSE@ optiups.html \ +@SOME_DRIVERS_FALSE@ powercom.html \ +@SOME_DRIVERS_FALSE@ powerpanel.html \ +@SOME_DRIVERS_FALSE@ rhino.html \ +@SOME_DRIVERS_FALSE@ safenet.html \ +@SOME_DRIVERS_FALSE@ solis.html \ +@SOME_DRIVERS_FALSE@ tripplite.html \ +@SOME_DRIVERS_FALSE@ tripplitesu.html \ +@SOME_DRIVERS_FALSE@ upscode2.html \ +@SOME_DRIVERS_FALSE@ victronups.html + + +# (--with-snmp) +@SOME_DRIVERS_FALSE@SRC_SNMP_PAGES = snmp-ups.txt +@SOME_DRIVERS_FALSE@MAN_SNMP_PAGES = snmp-ups.8 +@SOME_DRIVERS_FALSE@HTML_SNMP_MANS = snmp-ups.html + +# (--with-usb) +@SOME_DRIVERS_FALSE@SRC_USB_LIBUSB_PAGES = \ +@SOME_DRIVERS_FALSE@ bcmxcp_usb.txt \ +@SOME_DRIVERS_FALSE@ richcomm_usb.txt \ +@SOME_DRIVERS_FALSE@ tripplite_usb.txt \ +@SOME_DRIVERS_FALSE@ usbhid-ups.txt + +@SOME_DRIVERS_FALSE@MAN_USB_LIBUSB_PAGES = \ +@SOME_DRIVERS_FALSE@ bcmxcp_usb.8 \ +@SOME_DRIVERS_FALSE@ richcomm_usb.8 \ +@SOME_DRIVERS_FALSE@ tripplite_usb.8 \ +@SOME_DRIVERS_FALSE@ usbhid-ups.8 + +@SOME_DRIVERS_FALSE@HTML_USB_LIBUSB_MANS = \ +@SOME_DRIVERS_FALSE@ bcmxcp_usb.html \ +@SOME_DRIVERS_FALSE@ richcomm_usb.html \ +@SOME_DRIVERS_FALSE@ tripplite_usb.html \ +@SOME_DRIVERS_FALSE@ usbhid-ups.html + + +# (--with-neon) +@SOME_DRIVERS_FALSE@SRC_NETXML_PAGES = netxml-ups.txt +@SOME_DRIVERS_FALSE@MAN_NETXML_PAGES = netxml-ups.8 +@SOME_DRIVERS_FALSE@HTML_NETXML_MANS = netxml-ups.html + +# (--with-powerman) +@SOME_DRIVERS_FALSE@SRC_POWERMAN_PAGES = powerman-pdu.txt +@SOME_DRIVERS_FALSE@MAN_POWERMAN_PAGES = powerman-pdu.8 +@SOME_DRIVERS_FALSE@HTML_POWERMAN_MANS = powerman-pdu.html + +# SOME_DRIVERS +MAN_MANS = \ + $(MAN_CONF_PAGES) \ + $(MAN_CLIENT_PAGES) \ + $(MAN5_CGI_PAGES) \ + $(MAN8_CGI_PAGES) \ + $(MAN1_DEV_PAGES) \ + $(MAN3_DEV_PAGES) \ + $(MAN_SERIAL_PAGES) \ + $(MAN_SNMP_PAGES) \ + $(MAN_USB_LIBUSB_PAGES) \ + $(MAN_NETXML_PAGES) \ + $(MAN_POWERMAN_PAGES) + + +# distribute everything, even those not installed by default +# Note that 'dist' target requires AsciiDoc! +EXTRA_DIST = \ + $(SRC_CONF_PAGES) \ + $(SRC_CLIENT_PAGES) \ + $(SRC_CGI_PAGES) \ + $(SRC_DEV_PAGES) \ + $(SRC_SERIAL_PAGES) \ + $(SRC_SNMP_PAGES) \ + $(SRC_USB_LIBUSB_PAGES) \ + $(SRC_NETXML_PAGES) \ + $(SRC_POWERMAN_PAGES) \ + $(MAN_MANS) \ + asciidoc.conf + +HTML_MANS = \ + $(HTML_CONF_MANS) \ + $(HTML_CLIENT_MANS) \ + $(HTML_CGI_MANS) \ + $(HTML_DEV_MANS) \ + $(HTML_SERIAL_MANS) \ + $(HTML_SNMP_MANS) \ + $(HTML_USB_LIBUSB_MANS) \ + $(HTML_NETXML_MANS) \ + $(HTML_POWERMAN_MANS) + +CLEANFILES = *.xml *.html +SUFFIXES = .txt .html .1 .3 .5 .8 + +### The --destination-dir flag doesn't seem to affect the intermediate .xml file. +### Hence, the copying dance below. +@HAVE_ASCIIDOC_TRUE@A2X_MANPAGE_OPTS = -f manpage --attribute nutversion="@PACKAGE_VERSION@" all: all-am .SUFFIXES: +.SUFFIXES: .txt .html .1 .3 .5 .8 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -339,9 +638,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu man/Makefile + $(AUTOMAKE) --gnu docs/man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -366,13 +665,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -install-man1: $(man_MANS) +install-man1: $(man1_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ + @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -395,22 +692,18 @@ install-man1: $(man_MANS) uninstall-man1: @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ + @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } -install-man3: $(man_MANS) +install-man3: $(man3_MANS) @$(NORMAL_INSTALL) test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" - @list=''; test -n "$(man3dir)" || exit 0; \ + @list='$(man3_MANS)'; test -n "$(man3dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -433,22 +726,18 @@ install-man3: $(man_MANS) uninstall-man3: @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man3dir)" || exit 0; \ + @list='$(man3_MANS)'; test -n "$(man3dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } -install-man5: $(man_MANS) +install-man5: $(man5_MANS) @$(NORMAL_INSTALL) test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" - @list=''; test -n "$(man5dir)" || exit 0; \ + @list='$(man5_MANS)'; test -n "$(man5dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -471,22 +760,18 @@ install-man5: $(man_MANS) uninstall-man5: @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man5dir)" || exit 0; \ + @list='$(man5_MANS)'; test -n "$(man5dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man5dir)" && rm -f $$files; } -install-man8: $(man_MANS) +install-man8: $(man8_MANS) @$(NORMAL_INSTALL) test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ + @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -509,10 +794,8 @@ install-man8: $(man_MANS) uninstall-man8: @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man8dir)" || exit 0; \ + @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ @@ -592,6 +875,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -686,6 +970,50 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 \ uninstall-man8 +all: + +man-index.html: index.html + cp -f $< $@ + +html-man: $(HTML_MANS) man-index.html + +@HAVE_ASCIIDOC_TRUE@.txt.html: +@HAVE_ASCIIDOC_TRUE@ $(ASCIIDOC) --backend=xhtml11 \ +@HAVE_ASCIIDOC_TRUE@ --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ +@HAVE_ASCIIDOC_TRUE@ --attribute localtime=`TZ=UTC date +%H:%M:%S` \ +@HAVE_ASCIIDOC_TRUE@ -o $@ $< + +@HAVE_ASCIIDOC_TRUE@.txt.1: +@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< . +@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +@HAVE_ASCIIDOC_TRUE@.txt.3: +@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< . +@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +@HAVE_ASCIIDOC_TRUE@.txt.5: +@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< . +@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +@HAVE_ASCIIDOC_TRUE@.txt.8: +@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< . +@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +@HAVE_ASCIIDOC_FALSE@.txt.html: +@HAVE_ASCIIDOC_FALSE@ @echo "Not (re)building $@ manual page, since 'asciidoc' was not found." + +@HAVE_ASCIIDOC_FALSE@.txt.1: +@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." + +@HAVE_ASCIIDOC_FALSE@.txt.3: +@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." + +@HAVE_ASCIIDOC_FALSE@.txt.5: +@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." + +@HAVE_ASCIIDOC_FALSE@.txt.8: +@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." + # 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: diff --git a/docs/man/apcsmart.8 b/docs/man/apcsmart.8 new file mode 100644 index 0000000..4c0075b --- /dev/null +++ b/docs/man/apcsmart.8 @@ -0,0 +1,124 @@ +'\" t +.\" Title: apcsmart +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "APCSMART" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +apcsmart \- Driver for American Power Conversion Smart Protocol UPS equipment +.SH "SYNOPSIS" +.sp +\fBapcsmart\fR \-h +.sp +\fBapcsmart\fR \-a \fIUPS_NAME\fR [\fIOPTIONS\fR] +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +This man page only documents the hardware\-specific features of the apcsmart driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.sp .5v +.RE +.SH "SUPPORTED HARDWARE" +.sp +apcsmart should recognize all recent APC models that use a serial protocol at 2400 bps\&. This is primarily the Smart\-UPS, Matrix\-UPS and Back\-UPS Pro lines\&. +.sp +The driver attempts to support every bell and whistle of the APC reporting interface, whether or not this is strictly sensible\&. +.sp +Some older hardware may only report a handful of variables\&. This is usually not a bug\(emthey just don\(cqt support anything else\&. +.SH "CABLING" +.sp +This driver expects to see a 940\-0024C cable or a clone by default\&. You can switch to the 940\-0095B dual\-mode cable support with the cable= definition described below\&. +.sp +If your 940\-0024C cable is broken or missing, use this diagram to build a clone: +.sp +http://www\&.networkupstools\&.org/cables/940\-0024C\&.jpg +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBcable=940\-0095B\fR +.RS 4 +Configure the serial port for the APC 940\-0095B dual\-mode cable\&. +.RE +.PP +\fBsdtype=\fR\fInum\fR +.RS 4 +Use shutdown type +\fInum\fR, according to this table: +.PP +0 +.RS 4 +soft shutdown or powerdown, depending on battery status +.RE +.PP +1 +.RS 4 +soft shutdown followed by powerdown +.RE +.PP +2 +.RS 4 +instant power off +.RE +.PP +3 +.RS 4 +power off with grace period +.RE +.PP +4 +.RS 4 +"force OB" hack method for CS 350 +.RE +.RE +.sp +Modes 0 and 1 will power up the load when power returns\&. Modes 2 and 3 will keep the load turned off when the power returns\&. +.sp +Mode 4 exploits an oddity in the CS 350 models since they only seem to support the S command, but then only when running on battery\&. As a result, the driver will force the UPS to go on battery if necessary before sending the shutdown command\&. This ensures that the load gets reset\&. +.SH "BUGS" +.sp +Some older APC UPS models return bogus data in the status register during a front panel test\&. This is usually detected and discarded, but some other unexpected values have occasionally slipped through\&. +.sp +APC UPS models with both USB and serial ports require a power cycle when switching from USB communication to serial, and perhaps vice versa\&. +.SH "AUTHOR" +.sp +Nigel Metheringham (drawing heavily on the original apcsmart driver by Russell Kroll)\&. This driver was called newapc for a time and was renamed in the 1\&.5 series\&. +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/apcsmart.8 b/docs/man/apcsmart.txt similarity index 53% rename from man/apcsmart.8 rename to docs/man/apcsmart.txt index 7e9d866..33835c0 100644 --- a/man/apcsmart.8 +++ b/docs/man/apcsmart.txt @@ -1,52 +1,68 @@ -.TH APCSMART 8 "Mon Sep 29 2003" "" "Network UPS Tools (NUT)" -.SH NAME -apcsmart \- Driver for American Power Conversion Smart Protocol UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the -apcsmart driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +APCSMART(8) +=========== + +NAME +---- + +apcsmart - Driver for American Power Conversion Smart Protocol UPS equipment + +SYNOPSIS +-------- + +*apcsmart* -h + +*apcsmart* -a 'UPS_NAME' ['OPTIONS'] + +NOTE: This man page only documents the hardware-specific features of the +apcsmart driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ -.SH SUPPORTED HARDWARE apcsmart should recognize all recent APC models that use a serial -protocol at 2400 bps. This is primarily the Smart\(hyUPS, Matrix\(hyUPS and -Back\(hyUPS Pro lines. +protocol at 2400 bps. This is primarily the Smart-UPS, Matrix-UPS and +Back-UPS Pro lines. The driver attempts to support every bell and whistle of the APC reporting interface, whether or not this is strictly sensible. Some older hardware may only report a handful of variables. This is -usually not a bug \(hy they just don't support anything else. +usually not a bug--they just don't support anything else. -.SH CABLING +CABLING +------- -This driver expects to see a 940\(hy0024C cable or a clone by default. You -can switch to the 940\(hy0095B dual\(hymode cable support with the cable= +This driver expects to see a 940-0024C cable or a clone by default. You +can switch to the 940-0095B dual-mode cable support with the `cable=` definition described below. -If your 940\(hy0024C cable is broken or missing, use this diagram to build +If your 940-0024C cable is broken or missing, use this diagram to build a clone: -http://random.networkupstools.org/cables/940\(hy0024C.jpg +http://www.networkupstools.org/cables/940-0024C.jpg + +EXTRA ARGUMENTS +--------------- -.SH EXTRA ARGUMENTS This driver supports the following optional settings in the -\fBups.conf\fR(5): +linkman:ups.conf[5]: -.IP "cable=940\(hy0095B" -Configure the serial port for the APC 940\(hy0095B dual\(hymode cable. +*cable=940-0095B*:: +Configure the serial port for the APC 940-0095B dual-mode cable. -.IP "sdtype=\fInum\fR" -Use shutdown type \fInum\fR, according to this table: +*sdtype=*'num':: +Use shutdown type 'num', according to this table: -0: soft shutdown or powerdown, depending on battery status +0;; soft shutdown or powerdown, depending on battery status -1: soft shutdown followed by powerdown +1;; soft shutdown followed by powerdown -2: instant power off +2;; instant power off -3: power off with grace period +3;; power off with grace period -4: 'force OB' hack method for CS 350 +4;; "force OB" hack method for CS 350 Modes 0 and 1 will power up the load when power returns. Modes 2 and 3 will keep the load turned off when the power returns. @@ -57,7 +73,9 @@ result, the driver will force the UPS to go on battery if necessary before sending the shutdown command. This ensures that the load gets reset. -.SH BUGS +BUGS +---- + Some older APC UPS models return bogus data in the status register during a front panel test. This is usually detected and discarded, but some other unexpected values have occasionally slipped through. @@ -65,15 +83,19 @@ other unexpected values have occasionally slipped through. APC UPS models with both USB and serial ports require a power cycle when switching from USB communication to serial, and perhaps vice versa. -.SH AUTHOR +AUTHOR +------ Nigel Metheringham (drawing heavily on the original apcsmart driver by Russell Kroll). This driver was called newapc for a time and was renamed in the 1.5 series. -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/asciidoc.conf b/docs/man/asciidoc.conf new file mode 100644 index 0000000..077dea5 --- /dev/null +++ b/docs/man/asciidoc.conf @@ -0,0 +1,46 @@ +## Borrowed from 'linkgit' in the Git distribution. +## linkman: macro +# +# Usage: linkman:command[manpage-section] +# +# Note, {0} is the manpage section, while {target} is the command. +# +# Show NUT link as: (

    ); if section is defined, else just show +# the command. + +[macros] +(?su)[\\]?(?Plinkman):(?P\S*?)\[(?P.*?)\]= + +ifdef::backend-docbook[] +[linkman-inlinemacro] +{0%{target}} +{0#} +{0#{target}{0}} +{0#} +endif::backend-docbook[] + +ifdef::backend-xhtml11[] +[linkman-inlinemacro] +{target}{0?({0})} +endif::backend-xhtml11[] + +# Meta info for a2x manpage conversion: +ifdef::doctype-manpage[] +ifdef::backend-docbook[] +[header] +template::[header-declarations] + + +{mantitle} +{manvolnum} +Network UPS Tools +{nut_version} +NUT Manual + + + {manname} + {manpurpose} + +endif::backend-docbook[] +endif::doctype-manpage[] + diff --git a/docs/man/bcmxcp.8 b/docs/man/bcmxcp.8 new file mode 100644 index 0000000..2a7af9d --- /dev/null +++ b/docs/man/bcmxcp.8 @@ -0,0 +1,130 @@ +'\" t +.\" Title: bcmxcp +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BCMXCP" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +bcmxcp \- Driver for UPSes supporting the serial BCM/XCP protocol +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the bcmxcp driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver should recognize all serial BCM/XCP\-compatible UPSes\&. It has been developed and tested on Powerware PW5115 and PW9120 hardware\&. If your UPS has a USB connection, you may also consult the \fBbcmxcp_usb\fR(8) driver documentation\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5)\&. +.PP +\fBshutdown_delay=\fR\fIdelay\fR +.RS 4 +The number of seconds that the UPS should wait between receiving the shutdown command (upsdrvctl shutdown) and actually shutting off\&. +.RE +.PP +\fBbaud_rate=\fR\fIrate\fR +.RS 4 +Communication speed for the UPS\&. If this is set to 9600, it tries to connect to the UPS at 9600bps\&. If it fails to communicate, it will go into baud\-hunting\&. It starts at 1200 and goes up to 19200\&. If it succeeds, it tell you the speed it connected with\&. If not included in the config, it defaults to baud\-hunting\&. +.RE +.SH "DEFAULT VALUES FOR THE EXTRA ARGUMENTS" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\fBshutdown_delay =\fR +\fI120\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\fBbaud_rate =\fR +\fInone\fR +.RE +.SH "INSTANT COMMANDS" +.sp +This driver supports the following Instant Commands: +.PP +\fBshutdown\&.return\fR +.RS 4 +Turn off the load and return when power is back\&. +.RE +.PP +\fBshutdown\&.stayoff\fR +.RS 4 +Turn off the load and remain off\&. +.RE +.PP +\fBtest\&.battery\&.start\fR +.RS 4 +Start a battery test\&. +.RE +.PP +\fBoutlet\&.n\&.shutdown\&.return\fR +.RS 4 +Turn off the load on outlet +\fIn\fR +and return when power is back\&. (\fIn\fR +is the outlet number reported by the upsc command) +.RE +.SH "TODO LIST" +.PP +Report UPS statistics informations +.RS 4 +BCM/XCP supports reporting of UPS statistics data\&. +.RE +.PP +Change settings +.RS 4 +Access the config register to change settings\&. +.RE +.SH "BUGS" +.sp +None known\&. +.SH "AUTHOR" +.sp +Tore Ørpetveit +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "The USB BCM/XCP driver:" +.sp +\fBbcmxcp_usb\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/bcmxcp.txt b/docs/man/bcmxcp.txt new file mode 100644 index 0000000..8f5ed32 --- /dev/null +++ b/docs/man/bcmxcp.txt @@ -0,0 +1,88 @@ +BCMXCP(8) +========= + +NAME +---- + +bcmxcp - Driver for UPSes supporting the serial BCM/XCP protocol + +NOTE +---- +This man page only documents the hardware-specific features of the +bcmxcp driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver should recognize all serial BCM/XCP-compatible UPSes. It has +been developed and tested on Powerware PW5115 and PW9120 hardware. If your UPS +has a USB connection, you may also consult the linkman:bcmxcp_usb[8] driver +documentation. + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in the +linkman:ups.conf[5]. + +*shutdown_delay=*'delay':: +The number of seconds that the UPS should wait between receiving the +shutdown command (`upsdrvctl shutdown`) and actually shutting off. + +*baud_rate=*'rate':: +Communication speed for the UPS. If this is set to 9600, it tries to connect +to the UPS at 9600bps. If it fails to communicate, it will go into baud-hunting. +It starts at 1200 and goes up to 19200. If it succeeds, it tell you the speed it +connected with. If not included in the config, it defaults to baud-hunting. + +DEFAULT VALUES FOR THE EXTRA ARGUMENTS +-------------------------------------- + - *shutdown_delay =* '120' + - *baud_rate =* 'none' + +INSTANT COMMANDS +---------------- +This driver supports the following Instant Commands: + +*shutdown.return*:: +Turn off the load and return when power is back. + +*shutdown.stayoff*:: +Turn off the load and remain off. + +*test.battery.start*:: +Start a battery test. + +*outlet.n.shutdown.return*:: +Turn off the load on outlet 'n' and return when power is back. +('n' is the outlet number reported by the upsc command) + +TODO LIST +--------- + +Report UPS statistics informations:: +BCM/XCP supports reporting of UPS statistics data. + +Change settings:: +Access the config register to change settings. + +BUGS +---- +None known. + +AUTHOR +------ +Tore Ørpetveit + +SEE ALSO +-------- +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +The USB BCM/XCP driver: +~~~~~~~~~~~~~~~~~~~~~~~ +linkman:bcmxcp_usb[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bcmxcp_usb.8 b/docs/man/bcmxcp_usb.8 new file mode 100644 index 0000000..591c43e --- /dev/null +++ b/docs/man/bcmxcp_usb.8 @@ -0,0 +1,114 @@ +'\" t +.\" Title: bcmxcp_usb +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BCMXCP_USB" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +bcmxcp_usb \- Experimental driver for UPSes supporting the BCM/XCP protocol over USB +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the bcmxcp_usb driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. This driver is a variant of the serial driver bcmxcp and uses the same core code\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver should recognize all BCM/XCP\-compatible UPSes that are connected via USB\&. It has been developed and tested on Powerware PW3501 hardware\&. It also has been tested on PW5110 hardware\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5)\&. +.PP +\fBshutdown_delay=\fR\fIdelay\fR +.RS 4 +The number of seconds that the UPS should wait between receiving the shutdown command and actually shutting off\&. +.RE +.SH "DEFAULT VALUES FOR THE EXTRA ARGUMENTS" +.sp +\fBshutdown_delay =\fR\fI120\fR +.SH "INSTANT COMMANDS" +.sp +This driver supports the following Instant Commands: +.PP +\fBshutdown\&.return\fR +.RS 4 +Turn off the load and return when power is back\&. +.RE +.PP +\fBshutdown\&.stayoff\fR +.RS 4 +Turn off the load and remain off\&. +.RE +.PP +\fBtest\&.battery\&.start\fR +.RS 4 +Start a battery test\&. +.RE +.SH "TODO LIST" +.PP +\fBReport UPS alarm status\fR +.RS 4 +BCM/XCP supports reporting a wide range of UPS alarm conditions\&. +.RE +.PP +\fBReport UPS statistics informations\fR +.RS 4 +BCM/XCP supports reporting of UPS statistics data\&. +.RE +.SH "EXPERIMENTAL DRIVER" +.sp +This driver has been tagged experimental, even if it has been reported to be stable\&. Thus it is not suitable for production systems and it is not built by default\&. This is mainly due to the fact that it is a new driver\&. +.SH "INSTALLATION" +.sp +This driver is not built by default\&. You can build it by using "configure \-\-with\-usb=yes"\&. Note that it will also install other USB drivers\&. +.sp +You also need to install manually the hotplug files (libhidups and libhid\&.usermap), generally in etc/hotplug/usb/, to address the permission settings problem\&. Lastly note that the libhidups file must have execution flag set (ie using chmod +x \&...)\&. +.SH "IMPLEMENTATION" +.sp +bcmxcp_usb only supports 1 UPS at this time\&. You can put the "auto" value for port in ups\&.conf, i\&.e\&.: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[pw3105] + driver = bcmxcp_usb + port = auto +.fi +.if n \{\ +.RE +.\} +.SH "KNOWN ISSUES AND BUGS" +.SS ""Got EPERM: Operation not permitted upon driver startup"" +.sp +You have forgotten to install the hotplug files, as explained in the INSTALLATION section above\&. Don\(cqt forget to restart hotplug so that it applies these changes\&. +.SH "AUTHOR" +.sp +Tore Ørpetveit , Wolfgang Ocker +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/bcmxcp_usb.8 b/docs/man/bcmxcp_usb.txt similarity index 57% rename from man/bcmxcp_usb.8 rename to docs/man/bcmxcp_usb.txt index de238d3..a69d631 100644 --- a/man/bcmxcp_usb.8 +++ b/docs/man/bcmxcp_usb.txt @@ -1,58 +1,70 @@ -.TH BCMXCP_USB 8 "Sun Sep 19 2004" "" "Network UPS Tools (NUT)" -.SH NAME -bcmxcp \- Experimental driver for UPS'es supporting the BCM/XCP protocol over USB -.SH NOTE -This man page only documents the hardware\(hyspecific features of the +BCMXCP_USB(8) +============= + +NAME +---- +bcmxcp_usb - Experimental driver for UPSes supporting the BCM/XCP protocol over USB + +NOTE +---- +This man page only documents the hardware-specific features of the bcmxcp_usb driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +linkman:nutupsdrv[8]. This driver is a variant of the serial driver bcmxcp and uses the same core code. -.SH SUPPORTED HARDWARE -This driver should recognize all BCM/XCP-compatible UPS'es that are connected +SUPPORTED HARDWARE +------------------ +This driver should recognize all BCM/XCP-compatible UPSes that are connected via USB. It has been developed and tested on Powerware PW3501 hardware. It also has been tested on PW5110 hardware. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver supports the following optional settings in the -\fBups.conf\fR(5). +linkman:ups.conf[5]. -.IP "shutdown_delay=\fIdelay\fR" +*shutdown_delay=*'delay':: The number of seconds that the UPS should wait between receiving the shutdown command and actually shutting off. -.SH DEFAULT VALUES FOR THE EXTRA ARGUMENTS -.IP "shutdown_delay = \fI120\fR" +DEFAULT VALUES FOR THE EXTRA ARGUMENTS +-------------------------------------- +*shutdown_delay =*'120' -.SH INSTANT COMMANDS +INSTANT COMMANDS +---------------- This driver supports the following Instant Commands: -.IP "shutdown.return" +*shutdown.return*:: Turn off the load and return when power is back. -.IP "shutdown.stayoff" +*shutdown.stayoff*:: Turn off the load and remain off. -.IP "test.battery.start" +*test.battery.start*:: Start a battery test. -.SH TODO LIST +TODO LIST +--------- -.IP "Report UPS alarm status" +*Report UPS alarm status*:: BCM/XCP supports reporting a wide range of UPS alarm conditions. -.IP "Report UPS statistics informations" +*Report UPS statistics informations*:: BCM/XCP supports reporting of UPS statistics data. -.SH EXPERIMENTAL DRIVER +EXPERIMENTAL DRIVER +------------------- This driver has been tagged experimental, even if it has been reported to be stable. Thus it is not suitable for production systems and it is not built by default. This is mainly due to the fact that it is a new driver. -.SH INSTALLATION +INSTALLATION +------------ This driver is not built by default. You can build it by using -"configure \-\-with\-usb=yes". Note that it will also install other USB +"configure --with-usb=yes". Note that it will also install other USB drivers. You also need to install manually the hotplug files (libhidups and @@ -60,31 +72,36 @@ libhid.usermap), generally in etc/hotplug/usb/, to address the permission settings problem. Lastly note that the libhidups file must have execution flag set (ie using chmod +x ...). -.SH IMPLEMENTATION +IMPLEMENTATION +-------------- bcmxcp_usb only supports 1 UPS at this time. You can put the -"auto" value for port in \fBups.conf\fR, i.e.: +"auto" value for port in `ups.conf`, i.e.: -.nf [pw3105] driver = bcmxcp_usb port = auto -.fi -.SH KNOWN ISSUES AND BUGS -.SS "Got EPERM: Operation not permitted upon driver startup" +KNOWN ISSUES AND BUGS +--------------------- +"Got EPERM: Operation not permitted upon driver startup" +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You have forgotten to install the hotplug files, as explained in the INSTALLATION section above. Don't forget to restart hotplug so that it applies these changes. -.SH AUTHOR -Tore \[/O]rpetveit , +AUTHOR +------ +Tore Ørpetveit , Wolfgang Ocker -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/belkin.8 b/docs/man/belkin.8 new file mode 100644 index 0000000..4aa1378 --- /dev/null +++ b/docs/man/belkin.8 @@ -0,0 +1,68 @@ +'\" t +.\" Title: belkin +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BELKIN" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +belkin \- Driver for Belkin serial UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the belkin driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The \fBbelkin\fR driver is known to support the Regulator Pro 525 (F6C525\-SER)\&. Other similar models such as the 425 and 625 should also work\&. +.sp +The Trust UPS and older Belkin units are not supported\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "BUGS" +.sp +There are dragons lurking within the protocol to this UPS\&. I have one that essentially behaves like a glorified power strip due to some invasive probing on my part\&. Don\(cqt mess with it directly\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +the driver doesn\(cqt go anywhere near these character sequences, so it won\(cqt zap your UPS\&. I only mention this here as yet another reminder of the perils of closed hardware\&. +.sp .5v +.RE +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/belkin.8 b/docs/man/belkin.txt similarity index 54% rename from man/belkin.8 rename to docs/man/belkin.txt index 6f1596f..495201e 100644 --- a/man/belkin.8 +++ b/docs/man/belkin.txt @@ -1,36 +1,49 @@ -.TH BELKIN 8 "Tue Jul 29 2003" "" "Network UPS Tools (NUT)" -.SH NAME -belkin \- Driver for Belkin serial UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the -belkin driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +BELKIN(8) +========= -.SH SUPPORTED HARDWARE -The belkin driver is known to support the Regulator Pro 525 (F6C525\(hySER). +NAME +---- + +belkin - Driver for Belkin serial UPS equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the +belkin driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +The *belkin* driver is known to support the Regulator Pro 525 (F6C525-SER). Other similar models such as the 425 and 625 should also work. The Trust UPS and older Belkin units are not supported. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver does not support any extra settings in the -\fBups.conf\fR(5). +linkman:ups.conf[5]. -.SH BUGS +BUGS +---- There are dragons lurking within the protocol to this UPS. I have one that essentially behaves like a glorified power strip due to some invasive probing on my part. Don't mess with it directly. -Note: the driver doesn't go anywhere near these character sequences, +NOTE: the driver doesn't go anywhere near these character sequences, so it won't zap your UPS. I only mention this here as yet another reminder of the perils of closed hardware. -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/belkinunv.8 b/docs/man/belkinunv.8 new file mode 100644 index 0000000..eca4c8c --- /dev/null +++ b/docs/man/belkinunv.8 @@ -0,0 +1,352 @@ +'\" t +.\" Title: belkinunv +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BELKINUNV" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +belkinunv \- Driver for Belkin "Universal UPS" and compatible +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the belkin driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The belkinunv driver is known to work with the Belkin Universal UPS models F6C800\-UNV and F6C120\-UNV, and is expected to work with other Belkin Universal UPS models\&. The driver only supports serial communication, not USB\&. +.sp +The Trust UPS and older Belkin units are not supported by this driver, and neither are the Belkin Home Office models (F6H500\-SER and so forth)\&. However, some Belkin models, such as the Regulator Pro, are supported by the \fBbelkin\fR(8) driver, and the Home Office models are supported using the \fBgenericups\fR(8) driver with upstype=7\&. +.SH "SOFT SHUTDOWN WORKAROUND" +.sp +One problem with the Belkin Universal UPS is that it cannot enter a soft shutdown (shut down the load until AC power returns) unless the batteries are completely depleted\&. Thus, one cannot just shut off the UPS after operating system shutdown; it will not come back on when the power comes back on\&. Therefore, the belkinunv driver should never be used with the \fB\-k\fR option\&. Instead, the \fB\-x wait\fR option is provided as a workaround\&. +.sp +When called with the \fB\-x wait\fR option, \fBbelkinunv\fR behaves as a standalone program (i\&.e\&., it does not fork into the background)\&. It performs one simple task: it connects to the UPS, waits for AC power to return, and then exits with status 0\&. +.sp +This is meant to be used in a shutdown script as follows: during a shutdown, after all filesystems have been remounted read\-only, and just before the system would normally be halted: check /etc/killpower (or similar) to see if this shutdown was caused by \fBupsmon\fR(8), and if yes, call \fBbelkinunv \-x wait\fR\&. If AC power comes back on, \fBbelkinunv\fR exits, and things should be arranged so that the system reboots in this case\&. If AC power does not come back on, the UPS will eventually run out of batteries, kill the computer\(cqs power supply, and go into soft shutdown mode, which means everything will reboot properly when the power returns\&. In either case, a deadlock is avoided\&. +.sp +In addition, if an optional integer argument is given to the \fB\-x wait\fR option, this causes \fBbelkinunv\fR to wait not only for AC power to be present, but also for the battery charge to reach the given level\&. I use this as part of my startup scripts, to ensure that the batteries are sufficiently charged before the computer continues booting\&. This should be put very early in the startup script, before any filesystems are mounted read/write, and before any filesystem checks are performed\&. +.sp +Several other \fB\-x\fR options are provided to fine\-tune this behavior\&. See the options below for detailed descriptions\&. See the examples below for examples of how to use \fBbelkinunv\fR in shutdown and startup scripts\&. +.SH "OPTIONS" +.sp +See also \fBnutupsdrv\fR(8) for generic options\&. Never use the \fB\-k\fR option with this driver; it does not work properly\&. +.PP +\fB\-x wait\fR[=\fIlevel\fR] +.RS 4 +When this option is used, +\fBbelkinunv\fR +does not fork into the background, but behaves as a standalone program\&. It connects to the UPS and waits until AC power is present\&. If +\fIlevel\fR +is specified, it also waits until the battery charge reaches at least the given level in percent\&. Then, and only then, +\fBbelkinunv\fR +exits\&. In addition, while +\fBbelkinunv\fR +runs in this mode, it displays a status line with information on the UPS status and battery level\&. This is intended for use in the computer\(cqs shutdown and startup scripts, as described under +Soft Shutdown Workaround +above\&. +.RE +.PP +\fB\-x nohang\fR +.RS 4 +This option only has an effect when used in conjunction with the +\fB\-x wait\fR +option\&. It causes +\fBbelkinunv\fR +to exit if a connection with the UPS cannot be established or is lost, instead of retrying forever, which is the default behavior\&. The +\fB\-x nohang\fR +option should be used in a startup script, to ensure the computer remains bootable even if the UPS has been disconnected during the power failure (for instance, you attached your computer to a generator, carried it to a neighbor\(cqs house, or whatever)\&. +.RE +.PP +\fB\-x flash\fR +.RS 4 +This option only has an effect when used in conjunction with the +\fB\-x wait\fR +option\&. It causes the UPS load to be shut off for a short time ("flashed") just after the AC power has returned and the requested battery level (if any) has been attained\&. This is useful if slaves are attached to this UPS; the flash will cause all of them to reboot\&. Note that, due to the design of the Belkin UPS hardware, the load shutdown lasts ca\&. 1\(em2 minutes; a shorter flash cannot be performed reliably\&. Also, the computers will reboot at the scheduled time, on battery power if necessary, even if AC power fails again in the meantime\&. This should not be a problem, as your startup scripts can catch this situation\&. +.RE +.PP +\fB\-x silent\fR +.RS 4 +This option only has an effect when used in conjunction with the +\fB\-x wait\fR +option\&. It suppresses the status line which +\fBbelkinunv\fR +would normally print\&. +.RE +.PP +\fB\-x dumbterm\fR +.RS 4 +This option only has an effect when used in conjunction with the +\fB\-x wait\fR +option\&. It changes the way in which +\fBbelkinunv\fR +prints its status line\&. Normally, terminal control sequences are used to overwrite the same line with new status information, each time the status is updated\&. This may not work on all terminals\&. If the +\fB\-x dumbterm\fR +option is given, each status update is written on a new line\&. +.RE +.SH "VARIABLES" +.PP +\fBbattery\&.charge\fR, \fBbattery\&.runtime\fR +.RS 4 +not supported by all hardware\&. +.RE +.PP +\fBbattery\&.voltage\fR, \fBbattery\&.voltage\&.nominal\fR, \fBdriver\&.version\&.internal\fR, \fBinput\&.frequency\fR, \fBinput\&.frequency\&.nominal\fR +.RS 4 +e\&.g\&. 60 for 60Hz +.RE +.PP +\fBinput\&.sensitivity\fR +.RS 4 +writable: normal/medium/low +.RE +.PP +\fBinput\&.transfer\&.high\fR +.RS 4 +writable: high transfer voltage point in V +.RE +.PP +\fBinput\&.transfer\&.low\fR +.RS 4 +writable: low transfer voltage point in V +.RE +.PP +\fBinput\&.voltage\fR, \fBinput\&.voltage\&.maximum\fR, \fBinput\&.voltage\&.minimum\fR, \fBinput\&.voltage\&.nominal\fR, \fBoutput\&.frequency\fR, \fBoutput\&.voltage\fR, \fBups\&.beeper\&.status\fR +.RS 4 +writable\&. Values: enabled/disabled/muted\&. This variable controls the state of the panel beeper\&. Enabled means sound when the alarm is present, disabled means never sound, and muted means the sound is temporarily disabled until the alarm would normally stop sounding\&. In the muted state, the beeper is automatically turned back on at the next event (AC failure, battery test, etc)\&. Also, the beeper can\(cqt be turned off during a critical event (low battery)\&. Note that not all UPS models support the "disabled" state\&. +.RE +.PP +\fBups\&.firmware\fR, \fBups\&.load\fR, \fBups\&.model\fR, \fBups\&.power\&.nominal\fR +.RS 4 +e\&.g\&. 800 for an 800VA system +.RE +.PP +\fBups\&.status\fR +.RS 4 +a list of flags; see the +status flags +below\&. +.RE +.PP +\fBups\&.temperature\fR +.RS 4 +not supported by all hardware\&. +.RE +.PP +\fBups\&.test\&.result\fR, \fBups\&.delay\&.restart\fR +.RS 4 +time to restart (read only) +.RE +.PP +\fBups\&.delay\&.shutdown\fR +.RS 4 +time to shutdown (read only)\&. This is always a multiple of 60 seconds\&. +.RE +.PP +\fBups\&.type\fR +.RS 4 +ONLINE/OFFLINE/LINEINT\&. This describes the basic layout of this UPS (for GUI clients which want to draw an animated picture of power flow)\&. An offline UPS has a direct connection from AC input to AC output, and also a connection from AC input to the battery, and from the battery to AC output\&. An online UPS lacks the direct connection from AC input to AC output, whereas a line interactive UPS lacks the connection from AC input to the battery\&. +.RE +.SH "COMMANDS" +.PP +\fBbeeper\&.enable, beeper\&.disable, beeper\&.mute\fR +.RS 4 +Enable, disable or mute the panel beeper\&. Note that if the beeper is muted, it is automatically turned back on at the next event (AC failure, battery test, etc)\&. Also, the beeper can\(cqt be turned muted during a critical event (low battery)\&. +.RE +.PP +\fBreset\&.input\&.minmax\fR +.RS 4 +Reset the variables +\fBinput\&.voltage\&.minimum\fR +and +\fBinput\&.voltage\&.maximum\fR\&. +.RE +.PP +\fBshutdown\&.reboot\fR +.RS 4 +Shut down load immediately for about 1\(em2 minutes\&. +.RE +.PP +\fBshutdown\&.reboot\&.graceful\fR +.RS 4 +After 40 second delay, shut down load for about 1\(em2 minutes\&. +.RE +.PP +\fBshutdown\&.stayoff\fR +.RS 4 +Shut down load immediately and stay off\&. The only way it can be turned back on is by manually pressing the front panel button\&. +.RE +.PP +\fBtest\&.battery\&.start, test\&.battery\&.stop\fR +.RS 4 +Start/stop 10 second battery test\&. +.RE +.PP +\fBtest\&.failure\&.start, test\&.failure\&.stop\fR +.RS 4 +Start/stop "deep" battery test\&. +.RE +.SH "STATUS FLAGS" +.PP +\fBOB\fR +.RS 4 +load is on battery, including during tests +.RE +.PP +\fBOFF\fR +.RS 4 +load is off +.RE +.PP +\fBOL\fR +.RS 4 +load is online +.RE +.PP +\fBACFAIL\fR +.RS 4 +AC failure\&. Note that this refers to the AC input, and thus it is not the same as "OB"\&. An AC failure can occur at any time, for instance, during a battery test, or when the UPS load is off\&. +.RE +.PP +\fBOVER\fR +.RS 4 +overload +.RE +.PP +\fBOVERHEAT\fR +.RS 4 +overheat +.RE +.PP +\fBCOMMFAULT\fR +.RS 4 +UPS fault +.RE +.PP +\fBLB\fR +.RS 4 +low battery +.RE +.PP +\fBCHRG\fR +.RS 4 +charging +.RE +.PP +\fBDEPLETED\fR +.RS 4 +the battery is depleted\&. When the UPS raises this flag, it simultaneously switches off the load\&. +.RE +.PP +\fBRB\fR +.RS 4 +replace battery +.RE +.SH "EXAMPLES" +.sp +Here is an example for how \fBbelkinunv\fR should be used in a computer\(cqs shutdown script\&. These commands should go in the very last part of the shutdown script, after all file systems have been mounted read\-only, and just before the computer halts\&. Note that \fBbelkinunv\fR must be installed in a directory which is still readable at that point\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# NEAR END OF SHUTDOWN SCRIPT: +# if shutdown was caused by UPS, perform Belkin UPS workaround\&. +if [ \-f /etc/killpower ] ; then + echo "Waiting for AC power, or for UPS batteries to run out\&.\&.\&." + /usr/bin/belkinunv \-x wait /dev/ttyS1 +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf + # we get here if the power came back on\&. Reboot\&. + echo "Power is back\&. Rebooting\&.\&.\&." + reboot +fi +.fi +.if n \{\ +.RE +.\} +.sp +And here is an example of how to use \fBbelkinunv\fR in the startup script\&. These commands should go near the beginning of the startup script, before any file systems are mounted read/write, and before any file system integrity checks are done\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# NEAR BEGINNING OF STARTUP SCRIPT: +# if we are recovering from a power failure, wait for the UPS to +# charge to a comfortable level before writing anything to disk +if [ \-f /etc/killpower ] ; then + echo "Waiting for UPS battery charge to reach 60%\&.\&.\&." + /usr/bin/belkinunv \-x wait=60 \-x nohang /dev/ttyS1 +fi +.fi +.if n \{\ +.RE +.\} +.SH "EXIT STATUS" +.sp +When used normally, \fBbelkinunv\fR forks into the background and its diagnostics are the same as for all NUT drivers, see \fBnutupsdrv\fR(8)\&. +.sp +When used with the \fB\-x wait\fR option, the exit status is normally \fB0\fR\&. If the \fB\-x nohang\fR option has also been specified, an exit status of \fB1\fR indicates that communication with the UPS was lost\&. If the \fB\-x flash\fR option has been specified, an exit status of \fB2\fR indicates that the timed shutdown has failed\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in \fBups.conf\fR(5)\&. +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The NUT (Network UPS Tools) home page: +http://www\&.networkupstools\&.org/ +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The documentation for the protocol used by this UPS: +belkin\-universal\-ups\&.html +.RE +.SH "AUTHOR" +.sp +Peter Selinger diff --git a/docs/man/belkinunv.txt b/docs/man/belkinunv.txt new file mode 100644 index 0000000..9f7b6af --- /dev/null +++ b/docs/man/belkinunv.txt @@ -0,0 +1,344 @@ +BELKINUNV(8) +============ + +NAME +---- + +belkinunv - Driver for Belkin "Universal UPS" and compatible + +NOTE +---- +This man page only documents the hardware-specific features of the +belkin driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +The belkinunv driver is known to work with the Belkin Universal UPS +models F6C800-UNV and F6C120-UNV, and is expected to work with other +Belkin Universal UPS models. The driver only supports serial +communication, not USB. + +The Trust UPS and older Belkin units are not supported by this driver, +and neither are the Belkin Home Office models (F6H500-SER and so +forth). However, some Belkin models, such as the Regulator Pro, are +supported by the linkman:belkin[8] driver, and the Home Office models +are supported using the linkman:genericups[8] driver with +`upstype=7`. + +SOFT SHUTDOWN WORKAROUND +------------------------ +One problem with the Belkin Universal UPS is that it cannot enter a +soft shutdown (shut down the load until AC power returns) unless the +batteries are completely depleted. Thus, one cannot just shut off the +UPS after operating system shutdown; it will not come back on when the +power comes back on. Therefore, the belkinunv driver should never be +used with the *-k* option. Instead, the *-x wait* option is +provided as a workaround. + +When called with the *-x wait* option, *belkinunv* behaves as +a standalone program (i.e., it does not fork into the background). It +performs one simple task: it connects to the UPS, waits for AC power +to return, and then exits with status 0. + +This is meant to be used in a shutdown script as follows: during a +shutdown, after all filesystems have been remounted read-only, and +just before the system would normally be halted: check /etc/killpower +(or similar) to see if this shutdown was caused by linkman:upsmon[8], +and if yes, call *belkinunv -x wait*. If AC power comes back on, +*belkinunv* exits, and things should be arranged so that the +system reboots in this case. If AC power does not come back on, the +UPS will eventually run out of batteries, kill the computer's power +supply, and go into soft shutdown mode, which means everything will +reboot properly when the power returns. In either case, a deadlock is +avoided. + +In addition, if an optional integer argument is given to the *-x wait* +option, this causes *belkinunv* to wait not only for AC power to be present, +but also for the battery charge to reach the given level. I use this as part of +my startup scripts, to ensure that the batteries are sufficiently charged +before the computer continues booting. This should be put very early in the +startup script, before any filesystems are mounted read/write, and before any +filesystem checks are performed. + +Several other *-x* options are provided to fine-tune this +behavior. See the <<_options,options>> below for detailed descriptions. See the +<<_examples,examples>> +below for examples of how to use *belkinunv* in shutdown and +startup scripts. + +OPTIONS +------- +See also linkman:nutupsdrv[8] for generic options. Never use the +*-k* option with this driver; it does not work properly. + +*-x wait*[='level']:: +When this option is used, *belkinunv* does not fork into the +background, but behaves as a standalone program. It connects to the UPS and +waits until AC power is present. If 'level' is specified, it also +waits until the battery charge reaches at least the given level in +percent. Then, and only then, *belkinunv* exits. In addition, +while *belkinunv* runs in this mode, it displays a status line +with information on the UPS status and battery level. This is intended +for use in the computer's shutdown and startup scripts, as described +under <<_soft_shutdown_workaround,Soft Shutdown Workaround>> above. + +*-x nohang*:: +This option only has an effect when used in conjunction with the *-x wait* +option. It causes *belkinunv* to exit if a connection with +the UPS cannot be established or is lost, instead of retrying forever, +which is the default behavior. The *-x nohang* option should be +used in a startup +script, to ensure the computer remains bootable even if the UPS has +been disconnected during the power failure (for instance, you attached +your computer to a generator, carried it to a neighbor's house, or +whatever). + +*-x flash*:: +This option only has an effect when used in conjunction with the *-x wait* +option. It causes the UPS load to be shut off for a short time +("flashed") just after the AC power has returned and the requested +battery level (if any) has been attained. This is useful if slaves are +attached to this UPS; the flash will cause all of them to reboot. Note +that, due to the design of the Belkin UPS hardware, the load shutdown lasts +ca. 1--2 minutes; a shorter flash cannot be performed reliably. Also, +the computers will reboot at the scheduled time, on battery power if +necessary, even if AC power fails again in the meantime. This should +not be a problem, as your startup scripts can catch this situation. + +*-x silent*:: +This option only has an effect when used in conjunction with the *-x wait* +option. It suppresses the status line which *belkinunv* +would normally print. + +*-x dumbterm*:: +This option only has an effect when used in conjunction with the *-x wait* +option. It changes the way in which *belkinunv* prints its +status line. Normally, terminal control sequences are used to +overwrite the same line with new status information, each time the +status is updated. This may not work on all terminals. If the *-x dumbterm* +option is given, each status update is written on a new +line. + +VARIABLES +--------- +*battery.charge*:: + +*battery.runtime*:: +not supported by all hardware. + +*battery.voltage*:: + +*battery.voltage.nominal*:: + +*driver.version.internal*:: + +*input.frequency*:: + +*input.frequency.nominal*:: +e.g. 60 for 60Hz + +*input.sensitivity*:: +writable: normal/medium/low + +*input.transfer.high*:: +writable: high transfer voltage point in V + +*input.transfer.low*:: +writable: low transfer voltage point in V + +*input.voltage*:: + +*input.voltage.maximum*:: + +*input.voltage.minimum*:: + +*input.voltage.nominal*:: + +*output.frequency*:: + +*output.voltage*:: + +*ups.beeper.status*:: +writable. Values: enabled/disabled/muted. This variable controls the +state of the panel beeper. Enabled means sound when the alarm is +present, disabled means never sound, and muted means the sound is +temporarily disabled until the alarm would normally stop sounding. In +the muted state, the beeper is automatically turned back on at the +next event (AC failure, battery test, etc). Also, the beeper can't be +turned off during a critical event (low battery). Note that not all +UPS models support the "disabled" state. + +*ups.firmware*:: + +*ups.load*:: + +*ups.model*:: + +*ups.power.nominal*:: +e.g. 800 for an 800VA system + +*ups.status*:: +a list of flags; see the <<_status_flags,status flags>> below. + +*ups.temperature*:: +not supported by all hardware. + +*ups.test.result*:: + +*ups.delay.restart*:: +time to restart (read only) + +*ups.delay.shutdown*:: +time to shutdown (read only). This is always a multiple of 60 seconds. + +*ups.type*:: +ONLINE/OFFLINE/LINEINT. This describes the basic layout of this UPS +(for GUI clients which want to draw an animated picture of power +flow). An offline UPS has a direct connection from AC input to AC +output, and also a connection from AC input to the battery, and from +the battery to AC output. An online UPS lacks the direct connection +from AC input to AC output, whereas a line interactive UPS lacks the +connection from AC input to the battery. + + +COMMANDS +-------- + +*beeper.enable, beeper.disable, beeper.mute*:: +Enable, disable or mute the panel beeper. Note that if the beeper is +muted, it is automatically turned back on at the next event (AC failure, +battery test, etc). Also, the beeper can't be turned muted during a +critical event (low battery). + +*reset.input.minmax*:: +Reset the variables *input.voltage.minimum* and +*input.voltage.maximum*. + +*shutdown.reboot*:: +Shut down load immediately for about 1--2 minutes. + +*shutdown.reboot.graceful*:: +After 40 second delay, shut down load for about 1--2 minutes. + +*shutdown.stayoff*:: +Shut down load immediately and stay off. The only way it can be turned +back on is by manually pressing the front panel button. + +*test.battery.start, test.battery.stop*:: +Start/stop 10 second battery test. + +*test.failure.start, test.failure.stop*:: +Start/stop "deep" battery test. + + +STATUS FLAGS +------------ + +*OB*:: +load is on battery, including during tests + +*OFF*:: +load is off + +*OL*:: +load is online + +*ACFAIL*:: +AC failure. Note that this refers to the AC input, and thus it is not +the same as "OB". An AC failure can occur at any time, for instance, +during a battery test, or when the UPS load is off. + +*OVER*:: +overload + +*OVERHEAT*:: +overheat + +*COMMFAULT*:: +UPS fault + +*LB*:: +low battery + +*CHRG*:: +charging + +*DEPLETED*:: +the battery is depleted. When the UPS raises this flag, it +simultaneously switches off the load. + +*RB*:: +replace battery + +EXAMPLES +-------- + +Here is an example for how *belkinunv* should be used in a +computer's shutdown script. These commands should go in the very last +part of the shutdown script, after all file systems have been mounted +read-only, and just before the computer halts. Note that +*belkinunv* must be installed in a directory which is still +readable at that point. + + + # NEAR END OF SHUTDOWN SCRIPT: + # if shutdown was caused by UPS, perform Belkin UPS workaround. + if [ -f /etc/killpower ] ; then + echo "Waiting for AC power, or for UPS batteries to run out..." + /usr/bin/belkinunv -x wait /dev/ttyS1 + + # we get here if the power came back on. Reboot. + echo "Power is back. Rebooting..." + reboot + fi + +And here is an example of how to use *belkinunv* in the startup +script. These commands should go near the beginning of the startup +script, before any file systems are mounted read/write, and before any +file system integrity checks are done. + + + # NEAR BEGINNING OF STARTUP SCRIPT: + # if we are recovering from a power failure, wait for the UPS to + # charge to a comfortable level before writing anything to disk + if [ -f /etc/killpower ] ; then + echo "Waiting for UPS battery charge to reach 60%..." + /usr/bin/belkinunv -x wait=60 -x nohang /dev/ttyS1 + fi + +EXIT STATUS +----------- + +When used normally, *belkinunv* forks into the background and its +diagnostics are the same as for all NUT drivers, see +linkman:nutupsdrv[8]. + +When used with the *-x wait* option, the exit status is normally +*0*. If the *-x nohang* option has also been specified, an exit +status of *1* indicates that communication with the UPS was lost. If the +*-x flash* option has been specified, an exit status of *2* +indicates that the timed shutdown has failed. + +EXTRA ARGUMENTS +--------------- + +This driver does not support any extra settings in linkman:ups.conf[5]. + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ + - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + - The documentation for the protocol used by this UPS: +link:http://www.mscs.dal.ca/~selinger/ups/belkin-universal-ups.html[belkin-universal-ups.html] + +AUTHOR +------ + +Peter Selinger diff --git a/docs/man/bestfcom.8 b/docs/man/bestfcom.8 new file mode 100644 index 0000000..dfeafd1 --- /dev/null +++ b/docs/man/bestfcom.8 @@ -0,0 +1,56 @@ +'\" t +.\" Title: bestfcom +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BESTFCOM" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +bestfcom \- Driver for Best Power Fortress/Ferrups +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the bestfcom driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +Best Power Fortress/Ferrups implementing the Fortress UPS Protocol (f\-command set)\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "AUTHORS" +.sp +Kent Polk (bestfcom) +.sp +Andreas Wrede, John Stone (bestuferrups) +.sp +Grant Taylor (bestfort) +.sp +Russell Kroll (bestups) +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/bestfcom.8 b/docs/man/bestfcom.txt similarity index 57% rename from man/bestfcom.8 rename to docs/man/bestfcom.txt index 985558d..d742e8a 100644 --- a/man/bestfcom.8 +++ b/docs/man/bestfcom.txt @@ -1,21 +1,30 @@ -.TH bestfcom 8 "Thu Jul 8 2004" "" "Network UPS Tools (NUT)" -.SH NAME -bestfcom \- Driver for Best Power Fortress/Ferrups -.SH NOTE +BESTFCOM(8) +=========== + +NAME +---- + +bestfcom - Driver for Best Power Fortress/Ferrups + +NOTE +---- This man page only documents the hardware-specific features of the bestfcom driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +linkman:nutupsdrv[8]. -.SH SUPPORTED HARDWARE +SUPPORTED HARDWARE +------------------ Best Power Fortress/Ferrups implementing the Fortress UPS Protocol (f-command set). -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver does not support any extra settings in the -\fBups.conf\fR(5). +linkman:ups.conf[5]. -.SH AUTHORS +AUTHORS +------- Kent Polk (bestfcom) Andreas Wrede, John Stone (bestuferrups) @@ -24,10 +33,13 @@ Grant Taylor (bestfort) Russell Kroll (bestups) -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bestfortress.8 b/docs/man/bestfortress.8 new file mode 100644 index 0000000..031c8fe --- /dev/null +++ b/docs/man/bestfortress.8 @@ -0,0 +1,65 @@ +'\" t +.\" Title: bestfortress +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BESTFORTRESS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +bestfortress \- Driver for old Best Fortress UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the bestfortress driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports old Best Fortress UPS equipment using a serial connection\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBbaudrate\fR=\fInum\fR +.RS 4 +Set the speed of the serial connection \- 1200, 2400, 4800 or 9600\&. +.RE +.PP +\fBmax_load\fR=\fIVA\fR +.RS 4 +Set the full\-scale value of the +\fBups\&.load\fR +variable\&. +.RE +.SH "AUTHOR" +.sp +Holger Dietze , Stuart D\&. Gathman +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "The newer Best Power drivers:" +.sp +\fBbestups\fR(8), \fBbestuferrups\fR(8), \fBbestfcom\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/bestfortress.txt b/docs/man/bestfortress.txt new file mode 100644 index 0000000..8bc969a --- /dev/null +++ b/docs/man/bestfortress.txt @@ -0,0 +1,49 @@ +BESTFORTRESS(8) +=============== + +NAME +---- + +bestfortress - Driver for old Best Fortress UPS equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the +bestfortress driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports old Best Fortress UPS equipment using a serial connection. + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in the +linkman:ups.conf[5]: + +*baudrate*='num':: +Set the speed of the serial connection - 1200, 2400, 4800 or 9600. + +*max_load*='VA':: +Set the full-scale value of the *ups.load* variable. + +AUTHOR +------ +Holger Dietze , +Stuart D. Gathman + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +The newer Best Power drivers: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +linkman:bestups[8], linkman:bestuferrups[8], linkman:bestfcom[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bestuferrups.8 b/docs/man/bestuferrups.8 new file mode 100644 index 0000000..e45ab0a --- /dev/null +++ b/docs/man/bestuferrups.8 @@ -0,0 +1,54 @@ +'\" t +.\" Title: bestuferrups +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BESTUFERRUPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +bestuferrups \- Driver for Best Power Micro\-Ferrups +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the bestuferrups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +Best Power Micro\-Ferrups ME3100, probably other similar models too\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "AUTHORS" +.sp +Andreas Wrede, John Stone (bestuferrups) +.sp +Grant Taylor (bestfort) +.sp +Russell Kroll (bestups) +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/bestuferrups.txt b/docs/man/bestuferrups.txt new file mode 100644 index 0000000..49f4645 --- /dev/null +++ b/docs/man/bestuferrups.txt @@ -0,0 +1,42 @@ +BESTUFERRUPS(8) +=============== + +NAME +---- + +bestuferrups - Driver for Best Power Micro-Ferrups + +NOTE +---- +This man page only documents the hardware-specific features of the +bestuferrups driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +Best Power Micro-Ferrups ME3100, probably other similar models too. + +EXTRA ARGUMENTS +--------------- + +This driver does not support any extra settings in the +linkman:ups.conf[5]. + +AUTHORS +------- +Andreas Wrede, John Stone (bestuferrups) + +Grant Taylor (bestfort) + +Russell Kroll (bestups) + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bestups.8 b/docs/man/bestups.8 new file mode 100644 index 0000000..aed0cee --- /dev/null +++ b/docs/man/bestups.8 @@ -0,0 +1,105 @@ +'\" t +.\" Title: bestups +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BESTUPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +bestups \- Driver for Best Power / SOLA (Phoenixtec protocol) UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the bestups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +\fBbestups\fR was designed to monitor Best Power UPS hardware like the Fortress, Fortress Telecom, Axxium Rackmount and Patriot Pro\&. It also recognizes and supports SOLA units such as the 325, 520 and 620\&. In addition, the Best 610 is supported using the \(oqID\(cq option\&. +.sp +Other UPS hardware using the Phoenixtec protocol should also work, but they will generate a warning since their battery information is not known\&. +.sp +This driver does not support some older Best/SOLA units\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBnombattvolt=\fR\fInum\fR +.RS 4 +Override the battery float voltage which is normally determined by asking the hardware\&. This is useful if your UPS constantly reports +battery\&.charge +values just below 100% even when it\(cqs completely charged\&. +.sp +If you have this problem, set this to whatever +battery\&.voltage +reports when the UPS is known to be completely charged with a good battery\&. +.sp +The author\(cqs Best Fortress 750 uses +nombattvolt=27\&.4\&. +.RE +.PP +\fBbattvoltmult=\fR\fInum\fR +.RS 4 +Multiply the reported battery voltage by this number\&. Some devices report only a fraction of the total battery voltage\&. +.sp +For example, the SOLA 610 700VA UPS (with a 24V battery) reports the single cell voltage (about 2\&.27V when fully charged)\&. In this particular case you can set +battvoltmult = 12 +in +\fBups.conf\fR(8) +to fix this\&. +.RE +.PP +\fBID=\fR\fIstring\fR +.RS 4 +Set the Identification response string\&. This should only be used with hardware that supports the Phoenixtec protocol status inquiry commands, but not the "ID" command, such as the Best/SOLA 610\&. Format of the ID string is: AAA,BBBB,CCC,DDD,EE\&.E,FF\&.F +.sp +AAA is the three\-character identification for the UPS model\&. +.sp +BBBB is the output power in VA (volt amperes)\&. B is an integer number ranging from 0 to 9\&. +.sp +CCC is the Nominal Input Voltage\&. C is an integer number ranging from 0 to 9\&. The unit is Volts AC\&. +.sp +DDD is the Nominal Output Voltage\&. D is an integer number ranging from 0 to 9\&. The unit is Volts AC\&. +.sp +EE\&.E is the Battery Voltage that will cause the UPS to shut itself off\&. E is an integer number ranging from 0 to 9\&. Then unit is Volts DC and a decimal point is present\&. +.sp +FF\&.F or FFF\&.F is the Battery Voltage at full charge\&. F is an integer number ranging from 0 to 9\&. Then unit is Volts DC\&. Typically, for 700VA, 1KVA and 1\&.5KVA units, the format is FF\&.F\&. For 2KVA and 3KVA units, the format is FFF\&.F\&. +.sp +Example: a Best 610 1\&.5KVA unit would use the string "610,1500,120,120,10\&.0,48\&.0"\&. +.RE +.SH "BUGS" +.sp +The battery charge percentage value (in battery\&.charge) is derived from the voltage data that the UPS returns, since the UPS doesn\(cqt return that value directly\&. On some hardware, the charge will remain at 100% for a long time and then drops quickly shortly before the battery runs out\&. You can confirm from the battery\&.voltage readings that this is a problem with the UPS and not this driver\&. +.sp +Similarly, the float from the charger in some models forces the battery charge percentage back up to 100% immedately after the UPS goes back on\-line, so you can\(cqt tell when it is really recharged\&. +.sp +Finally, some models give one value for the battery\(cqs nominal voltage and yet actually have a nominal voltage slightly below that\&. This leads to things such as the perpetual 98\&.7% charge on the author\(cqs Fortress 750, even when it\(cqs been charging for weeks\&. You can use nombattvolt= in \fBups.conf\fR(8) to fix this\&. +.SH "AUTHOR" +.sp +Russell Kroll, Jason White +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/bestups.8 b/docs/man/bestups.txt similarity index 70% rename from man/bestups.8 rename to docs/man/bestups.txt index c385b18..61704f6 100644 --- a/man/bestups.8 +++ b/docs/man/bestups.txt @@ -1,13 +1,21 @@ -.TH BESTUPS 8 "Wed Jul 28 2004" "" "Network UPS Tools (NUT)" -.SH NAME -bestups \- Driver for Best Power / SOLA (Phoenixtec protocol) UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the -bestups driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +BESTUPS(8) +========== -.SH SUPPORTED HARDWARE -bestups was designed to monitor Best Power UPS hardware like the Fortress, +NAME +---- + +bestups - Driver for Best Power / SOLA (Phoenixtec protocol) UPS equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the +bestups driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +*bestups* was designed to monitor Best Power UPS hardware like the Fortress, Fortress Telecom, Axxium Rackmount and Patriot Pro. It also recognizes and supports SOLA units such as the 325, 520 and 620. In addition, the Best 610 is supported using the `ID' option. @@ -17,87 +25,93 @@ they will generate a warning since their battery information is not known. This driver does not support some older Best/SOLA units. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver supports the following optional settings in the -\fBups.conf\fR(5): +linkman:ups.conf[5]: -.IP "nombattvolt=\fInum\fR" +*nombattvolt=*'num':: Override the battery float voltage which is normally determined by asking the hardware. This is useful if your UPS constantly reports -battery.charge values just below 100% even when it's completely charged. - -If you have this problem, set this to whatever battery.voltage reports +`battery.charge` values just below 100% even when it's completely charged. ++ +If you have this problem, set this to whatever `battery.voltage` reports when the UPS is known to be completely charged with a good battery. ++ +The author's Best Fortress 750 uses `nombattvolt=27.4`. -The author's Best Fortress 750 uses nombattvolt=27.4. - -.IP "battvoltmult=\fInum\fR" +*battvoltmult=*'num':: Multiply the reported battery voltage by this number. Some devices report only a fraction of the total battery voltage. - ++ For example, the SOLA 610 700VA UPS (with a 24V battery) reports the single cell voltage (about 2.27V when fully charged). In this particular -case you can set 'battvoltmult = 12' in \fBups.conf\fR(8) to fix this. +case you can set `battvoltmult = 12` in linkman:ups.conf[8] to fix this. -.IP "ID=\fIstring\fR" +*ID=*'string':: Set the Identification response string. This should only be used with hardware that supports the Phoenixtec protocol status inquiry commands, but not the "ID" command, such as the Best/SOLA 610. Format of the ID string is: AAA,BBBB,CCC,DDD,EE.E,FF.F - ++ AAA is the three-character identification for the UPS model. - ++ BBBB is the output power in VA (volt amperes). B is an integer number ranging from 0 to 9. - ++ CCC is the Nominal Input Voltage. C is an integer number ranging from 0 to 9. The unit is Volts AC. - ++ DDD is the Nominal Output Voltage. D is an integer number ranging from 0 to 9. The unit is Volts AC. - ++ EE.E is the Battery Voltage that will cause the UPS to shut itself off. E is an integer number ranging from 0 to 9. Then unit is Volts DC and a decimal point is present. - ++ FF.F or FFF.F is the Battery Voltage at full charge. F is an integer number ranging from 0 to 9. Then unit is Volts DC. Typically, for 700VA, 1KVA and 1.5KVA units, the format is FF.F. For 2KVA and 3KVA units, the format is FFF.F. - ++ Example: a Best 610 1.5KVA unit would use the string "610,1500,120,120,10.0,48.0". -.SH BUGS +BUGS +---- -The battery charge percentage value (in battery.charge) is derived from +The battery charge percentage value (in `battery.charge`) is derived from the voltage data that the UPS returns, since the UPS doesn't return that value directly. On some hardware, the charge will remain at 100% for a long time and then drops quickly shortly before the battery runs out. -You can confirm from the battery.voltage readings that this is a problem +You can confirm from the `battery.voltage` readings that this is a problem with the UPS and not this driver. Similarly, the float from the charger in some models forces the battery charge percentage back up to 100% immedately after the UPS goes back -on\(hyline, so you can't tell when it is really recharged. +on-line, so you can't tell when it is really recharged. Finally, some models give one value for the battery's nominal voltage and yet actually have a nominal voltage slightly below that. This leads to things such as the perpetual 98.7% charge on the author's Fortress 750, -even when it's been charging for weeks. You can use nombattvolt= in -\fBups.conf\fR(8) to fix this. +even when it's been charging for weeks. You can use `nombattvolt=` in +linkman:ups.conf[8] to fix this. -.SH AUTHOR +AUTHOR +------ Russell Kroll, Jason White -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/blazer.8 b/docs/man/blazer.8 new file mode 100644 index 0000000..781eea8 --- /dev/null +++ b/docs/man/blazer.8 @@ -0,0 +1,313 @@ +'\" t +.\" Title: blazer +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BLAZER" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +blazer \- Driver for Megatec/Q1 protocol serial (blazer_ser) and USB (blazer_usb) based UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the blazer driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The blazer driver is known to work with various UPSes from Blazer, Energy Sistem, Fenton Technologies, Mustek and many others\&. The NUT compatibility table lists all the known supported models\&. Keep in mind, however, that other models not listed there may also be supported, but haven\(cqt been tested\&. +.sp +All devices with a serial interface (use the \fBblazer_ser\fR driver) and many with a USB interface (use the \fBblazer_usb\fR driver) are supported\&. +.SH "EXTRA ARGUMENTS" +.sp +You may need to override or provide defaults for some values, depending on the make and model of your UPS\&. The following are the ones that most likely will need changing (see \fBups.conf\fR(5)): +.PP +\fBdefault\&.battery\&.voltage\&.high =\fR \fIvalue\fR +.RS 4 +Maximum battery voltage that is reached after about 12 to 24 hours charging\&. If you want the driver to report a guesstimated +\fBbattery\&.charge\fR, you need to specify this (see +BATTERY CHARGE)\&. +.RE +.PP +\fBdefault\&.battery\&.voltage\&.low =\fR \fIvalue\fR +.RS 4 +Minimum battery voltage just before the UPS automatically shuts down\&. If you want the driver to report a guesstimated +\fBbattery\&.charge\fR, you need to specify this (see +BATTERY CHARGE)\&. +.RE +.PP +\fBdefault\&.battery\&.voltage\&.nominal =\fR \fIvalue\fR, \fBoverride\&.battery\&.voltage\&.nominal =\fR \fIvalue\fR +.RS 4 +Some devices show a wrong nominal battery voltage (or none at all), so you may need to override or set a default value\&. +.RE +.PP +\fBoverride\&.battery\&.packs =\fR \fIvalue\fR +.RS 4 +Some devices report a part of the total battery voltage\&. For instance, if +\fBbattery\&.voltage\&.nominal\fR +is 24 V, but it reports a +\fBbattery\&.voltage\fR +of around 2 V, the number of +\fBbattery\&.packs\fR +to correct this reading would be 12\&. The driver will attempt to detect this automatically, but if this fails somehow, you may want to override this value\&. +.RE +.PP +\fBondelay =\fR \fIvalue\fR +.RS 4 +Time to wait before switching on the UPS (minutes)\&. Note that a value below 3 minutes, may cause earlier firmware versions to not switch on automatically, so it defaults to 3 minutes\&. +.RE +.PP +\fBoffdelay =\fR \fIvalue\fR +.RS 4 +Time to wait before shutting down the UPS (seconds)\&. This value is truncated to units of 6 seconds (less than 60 seconds) or 60 seconds (more than 60 seconds)\&. Defaults to 30 seconds\&. +.RE +.PP +\fBnorating\fR +.RS 4 +Some UPSes will lock up if you attempt to read rating information from them\&. Setting this flag will make the driver skip this step\&. +.RE +.PP +\fBnovendor\fR +.RS 4 +Some UPSes will lock up if you attempt to read vendor information from them\&. Setting this flag will make the driver skip this step\&. +.RE +.PP +\fBruntimecal =\fR \fIvalue,value,value,value\fR +.RS 4 +Parameter used in the (optional) runtime estimation\&. This takes two runtimes at different loads\&. Typically, this uses the runtime at full load and the runtime at half load\&. For instance, if your UPS has a rated runtime of 240 seconds at full load and 720 seconds at half load, you would enter +.sp +.if n \{\ +.RS 4 +.\} +.nf +runtimecal = 270,100,720,50 +.fi +.if n \{\ +.RE +.\} +.sp +The first load should always be higher than the second\&. If you have values available for loads other than 100 and 50 % respectively, you can use those too, but keep them spaced apart as far as reasonably possible\&. Just don\(cqt get too close to no load (prediction of runtime depends more on idle load for the battery then)\&. +.RE +.PP +\fBchargetime =\fR \fIvalue\fR +.RS 4 +The time needed to fully recharge the battery after being fully discharged\&. If not specified, the driver defaults to 43200 seconds (12 hours)\&. Only used if +\fBruntimecal\fR +is also specified\&. +.RE +.PP +\fBidleload =\fR \fIvalue\fR +.RS 4 +Minimum battery load used by the driver to estimate the runtime\&. If not specified, the driver defaults to 10%\&. Only used if +\fBruntimecal\fR +is also specified\&. +.RE +.SH "SERIAL INTERFACE ONLY" +.PP +\fBcablepower =\fR \fIstring\fR +.RS 4 +By default the driver will set DTR and clear RTS (\fInormal\fR)\&. If you find that your UPS isn\(cqt detected or the communication with the UPS is unreliable, you may try if clear DTR and set RTS (\fIreverse\fR), set DTR and RTS (\fIboth\fR) or clear DTR and RTS (\fInone\fR) improves this situation\&. +.RE +.SH "USB INTERFACE ONLY" +.PP +\fBvendorid =\fR \fIregex\fR, \fBproductid =\fR \fIregex\fR, \fBvendor =\fR \fIregex\fR, \fBproduct =\fR \fIregex\fR, \fBserial =\fR \fIregex\fR +.RS 4 +Select a specific UPS, in case there is more than one connected via USB\&. Each option specifies an extended regular expression (see +\fBregex(7)\fR) that must match the UPS\(cqs entire vendor/product/serial string (minus any surrounding whitespace), or the whole 4\-digit hexadecimal code for vendorid and productid\&. Try +\fB\-DD\fR +for finding out the strings to match\&. +.RE +.sp +Examples: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-x vendor="Foo\&.Corporation\&.*" +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-x vendorid=051d # (APC) +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-x product="\&.*(Smart|Back)\-?UPS\&.*" +.fi +.if n \{\ +.RE +.\} +.PP +\fBbus =\fR \fIregex\fR +.RS 4 +Select a UPS on a specific USB bus or group of busses\&. The argument is a regular expression that must match the bus name where the UPS is connected (e\&.g\&. bus="002", bus="00[2\-3]")\&. +.RE +.PP +\fBsubdriver =\fR \fIstring\fR +.RS 4 +Select a serial\-over\-USB subdriver to use\&. You have a choice between +\fBphoenix\fR, +\fBippon\fR, +\fBcypress\fR, and +\fBkrauler\fR\&. When using this option, it is mandatory to also specify the +\fBvendorid\fR +and +\fBproductid\fR\&. +.RE +.SH "UPS COMMANDS" +.sp +This driver supports some instant commands (see \fBupscmd\fR(8)): +.PP +\fBbeeper\&.toggle\fR +.RS 4 +Toggle the UPS beeper\&. (Not available on some hardware\&.) +.RE +.PP +\fBload\&.on\fR +.RS 4 +Turn on the load immediately\&. +.RE +.PP +\fBload\&.off\fR +.RS 4 +Turn off the load immediately (see +KNOWN PROBLEMS)\&. +.RE +.PP +\fBshutdown\&.return\fR [\fIvalue\fR] +.RS 4 +Turn off the load and return when power is back\&. Uses the timers defined by +\fBondelay\fR +and +\fBoffdelay\fR\&. +.RE +.PP +\fBshutdown\&.stayoff\fR [\fIvalue\fR] +.RS 4 +Turn off the load and remain off (see +KNOWN PROBLEMS)\&. Uses the timer defined by +\fBoffdelay\fR\&. +.RE +.PP +\fBshutdown\&.stop\fR +.RS 4 +Stop a shutdown in progress\&. +.RE +.PP +\fBtest\&.battery\&.start\&.deep\fR +.RS 4 +Perform a long battery test (Not available on some hardware\&.) +.RE +.PP +\fBtest\&.battery\&.start\&.quick\fR +.RS 4 +Perform a (10 second) battery test\&. +.RE +.PP +\fBtest\&.battery\&.start\fR \fIvalue\fR +.RS 4 +Perform a battery test for the duration of +\fIvalue\fR +seconds (truncated to units of 60 seconds)\&. +.RE +.PP +\fBtest\&.battery\&.stop\fR +.RS 4 +Stop a running battery test (not available on some hardware\&.) +.RE +.SH "BATTERY CHARGE" +.sp +Due to popular demand, this driver will report a guesstimated \fBbattery\&.charge\fR and optionally \fBbattery\&.runtime\fR, provided you specified a couple of the EXTRA ARGUMENTS listed above\&. +.sp +If you specify both \fBbattery\&.voltage\&.high\fR and \fBbattery\&.voltage\&.low\fR in \fBups.conf\fR(5), but don\(cqt enter \fBruntimecal\fR, it will guesstimate the state of charge by looking at the battery voltage alone\&. This is not reliable under load, as this only gives reasonably accurate readings if you disconnect the load, let the battery rest for a couple of minutes and then measure the open cell voltage\&. This just isn\(cqt practical if the power went out and the UPS is providing power for your systems\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf + battery\&.voltage \- battery\&.voltage\&.low +battery\&.charge = \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- x 100 % + battery\&.voltage\&.high \- battery\&.voltage\&.low +.fi +.if n \{\ +.RE +.\} +.sp +There is a way to get better readings without disconnecting the load but this requires to keep track on how much (and how fast) current is going in\- and out of the battery\&. If you specified the \fBruntimecal\fR, the driver will attempt to do this\&. Note however, that this heavily relies on the values you enter and that the UPS must be able to report the load as well\&. There are quite a couple of devices that report 0 % (or any other fixed value) at all times, in which case this obviously doesn\(cqt work\&. +.sp +The driver also has no way of determining the degradation of the battery capacity over time, so you\(cqll have to deal with this yourself (by adjusting the values in \fBruntimecal\fR)\&. Also note that the driver guesses the initial state of charge based on the battery voltage, so this may be less than 100 %, even when you are certain that they are full\&. There is just no way to reliably measure this between 0 and 100 % full charge\&. +.sp +This is better than nothing (but not by much)\&. If any of the above calculations is giving you incorrect readings, you are the one that put in the values in \fBups.conf\fR(5), so don\(cqt complain with the author\&. If you need something better, buy a UPS that reports \fBbattery\&.charge\fR and \fBbattery\&.runtime\fR all by itself without the help of a NUT driver\&. +.SH "NOTES FOR THE PREVIOUS USER OF MEGATEC DRIVERS" +.sp +The blazer drivers having replaced the megatec ones, some configuration changes may be required by users switching to blazer\&. +.sp +Part of this, the following megatec options, in ups\&.conf, have to be changed: +.PP +\fBbattvolts\fR +.RS 4 +You need to use +\fIdefault\&.battery\&.voltage\&.high\fR +and +\fIdefault\&.battery\&.voltage\&.low\fR +.RE +.PP +\fBdtr and rts\fR +.RS 4 +You need to use +\fIcablepower\fR +.RE +.PP +\fBignoreoff\fR +.RS 4 +This parameter can simply be discarded, since it was a wrong understanding of the specification\&. +.RE +.SH "KNOWN PROBLEMS" +.sp +Some UPS commands aren\(cqt supported by all models\&. In most cases, the driver will send a message to the system log when the user tries to execute an unsupported command\&. Unfortunately, some models don\(cqt even provide a way for the driver to check for this, so the unsupported commands will silently fail\&. +.sp +Both the \fBload\&.off\fR and \fBshutdown\&.stayoff\fR instant commands are meant to turn the load off indefinitely\&. However, some UPS models don\(cqt allow this\&. +.sp +Some models report a bogus value for the beeper status (will always be \fIenabled\fR or \fIdisabled\fR)\&. So, the \fBbeeper\&.toggle\fR command may appear to have no effect in the status reported by the driver when, in fact, it is working fine\&. +.sp +The temperature and load value is known to be bogus in some models\&. +.SH "AUTHORS" +.sp +Arjen de Korte , Alexander Gordeev +.SH "SEE ALSO" +.sp +\fBnutupsdrv\fR(8), \fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8) +.SS "Internet Resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/blazer.8 b/docs/man/blazer.txt similarity index 55% rename from man/blazer.8 rename to docs/man/blazer.txt index 186b7c3..4fcb055 100644 --- a/man/blazer.8 +++ b/docs/man/blazer.txt @@ -1,223 +1,226 @@ -.TH BLAZER 8 "Mon Feb 16 2009" "" "Network UPS Tools (NUT)" -.SH NAME -blazer_ser, blazer_usb \- Driver for Megatec/Q1 protocol serial/USB based UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the -blazer driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +BLAZER(8) +========= -.SH SUPPORTED HARDWARE +NAME +---- + +blazer - Driver for Megatec/Q1 protocol serial (blazer_ser) and USB (blazer_usb) based UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +blazer driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ The blazer driver is known to work with various UPSes from Blazer, Energy Sistem, Fenton Technologies, Mustek and many others. The NUT compatibility table lists all the known supported models. Keep in mind, however, that other models not listed there may also be supported, but haven't been tested. -All devices with a serial interface (use the \fBblazer_ser\fR driver) and -many with a USB interface (use the \fBblazer_usb\fR driver) are supported. +All devices with a serial interface (use the *blazer_ser* driver) and +many with a USB interface (use the *blazer_usb* driver) are supported. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- You may need to override or provide defaults for some values, depending on the make and model of your UPS. The following are the ones that most likely -will need changing (see \fBups.conf\fR(5)): +will need changing (see linkman:ups.conf[5]): -.IP "default.battery.voltage.high = \fIvalue\fR" +*default.battery.voltage.high =* 'value':: Maximum battery voltage that is reached after about 12 to 24 hours charging. -If you want the driver to report a guesstimated \fBbattery.charge\fR, you need -to specify this (see \fBBATTERY CHARGE\fR). +If you want the driver to report a guesstimated *battery.charge*, you need +to specify this (see <<_battery_charge,BATTERY CHARGE>>). -.IP "default.battery.voltage.low = \fIvalue\fR" +*default.battery.voltage.low =* 'value':: Minimum battery voltage just before the UPS automatically shuts down. -If you want the driver to report a guesstimated \fBbattery.charge\fR, you need -to specify this (see \fBBATTERY CHARGE\fR). +If you want the driver to report a guesstimated *battery.charge*, you need +to specify this (see <<_battery_charge,BATTERY CHARGE>>). -.IP "default.battery.voltage.nominal = \fIvalue\fR" -.IP "override.battery.voltage.nominal = \fIvalue\fR" +*default.battery.voltage.nominal =* 'value':: +*override.battery.voltage.nominal =* 'value':: Some devices show a wrong nominal battery voltage (or none at all), so you may need to override or set a default value. -.IP "override.battery.packs = \fIvalue\fR" +*override.battery.packs =* 'value':: Some devices report a part of the total battery voltage. For instance, if -\fBbattery.voltage.nominal\fR is 24 V, but it reports a \fBbattery.voltage\fR -of around 2 V, the number of \fBbattery.packs\fR to correct this reading would +*battery.voltage.nominal* is 24 V, but it reports a *battery.voltage* +of around 2 V, the number of *battery.packs* to correct this reading would be 12. The driver will attempt to detect this automatically, but if this fails somehow, you may want to override this value. -.IP "ondelay = \fIvalue\fR" +*ondelay =* 'value':: Time to wait before switching on the UPS (minutes). Note that a value below 3 minutes, may cause earlier firmware versions to not switch on automatically, so it defaults to 3 minutes. -.IP "offdelay = \fIvalue\fR" +*offdelay =* 'value':: Time to wait before shutting down the UPS (seconds). This value is truncated to units of 6 seconds (less than 60 seconds) or 60 seconds (more than 60 seconds). Defaults to 30 seconds. -.IP "norating" +*norating*:: Some UPSes will lock up if you attempt to read rating information from them. Setting this flag will make the driver skip this step. -.IP "novendor" +*novendor*:: Some UPSes will lock up if you attempt to read vendor information from them. Setting this flag will make the driver skip this step. -.IP "runtimecal = \fIvalue,value,value,value\fR" +*runtimecal =* 'value,value,value,value':: Parameter used in the (optional) runtime estimation. This takes two runtimes at different loads. Typically, this uses the runtime at full load and the runtime at half load. For instance, if your UPS has a rated runtime of 240 seconds at full load and 720 seconds at half load, you would enter - - \fBruntimecal = 270,100,720,50\fR - ++ + runtimecal = 270,100,720,50 ++ The first load should always be higher than the second. If you have values available for loads other than 100 and 50 % respectively, you can use those too, but keep them spaced apart as far as reasonably possible. Just don't get too close to no load (prediction of runtime depends more on idle load for the battery then). -.IP "chargetime = \fIvalue\fR" +*chargetime =* 'value':: The time needed to fully recharge the battery after being fully discharged. If not specified, the driver defaults to 43200 seconds (12 hours). Only used if -\fBruntimecal\fR is also specified. +*runtimecal* is also specified. -.IP "idleload= \fIvalue\fR" +*idleload =* 'value':: Minimum battery load used by the driver to estimate the runtime. If not -specified, the driver defaults to 10 %. Only used if \fBruntimecal\fR is also +specified, the driver defaults to 10%. Only used if *runtimecal* is also specified. -.SH SERIAL INTERFACE ONLY +SERIAL INTERFACE ONLY +--------------------- -.IP "cablepower = \fIstring\fR" +*cablepower =* 'string':: -By default the driver will set DTR and clear RTS (\fInormal\fR). If you find that +By default the driver will set DTR and clear RTS ('normal'). If you find that your UPS isn't detected or the communication with the UPS is unreliable, you may -try if clear DTR and set RTS (\fIreverse\fR), set DTR and RTS (\fIboth\fR) or -clear DTR and RTS (\fInone\fR) improves this situation. +try if clear DTR and set RTS ('reverse'), set DTR and RTS ('both') or +clear DTR and RTS ('none') improves this situation. -.SH USB INTERFACE ONLY +USB INTERFACE ONLY +------------------ -.IP "vendorid = \fIregex\fR" -.IP "productid = \fIregex\fR" -.IP "vendor = \fIregex\fR" -.IP "product = \fIregex\fR" -.IP "serial = \fIregex\fR" +*vendorid =* 'regex':: +*productid =* 'regex':: +*vendor =* 'regex':: +*product =* 'regex':: +*serial =* 'regex':: Select a specific UPS, in case there is more than one connected via USB. Each option specifies an extended regular expression (see -\fBregex(7)\fR) that must match the UPS's entire vendor/product/serial +*regex(7)*) that must match the UPS's entire vendor/product/serial string (minus any surrounding whitespace), or the whole 4-digit -hexadecimal code for vendorid and productid. Try \fB-DD\fR for +hexadecimal code for vendorid and productid. Try *-DD* for finding out the strings to match. Examples: - \fB-x vendor="Foo.Corporation.*"\fR + -x vendor="Foo.Corporation.*" - \fB-x vendorid=051d\fR (APC) + -x vendorid=051d # (APC) - \fB-x product=".*(Smart|Back)-?UPS.*"\fR + -x product=".*(Smart|Back)-?UPS.*" -.IP "bus = \fIregex\fR" +*bus =* 'regex':: Select a UPS on a specific USB bus or group of busses. The argument is a regular expression that must match the bus name where the UPS is connected (e.g. bus="002", bus="00[2-3]"). -.IP "subdriver = \fIstring\fR" +*subdriver =* 'string':: -Select a serial-over-USB subdriver to use. You have a choice between \fIphoenix\fR -\fIippon\fR, \fIcypress\fR and \fIkrauler\fR. When using this option, it is mandatory to also -specify the vendorid and productid. Note that since nut-2.4.2 the \fIippon\fR subdriver is used -where previously the \fIphoenix\fR was selected. If this doesn't work for you, add the -following to the \fBups.conf\fR(5) entry for your UPS: -.nf - vendorid = 06da - productid = 0003 - subdriver = phoenix -.fi +Select a serial-over-USB subdriver to use. You have a choice between *phoenix*, +*ippon*, *cypress*, and *krauler*. When using this option, it is mandatory to also +specify the *vendorid* and *productid*. -.SH UPS COMMANDS +UPS COMMANDS +------------ -This driver supports some instant commands (see \fBupscmd\fR(8)): +This driver supports some instant commands (see linkman:upscmd[8]): -.IP "beeper.toggle" +*beeper.toggle*:: Toggle the UPS beeper. (Not available on some hardware.) -.IP "load.on" +*load.on*:: Turn on the load immediately. -.IP "load.off" +*load.off*:: -Turn off the load immediately (see \fBKNOWN PROBLEMS\fR). +Turn off the load immediately (see <<_known_problems,KNOWN PROBLEMS>>). -.IP "shutdown.return [\fIvalue\fR]" +*shutdown.return* ['value']:: Turn off the load and return when power is back. Uses the timers defined by -\fBondelay\fR and \fBoffdelay\fR. +*ondelay* and *offdelay*. -.IP "shutdown.stayoff [\fIvalue\fR]" +*shutdown.stayoff* ['value']:: -Turn off the load and remain off (see \fBKNOWN PROBLEMS\fR). Uses the timer -defined by \fBoffdelay\fR. +Turn off the load and remain off (see <<_known_problems,KNOWN PROBLEMS>>). Uses +the timer defined by *offdelay*. -.IP "shutdown.stop" +*shutdown.stop*:: Stop a shutdown in progress. -.IP "test.battery.start.deep" +*test.battery.start.deep*:: Perform a long battery test (Not available on some hardware.) -.IP "test.battery.start.quick" +*test.battery.start.quick*:: Perform a (10 second) battery test. -.IP "test.battery.start \fIvalue\fR" +*test.battery.start* 'value':: -Perform a battery test for the duration of \fInum\fR seconds (truncated to units of +Perform a battery test for the duration of 'value' seconds (truncated to units of 60 seconds). -.IP "test.battery.stop" +*test.battery.stop*:: Stop a running battery test (not available on some hardware.) -.SH BATTERY CHARGE +BATTERY CHARGE +-------------- -Due to popular demand, this driver will report a guesstimated \fBbattery.charge\fR -and optionally \fBbattery.runtime\fR, provided you specified a couple of the \fBEXTRA -PARAMETERS\fR listed above. +Due to popular demand, this driver will report a guesstimated *battery.charge* +and optionally *battery.runtime*, provided you specified a couple of the +<<_extra_arguments,EXTRA ARGUMENTS>> listed above. -If you specify both \fBbattery.voltage.high\fR and \fBbattery.voltage.low\fR in -\fBups.conf\fR(5), but don't enter \fBruntimecal\fR, it will guesstimate the state +If you specify both *battery.voltage.high* and *battery.voltage.low* in +linkman:ups.conf[5], but don't enter *runtimecal*, it will guesstimate the state of charge by looking at the battery voltage alone. This is not reliable under load, as this only gives reasonably accurate readings if you disconnect the load, let the battery rest for a couple of minutes and then measure the open cell voltage. This just isn't practical if the power went out and the UPS is providing power for your systems. -.nf battery.voltage - battery.voltage.low battery.charge = ------------------------------------------ x 100 % battery.voltage.high - battery.voltage.low -.fi There is a way to get better readings without disconnecting the load but this requires to keep track on how much (and how fast) current is going in- and out of -the battery. If you specified the \fBruntimecal\fR, the driver will attempt to do +the battery. If you specified the *runtimecal*, the driver will attempt to do this. Note however, that this heavily relies on the values you enter and that the UPS must be able to report the load as well. There are quite a couple of devices that report 0 % (or any other fixed value) at all times, in which case this @@ -225,18 +228,40 @@ obviously doesn't work. The driver also has no way of determining the degradation of the battery capacity over time, so you'll have to deal with this yourself (by adjusting the values -in \fBruntimecal\fR. Also note that the driver guesses the initial state of charge +in *runtimecal*). Also note that the driver guesses the initial state of charge based on the battery voltage, so this may be less than 100 %, even when you are certain that they are full. There is just no way to reliably measure this between 0 and 100 % full charge. This is better than nothing (but not by much). If any of the above calculations is giving you incorrect readings, you are the one that put in the values in -\fBups.conf\fR(5), so don't complain with the author. If you need something better, -buy a UPS that reports \fBbattery.charge\fR and \fBbattery.runtime\fR all by itself +linkman:ups.conf[5], so don't complain with the author. If you need something better, +buy a UPS that reports *battery.charge* and *battery.runtime* all by itself without the help of a NUT driver. -.SH KNOWN PROBLEMS +NOTES FOR THE PREVIOUS USER OF MEGATEC DRIVERS +---------------------------------------------- + +The blazer drivers having replaced the megatec ones, some configuration +changes may be required by users switching to blazer. + +Part of this, the following megatec options, in ups.conf, have to be changed: + +*battvolts*:: + +You need to use 'default.battery.voltage.high' and 'default.battery.voltage.low' + +*dtr and rts*:: + +You need to use 'cablepower' + +*ignoreoff*:: + +This parameter can simply be discarded, since it was a wrong understanding +of the specification. + +KNOWN PROBLEMS +-------------- Some UPS commands aren't supported by all models. In most cases, the driver will send a message to the system log when the user tries to execute an @@ -244,24 +269,27 @@ unsupported command. Unfortunately, some models don't even provide a way for the driver to check for this, so the unsupported commands will silently fail. -Both the \fBload.off\fR and \fBshutdown.stayoff\fR instant commands are meant to +Both the *load.off* and *shutdown.stayoff* instant commands are meant to turn the load off indefinitely. However, some UPS models don't allow this. -Some models report a bogus value for the beeper status (will always be \fIenabled\fR -or \fIdisabled\fR). So, the \fBbeeper.toggle\fR command may appear to have no effect +Some models report a bogus value for the beeper status (will always be 'enabled' +or 'disabled'). So, the *beeper.toggle* command may appear to have no effect in the status reported by the driver when, in fact, it is working fine. The temperature and load value is known to be bogus in some models. -.SH AUTHORS +AUTHORS +------- -Arjen de Korte +Arjen de Korte , Alexander Gordeev -.SH SEE ALSO +SEE ALSO +-------- -\fBnutupsdrv\fR(8), \fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8) +linkman:nutupsdrv[8], linkman:upsc[8], linkman:upscmd[8], linkman:upsrw[8] -.SS Internet resources: +Internet Resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/clone.8 b/docs/man/clone.8 new file mode 100644 index 0000000..94b04be --- /dev/null +++ b/docs/man/clone.8 @@ -0,0 +1,135 @@ +'\" t +.\" Title: clone +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "CLONE" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +clone \- UPS driver clone +.SH "NOTE" +.sp +This man page only documents the specific features of the clone driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "DESCRIPTION" +.sp +This driver, which sits on top of another driver socket, allows users to group clients to a particular outlet of a device and deal with this output as if it was a normal UPS\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following settings: +.PP +\fBload\&.off\fR=\fIcommand\fR +.RS 4 +Recommended\&. Set the command on the "real" UPS driver that will be used to switch off the outlet\&. You need both +\fBload\&.off\fR +and +\fBload\&.on\fR +in order to power cycle the outlet\&. Otherwise, shutting down the clients powered by an outlet is a one way street (see +IMPORTANT)\&. +.RE +.PP +\fBload\&.on\fR=\fIcommand\fR +.RS 4 +Recommended\&. Set the command on the "real" UPS driver that will be used to switch on the outlet\&. You need both +\fBload\&.off\fR +and +\fBload\&.on\fR +in order to power cycle the outlet\&. Otherwise, shutting down the clients powered by an outlet is a one way street (see +IMPORTANT)\&. +.RE +.PP +\fBload\&.status\fR=\fIvalue\fR +.RS 4 +Recommended\&. Set the variable on the "real" UPS driver that will be used to indicate the outlet status (i\&.e\&. on/off)\&. If not specified, the clone driver will attempt to keep track of the outlet status, but this is less reliable\&. +.RE +.PP +\fBoffdelay\fR=\fInum\fR +.RS 4 +Set the timer (in seconds) before the outlet is turned off after the shutdown condition (OB LB) for this outlet is met or a command to shutdown was issued\&. Defaults to 120 seconds\&. +.RE +.PP +\fBondelay\fR=\fInum\fR +.RS 4 +Set the timer (in seconds) for the outlet to switch on in case the power returns after the oulet has been switched off\&. Defaults to 30 seconds\&. +.RE +.PP +\fBmincharge\fR=\fIvalue\fR +.RS 4 +Set the remaining battery level when the clone UPS switches to LB (percent)\&. +.RE +.PP +\fBminruntime\fR=\fIvalue\fR +.RS 4 +Set the remaining battery runtime when the clone UPS switches to LB (seconds)\&. +.RE +.SH "IMPLEMENTATION" +.sp +The port specification in the \fBups.conf\fR(5) reference the driver socket that the "real" UPS driver is using\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[realups] + driver = usbhid\-ups + port = auto +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +[clone\-outlet\-1] + driver = clone + port = usbhid\-ups\-realups + load\&.on = outlet\&.1\&.load\&.on + load\&.off = outlet\&.1\&.load\&.off + load\&.status = outlet\&.1\&.status + [\&.\&.\&.] +.fi +.if n \{\ +.RE +.\} +.SH "IMPORTANT" +.sp +Unlike a real UPS, you should \fBnot\fR configure a upsmon master for this driver\&. When a upsmon master sees the OB LB flags and tells the upsd server it is OK to initiate the shutdown sequence, the server will latch the FSD status and it will not be possible to restart the systems connected without restarting the upsd server\&. +.sp +This will be a problem if the power returns after the clone UPS initiated the shutdown sequence on it\(cqs outlet, but returns before the real UPS begins shutting down\&. The solution is in the clone driver, that will insert the FSD flag if needed without the help of a upsmon master\&. +.SH "CAVEATS" +.sp +The clone UPS will follow the status on the real UPS driver\&. You can only make the clone UPS shutdown earlier than the real UPS driver, not later\&. If the real UPS driver initiates a shutdown, the clone UPS driver will immediately follow\&. +.sp +Be aware that the commands to shutdown/restart an outlet on the real UPS drivers are not affected, so if you tell the real UPS driver to shutdown the outlet of the clone UPS driver, your clients will lose power without warning\&. +.SH "AUTHOR" +.sp +Arjen de Korte +.SH "SEE ALSO" +.sp +\fBupscmd\fR(1), \fBupsrw\fR(1), \fBups.conf\fR(5), \fBnutupsdrv\fR(8) +.SS "Internet Resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/clone.8 b/docs/man/clone.txt similarity index 56% rename from man/clone.8 rename to docs/man/clone.txt index 2701878..6a844ac 100644 --- a/man/clone.8 +++ b/docs/man/clone.txt @@ -1,77 +1,81 @@ -.TH CLONE 8 "Mon Jul 20 2009" "" "Network UPS Tools (NUT)" -.SH NAME -clone \- UPS driver clone +CLONE(8) +======== -.SH NOTE +NAME +---- +clone - UPS driver clone + +NOTE +---- This man page only documents the specific features of the clone driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +linkman:nutupsdrv[8]. -.SH DESCRIPTION -This driver, which sits on top of another driver socket, allows to group -clients to a particular outlet of a device and deal with this output as -if it was a normal UPS. +DESCRIPTION +----------- +This driver, which sits on top of another driver socket, allows users to group +clients to a particular outlet of a device and deal with this output as if it +was a normal UPS. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver supports the following settings: -.IP "load.off=\fIcommand\fR" -Recommended. Set the command on the 'real' UPS driver that will be used to -switch off the outlet. You need both \fIload.off\fR and \fIload.on\fR in +*load.off*='command':: +Recommended. Set the command on the "real" UPS driver that will be used to +switch off the outlet. You need both *load.off* and *load.on* in order to power cycle the outlet. Otherwise, shutting down the clients -powered by an outlet is a one way street (see \fBIMPORTANT\fR). +powered by an outlet is a one way street (see <<_important,IMPORTANT>>). -.IP "load.on=\fIcommand\fR" -Recommended. Set the command on the 'real' UPS driver that will be used to -switch on the outlet. You need both \fIload.off\fR and \fIload.on\fR in +*load.on*='command':: +Recommended. Set the command on the "real" UPS driver that will be used to +switch on the outlet. You need both *load.off* and *load.on* in order to power cycle the outlet. Otherwise, shutting down the clients -powered by an outlet is a one way street (see \fBIMPORTANT\fR). +powered by an outlet is a one way street (see <<_important,IMPORTANT>>). -.IP "load.status=\fIvalue\fR" -Recommended. Set the variable on the 'real' UPS driver that will be used -to indicate the outlet status (ie on/off). If not specified, the clone +*load.status*='value':: +Recommended. Set the variable on the "real" UPS driver that will be used +to indicate the outlet status (i.e. on/off). If not specified, the clone driver will attempt to keep track of the outlet status, but this is less reliable. -.IP "offdelay=\fInum\fR" +*offdelay*='num':: Set the timer (in seconds) before the outlet is turned off after the -shutdown condition (OB LB) for this outlet is met or a command to shutdown +shutdown condition (+OB LB+) for this outlet is met or a command to shutdown was issued. Defaults to 120 seconds. -.IP "ondelay=\fInum\fR" +*ondelay*='num':: Set the timer (in seconds) for the outlet to switch on in case the power returns after the oulet has been switched off. Defaults to 30 seconds. -.IP "mincharge=\fIvalue\fR" +*mincharge*='value':: Set the remaining battery level when the clone UPS switches to LB (percent). -.IP "minruntime=\fIvalue\fR" +*minruntime*='value':: Set the remaining battery runtime when the clone UPS switches to LB (seconds). -.SH IMPLEMENTATION -The port specification in the \fBups.conf\fR(5) reference the driver -socket that the 'real' UPS driver is using. For example: +IMPLEMENTATION +-------------- +The port specification in the linkman:ups.conf[5] reference the driver +socket that the "real" UPS driver is using. For example: -.nf -[realups] - driver = usbhid-ups - port = auto -.fi + [realups] + driver = usbhid-ups + port = auto -.nf -[clone-outlet-1] - driver = clone - port = usbhid-ups-realups - load.on = outlet.1.load.on - load.off = outlet.1.load.off - load.status = outlet.1.status - [...] -.fi + [clone-outlet-1] + driver = clone + port = usbhid-ups-realups + load.on = outlet.1.load.on + load.off = outlet.1.load.off + load.status = outlet.1.status + [...] -.SH IMPORTANT -Unlike a real UPS, you should \fBnot\fR configure a upsmon master for this +IMPORTANT +--------- +Unlike a real UPS, you should *not* configure a upsmon master for this driver. When a upsmon master sees the OB LB flags and tells the upsd server it is OK to initiate the shutdown sequence, the server will latch the FSD status and it will not be possible to restart the systems connected without @@ -82,7 +86,8 @@ the shutdown sequence on it's outlet, but returns before the real UPS begins shutting down. The solution is in the clone driver, that will insert the FSD flag if needed without the help of a upsmon master. -.SH CAVEATS +CAVEATS +------- The clone UPS will follow the status on the real UPS driver. You can only make the clone UPS shutdown earlier than the real UPS driver, not later. If the real UPS driver initiates a shutdown, the clone UPS driver will @@ -93,15 +98,18 @@ drivers are not affected, so if you tell the real UPS driver to shutdown the outlet of the clone UPS driver, your clients will lose power without warning. -.SH AUTHOR +AUTHOR +------ Arjen de Korte -.SH SEE ALSO +SEE ALSO +-------- -\fBupscmd\fR(1), -\fBupsrw\fR(1), -\fBups.conf\fR(5), -\fBnutupsdrv\fR(8) +linkman:upscmd[1], +linkman:upsrw[1], +linkman:ups.conf[5], +linkman:nutupsdrv[8] -.SS Internet resources: +Internet Resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/dummy-ups.8 b/docs/man/dummy-ups.8 new file mode 100644 index 0000000..f50bf03 --- /dev/null +++ b/docs/man/dummy-ups.8 @@ -0,0 +1,145 @@ +'\" t +.\" Title: dummy-ups +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "DUMMY\-UPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +dummy-ups \- Driver for multi\-purpose UPS emulation +.SH "NOTE" +.sp +This man page only documents the specific features of the dummy\-ups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "DESCRIPTION" +.sp +This program is a multi\-purpose UPS emulation tool\&. Its behavior depends on the running mode: +.SS "Dummy Mode" +.sp +\fBdummy\-ups\fR looks like a standard device driver to \fBupsd\fR(8) and allows to change any value for testing purposes\&. It is both interactive, controllable through the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands (or equivalent graphical tool), and batchable through script files\&. It can be configured, launched and used as any other real driver\&. This mode is mostly useful for development and testing purposes\&. +.SS "Repeater Mode" +.sp +\fBdummy\-ups\fR acts as a NUT client, simply forwarding data\&. This can be useful for supervision purposes\&. This can also allow some load sharing between several UPS instances, using a point\-to\-point communication with the UPS\&. +.SH "IMPLEMENTATION" +.sp +The port specification depends on the running mode, and allows the driver to select the right mode\&. +.SS "Dummy Mode" +.sp +Port is a definition file name for \fBdummy\-ups\fR\&. This can either be an absolute or a relative path name\&. In the latter case the NUT sysconfig directory (ie /etc/nut, /usr/local/ups/etc, \&...) is prepended\&. +.sp +For instance: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[dummy] + driver = dummy\-ups + port = evolution500\&.dev + desc = "dummy\-ups in dummy mode" +.fi +.if n \{\ +.RE +.\} +.sp +This file is generally named "something\&.dev"\&. It contains a list of all valid data and associated values, and has the same format as an \fBupsc\fR(8) dump (: )\&. So you can easilly create definition files from an existing UPS using "upsc > file\&.dev"\&. It can also be empty, in which case only a basic set of data is available: device\&.\fB, driver\&.\fR, ups\&.mfr, ups\&.model, ups\&.status +.sp +Samples definition files are available in the "data" directory of the nut source tree, and generally in the sysconfig directory of your system distribution\&. +.sp +Since \fBdummy\-ups\fR will loop on reading this file, you can dynamically modify it to interact with the driver\&. This will avoid message spam into your system log files, if you are using NUT default configuration\&. +.sp +You can also use the "TIMER " instruction to create scheduled events sequences\&. For example, the following sequence will loop on switching ups\&.status between "OL", "OB" and "OB LB" every minute: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ups\&.status: OL +TIMER 60 +ups\&.status: OB +TIMER 60 +ups\&.status: LB +TIMER 60 +.fi +.if n \{\ +.RE +.\} +.sp +It is wise to end the script with a TIMER\&. Otherwise dummy\-ups will directly go back to the beginning of the file\&. +.SS "Repeater Mode" +.sp +Port is the name of a remote UPS, using the NUT form, ie: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[@[:]] +.fi +.if n \{\ +.RE +.\} +.sp +For instance: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[repeater] + driver = dummy\-ups + port = ups@hostname + desc = "dummy\-ups in repeater mode" +.fi +.if n \{\ +.RE +.\} +.SH "INTERACTION" +.sp +Once the driver is loaded in dummy mode, you can change any variables, except those of the driver\&.* and server\&.* collections\&. You can do this by either editing the definition file, or use the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands\&. +.sp +Note that in simulation mode, new variables can be added on the fly, by adding these to the definition file\&. Conversely, if you need to remove variable (such as transient ones, like ups\&.alarm), simply update these by setting an empty value\&. As a result, they will get removed from the data\&. +.sp +In repeater mode, the driver acts according to the capabilities of the UPS, and so support the same instant commands and settable values\&. +.SH "BACKGROUND" +.sp +This driver was written in one evening to replace the previous dummycons testing driver\&. It was too limited and required to work from a terminal to interact\&. +.sp +\fBdummy\-ups\fR is useful for NUT client development, and other testing purpose\&. +.sp +It also helps the NUT Quality Assurance effort, by automating some tests on the NUT framework\&. +.sp +It now offers a repeater mode\&. This will help in building the Meta UPS approach, which allows to build a virtual device, composed of several other devices (either UPS, PDUs)\&. +.SH "BUGS" +.sp +Instant commands are not yet supported in Dummy Mode, and data need name/value checking enforcement, as well as boundaries or enumeration definition\&. +.SH "AUTHOR" +.sp +Arnaud Quette +.SH "SEE ALSO" +.sp +\fBupscmd\fR(1), \fBupsrw\fR(1), \fBups.conf\fR(5), \fBnutupsdrv\fR(8) +.SS "Internet Resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/dummy-ups.8 b/docs/man/dummy-ups.txt similarity index 55% rename from man/dummy-ups.8 rename to docs/man/dummy-ups.txt index e59db28..ef55db5 100644 --- a/man/dummy-ups.8 +++ b/docs/man/dummy-ups.txt @@ -1,43 +1,60 @@ -.TH DUMMY-UPS 8 "Tue Oct 6 2009" "" "Network UPS Tools (NUT)" -.SH NAME -dummy-ups \- Driver for multi purpose UPS emulation +DUMMY-UPS(8) +============ -.SH NOTE +NAME +---- +dummy-ups - Driver for multi-purpose UPS emulation + +NOTE +---- This man page only documents the specific features of the dummy-ups driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +linkman:nutupsdrv[8]. -.SH DESCRIPTION -This program is a multi purpose UPS emulation tool. +DESCRIPTION +----------- +This program is a multi-purpose UPS emulation tool. Its behavior depends on the running mode: -.IP "Dummy mode" +Dummy Mode +~~~~~~~~~~ -looks like a standard UPS driver to \fBupsd\fR(8) and +*dummy-ups* looks like a standard device driver to linkman:upsd[8] and allows to change any value for testing purposes. It is both interactive, -controllable through the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands (or +controllable through the linkman:upsrw[1] and linkman:upscmd[1] commands (or equivalent graphical tool), and batchable through script files. It can be configured, launched and used as any other real driver. This mode is mostly useful for development and testing purposes. -.IP "Repeater mode" +Repeater Mode +~~~~~~~~~~~~~ -acts as a NUT client, simply forwarding data. This can be useful for supervision -purposes. This can also allow some load sharing between several UPS instances, -using a point\(hyto\(hypoint communication with the UPS. +*dummy-ups* acts as a NUT client, simply forwarding data. This can be useful +for supervision purposes. This can also allow some load sharing between several +UPS instances, using a point-to-point communication with the UPS. -.SH ARGUMENTS -The port specification depends on the running mode, and allows the automatic -guessing of it. +IMPLEMENTATION +-------------- -.IP "Dummy mode" +The port specification depends on the running mode, and allows the driver to +select the right mode. -Port is a definition file name for dummy-ups. This can either +Dummy Mode +~~~~~~~~~~ + +Port is a definition file name for *dummy-ups*. This can either be an absolute or a relative path name. In the latter case the NUT sysconfig directory (ie /etc/nut, /usr/local/ups/etc, ...) is prepended. -This file is generally named something.dev. It contains a list of all -valid data and associated values, and has the same format as an upsc +For instance: + + [dummy] + driver = dummy-ups + port = evolution500.dev + desc = "dummy-ups in dummy mode" + +This file is generally named "something.dev". It contains a list of all +valid data and associated values, and has the same format as an linkman:upsc[8] dump (: ). So you can easilly create definition files from an existing UPS using "upsc > file.dev". It can also be empty, in which case only a basic set of data is available: @@ -46,67 +63,62 @@ device.*, driver.*, ups.mfr, ups.model, ups.status Samples definition files are available in the "data" directory of the nut source tree, and generally in the sysconfig directory of your system distribution. -Since dummy-ups will loop on reading this file, you can dynamically modify it to -interact with the driver. +Since *dummy-ups* will loop on reading this file, you can dynamically modify +it to interact with the driver. This will avoid message spam into your +system log files, if you are using NUT default configuration. You can also use the "TIMER " instruction to create scheduled events sequences. For example, the following sequence will loop on switching ups.status between "OL", "OB" and "OB LB" every minute: -.nf ups.status: OL TIMER 60 ups.status: OB TIMER 60 ups.status: LB TIMER 60 -.fi It is wise to end the script with a TIMER. Otherwise dummy-ups will directly go back to the beginning of the file. -.IP "Repeater mode" +Repeater Mode +~~~~~~~~~~~~~ Port is the name of a remote UPS, using the NUT form, ie: [@[:]] -.SH IMPLEMENTATION -You will need add to at least one entry in \fBups.conf\fR(5) like: +For instance: -.nf -[dummy] - driver = dummy-ups - port = evolution500.dev - desc = "dummy-ups in dummy mode" -.fi + [repeater] + driver = dummy-ups + port = ups@hostname + desc = "dummy-ups in repeater mode" -.nf -[repeater] - driver = dummy-ups - port = ups@hostname - desc = "dummy-ups in repeater mode" -.fi - -You can declare as many entries, and so run multiple instances, as you need. - -.SH INTERACTION +INTERACTION +----------- Once the driver is loaded in dummy mode, you can change any variables, except those of the driver.* and server.* collections. You can do this by either editing the definition file, or use the -\fBupsrw\fR(1) and \fBupscmd\fR(1) commands. +linkman:upsrw[1] and linkman:upscmd[1] commands. + +Note that in simulation mode, new variables can be added on the fly, by +adding these to the definition file. Conversely, if you need to remove +variable (such as transient ones, like ups.alarm), simply update these +by setting an empty value. As a result, they will get removed from the data. In repeater mode, the driver acts according to the capabilities of the UPS, and so support the same instant commands and settable values. -.SH BACKGROUND +BACKGROUND +---------- This driver was written in one evening to replace the previous dummycons testing driver. It was too limited and required to work from a terminal to interact. -dummy-ups is useful for NUT client development, and other testing purpose. +*dummy-ups* is useful for NUT client development, and other testing purpose. It also helps the NUT Quality Assurance effort, by automating some tests on the NUT framework. @@ -115,19 +127,23 @@ It now offers a repeater mode. This will help in building the Meta UPS approach, which allows to build a virtual device, composed of several other devices (either UPS, PDUs). -.SH BUGS -Instant commands are not yet supported in Dummy Mode, and data need name / -value checking enforcement, as well as boundaries or enumeration definition. +BUGS +---- +Instant commands are not yet supported in Dummy Mode, and data need name/value +checking enforcement, as well as boundaries or enumeration definition. -.SH AUTHOR +AUTHOR +------ Arnaud Quette -.SH SEE ALSO +SEE ALSO +-------- -\fBupscmd\fR(1), -\fBupsrw\fR(1), -\fBups.conf\fR(5), -\fBnutupsdrv\fR(8) +linkman:upscmd[1], +linkman:upsrw[1], +linkman:ups.conf[5], +linkman:nutupsdrv[8] -.SS Internet resources: +Internet Resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/etapro.8 b/docs/man/etapro.8 new file mode 100644 index 0000000..236dd99 --- /dev/null +++ b/docs/man/etapro.8 @@ -0,0 +1,50 @@ +'\" t +.\" Title: etapro +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "ETAPRO" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +etapro \- Driver for ETA UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the etapro driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports ETA UPS equipment with the "PRO" option for smart mode\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "AUTHOR" +.sp +Marek Michalkiewicz +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/etapro.txt b/docs/man/etapro.txt new file mode 100644 index 0000000..3b827e2 --- /dev/null +++ b/docs/man/etapro.txt @@ -0,0 +1,35 @@ +ETAPRO(8) +========= + +NAME +---- +etapro - Driver for ETA UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +etapro driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports ETA UPS equipment with the "PRO" option for smart mode. + +EXTRA ARGUMENTS +--------------- +This driver does not support any extra settings in the +linkman:ups.conf[5]. + +AUTHOR +------ +Marek Michalkiewicz + +SEE ALSO +-------- +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/everups.8 b/docs/man/everups.8 new file mode 100644 index 0000000..94ce786 --- /dev/null +++ b/docs/man/everups.8 @@ -0,0 +1,53 @@ +'\" t +.\" Title: everups +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "EVERUPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +everups \- Driver for Ever UPS models +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the everups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver should recognize the NET *\-DPC and AP *\-PRO models\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "BUGS" +.sp +This UPS can only switch off the load if it\(cqs running on battery\&. This means you may be vulnerable to power races if your shutdown scripts don\(cqt sleep and force a reboot\&. +.SH "AUTHOR" +.sp +Bartek Szady +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/everups.txt b/docs/man/everups.txt new file mode 100644 index 0000000..cf01bc0 --- /dev/null +++ b/docs/man/everups.txt @@ -0,0 +1,44 @@ +EVERUPS(8) +========== + +NAME +---- +everups - Driver for Ever UPS models + +NOTE +---- +This man page only documents the hardware-specific features of the +everups driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver should recognize the NET *-DPC and AP *-PRO models. + +EXTRA ARGUMENTS +--------------- + +This driver does not support any extra settings in the +linkman:ups.conf[5]. + +BUGS +---- + +This UPS can only switch off the load if it's running on battery. This +means you may be vulnerable to power races if your shutdown scripts +don't sleep and force a reboot. + +AUTHOR +------ +Bartek Szady + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/gamatronic.8 b/docs/man/gamatronic.8 new file mode 100644 index 0000000..2c64b44 --- /dev/null +++ b/docs/man/gamatronic.8 @@ -0,0 +1,50 @@ +'\" t +.\" Title: gamatronic +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "GAMATRONIC" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +gamatronic \- Driver for Gamatronic UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the gamatronic driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +Various \- Rebuilt to work with Gamatronic UPS Units, but should recognize any UPS that speaks the SEC protocol at 1200\-19200 bps\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "AUTHOR" +.sp +Nadav Moskovitch +.SH "SEE ALSO" +.SS "The core driver" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/gamatronic.8 b/docs/man/gamatronic.txt similarity index 56% rename from man/gamatronic.8 rename to docs/man/gamatronic.txt index 4f61ebf..ac9db3f 100644 --- a/man/gamatronic.8 +++ b/docs/man/gamatronic.txt @@ -1,27 +1,38 @@ -.TH GAMATRONIC 8 "Tue Sep 8 2009" "" "Network UPS Tools (NUT)" -.SH NAME -gamatronic \- Driver for Gamatronic UPS equipment -.SH NOTE +GAMATRONIC(8) +============= + +NAME +---- +gamatronic - Driver for Gamatronic UPS equipment + +NOTE +---- This man page only documents the hardware-specific features of the gamatronic driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +linkman:nutupsdrv[8]. -.SH SUPPORTED HARDWARE +SUPPORTED HARDWARE +------------------ Various - Rebuilt to work with Gamatronic UPS Units, but should recognize any UPS that speaks the SEC protocol at 1200-19200 bps. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver does not support any extra settings in the -\fBups.conf\fR(5). +linkman:ups.conf[5]. -.SH AUTHOR +AUTHOR +------ Nadav Moskovitch -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver +~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources +~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/genericups.8 b/docs/man/genericups.8 new file mode 100644 index 0000000..64a8b74 --- /dev/null +++ b/docs/man/genericups.8 @@ -0,0 +1,593 @@ +'\" t +.\" Title: genericups +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "GENERICUPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +genericups \- Driver for contact\-closure UPS equipment +.SH "NOTE" +.sp +This man page only documents the specific features of the genericups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports hardware from many different manufacturers as it only uses the very simplest of signaling schemes\&. Contact closure refers to a kind of interface where basic high/low signals are provided to indicate status\&. This kind of UPS can only report line power and battery status\&. +.sp +This means that you will only get the essentials in ups\&.status: OL, OB, and LB\&. Anything else requires a smarter UPS\&. +.SH "CABLING" +.sp +Cabling is different for every kind of UPS\&. See the table below for information on what is known to work with a given UPS type\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following settings in the \fBups.conf\fR(5): +.PP +upstype=\fItype\fR +.RS 4 +Required\&. Configures the driver for a specific kind of UPS\&. See the +UPS Types +section below for more information on which entries are available\&. +.RE +.PP +mfr=\fIstring\fR +.RS 4 +Optional\&. The very nature of a generic UPS driver sometimes means that the stock manufacturer data has no relation to the actual hardware that is attached\&. With the +mfr +setting, you can change the value that is seen by clients that monitor this UPS\&. +.RE +.PP +model=\fIstring\fR +.RS 4 +Optional\&. This is like +mfr +above, but it overrides the model string instead\&. +.RE +.PP +serial=\fIstring\fR +.RS 4 +Optional\&. This is like +mfr +above and intended to record the identification string of the UPS\&. It is titled "serial" because usually this string is referred to as the serial number\&. +.RE +.PP +sdtime=\fIvalue\fR +.RS 4 +Optional\&. The driver will sleep for this many seconds after setting the shutdown signal\&. This is necessary for some hardware which requires a sustained level to activate the shutdown sequence\&. +.sp +The default behavior of the driver is to exit immediately\&. If this doesn\(cqt reliably trigger a shutdown in your UPS hardware, use this setting to give it more time to react\&. +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +very large values for sdtime may create warnings from upsdrvctl if it gets tired of waiting for the driver to return\&. +.sp .5v +.RE +.SH "CUSTOM CONFIGURATIONS" +.sp +You may override the values for CP, OL, LB, and SD by defining them in the \fBups.conf\fR(5) after the upstype setting\&. +.sp +For example, to set the cable power to DTR and the low battery value to DCD, it would look like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +CP = DTR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +LB = DCD +.fi +.if n \{\ +.RE +.\} +.sp +Recognized values for input lines are CTS, DCD, and RNG\&. Recognized values for output lines are DTR, RTS, and ST\&. See below for more about what these signals mean\&. +.sp +These values may be negated for active low signals\&. That is, "LB=\-DCD" recognizes a low battery condition when DCD is not held high\&. +.SH "TYPE INFORMATION" +.sp +The essence of a UPS definition in this driver is how it uses the serial lines that are available\&. These are the abbreviations you will see below: +.PP +OL +.RS 4 +On line (no power failure) (opposite of OB \- on battery) +.RE +.PP +LB +.RS 4 +Low battery +.RE +.PP +SD +.RS 4 +Shutdown load +.RE +.PP +CP +.RS 4 +Cable power (must be present for cable to have valid reading) +.RE +.PP +CTS +.RS 4 +Clear to Send\&. Received from the UPS\&. +.RE +.PP +RTS +.RS 4 +Ready to Send\&. Sent by the PC\&. +.RE +.PP +DCD +.RS 4 +Data Carrier Detect\&. Received from the UPS\&. +.RE +.PP +RNG +.RS 4 +Ring indicate\&. Received from the UPS\&. +.RE +.PP +DTR +.RS 4 +Data Terminal Ready\&. Sent by the PC\&. +.RE +.PP +ST +.RS 4 +Send a BREAK on the transmit data line +.RE +.sp +A "\-" in front of a signal name (like \-RNG) means that the indicated condition is signaled with an active low signal\&. For example, [LB=\-RNG] means the battery is low when the ring indicate line goes low, and that the battery is OK when that line is held high\&. +.SH "UPS TYPES" +.sp +0 = UPSonic LAN Saver 600 +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR+RTS] [OL=\-CTS] [LB=DCD] [SD=DTR] +.fi +.if n \{\ +.RE +.\} +.sp +1 = APC Back\-UPS/Back\-UPS Pro/Smart\-UPS with 940\-0095A/C cable +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=\-RNG] [LB=DCD] [SD=RTS] +.fi +.if n \{\ +.RE +.\} +.sp +2 = APC Back\-UPS/Back\-UPS Pro/Smart\-UPS with 940\-0020B cable +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=RTS] [OL=\-CTS] [LB=DCD] [SD=DTR+RTS] +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +Type 2 has also been reported to work with the 940\-0020C cable\&. +.fi +.if n \{\ +.RE +.\} +.sp +3 = PowerTech Comp1000 with DTR cable power +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=DCD] [SD=DTR+RTS] +.fi +.if n \{\ +.RE +.\} +.sp +4 = Generic RUPS Model +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=RTS] [OL=CTS] [LB=\-DCD] [SD=\-RTS] +.fi +.if n \{\ +.RE +.\} +.sp +5 = Tripp Lite UPS with Lan2\&.2 interface (black 73\-0844 cable) +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=\-DCD] [SD=DTR+RTS] +.fi +.if n \{\ +.RE +.\} +.sp +6 = Best Patriot with INT51 cable +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=\-DCD] [SD=RTS] +.fi +.if n \{\ +.RE +.\} +.sp +7 = CyberPower Power99 Also Upsonic Power Guardian PG\-500, Belkin Belkin Home Office, F6H350\-SER, F6H500\-SER, F6H650\-SER +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=RTS] [OL=CTS] [LB=\-DCD] [SD=DTR] +.fi +.if n \{\ +.RE +.\} +.sp +8 = Nitram Elite 500 +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=\-DCD] [SD=???] +.fi +.if n \{\ +.RE +.\} +.sp +9 = APC Back\-UPS/Back\-UPS Pro/Smart\-UPS with 940\-0023A cable +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=none] [OL=\-DCD] [LB=CTS] [SD=RTS] +.fi +.if n \{\ +.RE +.\} +.sp +10 = Victron Lite with crack cable +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=RTS] [OL=CTS] [LB=\-DCD] [SD=DTR] +.fi +.if n \{\ +.RE +.\} +.sp +11 = Powerware 3115 +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=\-CTS] [LB=\-DCD] [SD=ST] +.fi +.if n \{\ +.RE +.\} +.sp +12 = APC Back\-UPS Office with 940\-0119A cable +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=RTS] [OL=\-CTS] [LB=DCD] [SD=DTR] +.fi +.if n \{\ +.RE +.\} +.sp +13 = RPT Repoteck RPT\-800A/RPT\-162A +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR+RTS] [OL=DCD] [LB=\-CTS] [SD=ST] +.fi +.if n \{\ +.RE +.\} +.sp +14 = Online P\-series +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=DCD] [LB=\-CTS] [SD=RTS] +.fi +.if n \{\ +.RE +.\} +.sp +15 = Powerware 5119, 5125 +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=\-DCD] [SD=ST] +.fi +.if n \{\ +.RE +.\} +.sp +16 = Nitram Elite 2002 +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR+RTS] [OL=CTS] [LB=\-DCD] [SD=???] +.fi +.if n \{\ +.RE +.\} +.sp +17 = PowerKinetics 9001 +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=\-DCD] [SD=???] +.fi +.if n \{\ +.RE +.\} +.sp +18 = TrippLite Omni 450LAN with Martin\(cqs cabling +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=DCD] [SD=none] +.fi +.if n \{\ +.RE +.\} +.sp +19 = Fideltronic Ares Series +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=\-DCD] [SD=RTS] +.fi +.if n \{\ +.RE +.\} +.sp +20 = Powerware 5119 RM +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=\-CTS] [LB=DCD] [SD=ST] +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +Check docs/cables/powerware\&.txt +.fi +.if n \{\ +.RE +.\} +.sp +21 = Generic RUPS 2000 (Megatec M2501 cable) +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=RTS] [OL=CTS] [LB=\-DCD] [SD=RTS+DTR] +.fi +.if n \{\ +.RE +.\} +.sp +22 = Gamatronic All models with alarm interface (also CyberPower SL series) +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=RTS] [OL=CTS] [LB=\-DCD] [SD=DTR] +.fi +.if n \{\ +.RE +.\} +.SH "SIMILAR MODELS" +.sp +Many different UPS companies make models with similar interfaces\&. The RUPS cable seems to be especially popular in the "power strip" variety of UPS found in office supply stores\&. If your UPS works with an entry in the table above, but the model or manufacturer information don\(cqt match, don\(cqt despair\&. You can fix that easily by using the mfr and model variables documented above in your \fBups.conf\fR(5)\&. +.SH "TESTING COMPATIBILITY" +.sp +If your UPS isn\(cqt listed above, you can try going through the list until you find one that works\&. There is a lot of cable and interface reuse in the UPS world, and you may find a match\&. +.sp +To do this, first make sure nothing important is plugged into the outlets on the UPS, as you may inadvertently switch it off\&. Definitely make sure that the computer you\(cqre using is not plugged into that UPS\&. Plug in something small like a lamp so you know when power is being supplied to the outlets\&. +.sp +Now, you can either attempt to make an educated guess based on the documentation your manufacturer has provided (if any), or just start going down the list\&. +.SS "Step 1" +.sp +Pick a driver to try from the list (genericups \-h) and go to step 2\&. +.SS "Step 2" +.sp +Start the driver with the type you want to try \- +.sp +.if n \{\ +.RS 4 +.\} +.nf +genericups \-x upstype=n /dev/port +.fi +.if n \{\ +.RE +.\} +.sp +Let upsd sync up (watch the syslog), and then run upsc to see what it found\&. If the STATUS is right (should be OL for on line), continue to Step 3, otherwise go back to step 1\&. +.sp +Alternatively, you can run genericups in debug mode \- +.sp +.if n \{\ +.RS 4 +.\} +.nf +genericups \-DDDDD \-x upstype=n /dev/port +.fi +.if n \{\ +.RE +.\} +.sp +In this mode it will be running in the foreground and continuously display the line and battery status of the UPS\&. +.SS "Step 3" +.sp +Disconnect the UPS from the wall/mains power\&. This is easiest if you have a switched outlet in between it and the wall, but you can also just pull the plug to test\&. The lamp should stay lit, and the status should switch to "OB"\&. If the lamp went out or the status didn\(cqt go to "OB" within about 15 seconds, go to Step 1\&. Otherwise, continue to Step 4\&. +.SS "Step 4" +.sp +At this point, we know that OL and OB work\&. If nothing else beyond this point works, you at least know what your OL/OB value should be\&. +.sp +Wait for the UPS to start complaining about a low battery\&. Depending on the size of your UPS battery and the lamp\(cqs bulb, this could take awhile\&. It should start complaining audibly at some point\&. When this happens, STATUS should show "OB LB" within 15 seconds\&. If not, go to Step 1, otherwise continue to Step 5\&. +.SS "Step 5" +.sp +So far: OL works, OB works, and LB works\&. +.sp +With the UPS running on battery, run the genericups driver with the \-k switch to shut it down\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +genericups \-x upstype=n \-k /dev/port +.fi +.if n \{\ +.RE +.\} +.sp +If the UPS turns off the lamp, you\(cqre done\&. At this point, you have verified that the shutdown sequence actually does what you want\&. You can start using the genericups driver with this type number for normal operations\&. +.sp +You should use your findings to add a section to your ups\&.conf\&. Here is a quick example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[myups] + driver = genericups + port = /dev/ttyS0 + upstype = 1 +.fi +.if n \{\ +.RE +.\} +.sp +Change the port and upstype values to match your system\&. +.SH "NEW SUPPORT" +.sp +If the above testing sequence fails, you will probably need to create a new entry to support your hardware\&. All UPS types are determined from the table in the genericups\&.h file in the source tree\&. +.sp +On a standard 9 pin serial port, there are 6 lines that are used as the standard "high/low" signal levels\&. 4 of them are incoming (to the PC, from the UPS), and the other 2 are outgoing (to the UPS, from the PC)\&. The other 3 are the receive/transmit lines and the ground\&. +.sp +Be aware that many manufacturers remap pins within the cable\&. If you have any doubts, a quick check with a multimeter should confirm whether the cable is straight\-through or not\&. Another thing to keep in mind is that some cables have electronics in them to do special things\&. Some have resistors and transistors on board to change behavior depending on what\(cqs being supplied by the PC\&. +.SH "SPECIFIC MODEL NOTES" +.sp +These have been contributed by users of this driver\&. +.sp +The Centralion CL series may power down the load if the driver starts up with the UPS running on battery as the default line settings contain the shutdown sequence\&. \- Neil Muller +.sp +The Tripp\-Lite Internet Office 700 must be used with the black 73\-0844 cable instead of the gray 73\-0743 cable\&. This entry should work with any of their models with the Lan 2\&.2 interface \- see the sticker by the DB9 connector on the UPS\&. \- Stephen Brown +.sp +Type 5 should work with the Tripp\-Lite Lan 2\&.1 interface and the 73\-0724 cable\&. This was tested with the OmniSmart 675 PNP on Red Hat 7\&.2\&. \- Q Giese +.sp +Types 7 and 10 should both work with the PhoenixTec A1000\&. +.SH "BUGS" +.sp +There is no way to reliably detect a contact\-closure UPS\&. This means the driver will start up happily even if no UPS is detected\&. It also means that if the connection between the UPS and computer is interrupted, you may not be able to sense this in software\&. +.sp +Most contact\-closure UPSes will not power down the load if the line power is present\&. This can create a race when using slave \fBupsmon\fR(8) systems\&. See the \fBupsmon\fR(8) man page for more information\&. +.sp +The solution to both of these problems is to upgrade to a smart protocol UPS of some kind that allows detection and proper load cycling on command\&. +.SH "SEE ALSO" +.SS "The core driver" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/genericups.8 b/docs/man/genericups.txt similarity index 59% rename from man/genericups.8 rename to docs/man/genericups.txt index 523525e..9a7efc7 100644 --- a/man/genericups.8 +++ b/docs/man/genericups.txt @@ -1,12 +1,17 @@ -.TH GENERICUPS 8 "Thu Aug 11 2005" "" "Network UPS Tools (NUT)" -.SH NAME -genericups \- Driver for contact\(hyclosure UPS equipment +GENERICUPS(8) +============= -.SH NOTE +NAME +---- +genericups - Driver for contact-closure UPS equipment + +NOTE +---- This man page only documents the specific features of the genericups -driver. For information about the core driver, see \fBnutupsdrv\fR(8). +driver. For information about the core driver, see linkman:nutupsdrv[8]. -.SH SUPPORTED HARDWARE +SUPPORTED HARDWARE +------------------ This driver supports hardware from many different manufacturers as it only uses the very simplest of signaling schemes. Contact closure refers to a kind of interface where basic high/low signals are provided to indicate @@ -15,53 +20,57 @@ status. This kind of UPS can only report line power and battery status. This means that you will only get the essentials in ups.status: OL, OB, and LB. Anything else requires a smarter UPS. -.SH CABLING +CABLING +------- Cabling is different for every kind of UPS. See the table below for information on what is known to work with a given UPS type. -.SH EXTRA ARGUMENTS -This driver supports the following settings in the \fBups.conf\fR(5): +EXTRA ARGUMENTS +--------------- +This driver supports the following settings in the linkman:ups.conf[5]: -.IP "upstype=\fItype\fR" +upstype='type':: -Required. Configures the driver for a specific kind of UPS. See the UPS -Types section below for more information on which entries are available. +Required. Configures the driver for a specific kind of UPS. See the +<<_ups_types,UPS Types>> section below for more information on which entries +are available. -.IP "mfr=\fIstring\fR" +mfr='string':: Optional. The very nature of a generic UPS driver sometimes means that the stock manufacturer data has no relation to the actual hardware that is -attached. With the mfr setting, you can change the value that is seen by +attached. With the `mfr` setting, you can change the value that is seen by clients that monitor this UPS. -.IP "model=\fIstring\fR" +model='string':: -Optional. This is like mfr above, but it overrides the model string +Optional. This is like `mfr` above, but it overrides the model string instead. -.IP "serial=\fIstring\fR" +serial='string':: -Optional. This is like mfr above and intended to record the identification -string of the UPS. It is titled serial because usually this string is +Optional. This is like `mfr` above and intended to record the identification +string of the UPS. It is titled "serial" because usually this string is referred to as the serial number. -.IP "sdtime=\fIvalue\fR" +sdtime='value':: Optional. The driver will sleep for this many seconds after setting the shutdown signal. This is necessary for some hardware which requires a sustained level to activate the shutdown sequence. - ++ The default behavior of the driver is to exit immediately. If this doesn't reliably trigger a shutdown in your UPS hardware, use this setting to give it more time to react. -Note: very large values for sdtime may create warnings from upsdrvctl if +NOTE: very large values for +sdtime+ may create warnings from upsdrvctl if it gets tired of waiting for the driver to return. -.SH CUSTOM CONFIGURATIONS +CUSTOM CONFIGURATIONS +--------------------- You may override the values for CP, OL, LB, and SD by defining them in -the \fBups.conf\fR after the upstype setting. +the linkman:ups.conf[5] after the upstype setting. For example, to set the cable power to DTR and the low battery value to DCD, it would look like this: @@ -74,136 +83,153 @@ Recognized values for input lines are CTS, DCD, and RNG. Recognized values for output lines are DTR, RTS, and ST. See below for more about what these signals mean. -These values may be negated for active low signals. That is, "LB=\-DCD" +These values may be negated for active low signals. That is, "LB=-DCD" recognizes a low battery condition when DCD is not held high. -.SH TYPE INFORMATION +TYPE INFORMATION +---------------- The essence of a UPS definition in this driver is how it uses the serial lines that are available. These are the abbreviations you will see below: - OL \(hy On line (no power failure) (opposite of OB \(hy on battery) +OL:: On line (no power failure) (opposite of OB - on battery) - LB \(hy Low battery +LB:: Low battery - SD \(hy Shutdown load +SD:: Shutdown load - CP \(hy Cable power (must be present for cable to have valid reading) +CP:: Cable power (must be present for cable to have valid reading) - CTS \(hy Clear to Send. Received from the UPS. +CTS:: Clear to Send. Received from the UPS. - RTS \(hy Ready to Send. Sent by the PC. +RTS:: Ready to Send. Sent by the PC. - DCD \(hy Data Carrier Detect. Received from the UPS. +DCD:: Data Carrier Detect. Received from the UPS. - RNG \(hy Ring indicate. Received from the UPS. +RNG:: Ring indicate. Received from the UPS. - DTR \(hy Data Terminal Ready. Sent by the PC. +DTR:: Data Terminal Ready. Sent by the PC. - DSR \(hy Data Set Ready. Received from the UPS. +ST:: Send a BREAK on the transmit data line - ST \(hy Send a BREAK on the transmit data line - -A \- in front of a signal name (like \-RNG) means that the indicated -condition is signaled with an active low signal. For example, [LB=\-RNG] +A "-" in front of a signal name (like -RNG) means that the indicated +condition is signaled with an active low signal. For example, [LB=-RNG] means the battery is low when the ring indicate line goes low, and that the battery is OK when that line is held high. -.SH UPS TYPES +UPS TYPES +--------- 0 = UPSonic LAN Saver 600 - [CP=DTR+RTS] [OL=\-CTS] [LB=DCD] [SD=DTR] -1 = APC Back\(hyUPS/Back\(hyUPS Pro/Smart\(hyUPS with 940\-0095A/C cable - [CP=DTR] [OL=\-RNG] [LB=DCD] [SD=RTS] + [CP=DTR+RTS] [OL=-CTS] [LB=DCD] [SD=DTR] -2 = APC Back\(hyUPS/Back\(hyUPS Pro/Smart\(hyUPS with 940\-0020B cable - [CP=RTS] [OL=\-CTS] [LB=DCD] [SD=DTR+RTS] +1 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0095A/C cable - Type 2 has also been reported to work with the 940\-0020C cable. + [CP=DTR] [OL=-RNG] [LB=DCD] [SD=RTS] + +2 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0020B cable + + [CP=RTS] [OL=-CTS] [LB=DCD] [SD=DTR+RTS] + + Type 2 has also been reported to work with the 940-0020C cable. 3 = PowerTech Comp1000 with DTR cable power + [CP=DTR] [OL=CTS] [LB=DCD] [SD=DTR+RTS] 4 = Generic RUPS Model - [CP=RTS] [OL=CTS] [LB=\-DCD] [SD=\-RTS] -5 = Tripp Lite UPS with Lan2.2 interface (black 73\-0844 cable) - [CP=DTR] [OL=CTS] [LB=\-DCD] [SD=DTR+RTS] + [CP=RTS] [OL=CTS] [LB=-DCD] [SD=-RTS] + +5 = Tripp Lite UPS with Lan2.2 interface (black 73-0844 cable) + + [CP=DTR] [OL=CTS] [LB=-DCD] [SD=DTR+RTS] 6 = Best Patriot with INT51 cable - [CP=DTR] [OL=CTS] [LB=\-DCD] [SD=RTS] + + [CP=DTR] [OL=CTS] [LB=-DCD] [SD=RTS] 7 = CyberPower Power99 - also Upsonic Power Guardian PG\-500 + Also Upsonic Power Guardian PG-500, Belkin Belkin Home Office, + F6H350-SER, F6H500-SER, F6H650-SER - Also Belkin Belkin Home Office - F6H350\-SER, F6H500\-SER, F6H650\-SER - - [CP=RTS] [OL=CTS] [LB=\-DCD] [SD=DTR] + [CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR] 8 = Nitram Elite 500 - [CP=DTR] [OL=CTS] [LB=\-DCD] [SD=???] -9 = APC Back\(hyUPS/Back\(hyUPS Pro/Smart\(hyUPS with 940\-0023A cable - [CP=none] [OL=\-DCD] [LB=CTS] [SD=RTS] + [CP=DTR] [OL=CTS] [LB=-DCD] [SD=???] + +9 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0023A cable + + [CP=none] [OL=-DCD] [LB=CTS] [SD=RTS] 10 = Victron Lite with crack cable - [CP=RTS] [OL=CTS] [LB=\-DCD] [SD=DTR] + + [CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR] 11 = Powerware 3115 - [CP=DTR] [OL=\-CTS] [LB=\-DCD] [SD=ST] -12 = APC Back\-UPS Office with 940\-0119A cable - [CP=RTS] [OL=\-CTS] [LB=DCD] [SD=DTR] + [CP=DTR] [OL=-CTS] [LB=-DCD] [SD=ST] -13 = RPT Repoteck RPT\-800A/RPT\-162A - [CP=DTR+RTS] [OL=DCD] [LB=\-CTS] [SD=ST] +12 = APC Back-UPS Office with 940-0119A cable -14 = Online P\-series - [CP=DTR] [OL=DCD] [LB=\-CTS] [SD=RTS] + [CP=RTS] [OL=-CTS] [LB=DCD] [SD=DTR] + +13 = RPT Repoteck RPT-800A/RPT-162A + + [CP=DTR+RTS] [OL=DCD] [LB=-CTS] [SD=ST] + +14 = Online P-series + + [CP=DTR] [OL=DCD] [LB=-CTS] [SD=RTS] 15 = Powerware 5119, 5125 - [CP=DTR] [OL=CTS] [LB=\-DCD] [SD=ST] + + [CP=DTR] [OL=CTS] [LB=-DCD] [SD=ST] 16 = Nitram Elite 2002 - [CP=DTR+RTS] [OL=CTS] [LB=\-DCD] [SD=???] + + [CP=DTR+RTS] [OL=CTS] [LB=-DCD] [SD=???] 17 = PowerKinetics 9001 - [CP=DTR] [OL=CTS] [LB=\-DCD] [SD=???] + + [CP=DTR] [OL=CTS] [LB=-DCD] [SD=???] 18 = TrippLite Omni 450LAN with Martin's cabling + [CP=DTR] [OL=CTS] [LB=DCD] [SD=none] - http://lists.exploits.org/upsdev/Jul2002/00012.html - 19 = Fideltronic Ares Series - [CP=DTR] [OL=CTS] [LB=\-DCD] [SD=RTS] + + [CP=DTR] [OL=CTS] [LB=-DCD] [SD=RTS] 20 = Powerware 5119 RM - [CP=DTR] [OL=\-CTS] [LB=DCD] [SD=ST] + + [CP=DTR] [OL=-CTS] [LB=DCD] [SD=ST] Check docs/cables/powerware.txt 21 = Generic RUPS 2000 (Megatec M2501 cable) - [CP=RTS] [OL=CTS] [LB=\-DCD] [SD=RTS+DTR] - http://lists.exploits.org/upsdev/Oct2004/00004.html + [CP=RTS] [OL=CTS] [LB=-DCD] [SD=RTS+DTR] 22 = Gamatronic All models with alarm interface - also CyberPower SL series + (also CyberPower SL series) - [CP=RTS] [OL=CTS] [LB=\-DCD] [SD=DTR] + [CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR] -.SH SIMILAR MODELS +SIMILAR MODELS +-------------- Many different UPS companies make models with similar interfaces. The RUPS cable seems to be especially popular in the "power strip" variety of UPS found in office supply stores. If your UPS works with an entry in the table above, but the model or manufacturer information don't match, don't despair. You can fix that easily by using the mfr and model -variables documented above in your \fBups.conf\fR(5). +variables documented above in your linkman:ups.conf[5]. -.SH TESTING COMPATIBILITY +TESTING COMPATIBILITY +--------------------- If your UPS isn't listed above, you can try going through the list until you find one that works. There is a lot of cable and interface reuse in @@ -220,35 +246,40 @@ documentation your manufacturer has provided (if any), or just start going down the list. Step 1 +~~~~~~ -Pick a driver to try from the list (genericups \-h) and go to step 2. +Pick a driver to try from the list (genericups -h) and go to step 2. Step 2 +~~~~~~ -Start the driver with the type you want to try \(hy +Start the driver with the type you want to try - - genericups \-x upstype=n /dev/port + genericups -x upstype=n /dev/port Let upsd sync up (watch the syslog), and then run upsc to see what it -found. If the STATUS is right (should be OL for on line), go to step 3, -otherwise go back to step 1. +found. If the STATUS is right (should be OL for on line), continue to +<<_step_3,Step 3>>, otherwise go back to step 1. -Alternatively, you can run genericups in debug mode \(hy +Alternatively, you can run genericups in debug mode - - genericups -DDDDD \-x upstype=n /dev/port + genericups -DDDDD -x upstype=n /dev/port In this mode it will be running in the foreground and continuously display the line and battery status of the UPS. Step 3 +~~~~~~ Disconnect the UPS from the wall/mains power. This is easiest if you have a switched outlet in between it and the wall, but you can also just pull the plug to test. The lamp should stay lit, and the status should switch to "OB". If the lamp went out or the status didn't go to "OB" -within about 15 seconds, go to step 1. Otherwise, continue to step 4. +within about 15 seconds, go to <<_step_1,Step 1>>. Otherwise, continue +to <<_step_4,Step 4>>. Step 4 +~~~~~~ At this point, we know that OL and OB work. If nothing else beyond this point works, you at least know what your OL/OB value should be. @@ -257,16 +288,17 @@ Wait for the UPS to start complaining about a low battery. Depending on the size of your UPS battery and the lamp's bulb, this could take awhile. It should start complaining audibly at some point. When this happens, STATUS should show "OB LB" within 15 seconds. If not, go to -step 1, otherwise continue to step 5. +<<_step_1,Step 1>>, otherwise continue to <<_step_5,Step 5>>. Step 5 +~~~~~~ So far: OL works, OB works, and LB works. -With the UPS running on battery, run the genericups driver with the \-k +With the UPS running on battery, run the genericups driver with the -k switch to shut it down. - genericups \-x upstype=n \-k /dev/port + genericups -x upstype=n -k /dev/port If the UPS turns off the lamp, you're done. At this point, you have verified that the shutdown sequence actually does what you want. You @@ -283,7 +315,8 @@ Here is a quick example: Change the port and upstype values to match your system. -.SH NEW SUPPORT +NEW SUPPORT +----------- If the above testing sequence fails, you will probably need to create a new entry to support your hardware. All UPS types are determined from the @@ -296,48 +329,53 @@ The other 3 are the receive/transmit lines and the ground. Be aware that many manufacturers remap pins within the cable. If you have any doubts, a quick check with a multimeter should confirm whether the -cable is straight\(hythrough or not. Another thing to keep in mind is that +cable is straight-through or not. Another thing to keep in mind is that some cables have electronics in them to do special things. Some have resistors and transistors on board to change behavior depending on what's being supplied by the PC. -.SH SPECIFIC MODEL NOTES +SPECIFIC MODEL NOTES +-------------------- These have been contributed by users of this driver. The Centralion CL series may power down the load if the driver starts up with the UPS running on battery as the default line settings contain the -shutdown sequence. \(hy Neil Muller +shutdown sequence. - Neil Muller -The Tripp\(hyLite Internet Office 700 must be used with the black 73\(hy0844 -cable instead of the gray 73\(hy0743 cable. This entry should work with any -of their models with the Lan 2.2 interface \(hy see the sticker by the DB9 -connector on the UPS. \(hy Stephen Brown +The Tripp-Lite Internet Office 700 must be used with the black 73-0844 +cable instead of the gray 73-0743 cable. This entry should work with any +of their models with the Lan 2.2 interface - see the sticker by the DB9 +connector on the UPS. - Stephen Brown -Type 5 should work with the Tripp\(hyLite Lan 2.1 interface and the 73\(hy0724 -cable. This was tested with the OmniSmart 675 PNP on Red Hat 7.2. \(hy Q +Type 5 should work with the Tripp-Lite Lan 2.1 interface and the 73-0724 +cable. This was tested with the OmniSmart 675 PNP on Red Hat 7.2. - Q Giese Types 7 and 10 should both work with the PhoenixTec A1000. -.SH BUGS +BUGS +---- -There is no way to reliably detect a contact\(hyclosure UPS. This means the +There is no way to reliably detect a contact-closure UPS. This means the driver will start up happily even if no UPS is detected. It also means that if the connection between the UPS and computer is interrupted, you may not be able to sense this in software. -Most contact\(hyclosure UPSes will not power down the load if the line power -is present. This can create a race when using slave \fBupsmon\fR(8) -systems. See the \fBupsmon\fR(8) man page for more information. +Most contact-closure UPSes will not power down the load if the line power +is present. This can create a race when using slave linkman:upsmon[8] +systems. See the linkman:upsmon[8] man page for more information. The solution to both of these problems is to upgrade to a smart protocol UPS of some kind that allows detection and proper load cycling on command. -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver +~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources +~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/hosts.conf.5 b/docs/man/hosts.conf.5 new file mode 100644 index 0000000..caf89a3 --- /dev/null +++ b/docs/man/hosts.conf.5 @@ -0,0 +1,61 @@ +'\" t +.\" Title: hosts.conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "HOSTS\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +hosts.conf \- Access control for Network UPS Tools CGI programs +.SH "DESCRIPTION" +.sp +The CGI programs (\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8)) use this file to determine if they are allowed to talk to a host\&. This keeps random visitors from using your web server to annoy others by creating outgoing connections\&. +.SH "DIRECTIVES" +.PP +\fBMONITOR\fR \fIups\fR \fIdescription\fR +.RS 4 +The +\fIups\fR +element is in the form +upsname[@hostname[:port]]\&. To allow connections to a UPS called "snoopy" on a system called "doghouse" that runs upsd on port 7877, it would look like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +MONITOR snoopy@doghouse:7877 "Joe Cool" +.fi +.if n \{\ +.RE +.\} +.sp +The description must be one element, so if it has spaces, then it must be wrapped with quotes as shown above\&. The default hostname is "localhost"\&. +.RE +.SH "SEE ALSO" +.sp +\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/hosts.conf.5 b/docs/man/hosts.conf.txt similarity index 50% rename from man/hosts.conf.5 rename to docs/man/hosts.conf.txt index 276e0c3..273ae98 100644 --- a/man/hosts.conf.5 +++ b/docs/man/hosts.conf.txt @@ -1,30 +1,39 @@ -.TH HOSTS.CONF 5 "Mon Jan 22 2007" "" "Network UPS Tools (NUT)" -.SH NAME -hosts.conf \- Access control for Network UPS Tools CGI programs +HOSTS.CONF(5) +============= -.SH DESCRIPTION +NAME +---- -The CGI programs (\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), -\fBupsimage.cgi(8)\fR) use this file to determine if they are allowed to +hosts.conf - Access control for Network UPS Tools CGI programs + +DESCRIPTION +----------- + +The CGI programs (linkman:upsset.cgi[8], linkman:upsstats.cgi[8], +linkman:upsimage.cgi[8]) use this file to determine if they are allowed to talk to a host. This keeps random visitors from using your web server to annoy others by creating outgoing connections. -.SH DIRECTIVES +DIRECTIVES +---------- -.IP "MONITOR \fIups\fR \fIdescription\fR" +*MONITOR* 'ups' 'description':: -The \fIups\fR element is in the form "upsname[@hostname[:port]]". +The 'ups' element is in the form `upsname[@hostname[:port]]`. To allow connections to a UPS called "snoopy" on a system called "doghouse" that runs upsd on port 7877, it would look like this: MONITOR snoopy@doghouse:7877 "Joe Cool" - ++ The description must be one element, so if it has spaces, then it must be wrapped with quotes as shown above. The default hostname is "localhost". -.SH SEE ALSO -\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) +SEE ALSO +-------- -.SS Internet resources: +linkman:upsset.cgi[8], linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/isbmex.8 b/docs/man/isbmex.8 new file mode 100644 index 0000000..f649265 --- /dev/null +++ b/docs/man/isbmex.8 @@ -0,0 +1,50 @@ +'\" t +.\" Title: isbmex +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "ISBMEX" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +isbmex \- Driver for ISBMEX UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the isbmex driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports SOLA/BASIC Mexico ISBMEX protocol UPS equipment\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "AUTHOR" +.sp +Edscott Wilson Garcia +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/isbmex.txt b/docs/man/isbmex.txt new file mode 100644 index 0000000..9b97d16 --- /dev/null +++ b/docs/man/isbmex.txt @@ -0,0 +1,39 @@ +ISBMEX(8) +========= + +NAME +---- + +isbmex - Driver for ISBMEX UPS equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the +isbmex driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports SOLA/BASIC Mexico ISBMEX protocol UPS equipment. + +EXTRA ARGUMENTS +--------------- + +This driver does not support any extra settings in the +linkman:ups.conf[5]. + +AUTHOR +------ +Edscott Wilson Garcia + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/ivtscd.8 b/docs/man/ivtscd.8 new file mode 100644 index 0000000..f1365f2 --- /dev/null +++ b/docs/man/ivtscd.8 @@ -0,0 +1,50 @@ +'\" t +.\" Title: ivtscd +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "IVTSCD" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ivtscd \- driver for the IVT Solar Controller Device +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the \fBivtscd\fR driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "DESCRIPTION" +.sp +This driver allows to access the IVT SCD\-series devices\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra argument\&. +.SH "AUTHOR" +.sp +Arjen de Korte +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/ivtscd.txt b/docs/man/ivtscd.txt new file mode 100644 index 0000000..6a2c7c4 --- /dev/null +++ b/docs/man/ivtscd.txt @@ -0,0 +1,34 @@ +IVTSCD(8) +========= + +NAME +---- +ivtscd - driver for the IVT Solar Controller Device + +NOTE +---- +This man page only documents the hardware-specific features of the +*ivtscd* driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +DESCRIPTION +----------- +This driver allows to access the IVT SCD-series devices. + +EXTRA ARGUMENTS +--------------- +This driver does not support any extra argument. + +AUTHOR +------ +Arjen de Korte + +SEE ALSO +-------- +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/libupsclient-config.1 b/docs/man/libupsclient-config.1 new file mode 100644 index 0000000..99d9dcd --- /dev/null +++ b/docs/man/libupsclient-config.1 @@ -0,0 +1,70 @@ +'\" t +.\" Title: libupsclient-config +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "LIBUPSCLIENT\-CONFIG" "1" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +libupsclient-config \- script to get information about the installed version of libupsclient +.SH "SYNOPSIS" +.sp +\fBlibupsclient\-config\fR [\-\-version] [\-\-libs] [\-\-cflags] +.SH "DESCRIPTION" +.sp +\fBlibupsclient\-config\fR is a tool that is used to determine the compiler and linker flags that should be used to compile and link programs that use \fBlibupsclient\fR from the Network UPS Tools project\&. +.SH "OPTIONS" +.sp +\fBlibupsclient\-config\fR accepts the following options: +.PP +\fB\-\-version\fR +.RS 4 +Print the currently installed version of +\fBlibupsclient\fR +on the standard output\&. +.RE +.PP +\fB\-\-libs\fR +.RS 4 +Print the linker flags that are necessary to link a +\fBlibupsclient\fR +program\&. +.RE +.PP +\fB\-\-cflags\fR +.RS 4 +Print the compiler flags that are necessary to compile a +\fBlibupsclient\fR +program\&. +.RE +.SH "AUTHORS" +.sp +This manual page was written by Arnaud Quette \&. +.SH "SEE ALSO" +.sp +\fBupsclient\fR(3) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/libupsclient-config.txt b/docs/man/libupsclient-config.txt new file mode 100644 index 0000000..730a5b2 --- /dev/null +++ b/docs/man/libupsclient-config.txt @@ -0,0 +1,46 @@ +LIBUPSCLIENT-CONFIG(1) +====================== + +NAME +---- + +libupsclient-config - script to get information about the installed version of libupsclient + +SYNOPSIS +-------- +*libupsclient-config* [--version] [--libs] [--cflags] + +DESCRIPTION +----------- + +*libupsclient-config* is a tool that is used to determine the compiler and +linker flags that should be used to compile and link programs that use +*libupsclient* from the Network UPS Tools project. + +OPTIONS +------- + +*libupsclient-config* accepts the following options: + +*--version*:: +Print the currently installed version of *libupsclient* on the standard output. + +*--libs*:: +Print the linker flags that are necessary to link a *libupsclient* program. + +*--cflags*:: +Print the compiler flags that are necessary to compile a *libupsclient* program. + +AUTHORS +------- +This manual page was written by Arnaud Quette . + +SEE ALSO +-------- + +linkman:upsclient[3] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + diff --git a/docs/man/liebert-esp2.8 b/docs/man/liebert-esp2.8 new file mode 100644 index 0000000..d574af1 --- /dev/null +++ b/docs/man/liebert-esp2.8 @@ -0,0 +1,55 @@ +'\" t +.\" Title: liebert-esp2 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "LIEBERT\-ESP2" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +liebert-esp2 \- Driver for Liebert UPS, using the ESP\-II serial protocol +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the liebert\-esp2 driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This is an experimental driver\&. You have been warned\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in \fBups.conf\fR(5): +.PP +\fBbaudrate=\fR\fInum\fR +.RS 4 +Set the speed of the serial connection \- 1200, 2400 (default), 4800, 9600 or 19200\&. +.RE +.SH "AUTHOR" +.sp +Richard Gregory , Arjen de Korte +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/liebert-esp2.txt b/docs/man/liebert-esp2.txt new file mode 100644 index 0000000..e34fb06 --- /dev/null +++ b/docs/man/liebert-esp2.txt @@ -0,0 +1,40 @@ +LIEBERT-ESP2(8) +============== + +NAME +---- + +liebert-esp2 - Driver for Liebert UPS, using the ESP-II serial protocol + +NOTE +---- +This man page only documents the hardware-specific features of the +liebert-esp2 driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This is an experimental driver. You have been warned. + +EXTRA ARGUMENTS +--------------- + +This driver supports the following optional settings in linkman:ups.conf[5]: + +*baudrate=*'num':: +Set the speed of the serial connection - 1200, 2400 (default), 4800, 9600 or 19200. + +AUTHOR +------ +Richard Gregory , Arjen de Korte + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/liebert.8 b/docs/man/liebert.8 new file mode 100644 index 0000000..b1524fa --- /dev/null +++ b/docs/man/liebert.8 @@ -0,0 +1,52 @@ +'\" t +.\" Title: liebert +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "LIEBERT" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +liebert \- Driver for Liebert contact\-closure UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the liebert driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports some Liebert UPS equipment with a contact\-closure interface\&. This includes the UPStation GXT2 with their contact\-closure cable\&. The smart mode ("Multilink") cable is not supported by this driver\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "BUGS" +.sp +This driver does not yet support shutdowns by raising DTR\&. Be aware that shutdowns are not possible with the stock contact\-closure cable\&. You may have to build another cable with DTR connected through to the UPS for it to work\&. +.sp +There is no way for this driver to detect the hardware or cable\&. It will start up successfully even if no UPS is present\&. This is a fundamental limitation of any contact\-closure driver\&. +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/liebert.txt b/docs/man/liebert.txt new file mode 100644 index 0000000..dfaa795 --- /dev/null +++ b/docs/man/liebert.txt @@ -0,0 +1,49 @@ +LIEBERT(8) +========== + +NAME +---- + +liebert - Driver for Liebert contact-closure UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +liebert driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports some Liebert UPS equipment with a contact-closure +interface. This includes the UPStation GXT2 with their contact-closure +cable. The smart mode ("Multilink") cable is not supported by this +driver. + +EXTRA ARGUMENTS +--------------- + +This driver does not support any extra settings in the +linkman:ups.conf[5]. + +BUGS +---- + +This driver does not yet support shutdowns by raising DTR. Be aware +that shutdowns are not possible with the stock contact-closure cable. +You may have to build another cable with DTR connected through to the +UPS for it to work. + +There is no way for this driver to detect the hardware or cable. It +will start up successfully even if no UPS is present. This is a +fundamental limitation of any contact-closure driver. + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/masterguard.8 b/docs/man/masterguard.8 new file mode 100644 index 0000000..11dc582 --- /dev/null +++ b/docs/man/masterguard.8 @@ -0,0 +1,53 @@ +'\" t +.\" Title: masterguard +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "MASTERGUARD" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +masterguard \- Driver for Masterguard UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the masterguard driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports Masterguard UPS equipment\&. +.SH "EXTRA ARGUMENTS" +.PP +\fBCS\fR +.RS 4 +Cancel the shutdown procedure\&. +.RE +.SH "AUTHOR" +.sp +Michael Spanier +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/masterguard.txt b/docs/man/masterguard.txt new file mode 100644 index 0000000..0820025 --- /dev/null +++ b/docs/man/masterguard.txt @@ -0,0 +1,37 @@ +MASTERGUARD(8) +============== + +NAME +---- +masterguard - Driver for Masterguard UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +masterguard driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports Masterguard UPS equipment. + +EXTRA ARGUMENTS +--------------- + +*CS*:: +Cancel the shutdown procedure. + +AUTHOR +------ +Michael Spanier + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/metasys.8 b/docs/man/metasys.8 new file mode 100644 index 0000000..7d0f54c --- /dev/null +++ b/docs/man/metasys.8 @@ -0,0 +1,137 @@ +'\" t +.\" Title: metasys +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "METASYS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +metasys \- Driver for Meta System UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the metasys driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The \fBmetasys\fR driver was written with the "Meta System UPS Protocol Rev\&.1\&.12" kindly supplied from Meta System\&. +.sp +The driver should support all the common features of the ups models: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +HF Line (/2) 1\-8 boards +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +HF Millennium (810, 820) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +HF TOP Line (910, 920, 930, 940, 950, 970, 980) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ECO Network (750, 1000, 1050, 1500, 1800, 2000, 2100, 2500, 3000) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ECO (305, 308, 311, 511, 516, 519, 522, SX, SXI) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ally HF (800, 1000, 1250, 1600, 2000, 2500) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Megaline (1250, 2500, 3750, 5000, 6250, 7500, 8750, 10000) +.RE +.SH "CABLING" +.sp +The needed cable is a standard pin\-to\-pin serial cable with at least pins 2, 3, and 5 (on DB9 connector) connected\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports no extra arguments from \fBups.conf\fR(5)\&. +.SH "BUGS" +.sp +This driver has been tested on Meta System HF Millennium 820 and ally HF 1000 only\&. +.sp +Any informations about the use of the driver with the other listed UPS are really welcome\&. +.SH "AUTHOR" +.sp +Fabio Di Niro +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/metasys.8 b/docs/man/metasys.txt similarity index 61% rename from man/metasys.8 rename to docs/man/metasys.txt index a4f8e1a..2e29557 100644 --- a/man/metasys.8 +++ b/docs/man/metasys.txt @@ -1,16 +1,26 @@ -.TH METASYS 8 "Mon May 17 2004" "" "Network UPS Tools (NUT)" -.SH NAME -metasys \- Driver for Meta System UPS equipment -.SH NOTE +METASYS(8) +========== + +NAME +---- + +metasys - Driver for Meta System UPS equipment + +NOTE +---- + This man page only documents the hardware-specific features of the metasys driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +linkman:nutupsdrv[8]. -.SH SUPPORTED HARDWARE -Metasys driver have been written with the "Meta System UPS Protocol Rev.1.12" +SUPPORTED HARDWARE +------------------ + +The *metasys* driver was written with the "Meta System UPS Protocol Rev.1.12" kindly supplied from Meta System. The driver should support all the common features of the ups models: + - HF Line (/2) 1-8 boards - HF Millennium (810, 820) - HF TOP Line (910, 920, 930, 940, 950, 970, 980) @@ -20,29 +30,34 @@ The driver should support all the common features of the ups models: - Megaline (1250, 2500, 3750, 5000, 6250, 7500, 8750, 10000) -.SH CABLING -The needed cable is a standard pin-to-pin serial cable with, at least, +CABLING +------- +The needed cable is a standard pin-to-pin serial cable with at least pins 2, 3, and 5 (on DB9 connector) connected. -.SH EXTRA ARGUMENTS -This driver supports no extra arguments from the \fBups.conf\fR(5) +EXTRA ARGUMENTS +--------------- +This driver supports no extra arguments from linkman:ups.conf[5]. -.SH BUGS +BUGS +---- This driver has been tested on Meta System HF Millennium 820 and ally HF 1000 only. -Any informations about the use of the driver with the other listed -ups are really welcome. -.SH AUTHOR +Any informations about the use of the driver with the other listed +UPS are really welcome. + +AUTHOR +------ Fabio Di Niro -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS The metasys driver: -\fBmetasys\fR(8) - -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/mge-shut.8 b/docs/man/mge-shut.8 new file mode 100644 index 0000000..d174e06 --- /dev/null +++ b/docs/man/mge-shut.8 @@ -0,0 +1,122 @@ +'\" t +.\" Title: mge-shut +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "MGE\-SHUT" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +mge-shut \- Driver for SHUT Protocol UPS equipment +.SH "SYNOPSIS" +.sp +\fBmge\-shut\fR \-h +.sp +\fBmge\-shut\fR \-a \fIUPS_NAME\fR [\fIOPTIONS\fR] +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +This man page only documents the hardware\-specific features of the mge\-shut driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.sp .5v +.RE +.SH "SUPPORTED HARDWARE" +.sp +mge\-shut supports all recent Eaton, MGE and Dell UPS models which use the SHUT (Serial HID UPS Transfer) protocol\&. +.sp +Older MGE models, such as Pulsar ESV+, Pulsar EX and Pulsar ES+, use the U\-Talk protocol and should use the mge\-utalk driver\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver also supports the following optional settings: +.PP +\fBlowbatt\fR=\fInum\fR +.RS 4 +Set the low battery warning threshold at which shutdown is initiated by +\fBupsmon\fR(8)\&. +.sp +The factory default value is 30 (in percent), and can be settable depending on the exact model\&. +.RE +.PP +\fBoffdelay\fR=\fInum\fR +.RS 4 +Set the timer before the UPS is turned off after the kill power command is sent (via the +\fB\-k\fR +switch)\&. +.sp +The default value is 20 (in seconds)\&. Usually this +\fBmust be lower\fR +than +\fIondelay\fR, but the driver will +\fBnot\fR +warn you upon startup if it isn\(cqt\&. +.RE +.PP +\fBondelay\fR=\fInum\fR +.RS 4 +Set the timer for the UPS to switch on in case the power returns after the kill power command had been sent but before the actual switch off\&. This ensures the machines connected to the UPS are, in all cases, rebooted after a power failure\&. +.sp +The default value is 30 (in seconds)\&. Usually this +\fBmust be greater\fR +than offdelay, but the driver will +\fBnot\fR +warn you upon startup if it isn\(cqt\&. Some UPS\(cqes will restart no matter what, even if the power is (still) out at the moment this timer elapses\&. In that case, you could try if setting +\fIondelay = \-1\fR +in +\fBups\&.conf\fR +helps\&. +.RE +.PP +\fBnotification\fR=\fInum\fR +.RS 4 +Set notification type to 1 (no), 2 (light) or 3 (yes)\&. +.sp +The default value is 3 (yes) because of some early Ellipse models which need it\&. +.RE +.SH "KNOWN ISSUES" +.SS "Repetitive timeout and staleness" +.sp +Some models tends to be unresponsive with the default polling frequency\&. The result is that you have some "data stale" errors in your system log\&. +.sp +In this case, simply modify the general parameter "pollinterval" to a higher value (like 10 for 10 seconds)\&. This should solve the issue\&. +.sp +Using \fInotification=3\fR might also help\&. +.SH "AUTHOR" +.sp +Arnaud Quette +.SH "SEE ALSO" +.SS "The core driver" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/mge-shut.txt b/docs/man/mge-shut.txt new file mode 100644 index 0000000..76a9241 --- /dev/null +++ b/docs/man/mge-shut.txt @@ -0,0 +1,94 @@ +MGE-SHUT(8) +=========== + +NAME +---- + +mge-shut - Driver for SHUT Protocol UPS equipment + +SYNOPSIS +-------- + +*mge-shut* -h + +*mge-shut* -a 'UPS_NAME' ['OPTIONS'] + +NOTE: This man page only documents the hardware-specific features of the +mge-shut driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ + +mge-shut supports all recent Eaton, MGE and Dell UPS models which use the SHUT +(Serial HID UPS Transfer) protocol. + +Older MGE models, such as Pulsar ESV+, Pulsar EX and Pulsar ES+, use the U-Talk +protocol and should use the mge-utalk driver. + +EXTRA ARGUMENTS +--------------- + +This driver also supports the following optional settings: + +*lowbatt*='num':: +Set the low battery warning threshold at which shutdown is initiated by +linkman:upsmon[8]. ++ +The factory default value is 30 (in percent), and can be settable depending on +the exact model. + +*offdelay*='num':: +Set the timer before the UPS is turned off after the kill power command is +sent (via the *-k* switch). ++ +The default value is 20 (in seconds). Usually this *must be lower* than +'ondelay', but the driver will *not* warn you upon startup if it isn't. + +*ondelay*='num':: +Set the timer for the UPS to switch on in case the power returns after the +kill power command had been sent but before the actual switch off. This +ensures the machines connected to the UPS are, in all cases, rebooted after +a power failure. ++ +The default value is 30 (in seconds). Usually this *must be greater* +than offdelay, but the driver will *not* warn you upon startup if it +isn't. Some UPS'es will restart no matter what, even if the power is +(still) out at the moment this timer elapses. In that case, you could try +if setting 'ondelay = -1' in *ups.conf* helps. + +*notification*='num':: +Set notification type to 1 (no), 2 (light) or 3 (yes). ++ +The default value is 3 (yes) because of some early Ellipse models which +need it. + +KNOWN ISSUES +------------ + +Repetitive timeout and staleness +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some models tends to be unresponsive with the default polling frequency. +The result is that you have some "data stale" errors in your system log. + +In this case, simply modify the general parameter "pollinterval" to a higher +value (like 10 for 10 seconds). This should solve the issue. + +Using 'notification=3' might also help. + +AUTHOR +------ + +Arnaud Quette + +SEE ALSO +-------- + +The core driver +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources +~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/mge-utalk.8 b/docs/man/mge-utalk.8 new file mode 100644 index 0000000..82d1812 --- /dev/null +++ b/docs/man/mge-utalk.8 @@ -0,0 +1,120 @@ +'\" t +.\" Title: mge-utalk +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "MGE\-UTALK" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +mge-utalk \- Driver for MGE UPS SYSTEMS UTalk protocol equipment +.SH "SYNOPSIS" +.sp +\fBmge\-utalk\fR \-h +.sp +\fBmge\-utalk\fR \-a \fIUPS_NAME\fR [\fIOPTIONS\fR] +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +This man page only documents the hardware\-specific features of the mge\-utalk driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.sp .5v +.RE +.SH "SUPPORTED HARDWARE" +.sp +mge\-utalk supports the following legacy units, using the MGE UTalk protocol: +.sp +.if n \{\ +.RS 4 +.\} +.nf +Pulsar ESV+, +Pulsar ES+, +Pulsar EL, +Pulsar EX, +Pulsar EXtreme, +Comet EXtreme, +Comet (Utalk Serial Card, ref 66060), +Galaxy (Utalk Serial Card, ref 66060)\&. +.fi +.if n \{\ +.RE +.\} +.sp +This driver also support some newer models with backward UTalk compatibility, such as Pulsar Evolution and Pulsar EXtreme C\&. As these models also support the SHUT protocol, prefer mge\-shut for serial communication, or use the USB port, if available, with the usbhid\-ups driver\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBlowbatt\fR=\fInum\fR +.RS 4 +Set the low battery warning threshold at which shutdown is initiated by +\fBupsmon\fR(8)\&. +.sp +The factory default value is 30 (in percent), and can be settable depending on the exact model\&. +.RE +.PP +\fBoffdelay\fR=\fInum\fR +.RS 4 +Set the timer before the UPS is turned off after the kill power command is sent (via the +\fB\-k\fR +switch)\&. +.sp +The default value is 20 (in seconds)\&. +.RE +.PP +\fBondelay\fR=\fInum\fR +.RS 4 +Set the delay before the UPS is turned on, after the power returns\&. +.sp +The default value is 1 (in minutes)\&. +.RE +.PP +\fBoldmac\fR +.RS 4 +Set this flag if you are running Linux on an Oldworld Macintosh box (all beige Apple Macintosh)\&. This might also be needed for other OSs (like *BSD) running on PowerMac\&. +.RE +.SH "KNOWN ISSUES" +.SS "Repetitive timeout and staleness" +.sp +Older models, such as ES/ESV ones, might report repetitive "data stale" errors\&. This is due to the fact that these models don\(cqt support too much polling\&. To solve this problem, add "pollinterval=20" in ups\&.conf, and change the value of MAXAGE to 25 in upsd\&.conf, and DEADTIME to 25 in upsmon\&.conf\&. +.SH "AUTHOR" +.sp +Hans Ekkehard Plesser, Arnaud Quette, Martin Loyer, Patrick Agrain, Nicholas Reilly, Dave Abbott, Marek Kralewski +.SH "SEE ALSO" +.SS "The core driver" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/mge-utalk.txt b/docs/man/mge-utalk.txt new file mode 100644 index 0000000..ef11baa --- /dev/null +++ b/docs/man/mge-utalk.txt @@ -0,0 +1,98 @@ +MGE-UTALK(8) +============ + +NAME +---- + +mge-utalk - Driver for MGE UPS SYSTEMS UTalk protocol equipment + +SYNOPSIS +-------- + +*mge-utalk* -h + +*mge-utalk* -a 'UPS_NAME' ['OPTIONS'] + +NOTE: This man page only documents the hardware-specific features of the +mge-utalk driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ + +mge-utalk supports the following legacy units, using the MGE UTalk protocol: + + Pulsar ESV+, + Pulsar ES+, + Pulsar EL, + Pulsar EX, + Pulsar EXtreme, + Comet EXtreme, + Comet (Utalk Serial Card, ref 66060), + Galaxy (Utalk Serial Card, ref 66060). + +This driver also support some newer models with backward UTalk compatibility, +such as Pulsar Evolution and Pulsar EXtreme C. As these models also support +the SHUT protocol, prefer mge-shut for serial communication, or use the USB +port, if available, with the usbhid-ups driver. + +EXTRA ARGUMENTS +--------------- + +This driver supports the following optional settings in the linkman:ups.conf[5]: + +*lowbatt*='num':: +Set the low battery warning threshold at which shutdown is initiated by +linkman:upsmon[8]. ++ +The factory default value is 30 (in percent), and can be settable depending on +the exact model. + +*offdelay*='num':: +Set the timer before the UPS is turned off after the kill power command is +sent (via the *-k* switch). ++ +The default value is 20 (in seconds). + +*ondelay*='num':: +Set the delay before the UPS is turned on, after the power returns. ++ +The default value is 1 (in minutes). + +*oldmac*:: +Set this flag if you are running Linux on an Oldworld Macintosh box +(all beige Apple Macintosh). This might also be needed for other +OSs (like *BSD) running on PowerMac. + +KNOWN ISSUES +------------ + +Repetitive timeout and staleness +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Older models, such as ES/ESV ones, might report repetitive "data stale" errors. +This is due to the fact that these models don't support too much polling. +To solve this problem, add "pollinterval=20" in ups.conf, and change the value +of MAXAGE to 25 in upsd.conf, and DEADTIME to 25 in upsmon.conf. + +AUTHOR +------ + +Hans Ekkehard Plesser, +Arnaud Quette, +Martin Loyer, +Patrick Agrain, +Nicholas Reilly, +Dave Abbott, +Marek Kralewski + +SEE ALSO +-------- + +The core driver +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources +~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/microdowell.8 b/docs/man/microdowell.8 new file mode 100644 index 0000000..a166d56 --- /dev/null +++ b/docs/man/microdowell.8 @@ -0,0 +1,50 @@ +'\" t +.\" Title: microdowell +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "MICRODOWELL" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +microdowell \- Driver for Microdowell Enterprise UPS series +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the Microdowell driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver was developed for the Enterprise Nxx and Bxx models\&. Other Microdowell models may work, too\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "AUTHOR" +.sp +Elio Corbolante +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/microdowell.txt b/docs/man/microdowell.txt new file mode 100644 index 0000000..9277379 --- /dev/null +++ b/docs/man/microdowell.txt @@ -0,0 +1,40 @@ +MICRODOWELL(8) +============== + +NAME +---- + +microdowell - Driver for Microdowell Enterprise UPS series + +NOTE +---- + +This man page only documents the hardware-specific features of the +Microdowell driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver was developed for the Enterprise Nxx and Bxx models. Other +Microdowell models may work, too. + +EXTRA ARGUMENTS +--------------- + +This driver does not support any extra settings in the +linkman:ups.conf[5]. + +AUTHOR +------ +Elio Corbolante + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/netxml-ups.8 b/docs/man/netxml-ups.8 new file mode 100644 index 0000000..2ecc4e0 --- /dev/null +++ b/docs/man/netxml-ups.8 @@ -0,0 +1,159 @@ +'\" t +.\" Title: netxml-ups +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NETXML\-UPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +netxml-ups \- Driver for Eaton / MGE Network Management Card / Proxy (XML/HTTP Protocol) equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the netxml\-ups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +netxml\-ups support all recent Eaton / MGE models which use a Network Management Card or Proxy (MGE XML/HTTP protocol based)\&. This applies to both Eaton (previously MGE Office Protection Systems) and to MGE UPS SYSTEMS\&. Supported card and proxy models are: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NMC Minislot (Ref 66102, firmware EA or newer), +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SNMP/Web Minislot card (Ref 66244) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NMC Transverse (Ref 66074), +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NMC & Modbus/JBus (Ref 66103), +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Network Management Proxy, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ePDU Monitored (newer version)\&. +.RE +.sp +Older models, such as SNMP card (Ref 66062 and Ref 66045), use the SNMP protocol and should use the \fBsnmp-ups\fR(8) driver with the "mibs=mge" parameter\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBtimeout\fR=\fIvalue\fR +.RS 4 +The timeout for connecting to and reading from the UPS\&. Defaults to 5 seconds\&. Don\(cqt change this value unless you know exactly what you\(cqre doing\&. +.RE +.sp +This value \fBmust never\fR be higher than half the MAXAGE value specified in \fBupsd.conf\fR(5), otherwise you run the risk that \fBupsd\fR(8) declares the driver stale while it is waiting for a connection to timeout\&. +.PP +\fBlogin\fR=\fIvalue\fR +.RS 4 +Set the login value for authenticated mode\&. This feature also needs the +\fBpassword\fR +argument, and allows value settings in the card\&. This feature is not used yet\&. +.RE +.PP +\fBpassword\fR=\fIvalue\fR +.RS 4 +Set the password value, needed with the login for authenticated mode\&. This feature is not used yet\&. +.RE +.SH "IMPLEMENTATION" +.sp +The hostname of the UPS is specified with the "port" value in \fBups\&.conf\fR, i\&.e\&.: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[mgexml] + driver = netxml\-ups + port = http://netxml\-ups\&.example\&.com:80 +.fi +.if n \{\ +.RE +.\} +.sp +Specifying the method to connect to the UPS (http, https) is mandatory\&. If the port is equal to the default for the method specified (80 for http, 443 for https) it may be omitted\&. +.sp +In order not to overload older NMCs by polling them too frequently, it is recommended to increase the "pollinterval" (see \fBnutupsdrv\fR(8)) and \fBups.conf\fR(5)) to at least 5 seconds\&. +.SH "KNOWN ISSUES" +.sp +Don\(cqt connect to the UPS through a proxy\&. Although it would be trivial to add support for proxies, this is not recommended and don\(cqt ask for it\&. Not only because it will prevent the driver to make a persistent connection to the UPS, but also it adds an additional failure mode\&. If the proxy goes down (for whatever reason), the driver will no longer be able to reach the UPS\&. +.SH "AUTHORS" +.sp +Arjen de Korte +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/netxml-ups.txt b/docs/man/netxml-ups.txt new file mode 100644 index 0000000..ffa5b92 --- /dev/null +++ b/docs/man/netxml-ups.txt @@ -0,0 +1,93 @@ +netxml-ups(8) +============= + +NAME +---- +netxml-ups - Driver for Eaton / MGE Network Management Card / Proxy +(XML/HTTP Protocol) equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +netxml-ups driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +netxml-ups support all recent Eaton / MGE models which use a Network +Management Card or Proxy (MGE XML/HTTP protocol based). This applies to both +Eaton (previously MGE Office Protection Systems) and to MGE UPS SYSTEMS. +Supported card and proxy models are: + + * NMC Minislot (Ref 66102, firmware EA or newer), + * SNMP/Web Minislot card (Ref 66244) + * NMC Transverse (Ref 66074), + * NMC & Modbus/JBus (Ref 66103), + * Network Management Proxy, + * ePDU Monitored (newer version). + +Older models, such as SNMP card (Ref 66062 and Ref 66045), use the SNMP +protocol and should use the linkman:snmp-ups[8] driver with the "mibs=mge" +parameter. + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in the +linkman:ups.conf[5]: + +*timeout*='value':: +The timeout for connecting to and reading from the UPS. Defaults to 5 seconds. +Don't change this value unless you know exactly what you're doing. + +This value *must never* be higher than half the MAXAGE value specified in +linkman:upsd.conf[5], otherwise you run the risk that linkman:upsd[8] declares +the driver stale while it is waiting for a connection to timeout. + +*login*='value':: +Set the login value for authenticated mode. This feature also needs the +*password* argument, and allows value settings in the card. +This feature is not used yet. + +*password*='value':: +Set the password value, needed with the login for authenticated mode. +This feature is not used yet. + +IMPLEMENTATION +-------------- +The hostname of the UPS is specified with the "port" value in +*ups.conf*, i.e.: + + [mgexml] + driver = netxml-ups + port = http://netxml-ups.example.com:80 + +Specifying the method to connect to the UPS (http, https) is mandatory. +If the port is equal to the default for the method specified (80 for http, +443 for https) it may be omitted. + +In order not to overload older NMCs by polling them too frequently, it is +recommended to increase the "pollinterval" (see linkman:nutupsdrv[8]) and +linkman:ups.conf[5]) to at least 5 seconds. + +KNOWN ISSUES +------------ +Don't connect to the UPS through a proxy. Although it would be trivial to add +support for proxies, this is not recommended and don't ask for it. Not only +because it will prevent the driver to make a persistent connection to the UPS, +but also it adds an additional failure mode. If the proxy goes down (for +whatever reason), the driver will no longer be able to reach the UPS. + +AUTHORS +------- +Arjen de Korte + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/nut.conf.5 b/docs/man/nut.conf.5 new file mode 100644 index 0000000..9665388 --- /dev/null +++ b/docs/man/nut.conf.5 @@ -0,0 +1,169 @@ +'\" t +.\" Title: nut.conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUT\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nut.conf \- UPS definitions for Network UPS Tools +.SH "DESCRIPTION" +.sp +This file attempts to standardize the various files being found in different installations, like /etc/default/nut on Debian based systems and /etc/sysconfig/ups on RedHat based systems\&. +.sp +Distribution\(cqs init script should source this file in order to determine which components have to be started\&. +.sp +Blank lines are ignored\&. Lines with a hash (\fI#\fR) character at the 1st position of the line are ignored, too\&. They can be used to add comments\&. +.SH "DIRECTIVES" +.PP +\fBMODE\fR +.RS 4 +Required\&. Recognized values are +\fInone\fR, +\fIstandalone\fR, +\fInetserver\fR +and +\fInetclient\fR\&. Defaults to +\fInone\fR\&. +.PP +none +.RS 4 +Indicates that NUT should not get started automatically, possibly because it is not configured or that an Integrated Power Management or some external system, is used to startup the NUT components\&. +.RE +.PP +standalone +.RS 4 +Addresses a local only configuration, with 1 UPS protecting the local system\&. This implies to start the 3 NUT layers (driver, upsd and upsmon), with the related configuration files\&. This mode can also address UPS redundancy\&. +.RE +.PP +netserver +.RS 4 +Like the standalone configuration, but also possibly need one or more specific LISTEN directive(s) in upsd\&.conf\&. Since this MODE is open to the network, a special care should be applied to security concerns\&. +.RE +.PP +netclient +.RS 4 +When only upsmon is required, possibly because there are other hosts that are more closely attached to the UPS, the MODE should be set to netclient\&. +.RE +.RE +.PP +\fBUPSD_OPTIONS\fR +.RS 4 +Optional\&. Set upsd specific options\&. See +\fBupsd\fR(8) +for more details\&. It is ignored when +\fIMODE\fR +above indicates that no upsd should be running\&. +.RE +.PP +\fBUPSMON_OPTIONS\fR +.RS 4 +Optional\&. Set upsmon specific options\&. See +\fBupsmon\fR(8) +for more details\&. It is ignored when +\fIMODE\fR +above indicates that no upsmon should be running\&. +.RE +.PP +\fBPOWEROFF_WAIT\fR +.RS 4 +Optional\&. At the end of an emergency system halt, the upsmon master will signal the UPS to switch off\&. This may fail for a number of reasons\&. Most notably is the case that mains power returns during the shutdown process\&. See the section "Power races" in /usr/share/doc/nut/docs/shutdown\&.txt\&.gz\&. The system will wait this long for the UPS to cut power, and then reboot\&. It should be long enough to exhaust the batteries, in case line power continues to be unavailable\&. On the other hand, it should not be so long that the system remains offline for an unreasonable amount of time if line power has returned\&. See sleep(1) for compatible time syntax\&. If you specify the time in seconds, use the "s" suffix\&. +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +.sp +this workaround might be dangerous under some circumstances\&. Please read http://bugs\&.debian\&.org/358696 for more details\&. +.sp .5v +.RE +.SH "EXAMPLE" +.sp +.if n \{\ +.RS 4 +.\} +.nf +# /etc/nut/nut\&.conf\&. See nut\&.conf(5) +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +MODE = none +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +UPSD_OPTIONS = "" +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +UPSMON_OPTIONS = "" +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +# POWEROFF_WAIT = 15m +.fi +.if n \{\ +.RE +.\} +.SH "INTEGRATION" +.sp +An init script, such as /etc/init\&.d/nut, is expected to source this file in order to determine which component(s) has to be started\&. +.SH "SEE ALSO" +.sp +\fBups.conf\fR(5), \fBupsd.conf\fR(5), \fBupsd.users\fR(5), \fBupsmon.conf\fR(5) +.SH "INTERNET RESOURCES" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/nut.conf.5 b/docs/man/nut.conf.txt similarity index 56% rename from man/nut.conf.5 rename to docs/man/nut.conf.txt index 6665818..26ed896 100644 --- a/man/nut.conf.5 +++ b/docs/man/nut.conf.txt @@ -1,56 +1,61 @@ -.TH NUT.CONF 5 "Sun May 10 2009" "" "Network UPS Tools (NUT)" -.SH NAME -nut.conf \- UPS definitions for Network UPS Tools +NUT.CONF(5) +=========== -.SH DESCRIPTION +NAME +---- +nut.conf - UPS definitions for Network UPS Tools + +DESCRIPTION +----------- This file attempts to standardize the various files being found in different installations, like /etc/default/nut on Debian based -systems and /etc/sysconfig/nut on RedHat based systems. +systems and /etc/sysconfig/ups on RedHat based systems. Distribution's init script should source this file in order to -determine which component(s) has to be started. +determine which components have to be started. Blank lines are ignored. Lines with a hash ('#') character at the -1st position of the line are ignored too. They can be used to add +1st position of the line are ignored, too. They can be used to add comments. -.SH DIRECTIVES +DIRECTIVES +---------- -.IP MODE -Required. Recognized values are none, standalone, netserver and -netclient. Defaults to none. +*MODE*:: +Required. Recognized values are 'none', 'standalone', 'netserver' and +'netclient'. Defaults to 'none'. -none: Indicates that NUT should not get started automatically, +none;; Indicates that NUT should not get started automatically, possibly because it is not configured or that an Integrated Power Management or some external system, is used to startup the NUT components. -standalone: Addresses a local only configuration, with 1 UPS +standalone;; Addresses a local only configuration, with 1 UPS protecting the local system. This implies to start the 3 NUT layers (driver, upsd and upsmon), with the related configuration files. This mode can also address UPS redundancy. -netserver: Like the standalone configuration, but also need some -more ACLs and possibly a specific LISTEN directive in upsd.conf. +netserver;; Like the standalone configuration, but also possibly +need one or more specific LISTEN directive(s) in upsd.conf. Since this MODE is open to the network, a special care should be applied to security concerns. -netclient: When only upsmon is required, possibly because +netclient;; When only upsmon is required, possibly because there are other hosts that are more closely attached to the UPS, the MODE should be set to netclient. -.IP UPSD_OPTIONS -Optional. Set upsd specific options. See \fBupsd\fR(8) for more -details. It is ignored when MODE above indicates that no upsd +*UPSD_OPTIONS*:: +Optional. Set upsd specific options. See linkman:upsd[8] for more +details. It is ignored when 'MODE' above indicates that no upsd should be running. -.IP UPSMON_OPTIONS -Optional. Set upsmon specific options. See \fBupsmon\fR(8) for -more details. It is ignored when MODE above indicates that no +*UPSMON_OPTIONS*:: +Optional. Set upsmon specific options. See linkman:upsmon[8] for +more details. It is ignored when 'MODE' above indicates that no upsmon should be running. -.IP POWEROFF_WAIT +*POWEROFF_WAIT*:: Optional. At the end of an emergency system halt, the upsmon master will signal the UPS to switch off. This may fail for a number of reasons. Most notably is the case that mains power returns during @@ -60,32 +65,37 @@ long for the UPS to cut power, and then reboot. It should be long enough to exhaust the batteries, in case line power continues to be unavailable. On the other hand, it should not be so long that the system remains offline for an unreasonable amount of time if line -power has returned. See \fBsleep\fR(1) for compatible time syntax. +power has returned. See sleep(1) for compatible time syntax. If you specify the time in seconds, use the "s" suffix. WARNING: this workaround might be dangerous under some circumstances. Please read http://bugs.debian.org/358696 for more details. -.SH EXAMPLE +EXAMPLE +------- -# /etc/nut/nut.conf. See nut.conf(5) + # /etc/nut/nut.conf. See nut.conf(5) + + MODE = none + + UPSD_OPTIONS = "" + + UPSMON_OPTIONS = "" + + # POWEROFF_WAIT = 15m -MODE = none - -UPSD_OPTIONS = "" - -UPSMON_OPTIONS = "" - -# POWEROFF_WAIT = 15m - -.SH INTEGRATION +INTEGRATION +----------- An init script, such as /etc/init.d/nut, is expected to source this file in order to determine which component(s) has to be started. -.SH SEE ALSO -\fBups.conf\fR(5), \fBupsd.conf\fR(5), \fBupsd.users\fR(5), -\fBupsmon.conf\fR(5) +SEE ALSO +-------- -.SS Internet resources: +linkman:ups.conf[5], linkman:upsd.conf[5], linkman:upsd.users[5], +linkman:upsmon.conf[5] + +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/nutupsdrv.8 b/docs/man/nutupsdrv.8 new file mode 100644 index 0000000..043fed2 --- /dev/null +++ b/docs/man/nutupsdrv.8 @@ -0,0 +1,175 @@ +'\" t +.\" Title: nutupsdrv +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTUPSDRV" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutupsdrv \- generic manual for unified NUT drivers +.SH "SYNOPSIS" +.sp +\fBnutupsdrv\fR \fI\-h\fR +.sp +\fBnutupsdrv\fR [OPTIONS] +.SH "DESCRIPTION" +.sp +\fBnutupsdrv\fR is not actually a driver\&. This is a combined man page for the shared code that is the core of many drivers within the Network UPS Tools package\&. +.sp +For information on the specific drivers, see their individual man pages\&. +.sp +UPS drivers provide a communication channel between the physical UPS hardware and the \fBupsd\fR(8) server\&. The driver is responsible for translating the native protocol of the UPS to the common format used by the rest of this package\&. +.sp +The core has two modes of operation which are determined by the command line switches\&. In the normal mode, the driver will periodically poll the UPS for its state and parameters\&. The results of this command is presented to upsd\&. The driver will also handle setting variables and instant commands if available\&. +.sp +The driver can also instruct the UPS to shut down the load, possibly after some delay\&. This mode of operation is intended for cases when it is known that the UPS is running out of battery power and the systems attached must be turned off to ensure a proper reboot when power returns\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +You probably don\(cqt want to use any of these options directly\&. You should use \fBupsdrvctl\fR(8) to control your drivers, and \fBups.conf\fR(5) to configure them\&. The rest of this manual describes options and parameters that generally are not needed by normal users\&. +.sp .5v +.RE +.SH "OPTIONS" +.PP +\fB\-h\fR +.RS 4 +Display a help message without doing anything else\&. This will also list possible values for +\fI\-x\fR +in that driver, and other help text that the driver\(cqs author may have provided\&. +.RE +.PP +\fB\-a\fR \fIid\fR +.RS 4 +Autoconfigure this driver using the +\fIid\fR +section of +\fBups.conf\fR(5)\&. +\fBThis argument is mandatory when calling the driver directly\&.\fR +.RE +.PP +\fB\-D\fR +.RS 4 +Raise the debugging level\&. Use this multiple times to see more details\&. Running a driver in debug mode will prevent it from backgrounding after startup\&. It will keep on logging information to the console until it receives a SIGINT (usually Ctrl\-C) or SIGTERM signal\&. +.sp +The level of debugging needed depends both on the driver and the problem you\(cqre trying to diagnose\&. Therefore, first explain the problem you have with a driver to a developer/maintainer, before sending them debugging output\&. More often than not, if you just pick a level, the output may be either too limited or too verbose to be of any use\&. +.RE +.PP +\fB\-i\fR \fIinterval\fR +.RS 4 +Set the poll interval for the device\&. +.RE +.PP +\fB\-V\fR +.RS 4 +Print only version information, then exit\&. +.RE +.PP +\fB\-L\fR +.RS 4 +Print a parseable list of driver variables\&. Mostly useful for configuration wizard programs\&. +.RE +.PP +\fB\-k\fR +.RS 4 +("Kill" power) Forced shutdown mode\&. The UPS will power off the attached load, if possible\&. +.sp +You should use +upsdrvctl shutdown +whenever possible instead of calling this directly\&. +.RE +.PP +\fB\-r\fR \fIdirectory\fR +.RS 4 +The driver will chroot(2) to +\fIdirectory\fR +during initialization\&. This can be useful when securing systems\&. +.sp +In addition to the state path, many systems will require /dev/null to exist within +\fIdirectory\fR +for this to work\&. The serial ports are opened before the chroot call, so you do not need to create them inside the jail\&. In fact, it is somewhat safer if you do not\&. +.RE +.PP +\fB\-u\fR \fIusername\fR +.RS 4 +If started as root, the driver will setuid(2) to the user id associated with +\fIusername\fR\&. +.sp +If you do not specify this value and start it as root, the driver will switch to the default value that was compiled into the code\&. This is typically +\fInobody\fR, and is far from ideal\&. +.RE +.PP +\fB\-x\fR \fIvar\fR=\fIval\fR +.RS 4 +Define a variable called +\fIvar\fR +with the value of +\fIvar\fR +in the driver\&. This varies from driver to driver \- see the specific man pages for more information\&. +.sp +This is like setting +\fIvar\fR=\fIval\fR +in +\fBups.conf\fR(5), but +\fB\-x\fR +overrides any settings from that file\&. +.RE +.SH "DIAGNOSTICS" +.sp +Information about the startup process is printed to stdout\&. Additional messages after that point are available in the syslog\&. After \fBupsd\fR(8) starts, the UPS clients such as \fBupsc\fR(8) can be used to query the status of an UPS\&. +.SH "PROGRAM CONTROL" +.sp +You should always use \fBupsdrvctl\fR(8) to control the drivers\&. While drivers can be started by hand for testing purposes, it is not recommended for production use\&. +.SH "FILES" +.PP +ups\&.conf +.RS 4 +Required configuration file\&. This contains all details on which drivers to start and where the hardware is attached\&. +.RE +.SH "BUGS" +.sp +Some of the drivers may have bugs\&. See their manuals for more information\&. +.SH "SEE ALSO" +.sp +Server: \fBupsd\fR(8) +.sp +Clients: \fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8), \fBupslog\fR(8), \fBupsmon\fR(8) +.sp +CGI programs: \fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) +.sp +Driver control: \fBupsdrvctl\fR(8) +.sp +Drivers: \fBapcsmart\fR(8), \fBbcmxcp\fR(8), \fBbcmxcp_usb\fR(8), \fBbelkin\fR(8), \fBbelkinunv\fR(8), \fBbestfcom\fR(8), \fBbestuferrups\fR(8), \fBbestups\fR(8), \fBblazer\fR(8), \fBcyberpower\fR(8), \fBdummy-ups\fR(8), \fBetapro\fR(8), \fBeverups\fR(8), \fBgamatronic\fR(8), \fBgenericups\fR(8), \fBisbmex\fR(8), \fBliebert\fR(8), \fBmasterguard\fR(8), \fBmetasys\fR(8), \fBmge-shut\fR(8), \fBmge-utalk\fR(8), \fBmge-xml\fR(8), \fBnewmge-shut\fR(8), \fBnitram\fR(8), \fBoneac\fR(8), \fBoptiups\fR(8), \fBpowercom\fR(8), \fBpowerman-pdu\fR(8), \fBpowerpanel\fR(8), \fBrhino\fR(8), \fBrichcomm_usb\fR(8), \fBsafenet\fR(8), \fBsnmp-ups\fR(8), \fBsolis\fR(8), \fBtripplite\fR(8), \fBtripplitesu\fR(8), \fBtripplite_usb\fR(8), \fBusbhid-ups\fR(8), \fBupscode2\fR(8), \fBvictronups\fR(8) +.sp +Internet resources: The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/nutupsdrv.txt b/docs/man/nutupsdrv.txt new file mode 100644 index 0000000..5a67d7e --- /dev/null +++ b/docs/man/nutupsdrv.txt @@ -0,0 +1,197 @@ +NUTUPSDRV(8) +============ + +NAME +---- + +nutupsdrv - generic manual for unified NUT drivers + +SYNOPSIS +-------- + +*nutupsdrv* '-h' + +*nutupsdrv* [OPTIONS] + +DESCRIPTION +----------- + +*nutupsdrv* is not actually a driver. This is a combined man page for the +shared code that is the core of many drivers within the Network UPS Tools +package. + +For information on the specific drivers, see their individual man pages. + +UPS drivers provide a communication channel between the physical UPS +hardware and the linkman:upsd[8] server. The driver is responsible for +translating the native protocol of the UPS to the common format used by +the rest of this package. + +The core has two modes of operation which are determined by the +command line switches. In the normal mode, the driver will periodically +poll the UPS for its state and parameters. The results of this command +is presented to upsd. The driver will also handle setting variables and +instant commands if available. + +The driver can also instruct the UPS to shut down the load, possibly +after some delay. This mode of operation is intended for cases when it is +known that the UPS is running out of battery power and the systems +attached must be turned off to ensure a proper reboot when power returns. + +NOTE: You probably don't want to use any of these options directly. You +should use linkman:upsdrvctl[8] to control your drivers, and +linkman:ups.conf[5] to configure them. The rest of this manual describes +options and parameters that generally are not needed by normal users. + +OPTIONS +------- +*-h*:: +Display a help message without doing anything else. This will also list +possible values for '-x' in that driver, and other help text that the +driver's author may have provided. + +*-a* 'id':: +Autoconfigure this driver using the 'id' section of linkman:ups.conf[5]. +*This argument is mandatory when calling the driver directly.* + +*-D*:: +Raise the debugging level. Use this multiple times to see more details. +Running a driver in debug mode will prevent it from backgrounding after +startup. It will keep on logging information to the console until it +receives a SIGINT (usually Ctrl-C) or SIGTERM signal. ++ +The level of debugging needed depends both on the driver and the +problem you're trying to diagnose. Therefore, first explain the problem you +have with a driver to a developer/maintainer, before sending them debugging +output. More often than not, if you just pick a level, the output may be +either too limited or too verbose to be of any use. + +*-i* 'interval':: +Set the poll interval for the device. + +*-V*:: +Print only version information, then exit. + +*-L*:: +Print a parseable list of driver variables. Mostly useful for configuration +wizard programs. + +*-k*:: +("Kill" power) Forced shutdown mode. The UPS will power off the +attached load, if possible. ++ +You should use +upsdrvctl shutdown+ whenever possible instead of +calling this directly. + +*-r* 'directory':: +The driver will chroot(2) to 'directory' during initialization. +This can be useful when securing systems. ++ +In addition to the state path, many systems will require /dev/null to +exist within 'directory' for this to work. The serial ports are +opened before the chroot call, so you do not need to create them inside +the jail. In fact, it is somewhat safer if you do not. + +*-u* 'username':: +If started as root, the driver will setuid(2) to the user id +associated with 'username'. ++ +If you do not specify this value and start it as root, the driver will +switch to the default value that was compiled into the code. This is +typically 'nobody', and is far from ideal. + +*-x* 'var'='val':: +Define a variable called 'var' with the value of 'var' in the +driver. This varies from driver to driver - see the specific man pages +for more information. ++ +This is like setting 'var'='val' in linkman:ups.conf[5], but +*-x* overrides any settings from that file. + +DIAGNOSTICS +----------- + +Information about the startup process is printed to stdout. Additional +messages after that point are available in the syslog. After linkman:upsd[8] +starts, the UPS clients such as linkman:upsc[8] can be used to query the status +of an UPS. + +PROGRAM CONTROL +--------------- + +You should always use linkman:upsdrvctl[8] to control the drivers. While +drivers can be started by hand for testing purposes, it is not recommended for +production use. + +FILES +----- +ups.conf:: +Required configuration file. This contains all details on which drivers +to start and where the hardware is attached. + +BUGS +---- + +Some of the drivers may have bugs. See their manuals for more +information. + +SEE ALSO +-------- + +Server: +linkman:upsd[8] + +Clients: +linkman:upsc[8], linkman:upscmd[8], +linkman:upsrw[8], linkman:upslog[8], linkman:upsmon[8] + +CGI programs: +linkman:upsset.cgi[8], linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] + +Driver control: +linkman:upsdrvctl[8] + +Drivers: +linkman:apcsmart[8], +linkman:bcmxcp[8], +linkman:bcmxcp_usb[8], +linkman:belkin[8], +linkman:belkinunv[8], +linkman:bestfcom[8], +linkman:bestuferrups[8], +linkman:bestups[8], +linkman:blazer[8], +linkman:cyberpower[8], +linkman:dummy-ups[8], +linkman:etapro[8], +linkman:everups[8], +linkman:gamatronic[8], +linkman:genericups[8], +linkman:isbmex[8], +linkman:liebert[8], +linkman:masterguard[8], +linkman:metasys[8], +linkman:mge-shut[8], +linkman:mge-utalk[8], +linkman:mge-xml[8], +linkman:newmge-shut[8], +linkman:nitram[8], +linkman:oneac[8], +linkman:optiups[8], +linkman:powercom[8], +linkman:powerman-pdu[8], +linkman:powerpanel[8], +linkman:rhino[8], +linkman:richcomm_usb[8], +linkman:safenet[8], +linkman:snmp-ups[8], +linkman:solis[8], +linkman:tripplite[8], +linkman:tripplitesu[8], +linkman:tripplite_usb[8], +linkman:usbhid-ups[8], +linkman:upscode2[8], +linkman:victronups[8] + +Internet resources: +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/oneac.8 b/docs/man/oneac.8 new file mode 100644 index 0000000..507e23c --- /dev/null +++ b/docs/man/oneac.8 @@ -0,0 +1,82 @@ +'\" t +.\" Title: oneac +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "ONEAC" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +oneac \- Driver for Oneac UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the oneac driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports Oneac EG and ON UPS equipment with the Advanced Interface\&. If your UPS is equipped with the Basic Interface card, use the genericups driver\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5) file: +.PP +\fBtesttime\fR=\fInum\fR +.RS 4 +Change battery test time from the 2 minute default\&. +.RE +.SH "INSTANT COMMANDS" +.sp +This driver supports the following Instant Commands\&. +.PP +\fBreset\&.input\&.minmax\fR +.RS 4 +Reset the minimum and maximum input line voltage values seen since the last reset or power on\&. +.RE +.PP +\fBtest\&.battery\&.start\fR +.RS 4 +Start a battery test\&. The default time is 2 minutes\&. This time can be set in the +\fBups\&.conf\fR +file\&. See +\fBtestime\fR +above\&. +.RE +.PP +\fBtest\&.battery\&.stop\fR +.RS 4 +Stops a battery test that is in progress\&. +.RE +.PP +\fBtest\&.failure\&.start\fR +.RS 4 +Starts a 15 second long simulation of an input power failure\&. +.RE +.SH "AUTHOR" +.sp +Eric Lawson +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/oneac.8 b/docs/man/oneac.txt similarity index 55% rename from man/oneac.8 rename to docs/man/oneac.txt index c1c6e4f..88f6aa6 100644 --- a/man/oneac.8 +++ b/docs/man/oneac.txt @@ -1,48 +1,62 @@ -.TH ONEAC 8 "Tue Oct 22 2002" "" "Network UPS Tools (NUT)" -.SH NAME -oneac \- Driver for Oneac UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the -oneac driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +ONEAC(8) +======== -.SH SUPPORTED HARDWARE +NAME +---- + +oneac - Driver for Oneac UPS equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the +oneac driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ This driver supports Oneac EG and ON UPS equipment with the Advanced Interface. If your UPS is equipped with the Basic Interface card, use the genericups driver. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver supports the following optional settings in the -\fBups.conf\fR(5): +linkman:ups.conf[5] file: -.IP "testtime=\fInum\fR" +*testtime*='num':: Change battery test time from the 2 minute default. -.SH INSTANT COMMANDS +INSTANT COMMANDS +---------------- This driver supports the following Instant Commands. -.IP "reset.input.minmax" +*reset.input.minmax*:: Reset the minimum and maximum input line voltage values seen since the last reset or power on. -.IP "test.battery.start" +*test.battery.start*:: Start a battery test. The default time is 2 minutes. This -time can be set in the ups.conf file. See \fBtestime\fR above. +time can be set in the *ups.conf* file. See *testime* above. -.IP "test.battery.stop" +*test.battery.stop*:: Stops a battery test that is in progress. -.IP "test.failure.start" +*test.failure.start*:: Starts a 15 second long simulation of an input power failure. -.SH AUTHOR +AUTHOR +------ Eric Lawson -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/optiups.8 b/docs/man/optiups.8 new file mode 100644 index 0000000..ec18abc --- /dev/null +++ b/docs/man/optiups.8 @@ -0,0 +1,98 @@ +'\" t +.\" Title: optiups +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "OPTIUPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +optiups \- Driver for Opti\-UPS (Viewsonic) UPS and Zinto D (ONLINE\-USV) equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the optiups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +\fBoptiups\fR was originally written against a PowerES 280es in nut\-0\&.45\&. It was revised for nut\-2\&.0\&.1 and tested against a PowerES 420E\&. It is expected to work with at least the PowerES, PowerPS, and PowerVS models\&. +.sp +This driver additionally supports a Zinto D from ONLINE USV\-Systeme AG because of their very similar commands, but it is unknown if it also works with other UPS from them\&. +.sp +This driver will not work with the PowerES stock serial cable\&. You will need to construct your own three conductor cable: +.sp +.if n \{\ +.RS 4 +.\} +.nf +UPS 6 \-> PC 3 +UPS 9 \-> PC 2 +UPS 4 \-> PC 5 +.fi +.if n \{\ +.RE +.\} +.sp +The cable for Online\-USV uses pin UPS 7 (not UPS 4) → PC 5\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5) file: +.PP +\fBstatus_only\fR +.RS 4 +Only poll for critical status information\&. Without this, +\fBoptiups\fR +(and all NUT drivers) poll all sorts of information from the UPS fairly often\&. It is probably not often enough to hurt anything, so this option probably is not very useful, unless you have a flaky serial connection or a highly loaded machine\&. +.RE +.PP +\fBnowarn_noimp\fR +.RS 4 +Does not print warnings when the UPS reports that a variable is not implemented or not pollable\&. Without the option you will get a message sent to your system logs each time NUT polls the UPS\&. If you specify +\fBnowarn_noimp\fR, this message will only be logged once\&. +.RE +.PP +\fBfake_lowbatt\fR +.RS 4 +This forces the low battery flag true\&. Without it, if you want to test your UPS, you will have to unplug it and wait until the battery drops to a low/critical voltage level before NUT will respond and power down your system\&. With the flag, NUT should power down the system soon after you pull the plug\&. When you are done testing, you should remove this flag\&. +.sp +For basic shutdown configuration testing, the command +\fIupsmon \-c fsd\fR +is preferred\&. +.RE +.PP +\fBpowerup\fR +.RS 4 +Zinto D from ONLINE\-USV cannot be identified when switched to standby\&. Set this flag to allow the driver to power\-up your Zinto UPS\&. This will also power\-up your equipment connected to the UPS! +.RE +.SH "BUGS" +.sp +On the 420E, ups\&.serial and ups\&.temperature are unsupported features\&. This is not a bug in NUT or the NUT driver, just the way things are with this UPS\&. +.SH "AUTHOR" +.sp +Russell Kroll, Scott Heavner, Matthias Goebl +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/optiups.txt b/docs/man/optiups.txt new file mode 100644 index 0000000..25f7342 --- /dev/null +++ b/docs/man/optiups.txt @@ -0,0 +1,92 @@ +OPTIUPS(8) +========== + +NAME +---- + +optiups - Driver for Opti-UPS (Viewsonic) UPS and Zinto D (ONLINE-USV) equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the +optiups driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ + +*optiups* was originally written against a PowerES 280es in nut-0.45. It was +revised for nut-2.0.1 and tested against a PowerES 420E. It is expected to +work with at least the PowerES, PowerPS, and PowerVS models. + +This driver additionally supports a Zinto D from ONLINE USV-Systeme AG +because of their very similar commands, but it is unknown if it also works +with other UPS from them. + +This driver will not work with the PowerES stock serial cable. You will need +to construct your own three conductor cable: + + UPS 6 -> PC 3 + UPS 9 -> PC 2 + UPS 4 -> PC 5 + +The cable for Online-USV uses pin UPS 7 (not UPS 4) -> PC 5. + +EXTRA ARGUMENTS +--------------- + +This driver supports the following optional settings in the +linkman:ups.conf[5] file: + +*status_only*:: + +Only poll for critical status information. Without this, *optiups* (and +all NUT drivers) poll all sorts of information from the UPS fairly often. +It is probably not often enough to hurt anything, so this option probably +is not very useful, unless you have a flaky serial connection or a highly +loaded machine. + +*nowarn_noimp*:: + +Does not print warnings when the UPS reports that a variable is not +implemented or not pollable. Without the option you will get a message +sent to your system logs each time NUT polls the UPS. If you specify +*nowarn_noimp*, this message will only be logged once. + +*fake_lowbatt*:: + +This forces the low battery flag true. Without it, if you want to test your +UPS, you will have to unplug it and wait until the battery drops to a low/critical +voltage level before NUT will respond and power down your system. With the flag, +NUT should power down the system soon after you pull the plug. When you are done +testing, you should remove this flag. ++ +For basic shutdown configuration testing, the command 'upsmon -c fsd' is preferred. + +*powerup*:: + +Zinto D from ONLINE-USV cannot be identified when switched to standby. +Set this flag to allow the driver to power-up your Zinto UPS. +This will also power-up your equipment connected to the UPS! + +BUGS +---- + +On the 420E, `ups.serial` and `ups.temperature` are unsupported features. This +is not a bug in NUT or the NUT driver, just the way things are with this UPS. + +AUTHOR +------ +Russell Kroll, Scott Heavner, Matthias Goebl + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/powercom.8 b/docs/man/powercom.8 new file mode 100644 index 0000000..d3a4560 --- /dev/null +++ b/docs/man/powercom.8 @@ -0,0 +1,267 @@ +'\" t +.\" Title: powercom +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "POWERCOM" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +powercom \- UPS driver for Powercom/Trust/Advice UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the powercom driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports many similar kinds of UPS hardware\&. The most common ones are the Trust 425/625, Powercom, and Advice Partner/King PR750\&. Others using the same protocol may also work\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5) file: +.PP +\fBlinevoltage\fR=\fIvalue\fR +.RS 4 +An integer specifying the mains voltage\&. It can\(cqt be auto detected\&. Acceptable values are in the range of 110\(em120 or 220\(em240\&. The default is +\fI230\fR\&. +.RE +.PP +\fBmanufacturer\fR=\fIname\fR +.RS 4 +Specify the manufacturer name, which also can\(cqt be auto detected\&. This is a user defined string, so any name is acceptable\&. The default is +\fIPowerCom\fR\&. +.RE +.PP +\fBmodelname\fR=\fIname\fR +.RS 4 +Specify the model name, which also can\(cqt be auto detected\&. This is a user defined string, so any name is acceptable\&. The default is +\fIUnknown\fR\&. +.RE +.PP +\fBserialnumber\fR=\fIvalue\fR +.RS 4 +Like modelname above, but for the serial number\&. The default is +\fIUnknown\fR\&. +.RE +.PP +\fBtype\fR=\fIname\fR +.RS 4 +The exact type of the communication protocol within the powercom family, that will be used to communicate with the UPS\&. The type is named after the first modelname that was coded with that protocol\&. The acceptable names are +\fIKP625AP\fR, +\fITrust\fR, +\fIEgys\fR, +\fIKIN\fR, +\fIBNT\fR, +\fIIMP\fR +and +\fIBNT\-other\fR\&. The default is +\fITrust\fR\&. +.sp +\fIBNT\-other\fR +is a special type for BNT 100\-120V models\&. For this type you can (I think must!) specify voltage, batteryPercentage, loadPercentage and validationSequence\&. +.RE +.PP +\fBnumOfBytesFromUPS\fR=\fIvalue\fR +.RS 4 +The number of bytes in a UPS frame\&. The default is type\-dependent and is given below\&. +.RE +.PP +\fBmethodOfFlowControl\fR=\fIname\fR +.RS 4 +The method of serial communication flow control that is engaged by the UPS\&. The default is type\-dependent and is given below\&. Acceptable names are +\fIdtr0rts1\fR, +\fIdtr1\fR +or +\fIno_flow_control\fR\&. +.RE +.PP +\fBshutdownArguments\fR={{\fIminutes\fR,\fIseconds\fR},\fIwhether_minutes_should_be_used\fR} +.RS 4 +The minutes and seconds that the UPS should wait between receiving the shutdown command and actually shutting off\&. The other argument should be set to the character +\fIn\fR +only when the minutes value should be skipped and not sent to the UPS\&. The default is type\-dependent and is given below\&. The braces and commas are mandatory\&. Note that there should be no whitespace characters\&. +.RE +.PP +\fBvoltage\fR={\fIcoefficient1\fR,\fIcoefficient2\fR,\fIcoefficient3\fR,\fIcoefficient4\fR} +.RS 4 +(Only for types KP625AP, Trust, Egys, BNT\-other\&.) A quad that is used convert the raw data to a human\-readable voltage reading\&. The default is type\-dependent and is given below\&. Do note that the braces and commas are mandatory, as well as the lack of whitespace characters\&. +.RE +.PP +\fBfrequency\fR={\fIcoefficient1\fR,\fIcoefficient2\fR} +.RS 4 +(Only for types KP625AP, Trust, Egys\&.) A pair to convert the raw data to a human\-readable frequency reading\&. The default is type\-dependent and is given below\&. Do note that the braces and commas are mandatory as well, as the lack of whitespace characters\&. +.RE +.PP +\fBbatteryPercentage\fR={\fIcoefficient1\fR,\fIcoefficient2\fR,\fIcoefficient3\fR,\fIcoefficient4\fR,\fIcoefficient5\fR} +.RS 4 +(Only for KP625AP, Trust, Egys, BNT\-other\&.) A 5 tuple to convert the raw data to a human\-readable battery percentage reading\&. The default is type\-dependent and is given below\&. Do note that the braces and commas are mandatory, as the lack of white space characters\&. +.RE +.PP +\fBloadPercentage\fR={\fIcoefficient1\fR,\fIcoefficient2\fR,\fIcoefficient3\fR,\fIcoefficient4\fR} +.RS 4 +(Only for types KP625AP, Trust, Egys, BNT\-other\&.) A quad to convert the raw data to human readable load percentage reading\&. The default is type\-dependent and is given below\&. Do note that the braces and commas are mandatory, as the lack of white space characters\&. +.RE +.PP +\fBvalidationSequence\fR={{\fIindex1\fR,\fIvalue1\fR},{\fIindex2\fR,\fIvalue2\fR},{\fIindex3\fR,\fIvalue3\fR}} +.RS 4 +(Only for types KP625AP, Trust, Egys, BNT\-other\&.) 3 pairs to be used for validating the UPS by comparing bytes of the raw data with constant values\&. The default is type\-dependent and is given below\&. The braces and commas are mandatory, as the lack of white space characters\&. +.RE +.SH "DEFAULT VALUES FOR THE EXTRA ARGUMENTS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +linevoltage = 230 +manufacturer = PowerCom +modelname = Unknown +serialnumber = Unknown +type = Trust +.fi +.if n \{\ +.RE +.\} +.sp +The rest of the default values for the extra arguments are type\-dependent: +.SS "Trust" +.sp +.if n \{\ +.RS 4 +.\} +.nf +numOfBytesFromUPS = 11 +methodOfFlowControl = dtr0rts1 +validationSequence = {{5,0},{7,0},{8,0}} +shutdownArguments = {{0,10},n} +frequency = {0\&.00020997,0\&.00020928} +loadPercentage = {6\&.1343,\-0\&.3808,4\&.3110,0\&.1811} +batteryPercentage = {5\&.0000,0\&.3268,\-825\&.00,4\&.5639,\-835\&.82} +voltage = {1\&.9216,\-0\&.0977,0\&.9545,0\&.0000} +.fi +.if n \{\ +.RE +.\} +.SS "KP625AP" +.sp +.if n \{\ +.RS 4 +.\} +.nf +numOfBytesFromUPS = 16 +methodOfFlowControl = dtr0rts1 +validationSequence = {{5,0x80},{7,0},{8,0}} +shutdownArguments = {{0,10},n} +frequency = {0\&.00020997,0\&.00020928} +loadPercentage = {6\&.1343,\-0\&.3808,4\&.3110,0\&.1811} +batteryPercentage = {5\&.0000,0\&.3268,\-825\&.00,4\&.5639,\-835\&.82} +voltage = {1\&.9216,\-0\&.0977,0\&.9545,0\&.0000} +.fi +.if n \{\ +.RE +.\} +.SS "Egys" +.sp +.if n \{\ +.RS 4 +.\} +.nf +numOfBytesFromUPS = 16 +methodOfFlowControl = no_flow_control +validationSequence = {{5,0x80},{7,0},{8,0}} +shutdownArguments = {{0,10},n} +frequency = {0\&.00020997,0\&.00020928} +loadPercentage = {6\&.1343,\-0\&.3808,1\&.3333,0\&.6667} +batteryPercentage = {5\&.0000,0\&.3268,\-825\&.00,2\&.2105,\-355\&.37} +voltage = {1\&.9216,\-0\&.0977,0\&.9545,0\&.0000} +.fi +.if n \{\ +.RE +.\} +.SS "IMP" +.sp +.if n \{\ +.RS 4 +.\} +.nf +numOfBytesFromUPS = 16 +methodOfFlowControl = no_flow_control +validationSequence = {{5,0xFF},{7,0},{8,0}} +shutdownArguments = {{1,30},y} +.fi +.if n \{\ +.RE +.\} +.SS "KIN" +.sp +.if n \{\ +.RS 4 +.\} +.nf +numOfBytesFromUPS = 16 +methodOfFlowControl = no_flow_control +validationSequence = {{11,0x4b},{8,0},{8,0}} +shutdownArguments = {{1,30},y} +.fi +.if n \{\ +.RE +.\} +.SS "BNT" +.sp +.if n \{\ +.RS 4 +.\} +.nf +numOfBytesFromUPS = 16 +methodOfFlowControl = no_flow_control +validationSequence = {{11,0x42},{8,0},{8,0}} +shutdownArguments = {{1,30},y} +.fi +.if n \{\ +.RE +.\} +.SS "BNT\-other" +.sp +.if n \{\ +.RS 4 +.\} +.nf +numOfBytesFromUPS = 16 +methodOfFlowControl = no_flow_control +validationSequence = {{8,0},{8,0},{8,0}} +shutdownArguments = {{1,30},y} +loadPercentage = {1\&.4474,0\&.0,0\&.8594,0\&.0} +batteryPercentage = {5\&.0000,0\&.3268,\-825\&.00,0\&.46511,0} +voltage = {1\&.9216,\-0\&.0977,0\&.82857,0\&.0000} +.fi +.if n \{\ +.RE +.\} +.SH "AUTHOR" +.sp +Peter Bieringer , Alexey Sidorov +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/powercom.txt b/docs/man/powercom.txt new file mode 100644 index 0000000..020599d --- /dev/null +++ b/docs/man/powercom.txt @@ -0,0 +1,205 @@ +POWERCOM(8) +=========== + +NAME +---- + +powercom - UPS driver for Powercom/Trust/Advice UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +powercom driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports many similar kinds of UPS hardware. The most common +ones are the Trust 425/625, Powercom, and Advice Partner/King PR750. +Others using the same protocol may also work. + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in the +linkman:ups.conf[5] file: + +*linevoltage*='value':: +An integer specifying the mains voltage. It can't be auto detected. +Acceptable values are in the range of 110--120 or 220--240. The default +is '230'. + +*manufacturer*='name':: +Specify the manufacturer name, which also can't be auto detected. This is +a user defined string, so any name is acceptable. The default is +'PowerCom'. + +*modelname*='name':: +Specify the model name, which also can't be auto detected. This is a +user defined string, so any name is acceptable. The default is +'Unknown'. + +*serialnumber*='value':: +Like modelname above, but for the serial number. The default is +'Unknown'. + +*type*='name':: +The exact type of the communication protocol within the powercom family, +that will be used to communicate with the UPS. The type is named after +the first modelname that was coded with that protocol. The acceptable +names are 'KP625AP', 'Trust', 'Egys', 'KIN', 'BNT', 'IMP' and 'BNT-other'. The +default is 'Trust'. ++ +'BNT-other' is a special type for BNT 100-120V models. +For this type you can (I think must!) specify voltage, batteryPercentage, +loadPercentage and validationSequence. + +*numOfBytesFromUPS*='value':: +The number of bytes in a UPS frame. The default is type-dependent and +is given below. + +*methodOfFlowControl*='name':: +The method of serial communication flow control that is engaged by the +UPS. The default is type-dependent and is given below. Acceptable names +are 'dtr0rts1', 'dtr1' or 'no_flow_control'. + +*shutdownArguments*={{'minutes','seconds'},'whether_minutes_should_be_used'}:: +The minutes and seconds that the UPS should wait between receiving the +shutdown command and actually shutting off. The other argument should +be set to the character 'n' only when the minutes value should be +skipped and not sent to the UPS. The default is type-dependent and is +given below. The braces and commas are mandatory. Note that there should +be no whitespace characters. + +*voltage*={'coefficient1','coefficient2','coefficient3','coefficient4'}:: +(Only for types KP625AP, Trust, Egys, BNT-other.) +A quad that is used convert the raw data to a human-readable voltage +reading. The default is type-dependent and is given below. Do note that +the braces and commas are mandatory, as well as the lack of whitespace +characters. + +*frequency*={'coefficient1','coefficient2'}:: +(Only for types KP625AP, Trust, Egys.) +A pair to convert the raw data to a human-readable frequency reading. The +default is type-dependent and is given below. Do note that the braces +and commas are mandatory as well, as the lack of whitespace characters. + +*batteryPercentage*={'coefficient1','coefficient2','coefficient3','coefficient4','coefficient5'}:: +(Only for KP625AP, Trust, Egys, BNT-other.) +A 5 tuple to convert the raw data to a human-readable battery percentage +reading. The default is type-dependent and is given below. Do note that +the braces and commas are mandatory, as the lack of white space +characters. + +*loadPercentage*={'coefficient1','coefficient2','coefficient3','coefficient4'}:: +(Only for types KP625AP, Trust, Egys, BNT-other.) +A quad to convert the raw data to human readable load percentage +reading. The default is type-dependent and is given below. Do note that +the braces and commas are mandatory, as the lack of white space +characters. + +*validationSequence*={{'index1','value1'},{'index2','value2'},{'index3','value3'}}:: +(Only for types KP625AP, Trust, Egys, BNT-other.) +3 pairs to be used for validating the UPS by comparing bytes of the raw +data with constant values. The default is type-dependent and is given +below. The braces and commas are mandatory, as the lack of white space +characters. + +DEFAULT VALUES FOR THE EXTRA ARGUMENTS +-------------------------------------- + linevoltage = 230 + manufacturer = PowerCom + modelname = Unknown + serialnumber = Unknown + type = Trust + +The rest of the default values for the extra arguments are type-dependent: + +Trust +~~~~~ + numOfBytesFromUPS = 11 + methodOfFlowControl = dtr0rts1 + validationSequence = {{5,0},{7,0},{8,0}} + shutdownArguments = {{0,10},n} + frequency = {0.00020997,0.00020928} + loadPercentage = {6.1343,-0.3808,4.3110,0.1811} + batteryPercentage = {5.0000,0.3268,-825.00,4.5639,-835.82} + voltage = {1.9216,-0.0977,0.9545,0.0000} + +KP625AP +~~~~~~~ + numOfBytesFromUPS = 16 + methodOfFlowControl = dtr0rts1 + validationSequence = {{5,0x80},{7,0},{8,0}} + shutdownArguments = {{0,10},n} + frequency = {0.00020997,0.00020928} + loadPercentage = {6.1343,-0.3808,4.3110,0.1811} + batteryPercentage = {5.0000,0.3268,-825.00,4.5639,-835.82} + voltage = {1.9216,-0.0977,0.9545,0.0000} + + +Egys +~~~~ + + numOfBytesFromUPS = 16 + methodOfFlowControl = no_flow_control + validationSequence = {{5,0x80},{7,0},{8,0}} + shutdownArguments = {{0,10},n} + frequency = {0.00020997,0.00020928} + loadPercentage = {6.1343,-0.3808,1.3333,0.6667} + batteryPercentage = {5.0000,0.3268,-825.00,2.2105,-355.37} + voltage = {1.9216,-0.0977,0.9545,0.0000} + + +IMP +~~~ + + numOfBytesFromUPS = 16 + methodOfFlowControl = no_flow_control + validationSequence = {{5,0xFF},{7,0},{8,0}} + shutdownArguments = {{1,30},y} + + +KIN +~~~ + + numOfBytesFromUPS = 16 + methodOfFlowControl = no_flow_control + validationSequence = {{11,0x4b},{8,0},{8,0}} + shutdownArguments = {{1,30},y} + + +BNT +~~~ + + numOfBytesFromUPS = 16 + methodOfFlowControl = no_flow_control + validationSequence = {{11,0x42},{8,0},{8,0}} + shutdownArguments = {{1,30},y} + + +BNT-other +~~~~~~~~~ + + numOfBytesFromUPS = 16 + methodOfFlowControl = no_flow_control + validationSequence = {{8,0},{8,0},{8,0}} + shutdownArguments = {{1,30},y} + loadPercentage = {1.4474,0.0,0.8594,0.0} + batteryPercentage = {5.0000,0.3268,-825.00,0.46511,0} + voltage = {1.9216,-0.0977,0.82857,0.0000} + +AUTHOR +------ +Peter Bieringer , +Alexey Sidorov + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/powerman-pdu.8 b/docs/man/powerman-pdu.8 new file mode 100644 index 0000000..f8afcdd --- /dev/null +++ b/docs/man/powerman-pdu.8 @@ -0,0 +1,113 @@ +'\" t +.\" Title: powerman-pdu +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "POWERMAN\-PDU" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +powerman-pdu \- Driver for Powerman PDU +.SH "SYNOPSIS" +.sp +\fBpowerman\-pdu\fR \-h +.sp +\fBpowerman\-pdu\fR \-a \fIPDU_NAME\fR [\fIOPTIONS\fR] +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +This man page only documents the hardware\-specific features of the powerman\-pdu driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.sp .5v +.RE +.SH "SUPPORTED HARDWARE" +.sp +This driver supports a wide range of PDUs through the Powerman project\&. +.sp +This includes various models from APC, Baytech, Cyclades, but also support IPMI and various blade management modules from HP, IBM and Sun\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver doesn\(cqt support any optional settings\&. +.SH "INSTALLATION" +.sp +This driver is not built by default\&. You can build it by using "configure \-\-with\-powerman=yes"\&. +.SH "UPS COMMANDS" +.sp +The following instant commands (see \fBupscmd\fR(8)) are available for each outlet of the PDU, with \fBX\fR standing for the outlet number: +.PP +\fBoutlet\&.X\&.load\&.on\fR +.RS 4 +Power on the outlet\&. +.RE +.PP +\fBoutlet\&.X\&.load\&.off\fR +.RS 4 +Power off the outlet\&. +.RE +.PP +\fBoutlet\&.X\&.load\&.cycle\fR +.RS 4 +Cycle the outlet (power off then power on, possibly with a delay)\&. +.RE +.SH "IMPLEMENTATION" +.sp +The hostname of the Powerman server is specified using the "port" value in \fBups\&.conf\fR, i\&.e\&.: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[pdu] + driver = powerman\-pdu + port = host\&.example\&.com:port +.fi +.if n \{\ +.RE +.\} +.sp +The port used to reach \fIpowermand\fR is optional if the default port is used\&. +.SH "KNOWN ISSUES" +.sp +In the current NUT version (2\&.4\&.1), ups\&.status is still exposed, with the value "WAIT"\&. Some other values from the ups collection are also exposed\&. +.SH "AUTHOR" +.sp +Arnaud Quette +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ +.sp +The PowerMan home page: http://powerman\&.sourceforge\&.net/ diff --git a/docs/man/powerman-pdu.txt b/docs/man/powerman-pdu.txt new file mode 100644 index 0000000..a7b914d --- /dev/null +++ b/docs/man/powerman-pdu.txt @@ -0,0 +1,87 @@ +POWERMAN-PDU(8) +=============== + +NAME +---- + +powerman-pdu - Driver for Powerman PDU + +SYNOPSIS +-------- + +*powerman-pdu* -h + +*powerman-pdu* -a 'PDU_NAME' ['OPTIONS'] + +NOTE: This man page only documents the hardware-specific features of the +powerman-pdu driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ + +This driver supports a wide range of PDUs through the Powerman project. + +This includes various models from APC, Baytech, Cyclades, but also support +IPMI and various blade management modules from HP, IBM and Sun. + +EXTRA ARGUMENTS +--------------- + +This driver doesn't support any optional settings. + +INSTALLATION +------------ + +This driver is not built by default. You can build it by using +"configure --with-powerman=yes". + +UPS COMMANDS +------------ +The following instant commands (see linkman:upscmd[8]) are available for each +outlet of the PDU, with *X* standing for the outlet number: + +*outlet.X.load.on*:: + +Power on the outlet. + +*outlet.X.load.off*:: + +Power off the outlet. + +*outlet.X.load.cycle*:: + +Cycle the outlet (power off then power on, possibly with a delay). + +IMPLEMENTATION +-------------- +The hostname of the Powerman server is specified using the "port" value in +*ups.conf*, i.e.: + + [pdu] + driver = powerman-pdu + port = host.example.com:port + +The port used to reach 'powermand' is optional if the default port is used. + +KNOWN ISSUES +------------ +In the current NUT version (2.4.1), ups.status is still exposed, with the value +"WAIT". Some other values from the +ups collection are also exposed. + +AUTHOR +------ +Arnaud Quette + +SEE ALSO +-------- +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + +The PowerMan home page: http://powerman.sourceforge.net/ diff --git a/docs/man/powerpanel.8 b/docs/man/powerpanel.8 new file mode 100644 index 0000000..ddfe8b3 --- /dev/null +++ b/docs/man/powerpanel.8 @@ -0,0 +1,172 @@ +'\" t +.\" Title: powerpanel +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "POWERPANEL" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +powerpanel \- Driver for PowerPanel Plus compatible UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the powerpanel driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports CyberPower BC1200, PR2200 and many other similar devices, both for the text and binary protocols\&. The driver will autodetect which protocol is used\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in \fBups.conf\fR(5): +.PP +\fBprotocol=\fR[\fItext,binary\fR] +.RS 4 +Override the default autodetection of the protocol\&. +.RE +.PP +\fBmanufacturer=\fR\fIvalue\fR +.RS 4 +If you don\(cqt like the autodetected value, you can override this by setting it here\&. +.RE +.PP +\fBmodel=\fR\fIvalue\fR +.RS 4 +Like manufacturer above\&. +.RE +.PP +\fBserial=\fR\fIvalue\fR +.RS 4 +Like manufacturer above\&. +.RE +.PP +\fBondelay=\fR\fIvalue\fR +.RS 4 +Time to wait before switching on the UPS (1 \- 9999 minutes, 0=indefinite)\&. Only available with the text protocol driver (see +Support Status)\&. +.RE +.PP +\fBoffdelay=\fR\fIvalue\fR +.RS 4 +Time to wait before shutting down the UPS (6 \- 600 seconds)\&. Values below 60 seconds will be truncated to 6 seconds intervals, values above 60 seconds to 60 seconds intervals\&. Only available with the text protocol driver (see +Support Status)\&. +.RE +.SH "VARIABLES" +.sp +Depending on the type of your UPS unit, some of the following variables may be changed with \fBupsrw\fR(8)\&. If the driver can\(cqt read a variable from the UPS, it will not be made available\&. +.PP +\fBinput\&.transfer\&.high\fR +.RS 4 +writable: high transfer voltage point in V +.RE +.PP +\fBinput\&.transfer\&.low\fR +.RS 4 +writable: low transfer voltage point in V +.RE +.PP +\fBbattery\&.charge\&.low\fR +.RS 4 +writable: remaining battery charge percentage for low battery warning +.RE +.PP +\fBoutput\&.voltage\&.nominal\fR +.RS 4 +writable: nominal output voltage in V +.RE +.PP +\fBups\&.start\&.battery\fR +.RS 4 +writable: allow cold start from battery +.RE +.SH "COMMANDS" +.sp +Depending on the type of your UPS unit, some of the following commands may be available\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +test\&.battery\&.start\&.quick, test\&.battery\&.stop +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +beeper\&.enable, beeper\&.disable, beeper\&.toggle +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.return, shutdown\&.reboot, shutdown\&.stayoff +.RE +.sp +On many devices, these commands are unreliable, so before using them you must verify that these work as expected (see Shutdown Issues)\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.stop +.RE +.SH "SUPPORT STATUS" +.sp +Vendor support is absent for this driver, so if you need some features that are currently not available, provide ample documentation on what the driver should sent to the UPS in order to make this work\&. If more information would be available on the binary protocol, it would probably be possible to make \fIondelay\fR and \fIoffdelay\fR configurable\&. So far, nobody has taken the time to investigate what we should tell the UPS to make this work, and CyberPower isn\(cqt willing to share this with us\&. +.SH "SHUTDOWN ISSUES" +.sp +If the \fBshutdown\&.return\fR command on your UPS doesn\(cqt seem to work, chances are that your UPS is an older model\&. Try a couple of different settings for \fIoffdelay\fR\&. If no value in the range 6\&.\&.600 works, your UPS likely doesn\(cqt support this\&. In order to get the expected behaviour, it requires \fBshutdown\&.stayoff\fR (when on battery) and \fBshutdown\&.reboot\fR (when on mains)\&. The driver will automatically fallback to these commands if \fBshutdown\&.return\fR fails, and tries to detect which one should be used when called with the \fI\-k\fR option (or through \fBupsdrvctl shutdown\fR)\&. +.sp +This isn\(cqt bullet\-proof, however, and you should be prepared that the power will either not be shutdown or that it doesn\(cqt return when the power comes back\&. All models supported by the binary protocol and many supported through the text protocol are affected by this\&. +.SH "KNOWN PROBLEMS" +.sp +The CyberPower OP series don\(cqt offer direct voltage, charge, frequency and temperature readings\&. Instead, they will return a binary value that needs conversion to the actual value\&. +.sp +The exact conversion needed is unknown at the time of this writing, hence an estimation was made based om readings from actual devices\&. This may (probably will) be off, possibly a lot\&. Unless you can tell us the exact mapping between values from the UPS and actual readings, don\(cqt bother to complain\&. We\(cqve done the best we can based on the limited information available\&. Remember, a UPS isn\(cqt a measuring instrument\&. +.SH "AUTHORS" +.sp +Arjen de Korte , Doug Reynolds +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/powerpanel.8 b/docs/man/powerpanel.txt similarity index 53% rename from man/powerpanel.8 rename to docs/man/powerpanel.txt index bc88174..6ba2b6e 100644 --- a/man/powerpanel.8 +++ b/docs/man/powerpanel.txt @@ -1,103 +1,115 @@ -.TH POWERPANEL 8 "Tue Dec 23 2008" "" "Network UPS Tools (NUT)" -.SH NAME -powerpanel \- Driver for PowerPanel Plus compatible UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the -powerpanel driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +POWERPANEL(8) +============= -.SH SUPPORTED HARDWARE +NAME +---- + +powerpanel - Driver for PowerPanel Plus compatible UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +powerpanel driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ This driver supports CyberPower BC1200, PR2200 and many other similar devices, both for the text and binary protocols. The driver will autodetect which protocol is used. -.SH EXTRA ARGUMENTS -This driver supports the following optional settings in \fBups.conf\fR(5): +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in linkman:ups.conf[5]: -.IP "protocol=\fI[text,binary]\fR" +*protocol=*['text,binary']:: Override the default autodetection of the protocol. -.IP "manufacturer=\fIvalue\fR" +*manufacturer=*'value':: If you don't like the autodetected value, you can override this by setting it here. -.IP "model=\fIvalue\fR" +*model=*'value':: Like manufacturer above. -.IP "serial=\fIvalue\fR" +*serial=*'value':: Like manufacturer above. -.IP "ondelay=\fIvalue\fR" -Time to wait before switching on the UPS (1 - 9999 minutes, 0 indefinite). -Only available with the text protocol driver (see \fBSUPPORT STATUS\fR). +*ondelay=*'value':: +Time to wait before switching on the UPS (1 - 9999 minutes, 0=indefinite). +Only available with the text protocol driver (see <<_support_status,Support Status>>). -.IP "offdelay=\fIvalue\fR" +*offdelay=*'value':: Time to wait before shutting down the UPS (6 - 600 seconds). Values below 60 seconds will be truncated to 6 seconds intervals, values above 60 seconds to 60 seconds intervals. Only available with the text protocol driver (see -\fBSUPPORT STATUS\fR). +<<_support_status,Support Status>>). -.SH VARIABLES +VARIABLES +--------- Depending on the type of your UPS unit, some of the following variables may -be changed. If the driver can't read a variable from the UPS, it will not be -made available. -.TP 12 -.B input.transfer.high -writable: high transfer voltage point in V -.TP -.B input.transfer.low -writable: low transfer voltage point in V -.TP -.B battery.charge.low -writable: remaining battery charge percentage for low battery warning -.TP -.B output.voltage.nominal -writable: nominal output voltage in V -.TP -.B ups.start.battery -writable: allow cold start from battery -.PD +be changed with linkman:upsrw[8]. If the driver can't read a variable from the +UPS, it will not be made available. -.SH COMMANDS +*input.transfer.high*:: +writable: high transfer voltage point in V + +*input.transfer.low*:: +writable: low transfer voltage point in V + +*battery.charge.low*:: +writable: remaining battery charge percentage for low battery warning + +*output.voltage.nominal*:: +writable: nominal output voltage in V + +*ups.start.battery*:: +writable: allow cold start from battery + +COMMANDS +-------- Depending on the type of your UPS unit, some of the following commands may be available. -.TP 12 -.B test.battery.start.quick, test.battery.stop -.TP -.B beeper.enable, beeper.disable, beeper.toggle -.TP -.B shutdown.return, shutdown.reboot, shutdown.stayoff -On many devices, these commands are unreliable, so before using them you -must verify that these work as expected (see \fBSHUTDOWN ISSUES\fR). -.TP -.B shutdown.stop -.PD -.SH SUPPORT STATUS + * test.battery.start.quick, test.battery.stop + + * beeper.enable, beeper.disable, beeper.toggle + + * shutdown.return, shutdown.reboot, shutdown.stayoff + +On many devices, these commands are unreliable, so before using them you +must verify that these work as expected (see <<_shutdown_issues,Shutdown Issues>>). + + * shutdown.stop + +SUPPORT STATUS +-------------- Vendor support is absent for this driver, so if you need some features that are currently not available, provide ample documentation on what the driver should sent to the UPS in order to make this work. If more information would be available on the binary protocol, it would probably be possible to -make ondelay and offdelay configurable. So far, nobody has taken the time -to investigate what we should tell the UPS to make this work and CyberPower +make 'ondelay' and 'offdelay' configurable. So far, nobody has taken the time +to investigate what we should tell the UPS to make this work, and CyberPower isn't willing to share this with us. -.SH SHUTDOWN ISSUES -If the \fBshutdown.return\fR command on your UPS doesn't seem to work, -chances are that your UPS is of an older model. Try a couple of different -settings for \fIoffdelay\fR. If no value in the range 6..600 works, your +SHUTDOWN ISSUES +--------------- +If the *shutdown.return* command on your UPS doesn't seem to work, +chances are that your UPS is an older model. Try a couple of different +settings for 'offdelay'. If no value in the range 6..600 works, your UPS likely doesn't support this. In order to get the expected behaviour, -it requires \fBshutdown.stayoff\fR (when on battery) and \fBshutdown.reboot\fR +it requires *shutdown.stayoff* (when on battery) and *shutdown.reboot* (when on mains). The driver will automatically fallback to these commands if -\fBshutdown.return\fR fails and tries to detect which one should be used when -called with the '\(hyk' option (or through \fBupsdrvctl shutdown\fR). +*shutdown.return* fails, and tries to detect which one should be used when +called with the '-k' option (or through *upsdrvctl shutdown*). -This isn't bullet proof however and you should be prepared that the +This isn't bullet-proof, however, and you should be prepared that the power will either not be shutdown or that it doesn't return when the power comes back. All models supported by the binary protocol and many supported through the text protocol are affected by this. -.SH KNOWN PROBLEMS +KNOWN PROBLEMS +-------------- The CyberPower OP series don't offer direct voltage, charge, frequency and temperature readings. Instead, they will return a binary value that needs conversion to the actual value. @@ -110,13 +122,17 @@ don't bother to complain. We've done the best we can based on the limited information available. Remember, a UPS isn't a measuring instrument. -.SH AUTHORS -Arjen de Korte , Doug Reynolds +AUTHORS +------- +Arjen de Korte , Doug Reynolds -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/rhino.8 b/docs/man/rhino.8 new file mode 100644 index 0000000..3030456 --- /dev/null +++ b/docs/man/rhino.8 @@ -0,0 +1,154 @@ +'\" t +.\" Title: rhino +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "RHINO" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +rhino \- Driver for Brazilian Microsol RHINO UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the rhino driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver has been tested with : +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Rhino 6000 VA +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Rhino 7500 VA +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Rhino 10000 VA +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Rhino 20000 VA +.RE +.sp +All Rhino models are sinusoidal on\-line\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver support the following extra optional settings in \fBups.conf\fR(5): +.sp +\fBbattext = n\fR \- (default = 0, no extra battery, where n = Ampere*hour ) +.SH "COMMANDS" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +load\&.on \- Turn on the load immediately +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +load\&.off \- Turn off the load immediately +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +bypass\&.start \- Put the UPS in bypass mode +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +bypass\&.stop \- Put the UPS out of bypass mode +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.stayoff \- Shut down in 3 minutes and do not return +.RE +.SH "AUTHOR" +.sp +Silvino B\&. Magalhães +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/rhino.txt b/docs/man/rhino.txt new file mode 100644 index 0000000..e4638e2 --- /dev/null +++ b/docs/man/rhino.txt @@ -0,0 +1,59 @@ +RHINO(8) +======== + +NAME +---- +rhino - Driver for Brazilian Microsol RHINO UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +rhino driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver has been tested with : + + * Rhino 6000 VA + * Rhino 7500 VA + * Rhino 10000 VA + * Rhino 20000 VA + +All Rhino models are sinusoidal on-line. + +EXTRA ARGUMENTS +--------------- + +This driver support the following extra optional settings in +linkman:ups.conf[5]: + +*battext = n* - (default = 0, no extra battery, where n = Ampere*hour ) + +COMMANDS +-------- + + * load.on - Turn on the load immediately + + * load.off - Turn off the load immediately + + * bypass.start - Put the UPS in bypass mode + + * bypass.stop - Put the UPS out of bypass mode + + * shutdown.stayoff - Shut down in 3 minutes and do not return + +AUTHOR +------ +Silvino B. Magalhães + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/richcomm_usb.8 b/docs/man/richcomm_usb.8 new file mode 100644 index 0000000..22c29a3 --- /dev/null +++ b/docs/man/richcomm_usb.8 @@ -0,0 +1,55 @@ +'\" t +.\" Title: richcomm_usb +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "RICHCOMM_USB" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +richcomm_usb \- Driver UPS equipment using Richcomm dry\-contact to USB solution +.SH "NOTE" +.sp +This man page only documents the specific features of the richcomm_usb driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The Richcomm dry\-contact to USB solution is a generic interface that is used to upgrade an existing (RS\-232) contact closure UPS interface to USB\&. As such, all the limitations of the underlying contact closure interface apply\&. This means that you will only get the essentials in ups\&.status: OL, OB, and LB\&. See also \fBgenericups\fR(8)\&. +.SH "BUGS" +.sp +Most contact\-closure UPSes will not power down the load if the line power is present\&. This can create a race when using slave \fBupsmon\fR(8) systems\&. See the \fBupsmon\fR(8) man page for more information\&. +.sp +The solution to both of these problems is to upgrade to a smart protocol UPS of some kind that allows detection and proper load cycling on command\&. +.SH "AUTHORS" +.sp +Peter van Valderen , Dirk Teurlings +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "The generic serial driver:" +.sp +\fBgenericups\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/richcomm_usb.txt b/docs/man/richcomm_usb.txt new file mode 100644 index 0000000..3f52861 --- /dev/null +++ b/docs/man/richcomm_usb.txt @@ -0,0 +1,50 @@ +RICHCOMM_USB(8) +=============== + +NAME +---- +richcomm_usb - Driver UPS equipment using Richcomm dry-contact to USB +solution + +NOTE +---- +This man page only documents the specific features of the richcomm_usb +driver. For information about the core driver, see linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +The Richcomm dry-contact to USB solution is a generic interface that is +used to upgrade an existing (RS-232) contact closure UPS interface to USB. +As such, all the limitations of the underlying contact closure interface +apply. This means that you will only get the essentials in ups.status: OL, +OB, and LB. See also linkman:genericups[8]. + +BUGS +---- +Most contact-closure UPSes will not power down the load if the line power +is present. This can create a race when using slave linkman:upsmon[8] +systems. See the linkman:upsmon[8] man page for more information. + +The solution to both of these problems is to upgrade to a smart protocol +UPS of some kind that allows detection and proper load cycling on command. + +AUTHORS +------- + +Peter van Valderen , +Dirk Teurlings + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +The generic serial driver: +~~~~~~~~~~~~~~~~~~~~~~~~~~ +linkman:genericups[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/safenet.8 b/docs/man/safenet.8 new file mode 100644 index 0000000..a3ca1c8 --- /dev/null +++ b/docs/man/safenet.8 @@ -0,0 +1,135 @@ +'\" t +.\" Title: safenet +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "SAFENET" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +safenet \- Driver for SafeNet compatible UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the safenet driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports UPS equipment which can be controlled via SafeNet v1\&.0 for Windows (serial interface only)\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5) file: +.PP +\fBmanufacturer=\fR\fIvalue\fR +.RS 4 +Autodetection of this parameter is not possible yet (and it probably never will be)\&. Therefore, this user\-defined string accepts any name\&. The default is +\fIunknown\fR\&. +.RE +.PP +\fBmodelname=\fR\fIvalue\fR +.RS 4 +Like manufacturer above\&. The default is +\fIunknown\fR\&. +.RE +.PP +\fBserialnumber=\fR\fIvalue\fR +.RS 4 +Like manufacturer above\&. The default is +\fIunknown\fR\&. +.RE +.PP +\fBondelay=\fR\fIvalue\fR +.RS 4 +Time to wait before switching on the UPS (minutes)\&. Defaults to 1 minute\&. +.RE +.PP +\fBoffdelay=\fR\fIvalue\fR +.RS 4 +Time to wait before shutting down the UPS (seconds)\&. Defaults to 30 seconds\&. +.RE +.SH "UPSCMD" +.sp +This driver supports some instant commands (see \fBupscmd\fR(8)): +.PP +\fBtest\&.battery\&.start\fR +.RS 4 +Start UPS self test +.RE +.PP +\fBtest\&.battery\&.stop\fR +.RS 4 +Cancel UPS self test +.RE +.PP +\fBtest\&.failure\&.start\fR +.RS 4 +Start simulated power failure +.RE +.PP +\fBtest\&.failure\&.stop\fR +.RS 4 +Cancel simulated power failure +.RE +.PP +\fBbeeper\&.enable\fR +.RS 4 +Enable the UPS beeper +.RE +.PP +\fBbeeper\&.mute\fR +.RS 4 +Temporarily mute the UPS beeper +.RE +.PP +\fBbeeper\&.toggle\fR +.RS 4 +Toggle the UPS beeper +.RE +.PP +\fBshutdown\&.return\fR +.RS 4 +Turn off the load and wait for the power to return\&. Uses the timer defined by +\fBoffdelay\fR\&. +.RE +.PP +\fBshutdown\&.reboot\fR +.RS 4 +Turn off the load and return\&. Uses the timers defined by +\fBoffdelay\fR +and +\fBondelay\fR\&. +.RE +.SH "KNOWN PROBLEMS" +.sp +If you run the \fBshutdown\&.return\fR command with mains present, the output may stay on or switch off and not back on again\&. The \fBshutdown\&.reboot\fR command will unconditionally switch on the load again (with or without mains present)\&. +.sp +If the driver is called with the \fI\-k\fR option (or through \fBupsdrvctl shutdown\fR) it tries to detect which command should be used in an attempt to stay off until mains is present again or to cycle the output if the power returned in the mean time\&. This isn\(cqt bullet\-proof, and you should be prepared that the power will either not be shutdown, or that it doesn\(cqt return when the power comes back\&. +.SH "AUTHOR" +.sp +Arjen de Korte +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/safenet.txt b/docs/man/safenet.txt new file mode 100644 index 0000000..f6f5a5a --- /dev/null +++ b/docs/man/safenet.txt @@ -0,0 +1,101 @@ +SAFENET(8) +========== + +NAME +---- +safenet - Driver for SafeNet compatible UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +safenet driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports UPS equipment which can be controlled via +SafeNet v1.0 for Windows (serial interface only). + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in the +linkman:ups.conf[5] file: + +*manufacturer=*'value':: +Autodetection of this parameter is not possible yet (and it probably +never will be). Therefore, this user-defined string accepts any name. The +default is 'unknown'. + +*modelname=*'value':: +Like manufacturer above. The default is 'unknown'. + +*serialnumber=*'value':: +Like manufacturer above. The default is 'unknown'. + +*ondelay=*'value':: +Time to wait before switching on the UPS (minutes). Defaults to 1 minute. + +*offdelay=*'value':: +Time to wait before shutting down the UPS (seconds). Defaults to 30 seconds. + +UPSCMD +------ +This driver supports some instant commands (see linkman:upscmd[8]): + +*test.battery.start*:: +Start UPS self test + +*test.battery.stop*:: +Cancel UPS self test + +*test.failure.start*:: +Start simulated power failure + +*test.failure.stop*:: +Cancel simulated power failure + +*beeper.enable*:: +Enable the UPS beeper + +*beeper.mute*:: +Temporarily mute the UPS beeper + +*beeper.toggle*:: +Toggle the UPS beeper + +*shutdown.return*:: +Turn off the load and wait for the power to return. Uses the timer +defined by *offdelay*. + +*shutdown.reboot*:: +Turn off the load and return. Uses the timers defined by *offdelay* +and *ondelay*. + +KNOWN PROBLEMS +-------------- +If you run the *shutdown.return* command with mains present, the output +may stay on or switch off and not back on again. The *shutdown.reboot* +command will unconditionally switch on the load again (with or without mains +present). + +If the driver is called with the '-k' option (or through *upsdrvctl +shutdown*) it tries to detect which command should be used in an attempt +to stay off until mains is present again or to cycle the output if the +power returned in the mean time. This isn't bullet-proof, and you should be +prepared that the power will either not be shutdown, or that it doesn't +return when the power comes back. + +AUTHOR +------ +Arjen de Korte + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/skel.txt b/docs/man/skel.txt new file mode 100644 index 0000000..f98cd2c --- /dev/null +++ b/docs/man/skel.txt @@ -0,0 +1,111 @@ +SKEL(8) +======= + +NAME +---- +skel - skeleton driver man page + +NOTE +---- +This man page only documents the hardware-specific features of the +*skel* driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +////////////////////////////////////////// +The following lines are comments. + +When copying this man page for your new driver, be sure to replace all +occurrances of "skel" and "SKEL" by your actual driver name. + +If you have AsciiDoc installed, you can test the formatting of your man page by +running: + asciidoc --backend=xhtml11 -o skel.html skel.txt + +After writing a man page, be sure to add it to the appropriate variable in +Makefile.am in this directory. + +In the "NAME" section, you must follow the format above, including separating +the driver name from its description by "-". This is to ensure that the +apropos(8) database is properly rebuilt. +////////////////////////////////////////// + +SUPPORTED HARDWARE +------------------ +*skel* supports ... + +////////////////////////////////////////// +If the driver only works with certain cables, this is a good place to +mention it: + +CABLING +------- + +////////////////////////////////////////// + +EXTRA ARGUMENTS +This driver also supports the following optional settings: + +*option1*='num':: +Set the value of ... to 'num'. Contrast with *option2*. + +*option2*='string':: +Some other option. + +////////////////////////////////////////// +Optional: list supported instant commands here: + +INSTANT COMMANDS +---------------- + +*instcmd1*:: +Command 1. +////////////////////////////////////////// + +////////////////////////////////////////// +Optional: use INSTALLATION if you need special parameters to the configure +script, or additional libraries as prerequisites. + +INSTALLATION +------------ + +////////////////////////////////////////// + +////////////////////////////////////////// +You may leave this as "none known at this time", or describe any trouble +encountered when implementing the protocol for your UPS. + +KNOWN ISSUES AND BUGS +--------------------- +*Got "EPERM: Operation not permitted" upon driver startup*:: + +You have forgotten to install the udev files, as explained +in the INSTALLATION section above. Don't forget to restart +udev so that it applies these changes. +////////////////////////////////////////// + +////////////////////////////////////////// +An email address is not strictly necessary, but you may wish to provide +some form of contact information so that users can report bugs. +////////////////////////////////////////// + +AUTHORS +------- +J Random User + +////////////////////////////////////////// +If this driver is ever made obsolete by another driver, mention the +replacement driver in the "SEE ALSO" section. You may also wish to point +the user to other drivers which may better support their hardware, if there +is ambiguity based on the driver name. +////////////////////////////////////////// + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/snmp-ups.8 b/docs/man/snmp-ups.8 new file mode 100644 index 0000000..5345521 --- /dev/null +++ b/docs/man/snmp-ups.8 @@ -0,0 +1,205 @@ +'\" t +.\" Title: snmp-ups +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "SNMP\-UPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +snmp-ups \- Multi\-MIB Driver for SNMP UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the snmp\-ups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The snmp\-ups driver automatically detects and supports a wide range of devices by loading various MIBS: \fBietf\fR:: UPS that is RFC 1628 (UPS MIB) compliant, e\&.g\&. MGE UPS SYSTEMS, Liebert, perhaps others (default) +.PP +\fBmge\fR +.RS 4 +MGE UPS SYSTEMS and MGE Office Protection Systems devices with SNMP cards (ref 66062, 66045, 66074 and 66244) +.RE +.PP +\fBapcc\fR +.RS 4 +APC AP9606 APC Web/SNMP management card, perhaps others +.RE +.PP +\fBnetvision\fR +.RS 4 +Socomec Sicon UPS with Netvision Web/SNMP management card/external box +.RE +.PP +\fBpw\fR +.RS 4 +Powerware devices with ConnectUPS SNMP cards +.RE +.PP +\fBaphel_genesisII\fR +.RS 4 +Eaton Powerware ePDU Monitored +.RE +.PP +\fBaphel_revelation\fR +.RS 4 +Eaton Powerware ePDU Managed +.RE +.PP +\fBraritan\fR +.RS 4 +Various Raritan PDUs +.RE +.PP +\fBbaytech\fR +.RS 4 +Various BayTech PDUs +.RE +.PP +\fBcpqpower\fR +.RS 4 +HP/Compaq AF401A management card, perhaps others +.RE +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBmibs\fR=\fIname\fR +.RS 4 +Set MIB compliance (default=auto, allowed entries: refer to the above SUPPORTED HARDWARE)\&. With "auto", the driver will try a select set of SNMP objects until it finds one that the device responds to\&. +.RE +.PP +\fBcommunity\fR=\fIname\fR +.RS 4 +Set community name (default = public)\&. Note that you require a RW community name to change UPS settings (as for a powerdown)\&. +.RE +.PP +\fBsnmp_version\fR=\fIversion\fR +.RS 4 +Set SNMP version (default = v1, the other allowed value is v2c) +.RE +.PP +\fBpollfreq\fR=\fIvalue\fR +.RS 4 +Set polling frequency in seconds, to reduce network flow (default=30) +.RE +.PP +\fBnotransferoids\fR +.RS 4 +Disable the monitoring of the low and high voltage transfer OIDs in the hardware\&. This will remove input\&.transfer\&.low and input\&.transfer\&.high from the list of variables\&. This should only be used on APCC Symmetra equipment which has strangeness in the three\-phase power reporting\&. +.RE +.PP +\fBsecLevel\fR=\fIvalue\fR +.RS 4 +Set the securityLevel used for SNMPv3 messages (default=noAuthNoPriv, allowed: authNoPriv,authPriv) +.RE +.PP +\fBsecName\fR=\fIvalue\fR +.RS 4 +Set the securityName used for authenticated SNMPv3 messages (no default) +.RE +.PP +\fBauthPassword\fR=\fIvalue\fR +.RS 4 +Set the authentication pass phrase used for authenticated SNMPv3 messages (no default) +.RE +.PP +\fBprivPassword\fR=\fIvalue\fR +.RS 4 +Set the privacy pass phrase used for encrypted SNMPv3 messages (no default) +.RE +.PP +\fBauthProtocol\fR=\fIvalue\fR +.RS 4 +Set the authentication protocol (MD5 or SHA) used for authenticated SNMPv3 messages (default=MD5) +.RE +.PP +\fBprivProtocol\fR=\fIvalue\fR +.RS 4 +Set the privacy protocol (DES or AES) used for encrypted SNMPv3 messages (default=DES) +.RE +.SH "REQUIREMENTS" +.sp +You will need to install the Net\-SNMP package from http://www\&.net\-snmp\&.org/ before building this driver\&. +.sp +SNMP v3 also requires OpenSSL support from http://www\&.openssl\&.org\&. +.SH "LIMITATION" +.SS "Shutdown" +.sp +This driver does not provide a proper upsdrv_shutdown() function\&. There probably never will be one, since at the time this script should run (near the end of the system halt script), there will be no network capabilities anymore\&. Probably the only way to shutdown an SNMP UPS is by sending it a shutdown with delay command through \fBupscmd\fR(8) and hope for the best that the system will have finished shutting down before the power is cut\&. +.SH "INSTALLATION" +.sp +This driver is only built if the Net\-SNMP development files are present on the system\&. You can also force it to be built by using "configure \-\-with\-snmp=yes" before calling make\&. +.SH "IMPLEMENTATION" +.sp +The hostname of the UPS is specified with the "port" value in ups\&.conf, i\&.e\&.: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[snmpv1] + driver = snmp\-ups + port = snmp\-ups\&.example\&.com + community = public + snmp_version = v1 + mibs = ietf + pollfreq = 15 + desc = "Example SNMP v1 device" +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +[snmpv3] + driver = snmp\-ups + port = 166\&.99\&.224\&.132 + mibs = mge + secLevel = authPriv + secName = mysecurityname + authPassword = myauthenticationpassphrase + privPassword = myprivatepassphrase + desc = "Example SNMP v3 device, with the highest security level" +.fi +.if n \{\ +.RE +.\} +.SH "AUTHORS" +.sp +Arnaud Quette, Dmitry Frolov +.sp +Sponsored by Eaton http://www\&.eaton\&.com and originally by MGE UPS SYSTEMS http://www\&.mgeups\&.com/ +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "NUT SNMP Protocols Library" +.sp +Available at: http://www\&.networkupstools\&.org/protocols/snmp/ +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/snmp-ups.txt b/docs/man/snmp-ups.txt new file mode 100644 index 0000000..87b850d --- /dev/null +++ b/docs/man/snmp-ups.txt @@ -0,0 +1,167 @@ +snmp-ups(8) +=========== + +NAME +---- + +snmp-ups - Multi-MIB Driver for SNMP UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +snmp-ups driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ + +The snmp-ups driver automatically detects and supports a wide range of devices by loading various MIBS: +*ietf*:: +UPS that is RFC 1628 (UPS MIB) compliant, e.g. MGE UPS SYSTEMS, Liebert, perhaps others (default) + +*mge*:: +MGE UPS SYSTEMS and MGE Office Protection Systems devices with SNMP cards (ref 66062, 66045, 66074 and 66244) + +*apcc*:: +APC AP9606 APC Web/SNMP management card, perhaps others + +*netvision*:: +Socomec Sicon UPS with Netvision Web/SNMP management card/external box + +*pw*:: +Powerware devices with ConnectUPS SNMP cards + +*aphel_genesisII*:: +Eaton Powerware ePDU Monitored + +*aphel_revelation*:: +Eaton Powerware ePDU Managed + +*raritan*:: +Various Raritan PDUs + +*baytech*:: +Various BayTech PDUs + +*cpqpower*:: +HP/Compaq AF401A management card, perhaps others + +EXTRA ARGUMENTS +--------------- + +This driver supports the following optional settings in the +linkman:ups.conf[5]: + +*mibs*='name':: +Set MIB compliance (default=auto, allowed entries: refer to the above SUPPORTED HARDWARE). +With "auto", the driver will try a select set of SNMP objects until it finds +one that the device responds to. + +*community*='name':: +Set community name (default = public). +Note that you require a RW community name to change UPS settings (as for a powerdown). + +*snmp_version*='version':: +Set SNMP version (default = v1, the other allowed value is v2c) + +*pollfreq*='value':: +Set polling frequency in seconds, to reduce network flow (default=30) + +*notransferoids*:: +Disable the monitoring of the low and high voltage transfer OIDs in +the hardware. This will remove input.transfer.low and input.transfer.high +from the list of variables. This should only be used on APCC Symmetra +equipment which has strangeness in the three-phase power reporting. + +*secLevel*='value':: +Set the securityLevel used for SNMPv3 messages (default=noAuthNoPriv, +allowed: authNoPriv,authPriv) + +*secName*='value':: +Set the securityName used for authenticated SNMPv3 messages (no default) + +*authPassword*='value':: +Set the authentication pass phrase used for authenticated SNMPv3 messages +(no default) + +*privPassword*='value':: +Set the privacy pass phrase used for encrypted SNMPv3 messages (no default) + +*authProtocol*='value':: +Set the authentication protocol (MD5 or SHA) used for authenticated SNMPv3 +messages (default=MD5) + +*privProtocol*='value':: +Set the privacy protocol (DES or AES) used for encrypted SNMPv3 messages +(default=DES) + +REQUIREMENTS +------------ +You will need to install the Net-SNMP package from +http://www.net-snmp.org/ before building this driver. + +SNMP v3 also requires OpenSSL support from http://www.openssl.org. + +LIMITATION +---------- +Shutdown +~~~~~~~~ + +This driver does not provide a proper upsdrv_shutdown() function. There probably +never will be one, since at the time this script should run (near the end of +the system halt script), there will be no network capabilities anymore. +Probably the only way to shutdown an SNMP UPS is by sending it a shutdown +with delay command through linkman:upscmd[8] and hope for the best that the +system will have finished shutting down before the power is cut. + +INSTALLATION +------------ +This driver is only built if the Net-SNMP development files are present on the system. +You can also force it to be built by using "configure --with-snmp=yes" before calling make. + +IMPLEMENTATION +-------------- +The hostname of the UPS is specified with the "port" value in +`ups.conf`, i.e.: + + [snmpv1] + driver = snmp-ups + port = snmp-ups.example.com + community = public + snmp_version = v1 + mibs = ietf + pollfreq = 15 + desc = "Example SNMP v1 device" + + [snmpv3] + driver = snmp-ups + port = 166.99.224.132 + mibs = mge + secLevel = authPriv + secName = mysecurityname + authPassword = myauthenticationpassphrase + privPassword = myprivatepassphrase + desc = "Example SNMP v3 device, with the highest security level" + +AUTHORS +------- +Arnaud Quette, Dmitry Frolov + +Sponsored by Eaton +and originally by MGE UPS SYSTEMS + + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +NUT SNMP Protocols Library +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Available at: http://www.networkupstools.org/protocols/snmp/ + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/solis.8 b/docs/man/solis.8 new file mode 100644 index 0000000..6478e12 --- /dev/null +++ b/docs/man/solis.8 @@ -0,0 +1,123 @@ +'\" t +.\" Title: solis +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "SOLIS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +solis \- Driver for Brazilian Microsol SOLIS UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the solis driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver has been tested with : +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Solis 1000 VA +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Solis 1500 VA +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Solis 2000 VA +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Solis 3000 VA +.RE +.sp +All Solis models are sinusoidal on\-line +.SH "EXTRA ARGUMENTS" +.sp +This driver support the following extra optional settings in the \fBups.conf\fR(5)\&. +.sp +\fBbattext = n\fR \- (default = 0, no extra battery, where n = Ampere*hour ) +.sp +\fBprgshut = 1\fR \- (default = 0, no programable shutdown ) +.SH "COMMANDS" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.return \- Shut down in \&.3 minutes and restart in \&.3 minutes +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.stayoff \- Shut down in \&.3 minutes and do not return +.RE +.SH "AUTHOR" +.sp +Silvino B\&. Magalhães +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/solis.txt b/docs/man/solis.txt new file mode 100644 index 0000000..37bc48d --- /dev/null +++ b/docs/man/solis.txt @@ -0,0 +1,57 @@ +SOLIS(8) +======== + +NAME +---- + +solis - Driver for Brazilian Microsol SOLIS UPS equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the +solis driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver has been tested with : + + * Solis 1000 VA + * Solis 1500 VA + * Solis 2000 VA + * Solis 3000 VA + +All Solis models are sinusoidal on-line + +EXTRA ARGUMENTS +--------------- + +This driver support the following extra optional settings in the +linkman:ups.conf[5]. + +*battext = n* - (default = 0, no extra battery, where n = Ampere*hour ) + +*prgshut = 1* - (default = 0, no programable shutdown ) + +COMMANDS +-------- + + * shutdown.return - Shut down in .3 minutes and restart in .3 minutes + + * shutdown.stayoff - Shut down in .3 minutes and do not return + +AUTHOR +------ +Silvino B. Magalhães + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/tripplite.8 b/docs/man/tripplite.8 new file mode 100644 index 0000000..2904180 --- /dev/null +++ b/docs/man/tripplite.8 @@ -0,0 +1,71 @@ +'\" t +.\" Title: tripplite +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "TRIPPLITE" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +tripplite \- Driver for Tripp\-Lite SmartPro UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the tripplite driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver should work on the SmartPro line, including the SMART700 and SMART700SER\&. It only supports SmartPro models that communicate using the serial port\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBoffdelay\fR=\fInum\fR +.RS 4 +Time to wait before the UPS is turned off after the kill power command is sent\&. The default value is 64 (in seconds)\&. +.RE +.PP +\fBrebootdelay\fR=\fInum\fR +.RS 4 +Set the timer before the UPS is cycled after the reboot command is sent\&. The default value is 64 (in seconds)\&. +.RE +.PP +\fBstartdelay\fR=\fInum\fR +.RS 4 +Set the time that the UPS waits before it turns itself back on after a reboot command\&. The default value is 60 (in seconds)\&. +.RE +.SH "KNOWN ISSUES AND BUGS" +.sp +Battery charge information may not be correct for all UPSes\&. It is tuned to be correct for a SMART700SER\&. Other models may not provide correct information\&. Information from the manufacturer would be helpful\&. +.SH "AUTHORS" +.sp +Rickard E\&. (Rik) Faith, Nicholas Kain +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Other drivers for Tripp\-Lite hardware:" +.sp +\fBtripplitesu\fR(8), \fBtripplite_usb\fR(8), \fBusbhid-ups\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/tripplite.8 b/docs/man/tripplite.txt similarity index 50% rename from man/tripplite.8 rename to docs/man/tripplite.txt index d4ff187..dc6f1c8 100644 --- a/man/tripplite.8 +++ b/docs/man/tripplite.txt @@ -1,47 +1,60 @@ -.TH TRIPPLITE 8 "Sat Aug 21 2004" "" "Network UPS Tools (NUT)" -.SH NAME -tripplite \- Driver for Tripp\(hyLite SmartPro UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the -tripplite driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +TRIPPLITE(8) +============ -.SH SUPPORTED HARDWARE +NAME +---- +tripplite - Driver for Tripp-Lite SmartPro UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +tripplite driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ This driver should work on the SmartPro line, including the SMART700 and SMART700SER. It only supports SmartPro models that communicate using the serial port. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver supports the following optional settings in the -\fBups.conf\fR(5): +linkman:ups.conf[5]: -.IP "offdelay=\fInum\fR" +*offdelay*='num':: Time to wait before the UPS is turned off after the kill power command is -sent. -The default value is 64 (in seconds). +sent. The default value is 64 (in seconds). -.IP "rebootdelay=\fInum\fR" +*rebootdelay*='num':: Set the timer before the UPS is cycled after the reboot command is sent. The default value is 64 (in seconds). -.IP "startdelay=\fInum\fR" +*startdelay*='num':: Set the time that the UPS waits before it turns itself back on after a -reboot command. -The default value is 60 (in seconds). +reboot command. The default value is 60 (in seconds). -.SH KNOWN ISSUES AND BUGS +KNOWN ISSUES AND BUGS +--------------------- Battery charge information may not be correct for all UPSes. It is tuned to be correct for a SMART700SER. Other models may not provide correct information. Information from the manufacturer would be helpful. -.SH AUTHORS -Rickard E. (Rik) Faith -Nicholas Kain +AUTHORS +------- +Rickard E. (Rik) Faith, Nicholas Kain -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Other drivers for Tripp-Lite hardware: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +linkman:tripplitesu[8], linkman:tripplite_usb[8], linkman:usbhid-ups[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/tripplite_usb.8 b/docs/man/tripplite_usb.8 new file mode 100644 index 0000000..df2c950 --- /dev/null +++ b/docs/man/tripplite_usb.8 @@ -0,0 +1,272 @@ +'\" t +.\" Title: tripplite_usb +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "TRIPPLITE_USB" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +tripplite_usb \- Driver for older Tripp Lite USB UPSes (not PDC HID) +.SH "SYNOPSIS" +.sp +\fBtripplite_usb\fR \-h +.sp +\fBtripplite_usb\fR \-a \fIUPS_NAME\fR [\fIOPTIONS\fR] +.SH "SUPPORTED HARDWARE" +.sp +This driver should work with older Tripp Lite UPSes which are detected as USB HID\-class devices, but are not true HID Power\-Device Class devices\&. So far, the devices supported by tripplite_usb have product ID 0001, and the newer units (such as those with "LCD" in the model name) with product ID 2001 require the \fBusbhid-ups\fR(8) driver instead\&. Please report success or failure to the nut\-upsuser mailing list\&. A key piece of information is the protocol number, returned in ups\&.debug\&.0\&. Also, be sure to turn on debugging (\fI\-DDD\fR) for more informative log messages\&. If your Tripp Lite UPS uses a serial port, you may wish to investigate the \fBtripplite\fR(8) or \fBtripplite_su\fR(8) driver\&. +.sp +This driver has been tested with the following models: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +INTERNETOFFICE700 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +OMNIVS1000 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +OMNIVS1500XL (some warnings) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SMART700USB +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SMART1500RM2U +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SMART2200RMXL2U +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SMART3000RM2U +.RE +.sp +If you have used Tripp Lite\(cqs PowerAlert software to connect to your UPS, there is a good chance that \fItripplite_usb\fR will work if it uses one of the following protocols: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Protocol 0004 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Protocol 1001 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Protocol 2001 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Protocol 3003 +.RE +.sp +On the other hand, if the web page for your UPS on the Tripp\-Lite website says "HID\-compliant USB port also enables direct integration with built\-in power management and auto\-shutdown features of Windows and MAC OS X", then you should use the \fBusbhid-ups\fR(8) driver instead\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5) file (or with \fI\-x\fR on the command line): +.PP +\fBoffdelay\fR +.RS 4 +This setting controls the delay between receiving the "kill" command (\fI\-k\fR) and actually cutting power to the computer\&. +.RE +.PP +\fBbus\fR +.RS 4 +This regular expression is used to match the USB bus (as seen in +/proc/bus/usb/devices +or lsusb(8); including leading zeroes)\&. +.RE +.PP +\fBproduct\fR +.RS 4 +A regular expression to match the product string for the UPS\&. This would be useful if you have two different Tripp Lite UPS models connected to the system, and you want to be sure that you shut them down in the correct order\&. +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +This regex is matched against the full USB product string as seen in lsusb(8)\&. The ups\&.model in the \fBupsc\fR(1) output only lists the name after TRIPP LITE, so to match a SMART2200RMXL2U, you could use the regex \&.*SMART2200\&.*\&. +.sp .5v +.RE +.PP +\fBproductid\fR +.RS 4 +The productid is a regular expression which matches the UPS PID as four hexadecimal digits\&. So far, the only devices that work with this driver have PID +0001\&. +.RE +.PP +\fBserial\fR +.RS 4 +It does not appear that these particular Tripp Lite UPSes use the +iSerial +descriptor field to return a serial number\&. However, in case your unit does, you may specify it here\&. +.RE +.sp +For more information on regular expressions, see regex(7) +.SH "RUNTIME VARIABLES" +.PP +\fBups\&.delay\&.shutdown\fR +.RS 4 +This variable is the same as the +\fIoffdelay\fR +setting, but it can be changed at runtime by +\fBupsrw\fR(8)\&. +.RE +.PP +\fBups\&.id\fR +.RS 4 +Some SMARTPRO models feature an ID that can be set and retrieved\&. If your UPS supports this feature, this variable will be listed in the output of +\fBupsrw\fR(8)\&. +.RE +.PP +\fBoutlet\&.1\&.switch\fR +.RS 4 +Some Tripp Lite units have a switchable outlet (usually outlet #1) which can be turned on and off by writing +\fI1\fR +or +\fI0\fR, respectively, to +outlet\&.1\&.switch +with +\fBupsrw\fR(8)\&. If your unit has multiple switchable outlets, substitute the outlet number for +\fI1\fR +in the variable name\&. Be sure to test this first \- there is no other way to be certain that the number used by the driver matches the label on the unit\&. +.RE +.SH "KNOWN ISSUES AND BUGS" +.sp +The driver was not developed with any official documentation from Tripp Lite, so certain events may confuse the driver\&. If you observe any strange behavior, please re\-run the driver with \-DDD to increase the verbosity\&. +.sp +So far, the Tripp Lite UPSes do not seem to have a serial number or other globally unique identifier accessible through USB\&. Thus, when monitoring several Tripp Lite USB UPSes, you should use either the \fIbus\fR or \fIproduct\fR configuration options to uniquely specify which UPS a given driver instance should control\&. +.sp +For instance, you can easily monitor an OMNIVS1000 and a SMART1500RM2U at the same time, since they have different USB Product ID strings\&. If you have two SMART1500RM2U units, you would have to find which USB bus number each unit is on (via lsusb(8)), which may result in ambiguities if the available USB ports are on the same bus\&. +.sp +Some of the SMART*2U models have an ID number, but because this ID is not exposed as a USB string descriptor, there is no easy way to use this ID to distinguish between multiple UPS units on a single machine\&. The UPS would need to be claimed by the driver in order to read this ID\&. +.SH "AUTHOR" +.sp +Written by Charles Lepple, based on the \fBtripplite\fR(8) driver by Rickard E\&. (Rik) Faith and Nicholas Kain\&. Please do not email the authors directly \- use the nut\-upsdev mailing list\&. +.sp +A Tripp Lite OMNIVS1000 was graciously donated to the NUT project by Bradley Feldman (http://www\&.bradleyloritheo\&.com) +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Other drivers for Tripp\-Lite hardware:" +.sp +\fBtripplite\fR(8), \fBtripplitesu\fR(8), \fBusbhid-ups\fR(8) +.SS "Other tools:" +.sp +regex(7), lsusb(8) +.SH "INTERNET RESOURCES" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/tripplite_usb.txt b/docs/man/tripplite_usb.txt new file mode 100644 index 0000000..9e4e59e --- /dev/null +++ b/docs/man/tripplite_usb.txt @@ -0,0 +1,168 @@ +TRIPPLITE_USB(8) +================ + + +NAME +---- +tripplite_usb - Driver for older Tripp Lite USB UPSes (not PDC HID) + +SYNOPSIS +-------- +*tripplite_usb* -h + +*tripplite_usb* -a 'UPS_NAME' ['OPTIONS'] + +SUPPORTED HARDWARE +------------------ +This driver should work with older Tripp Lite UPSes which are detected as USB +HID-class devices, but are not true HID Power-Device Class devices. So far, +the devices supported by tripplite_usb have product ID 0001, and the newer +units (such as those with "LCD" in the model name) with product ID 2001 require +the linkman:usbhid-ups[8] driver instead. Please report success or failure to +the nut-upsuser mailing list. A key piece of information is the protocol +number, returned in `ups.debug.0`. Also, be sure to turn on debugging ('-DDD') +for more informative log messages. If your Tripp Lite UPS uses a serial port, +you may wish to investigate the linkman:tripplite[8] or linkman:tripplite_su[8] +driver. + +This driver has been tested with the following models: + + * INTERNETOFFICE700 + * OMNIVS1000 + * OMNIVS1500XL (some warnings) + * SMART700USB + * SMART1500RM2U + * SMART2200RMXL2U + * SMART3000RM2U + +If you have used Tripp Lite's PowerAlert software to connect to your UPS, there +is a good chance that 'tripplite_usb' will work if it uses one of the +following protocols: + + * Protocol 0004 + * Protocol 1001 + * Protocol 2001 + * Protocol 3003 + +On the other hand, if the web page for your UPS on the Tripp-Lite website says +"HID-compliant USB port also enables direct integration with built-in power +management and auto-shutdown features of Windows and MAC OS X", then you should +use the linkman:usbhid-ups[8] driver instead. + +EXTRA ARGUMENTS +--------------- + +This driver supports the following optional settings in the linkman:ups.conf[5] +file (or with '-x' on the command line): + +*offdelay*:: + +This setting controls the delay between receiving the "kill" command ('-k') +and actually cutting power to the computer. + +*bus*:: + +This regular expression is used to match the USB bus (as seen in +`/proc/bus/usb/devices` or lsusb(8); including leading zeroes). + +*product*:: + +A regular expression to match the product string for the UPS. This would be +useful if you have two different Tripp Lite UPS models connected to the +system, and you want to be sure that you shut them down in the correct order. + +NOTE: This regex is matched against the full USB product string as seen in +lsusb(8). The `ups.model` in the linkman:upsc[1] output only lists the name after +`TRIPP LITE`, so to match a SMART2200RMXL2U, you could use the regex +`.*SMART2200.*`. + +*productid*:: + +The productid is a regular expression which matches the UPS PID as four +hexadecimal digits. So far, the only devices that work with this driver have +PID `0001`. + +*serial*:: + +It does not appear that these particular Tripp Lite UPSes use the `iSerial` +descriptor field to return a serial number. However, in case your unit does, +you may specify it here. + +For more information on regular expressions, see regex(7) + +RUNTIME VARIABLES +----------------- + +*ups.delay.shutdown*:: + +This variable is the same as the 'offdelay' setting, but it can be changed at +runtime by linkman:upsrw[8]. + +*ups.id*:: + +Some SMARTPRO models feature an ID that can be set and retrieved. If your UPS +supports this feature, this variable will be listed in the output of linkman:upsrw[8]. + +*outlet.1.switch*:: + +Some Tripp Lite units have a switchable outlet (usually outlet #1) which can be +turned on and off by writing '1' or '0', respectively, to `outlet.1.switch` +with linkman:upsrw[8]. +If your unit has multiple switchable outlets, substitute the outlet number for +'1' in the variable name. Be sure to test this first - there is no other way to +be certain that the number used by the driver matches the label on the unit. + +KNOWN ISSUES AND BUGS +--------------------- + +The driver was not developed with any official documentation from Tripp Lite, +so certain events may confuse the driver. If you observe any strange behavior, +please re-run the driver with `-DDD` to increase the verbosity. + +So far, the Tripp Lite UPSes do not seem to have a serial number or other +globally unique identifier accessible through USB. Thus, when monitoring +several Tripp Lite USB UPSes, you should use either the 'bus' or 'product' +configuration options to uniquely specify which UPS a given driver instance +should control. + +For instance, you can easily monitor an OMNIVS1000 and a SMART1500RM2U at the +same time, since they have different USB Product ID strings. If you have two +SMART1500RM2U units, you would have to find which USB bus number each unit is +on (via lsusb(8)), which may result in ambiguities if the available USB ports +are on the same bus. + +Some of the SMART*2U models have an ID number, but because this ID is not +exposed as a USB string descriptor, there is no easy way to use this ID to +distinguish between multiple UPS units on a single machine. The UPS would need +to be claimed by the driver in order to read this ID. + +AUTHOR +------ +Written by Charles Lepple, based on the linkman:tripplite[8] driver by Rickard E. (Rik) +Faith and Nicholas Kain. Please do not email the authors directly - use the +nut-upsdev mailing list. + +A Tripp Lite OMNIVS1000 was graciously donated to the NUT project by Bradley +Feldman (http://www.bradleyloritheo.com) + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Other drivers for Tripp-Lite hardware: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +linkman:tripplite[8], linkman:tripplitesu[8], linkman:usbhid-ups[8] + +Other tools: +~~~~~~~~~~~~ +regex(7), lsusb(8) + + +INTERNET RESOURCES +------------------ + +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + diff --git a/docs/man/tripplitesu.8 b/docs/man/tripplitesu.8 new file mode 100644 index 0000000..9857093 --- /dev/null +++ b/docs/man/tripplitesu.8 @@ -0,0 +1,59 @@ +'\" t +.\" Title: tripplitesu +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "TRIPPLITESU" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +tripplitesu \- Driver for Tripp\-Lite SmartOnline (SU) UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the tripplitesu driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports the Tripp Lite SmartOnline family (via the serial port)\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBlowbatt\fR=\fInum\fR +.RS 4 +Set the low battery warning threshold in percent at which shutdown is initiated by +\fBupsmon\fR(8)\&. By default, the UPS may not report low battery until there are only a few seconds left\&. Common values are around 25\(em30\&. +.RE +.SH "AUTHOR" +.sp +Allan N\&. Hessenflow +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Other drivers for Tripp\-Lite hardware:" +.sp +\fBtripplite\fR(8), \fBtripplite_usb\fR(8), \fBusbhid-ups\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/tripplitesu.txt b/docs/man/tripplitesu.txt new file mode 100644 index 0000000..6416699 --- /dev/null +++ b/docs/man/tripplitesu.txt @@ -0,0 +1,45 @@ +TRIPPLITESU(8) +============== + +NAME +---- +tripplitesu - Driver for Tripp-Lite SmartOnline (SU) UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +tripplitesu driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports the Tripp Lite SmartOnline family (via the serial port). + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in the +linkman:ups.conf[5]: + +*lowbatt*='num':: +Set the low battery warning threshold in percent at which shutdown is +initiated by linkman:upsmon[8]. By default, the UPS may not report low battery +until there are only a few seconds left. Common values are around 25--30. + +AUTHOR +------ +Allan N. Hessenflow + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Other drivers for Tripp-Lite hardware: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +linkman:tripplite[8], linkman:tripplite_usb[8], linkman:usbhid-ups[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/ups.conf.5 b/docs/man/ups.conf.5 new file mode 100644 index 0000000..e120145 --- /dev/null +++ b/docs/man/ups.conf.5 @@ -0,0 +1,155 @@ +'\" t +.\" Title: ups.conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPS\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ups.conf \- UPS definitions for Network UPS Tools +.SH "DESCRIPTION" +.sp +This file is read by the driver controller \fBupsdrvctl\fR(8), the UPS drivers that use the common core (see \fBnutupsdrv\fR(8), and \fBupsd\fR(8))\&. The file begins with global directives, and then each UPS has a section which contains a number of directives that set parameters for that UPS\&. +.sp +A UPS section begins with the name of the UPS in brackets, and continues until the next UPS name in brackets or until EOF\&. The name "default" is used internally in upsd, so you can\(cqt use it in this file\&. +.sp +You must define the \fIdriver\fR and \fIport\fR elements for each entry\&. Anything after that in a section is optional\&. A simple example might look like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[myups] + driver = blazer_ser + port = /dev/ttyS0 + desc = "Web server UPS" +.fi +.if n \{\ +.RE +.\} +.sp +A slightly more complicated version includes some extras for the hardware\-specific part of the driver: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[bigups] + driver = apcsmart + port = /dev/cua00 + cable = 940\-0095B + sdtype = 2 + desc = "Database server UPS" +.fi +.if n \{\ +.RE +.\} +.sp +In this case, the \fBapcsmart\fR(8) driver will receive variables called "cable" and "sdtype" which have special meanings\&. See the man pages of your driver(s) to learn which variables are supported and what they do\&. +.SH "GLOBAL DIRECTIVES" +.PP +\fBchroot\fR +.RS 4 +Optional\&. The driver will chroot(2) to this directory during initialization\&. This can be useful when securing systems\&. +.RE +.PP +\fBdriverpath\fR +.RS 4 +Optional\&. Path name of the directory in which the UPS driver executables reside\&. If you don\(cqt specify this, the programs look in a built\-in default directory, which is often /usr/local/ups/bin\&. +.RE +.PP +\fBmaxstartdelay\fR +.RS 4 +Optional\&. Same as the UPS field of the same name, but this is the default for UPSes that don\(cqt have the field\&. +.RE +.PP +\fBpollinterval\fR +.RS 4 +Optional\&. The status of the UPS will be refreshed after a maximum delay which is controlled by this setting\&. This is normally 2 seconds\&. This may be useful if the driver is creating too much of a load on your system or network\&. +.RE +.PP +\fBuser\fR +.RS 4 +Optional\&. If started as root, the driver will setuid(2) to the user id associated with +\fIusername\fR\&. +.RE +.SH "UPS FIELDS" +.PP +\fBdriver\fR +.RS 4 +Required\&. This specifies which program will be monitoring this UPS\&. You need to specify the one that is compatible with your hardware\&. See +\fBnutupsdrv\fR(8) +for more information on drivers in general and pointers to the man pages of specific drivers\&. +.RE +.PP +\fBport\fR +.RS 4 +Required\&. This is the serial port where the UPS is connected\&. On a Linux system, the first serial port usually is +\fI/dev/ttyS0\fR\&. On FreeBSD and similar systems, it probably will be +\fI/dev/cuaa0\fR\&. +.RE +.PP +\fBsdorder\fR +.RS 4 +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\&. +.sp +The default value for this parameter is 0\&. +.RE +.PP +\fBdesc\fR +.RS 4 +Optional\&. This allows you to set a brief description that upsd will provide to clients that ask for a list of connected equipment\&. +.RE +.PP +\fBnolock\fR +.RS 4 +Optional\&. When you specify this, the driver skips the port locking routines every time it starts\&. This may allow other processes to seize the port if you start more than one accidentally\&. +.sp +You should only use this if your system won\(cqt work without it\&. +.sp +This may be needed on Mac OS X systems\&. +.RE +.PP +\fBmaxstartdelay\fR +.RS 4 +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\&. +.sp +The default is 45 seconds\&. +.RE +.sp +All other fields are passed through to the hardware\-specific part of the driver\&. See those manuals for the list of what is allowed\&. +.SH "INTEGRATION" +.sp +\fBupsdrvctl\fR(8) uses this file to start and stop the drivers\&. +.sp +The drivers themselves also obtain configuration data from this file\&. Each driver looks up its section and uses that to configure itself\&. +.sp +\fBupsd\fR(8) learns about which UPSes are installed on this system by reading this file\&. If this system is called "doghouse" and you have defined a UPS in your \fBups\&.conf\fR called "snoopy", then you can monitor it from \fBupsc\fR(8) or similar as "snoopy@doghouse"\&. +.SH "SEE ALSO" +.sp +\fBupsd\fR(8), \fBnutupsdrv\fR(8), \fBupsdrvctl\fR(8) +.SS "Internet resources" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/ups.conf.txt b/docs/man/ups.conf.txt new file mode 100644 index 0000000..432b1f4 --- /dev/null +++ b/docs/man/ups.conf.txt @@ -0,0 +1,143 @@ +UPS.CONF(5) +=========== + +NAME +---- +ups.conf - UPS definitions for Network UPS Tools + +DESCRIPTION +----------- + +This file is read by the driver controller linkman:upsdrvctl[8], the UPS drivers +that use the common core (see linkman:nutupsdrv[8], and linkman:upsd[8]). The +file begins with global directives, and then each UPS has a section which +contains a number of directives that set parameters for that UPS. + +A UPS section begins with the name of the UPS in brackets, and continues +until the next UPS name in brackets or until EOF. The name "default" is +used internally in upsd, so you can't use it in this file. + +You must define the 'driver' and 'port' elements for each entry. Anything +after that in a section is optional. A simple example might look like this: + + [myups] + driver = blazer_ser + port = /dev/ttyS0 + desc = "Web server UPS" + +A slightly more complicated version includes some extras for the +hardware-specific part of the driver: + + [bigups] + driver = apcsmart + port = /dev/cua00 + cable = 940-0095B + sdtype = 2 + desc = "Database server UPS" + +In this case, the linkman:apcsmart[8] driver will receive variables called +"cable" and "sdtype" which have special meanings. See the man pages of +your driver(s) to learn which variables are supported and what they do. + +GLOBAL DIRECTIVES +----------------- + +*chroot*:: + +Optional. The driver will chroot(2) to this directory during initialization. +This can be useful when securing systems. + +*driverpath*:: + +Optional. Path name of the directory in which the UPS driver executables +reside. If you don't specify this, the programs look in a built-in default +directory, which is often /usr/local/ups/bin. + +*maxstartdelay*:: + +Optional. Same as the UPS field of the same name, but this is the +default for UPSes that don't have the field. + +*pollinterval*:: + +Optional. The status of the UPS will be refreshed after a maximum +delay which is controlled by this setting. This is normally 2 seconds. This +may be useful if the driver is creating too much of a load on your system or +network. + +*user*:: + +Optional. If started as root, the driver will setuid(2) to the user id +associated with 'username'. + +UPS FIELDS +---------- +*driver*:: + +Required. This specifies which program will be monitoring this UPS. You +need to specify the one that is compatible with your hardware. See +linkman:nutupsdrv[8] for more information on drivers in general and pointers to the +man pages of specific drivers. + +*port*:: + +Required. This is the serial port where the UPS is connected. On a Linux +system, the first serial port usually is '/dev/ttyS0'. On FreeBSD and +similar systems, it probably will be '/dev/cuaa0'. + +*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. + +*desc*:: + +Optional. This allows you to set a brief description that upsd will provide +to clients that ask for a list of connected equipment. + +*nolock*:: + +Optional. When you specify this, the driver skips the port locking routines +every time it starts. This may allow other processes to seize the port if +you start more than one accidentally. ++ +You should only use this if your system won't work without it. ++ +This may be needed on Mac OS X systems. + +*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. + +All other fields are passed through to the hardware-specific part of the +driver. See those manuals for the list of what is allowed. + +INTEGRATION +----------- + +linkman:upsdrvctl[8] uses this file to start and stop the drivers. + +The drivers themselves also obtain configuration data from this file. +Each driver looks up its section and uses that to configure itself. + +linkman:upsd[8] learns about which UPSes are installed on this system by +reading this file. If this system is called "doghouse" and you have +defined a UPS in your *ups.conf* called "snoopy", then you can monitor it +from linkman:upsc[8] or similar as "snoopy@doghouse". + +SEE ALSO +-------- +linkman:upsd[8], linkman:nutupsdrv[8], linkman:upsdrvctl[8] + +Internet resources +~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsc.8 b/docs/man/upsc.8 new file mode 100644 index 0000000..59828f0 --- /dev/null +++ b/docs/man/upsc.8 @@ -0,0 +1,120 @@ +'\" t +.\" Title: upsc +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSC" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsc \- example lightweight UPS client +.SH "SYNOPSIS" +.sp +\fBupsc\fR \-l | \-L [\fIhost\fR] +.sp +\fBupsc\fR \fIups\fR [\fIvariable\fR] +.SH "DESCRIPTION" +.sp +\fBupsc\fR is provided as a quick way to poll the status of a UPS server\&. It can be used inside shell scripts and other programs that need UPS data but don\(cqt want to include the full interface\&. +.SH "OPTIONS" +.PP +\fB\-l\fR \fIhost\fR +.RS 4 +List all UPS names configured at +\fIhost\fR, one name per line\&. The hostname defaults to "localhost"\&. You may optionally add a colon and a port number\&. +.RE +.PP +\fB\-L\fR \fIhost\fR +.RS 4 +As above, list all UPS names configured at +\fIhost\fR, including their description provided by the remote upsd(8) from ups\&.conf(5)\&. The hostname defaults to "localhost"\&. You may optionally add a colon and a port number to override the default port\&. +.RE +.PP +\fIups\fR +.RS 4 +Display the status of that UPS\&. The format for this option is +\fIupsname[@hostname[:port]]\fR\&. The default hostname is "localhost"\&. +.RE +.PP +\fIvariable\fR +.RS 4 +Display the value of this variable only\&. By default, upsc retrieves the list of variables from the server and then displays the value for each\&. This may be useful in shell scripts to save an additional pipe into grep\&. +.RE +.SH "EXAMPLES" +.sp +To list all variables on an UPS named "myups" on a host called "mybox", with upsd(8) running on port 1234: +.sp +.if n \{\ +.RS 4 +.\} +.nf +$ upsc myups@mybox:1234 +battery\&.charge: 100\&.0 +battery\&.voltage: 13\&.9 +battery\&.voltage\&.nominal: 13\&.6 +\&. \&. \&. +.fi +.if n \{\ +.RE +.\} +.sp +To list the UPSes configured on this system, along with their descriptions: +.sp +.if n \{\ +.RS 4 +.\} +.nf +$ upsc \-L +apc: Back\-UPS 500 +ppro2: Patriot Pro II +.fi +.if n \{\ +.RE +.\} +.sp +To retrieve the status for all UPSes connected to mybox, using Bourne\-shell syntax: +.sp +.if n \{\ +.RS 4 +.\} +.nf +$ for UPS in `upsc \-l mybox:1234`; do + upsc $UPS ups\&.status +done +.fi +.if n \{\ +.RE +.\} +.SH "DIAGNOSTICS" +.sp +upsc will either print a list of UPS names, a list of all supported variables and their values on the UPS, or an error message\&. If you receive an error, make sure you have specified a valid UPS on the command line, that \fBupsd\fR(8) is really running on the other host and that no firewalls are blocking you\&. +.SH "HISTORY" +.sp +Earlier versions of this program used the \fIupsfetch\fR library and UDP sockets to talk to upsd\&. This version of upsc uses the new \fIupsclient\fR library, which only talks TCP\&. This is why \fIupsct\fR no longer exists\&. +.SH "SEE ALSO" +.sp +\fBupsd\fR(8) +.SH "INTERNET RESOURCES" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsc.txt b/docs/man/upsc.txt new file mode 100644 index 0000000..74c96a9 --- /dev/null +++ b/docs/man/upsc.txt @@ -0,0 +1,96 @@ +UPSC(8) +======= + + +NAME +---- +upsc - example lightweight UPS client + +SYNOPSIS +-------- +*upsc* -l | -L ['host'] + +*upsc* 'ups' ['variable'] + +DESCRIPTION +----------- + +*upsc* is provided as a quick way to poll the status of a UPS server. It can +be used inside shell scripts and other programs that need UPS data but don't +want to include the full interface. + +OPTIONS +------- +*-l* 'host':: + + List all UPS names configured at 'host', one name per line. The hostname + defaults to "localhost". You may optionally add a colon and a port number. + +*-L* 'host':: + + As above, list all UPS names configured at 'host', including their description + provided by the remote upsd(8) from ups.conf(5). The hostname defaults to + "localhost". You may optionally add a colon and a port number to override the + default port. + +'ups':: + + Display the status of that UPS. The format for this option is + 'upsname[@hostname[:port]]'. The default hostname is "localhost". + +'variable':: + + Display the value of this variable only. By default, upsc retrieves the list + of variables from the server and then displays the value for each. This may + be useful in shell scripts to save an additional pipe into grep. + +EXAMPLES +-------- + +To list all variables on an UPS named "myups" on a host +called "mybox", with upsd(8) running on port 1234: + + $ upsc myups@mybox:1234 + battery.charge: 100.0 + battery.voltage: 13.9 + battery.voltage.nominal: 13.6 + . . . + +To list the UPSes configured on this system, along with their descriptions: + + $ upsc -L + apc: Back-UPS 500 + ppro2: Patriot Pro II + +To retrieve the status for all UPSes connected to mybox, using Bourne-shell +syntax: + + $ for UPS in `upsc -l mybox:1234`; do + upsc $UPS ups.status + done + +DIAGNOSTICS +----------- + +upsc will either print a list of UPS names, a list of all supported variables +and their values on the UPS, or an error message. If you receive an error, +make sure you have specified a valid UPS on the command line, that +linkman:upsd[8] is really running on the other host and that no firewalls are +blocking you. + +HISTORY +------- + +Earlier versions of this program used the 'upsfetch' library and UDP sockets to +talk to upsd. This version of upsc uses the new 'upsclient' library, which +only talks TCP. This is why 'upsct' no longer exists. + +SEE ALSO +-------- + +linkman:upsd[8] + +INTERNET RESOURCES +------------------ + +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upscli_connect.3 b/docs/man/upscli_connect.3 new file mode 100644 index 0000000..7ad7b85 --- /dev/null +++ b/docs/man/upscli_connect.3 @@ -0,0 +1,55 @@ +'\" t +.\" Title: upscli_connect +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_CONNECT" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_connect \- Open a connection to a NUT upsd +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_connect()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure and opens a TCP connection to the \fIhost\fR on the given \fIport\fR\&. +.sp +\fIflags\fR may be either UPSCLI_CONN_TRYSSL to try a SSL connection, or UPSCLI_CONN_REQSSL to require a SSL connection\&. +.sp +If SSL mode is required, this function will only return successfully if it is able to establish a SSL connection with the server\&. Possible reasons for failure include no SSL support on the server, and if \fBupsclient\fR itself hasn\(cqt been compiled with SSL support\&. +.sp +You must call \fBupscli_disconnect\fR(3) when finished with a connection, or your program will slowly leak memory and file descriptors\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_connect()\fR function modifies the UPSCONN_t structure and returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_disconnect\fR(3), \fBupscli_fd\fR(3), \fBupscli_splitaddr\fR(3), \fBupscli_splitname\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_connect.txt b/docs/man/upscli_connect.txt new file mode 100644 index 0000000..d493dd0 --- /dev/null +++ b/docs/man/upscli_connect.txt @@ -0,0 +1,45 @@ +UPSCLI_CONNECT(3) +================= + +NAME +---- + +upscli_connect - Open a connection to a NUT upsd + +SYNOPSIS +-------- + + #include + + int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags); + +DESCRIPTION +----------- +The *upscli_connect()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure and opens a TCP connection to the 'host' on +the given 'port'. + +'flags' may be either `UPSCLI_CONN_TRYSSL` to try a SSL +connection, or `UPSCLI_CONN_REQSSL` to require a SSL connection. + +If SSL mode is required, this function will only return successfully if +it is able to establish a SSL connection with the server. Possible +reasons for failure include no SSL support on the server, and if +*upsclient* itself hasn't been compiled with SSL support. + +You must call linkman:upscli_disconnect[3] when finished with a +connection, or your program will slowly leak memory and file +descriptors. + +RETURN VALUE +------------ + +The *upscli_connect()* function modifies the `UPSCONN_t` structure and +returns 0 on success, or -1 if an error occurs. + +SEE ALSO +-------- +linkman:upscli_disconnect[3], linkman:upscli_fd[3], +linkman:upscli_splitaddr[3], linkman:upscli_splitname[3], +linkman:upscli_ssl[3], linkman:upscli_strerror[3], +linkman:upscli_upserror[3] diff --git a/docs/man/upscli_disconnect.3 b/docs/man/upscli_disconnect.3 new file mode 100644 index 0000000..e745421 --- /dev/null +++ b/docs/man/upscli_disconnect.3 @@ -0,0 +1,51 @@ +'\" t +.\" Title: upscli_disconnect +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_DISCONNECT" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_disconnect \- disconnect from a UPS server +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_disconnect(UPSCONN_t *ups); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_disconnect()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure, shuts down the connection to the server, and frees dynamic memory used by the state structure\&. The UPSCONN_t structure is no longer valid after this function is called\&. +.sp +This function must be called, or your program will leak memory and file descriptors\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_disconnect()\fR function returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_connect\fR(3), \fBupscli_fd\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_disconnect.txt b/docs/man/upscli_disconnect.txt new file mode 100644 index 0000000..8c7d5ca --- /dev/null +++ b/docs/man/upscli_disconnect.txt @@ -0,0 +1,35 @@ +UPSCLI_DISCONNECT(3) +==================== + +NAME +---- + +upscli_disconnect - disconnect from a UPS server + +SYNOPSIS +-------- + + #include + + int upscli_disconnect(UPSCONN_t *ups); + +DESCRIPTION +----------- +The *upscli_disconnect()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure, shuts down the connection to the server, and +frees dynamic memory used by the state structure. The `UPSCONN_t` structure +is no longer valid after this function is called. + +This function must be called, or your program will leak memory and +file descriptors. + +RETURN VALUE +------------ + +The *upscli_disconnect()* function returns 0 on success, or -1 if an +error occurs. + +SEE ALSO +-------- +linkman:upscli_connect[3], linkman:upscli_fd[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_fd.3 b/docs/man/upscli_fd.3 new file mode 100644 index 0000000..c243aa1 --- /dev/null +++ b/docs/man/upscli_fd.3 @@ -0,0 +1,51 @@ +'\" t +.\" Title: upscli_fd +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_FD" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_fd \- Get file descriptor for connection +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_fd(UPSCONN_t *ups); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_fd()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure and returns the value of the file descriptor for that connection, if any\&. +.sp +This may be useful for determining if the connection to \fBupsd\fR(8) has been lost\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_fd()\fR function returns the file descriptor, which may be any non\-negative number\&. It returns \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_connect\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_fd.txt b/docs/man/upscli_fd.txt new file mode 100644 index 0000000..c42b098 --- /dev/null +++ b/docs/man/upscli_fd.txt @@ -0,0 +1,35 @@ +UPSCLI_FD(3) +============ + +NAME +---- + +upscli_fd - Get file descriptor for connection + +SYNOPSIS +-------- + + #include + + int upscli_fd(UPSCONN_t *ups); + +DESCRIPTION +----------- + +The *upscli_fd()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure and returns the value of the file descriptor +for that connection, if any. + +This may be useful for determining if the connection to linkman:upsd[8] +has been lost. + +RETURN VALUE +------------ + +The *upscli_fd()* function returns the file descriptor, which +may be any non-negative number. It returns -1 if an error occurs. + +SEE ALSO +-------- + +linkman:upscli_connect[3], linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_get.3 b/docs/man/upscli_get.3 new file mode 100644 index 0000000..ec72a15 --- /dev/null +++ b/docs/man/upscli_get.3 @@ -0,0 +1,179 @@ +'\" t +.\" Title: upscli_get +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_GET" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_get \- retrieve data from a UPS +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_get(UPSCONN_t *ups, int numq, const char **query, + int *numa, char ***answer) +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_get()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure, and the pointer \fIquery\fR to an array of \fInumq\fR query elements\&. It builds a properly\-formatted request from those elements and transmits it to \fBupsd\fR(8)\&. +.sp +Upon success, the response will be split into separate components\&. A pointer to those components will be returned in \fIanswer\fR\&. The number of usable answer components will be returned in \fInuma\fR\&. +.SH "USES" +.sp +This function implements the "GET" command in the protocol\&. As a result, you can use it to request many different things from the server\&. Some examples are: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +GET NUMLOGINS +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +GET UPSDESC +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +GET VAR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +GET TYPE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +GET DESC +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +GET CMDDESC +.RE +.SH "QUERY FORMATTING" +.sp +To generate a request for GET NUMLOGINS su700, you would populate query and numq as follows: +.sp +.if n \{\ +.RS 4 +.\} +.nf +int numq; +const char *query[2]; +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +query[0] = "NUMLOGINS"; +query[1] = "su700"; +numq = 2; +.fi +.if n \{\ +.RE +.\} +.sp +All escaping of special characters and quoting of elements with spaces is handled for you inside this function\&. +.SH "ANSWER FORMATTING" +.sp +The raw response from upsd to the above query would be NUMLOGINS su700 1\&. Since this is split up for you, the values work out like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +numa = 3; +answer[0] = "NUMLOGINS" +answer[1] = "su700" +answer[2] = "1" +.fi +.if n \{\ +.RE +.\} +.sp +Notice that the value which you seek typically starts at answer[numq]\&. +.SH "ERROR CHECKING" +.sp +This function will check your query against the response from \fBupsd\fR(8)\&. For example, if you send "VAR" "su700" "ups\&.status", it will expect to see those at the beginning of the response\&. +.sp +If the results from \fBupsd\fR do not pass this case\-insensitive test against your request, this function will return an error\&. When this happens, \fBupscli_upserror\fR(3) will return \fIUPSCLI_ERR_PROTOCOL\fR\&. +.SH "ANSWER ARRAY LIFETIME" +.sp +The pointers contained within the \fIanswer\fR array are only valid until the next call to a \fIupsclient\fR function which references them\&. If you need to use data from multiple calls, you must copy it somewhere else first\&. +.sp +The \fIanswer\fR array and its elements may change locations, so you must not rely on previous addresses\&. You must only use the addresses which were returned by the most recent call\&. You also must not attempt to use more than \fInuma\fR elements in \fIanswer\fR\&. Such behavior is undefined, and may yield bogus data or a crash\&. +.sp +The array will be deleted after calling \fBupscli_disconnect\fR(3)\&. Any access after that point is also undefined\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_get()\fR function returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_list_start\fR(3), \fBupscli_list_next\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_get.txt b/docs/man/upscli_get.txt new file mode 100644 index 0000000..00aea76 --- /dev/null +++ b/docs/man/upscli_get.txt @@ -0,0 +1,102 @@ +UPSCLI_GET(3) +============= + +NAME +---- +upscli_get - retrieve data from a UPS + +SYNOPSIS +-------- + + #include + + int upscli_get(UPSCONN_t *ups, int numq, const char **query, + int *numa, char ***answer) + +DESCRIPTION +----------- +The *upscli_get()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure, and the pointer 'query' to an array of +'numq' query elements. It builds a properly-formatted request from +those elements and transmits it to linkman:upsd[8]. + +Upon success, the response will be split into separate components. A +pointer to those components will be returned in 'answer'. The +number of usable answer components will be returned in 'numa'. + +USES +---- + +This function implements the "GET" command in the protocol. As a +result, you can use it to request many different things from the server. +Some examples are: + + * GET NUMLOGINS + * GET UPSDESC + * GET VAR + * GET TYPE + * GET DESC + * GET CMDDESC + +QUERY FORMATTING +---------------- +To generate a request for `GET NUMLOGINS su700`, you would populate +query and numq as follows: + + int numq; + const char *query[2]; + + query[0] = "NUMLOGINS"; + query[1] = "su700"; + numq = 2; + +All escaping of special characters and quoting of elements with spaces +is handled for you inside this function. + +ANSWER FORMATTING +----------------- +The raw response from upsd to the above query would be `NUMLOGINS su700 1`. +Since this is split up for you, the values work out like this: + + numa = 3; + answer[0] = "NUMLOGINS" + answer[1] = "su700" + answer[2] = "1" + +Notice that the value which you seek typically starts at answer[numq]. + +ERROR CHECKING +-------------- +This function will check your query against the response from +linkman:upsd[8]. For example, if you send "VAR" "su700" "ups.status", it +will expect to see those at the beginning of the response. + +If the results from *upsd* do not pass this case-insensitive test +against your request, this function will return an error. When this +happens, linkman:upscli_upserror[3] will return 'UPSCLI_ERR_PROTOCOL'. + +ANSWER ARRAY LIFETIME +--------------------- +The pointers contained within the 'answer' array are only valid +until the next call to a 'upsclient' function which references them. +If you need to use data from multiple calls, you must copy it somewhere +else first. + +The 'answer' array and its elements may change locations, so you +must not rely on previous addresses. You must only use the addresses +which were returned by the most recent call. You also must not attempt +to use more than 'numa' elements in 'answer'. Such behavior is +undefined, and may yield bogus data or a crash. + +The array will be deleted after calling linkman:upscli_disconnect[3]. Any +access after that point is also undefined. + +RETURN VALUE +------------ +The *upscli_get()* function returns 0 on success, or -1 if an +error occurs. + +SEE ALSO +-------- +linkman:upscli_list_start[3], linkman:upscli_list_next[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_list_next.3 b/docs/man/upscli_list_next.3 new file mode 100644 index 0000000..acbb024 --- /dev/null +++ b/docs/man/upscli_list_next.3 @@ -0,0 +1,69 @@ +'\" t +.\" Title: upscli_list_next +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_LIST_NEXT" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_list_next \- retrieve list items from a UPS +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_list_next(UPSCONN_t *ups, int numq, const char **query, + int *numa, char ***answer) +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_list_next()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure, and the pointer \fIquery\fR to an array of \fInumq\fR query elements\&. It performs a read from the network and expects to find either another list item or the end of a list\&. +.sp +You must call \fBupscli_list_start\fR(3) before calling this function\&. +.sp +This function will return 1 and set values in \fInuma\fR and \fIanswer\fR if a list item is received\&. If the list is done, it will return 0, and the values in \fInuma\fR and \fIanswer\fR are undefined\&. +.sp +Calling this function after it returns something other than 1 is undefined\&. +.SH "QUERY FORMATTING" +.sp +You may not change the values of \fInumq\fR or \fIquery\fR between the call to \fBupscli_list_start\fR(3) and the first call to this function\&. You also may not change the values between calls to this function\&. +.SH "ANSWER FORMATTING" +.sp +The contents of \fInuma\fR and \fIanswer\fR work just like a call to \fBupscli_get\fR(3)\&. The values returned by \fBupsd\fR(8) are identical to a single item request, so this is not surprising\&. +.SH "ERROR CHECKING" +.sp +This function checks the response from \fBupsd\fR(8) against your query\&. If the response is not part of the list you have requested, it will return an error code\&. +.sp +When this happens, \fBupscli_upserror\fR(3) will return UPSCLI_ERR_PROTOCOL\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_list_next()\fR function returns 1 when list data is present, 0 if the list is finished, or \-1 if an error occurs\&. +.sp +It is possible to have an empty list\&. The function will return 0 for its first call in that case\&. +.SH "SEE ALSO" +.sp +\fBupscli_list_start\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_list_next.txt b/docs/man/upscli_list_next.txt new file mode 100644 index 0000000..30fc7b3 --- /dev/null +++ b/docs/man/upscli_list_next.txt @@ -0,0 +1,70 @@ +UPSCLI_LIST_NEXT(3) +=================== + +NAME +---- + +upscli_list_next - retrieve list items from a UPS + +SYNOPSIS +-------- + + #include + + int upscli_list_next(UPSCONN_t *ups, int numq, const char **query, + int *numa, char ***answer) + +DESCRIPTION +----------- + +The *upscli_list_next()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure, and the pointer 'query' to an array of +'numq' query elements. It performs a read from the network and +expects to find either another list item or the end of a list. + +You must call linkman:upscli_list_start[3] before calling this function. + +This function will return 1 and set values in 'numa' and +'answer' if a list item is received. If the list is done, it will +return 0, and the values in 'numa' and 'answer' are undefined. + +Calling this function after it returns something other than 1 is +undefined. + +QUERY FORMATTING +---------------- + +You may not change the values of 'numq' or 'query' between the +call to linkman:upscli_list_start[3] and the first call to this function. +You also may not change the values between calls to this function. + +ANSWER FORMATTING +----------------- + +The contents of 'numa' and 'answer' work just like a call to +linkman:upscli_get[3]. The values returned by linkman:upsd[8] are identical to +a single item request, so this is not surprising. + +ERROR CHECKING +-------------- + +This function checks the response from linkman:upsd[8] against your query. +If the response is not part of the list you have requested, it will +return an error code. + +When this happens, linkman:upscli_upserror[3] will return +`UPSCLI_ERR_PROTOCOL`. + +RETURN VALUE +------------ + +The *upscli_list_next()* function returns 1 when list data is +present, 0 if the list is finished, or -1 if an error occurs. + +It is possible to have an empty list. The function will return 0 for +its first call in that case. + +SEE ALSO +-------- +linkman:upscli_list_start[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_list_start.3 b/docs/man/upscli_list_start.3 new file mode 100644 index 0000000..aec5052 --- /dev/null +++ b/docs/man/upscli_list_start.3 @@ -0,0 +1,139 @@ +'\" t +.\" Title: upscli_list_start +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_LIST_START" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_list_start \- begin multi\-item retrieval from a UPS +.SH "SYNOPSIS" +.sp +.nf +#include +int upscli_list_start(UPSCONN_t *ups, int numq, const char **query) +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_list_start()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure, and the pointer \fIquery\fR to an array of \fInumq\fR query elements\&. It builds a properly\-formatted request from those elements and transmits it to \fBupsd\fR(8)\&. +.sp +Upon success, the caller must call \fBupscli_list_next\fR(3) to retrieve the elements of the list\&. Failure to retrieve the list will most likely result in the client getting out of sync with the server due to buffered data\&. +.SH "USES" +.sp +This function implements the "LIST" command in the protocol\&. As a result, you can use it to request many different things from the server\&. Some examples are: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +LIST UPS +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +LIST VAR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +LIST RW +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +LIST CMD +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +LIST ENUM +.RE +.SH "QUERY FORMATTING" +.sp +To see the list of variables on a UPS called \fIsu700\fR, the protocol command would be LIST VAR su700\&. To start that list with this function, you would populate query and numq as follows: +.sp +.if n \{\ +.RS 4 +.\} +.nf +int numq; +const char *query[2]; +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +query[0] = "VAR"; +query[1] = "su700"; +numq = 2; +.fi +.if n \{\ +.RE +.\} +.sp +All escaping of special characters and quoting of elements with spaces are handled for you inside this function\&. +.SH "ERROR CHECKING" +.sp +This function checks the response from \fBupsd\fR(8) against your query\&. If it is not starting a list, or is starting the wrong type of list, it will return an error code\&. +.sp +When this happens, \fBupscli_upserror\fR(3) will return UPSCLI_ERR_PROTOCOL\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_list_start()\fR function returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_list_start.txt b/docs/man/upscli_list_start.txt new file mode 100644 index 0000000..a017d9c --- /dev/null +++ b/docs/man/upscli_list_start.txt @@ -0,0 +1,80 @@ +UPSCLI_LIST_START(3) +==================== + +NAME +---- + +upscli_list_start - begin multi-item retrieval from a UPS + +SYNOPSIS +-------- + + #include + int upscli_list_start(UPSCONN_t *ups, int numq, const char **query) + +DESCRIPTION +----------- + +The *upscli_list_start()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure, and the pointer 'query' to an array of +'numq' query elements. It builds a properly-formatted request from +those elements and transmits it to linkman:upsd[8]. + +Upon success, the caller must call linkman:upscli_list_next[3] to retrieve +the elements of the list. Failure to retrieve the list will most likely +result in the client getting out of sync with the server due to buffered +data. + +USES +---- + +This function implements the "LIST" command in the protocol. As a +result, you can use it to request many different things from the server. +Some examples are: + + - LIST UPS + - LIST VAR + - LIST RW + - LIST CMD + - LIST ENUM + +QUERY FORMATTING +---------------- + +To see the list of variables on a UPS called 'su700', the protocol command +would be `LIST VAR su700`. To start that list with this function, you +would populate query and numq as follows: + + int numq; + const char *query[2]; + + query[0] = "VAR"; + query[1] = "su700"; + numq = 2; + +All escaping of special characters and quoting of elements with spaces +are handled for you inside this function. + +ERROR CHECKING +-------------- + +This function checks the response from linkman:upsd[8] against your query. +If it is not starting a list, or is starting the wrong type of list, it +will return an error code. + +When this happens, linkman:upscli_upserror[3] will return +`UPSCLI_ERR_PROTOCOL`. + +RETURN VALUE +------------ +The *upscli_list_start()* function returns 0 on success, or -1 if an +error occurs. + +SEE ALSO +-------- + +linkman:upscli_fd[3], linkman:upscli_get[3], +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_ssl[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] + diff --git a/docs/man/upscli_readline.3 b/docs/man/upscli_readline.3 new file mode 100644 index 0000000..226cd90 --- /dev/null +++ b/docs/man/upscli_readline.3 @@ -0,0 +1,51 @@ +'\" t +.\" Title: upscli_readline +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_READLINE" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_readline \- read a single response from a UPS +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_readline()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure, receives a single line from the server, and copies up to \fIbuflen\fR bytes of the response into the buffer \fIbuf\fR\&. +.sp +Some parsing of the string occurs during reception\&. In particular, ERR messages from \fBupsd\fR(8) are detected and will cause this function to return \-1\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_readline()\fR function returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_readline.txt b/docs/man/upscli_readline.txt new file mode 100644 index 0000000..52106ad --- /dev/null +++ b/docs/man/upscli_readline.txt @@ -0,0 +1,39 @@ +UPSCLI_READLINE(3) +================== + +NAME +---- + +upscli_readline - read a single response from a UPS + +SYNOPSIS +-------- + + #include + + int upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen); + +DESCRIPTION +----------- +The *upscli_readline()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure, receives a single line from the server, and +copies up to 'buflen' bytes of the response into the buffer +'buf'. + +Some parsing of the string occurs during reception. In particular, +ERR messages from linkman:upsd[8] are detected and will cause this +function to return -1. + +RETURN VALUE +------------ + +The *upscli_readline()* function returns 0 on success, or -1 if an +error occurs. + +SEE ALSO +-------- + +linkman:upscli_fd[3], linkman:upscli_get[3], +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_ssl[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_sendline.3 b/docs/man/upscli_sendline.3 new file mode 100644 index 0000000..5f3004f --- /dev/null +++ b/docs/man/upscli_sendline.3 @@ -0,0 +1,51 @@ +'\" t +.\" Title: upscli_sendline +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_SENDLINE" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_sendline \- send a single command to a UPS +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_sendline()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure and transmits a buffer \fIbuf\fR of size \fIbuflen\fR to the server\&. +.sp +The data in \fIbuf\fR must be a fully formatted protocol command as no parsing of the buffer occurs within this function\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_sendline()\fR function returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_sendline.txt b/docs/man/upscli_sendline.txt new file mode 100644 index 0000000..c449c6d --- /dev/null +++ b/docs/man/upscli_sendline.txt @@ -0,0 +1,39 @@ +UPSCLI_SENDLINE(3) +================== + +NAME +---- + +upscli_sendline - send a single command to a UPS + +SYNOPSIS +-------- + + + #include + + int upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen); + +DESCRIPTION +----------- + +The *upscli_sendline()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure and transmits a buffer 'buf' of size +'buflen' to the server. + +The data in 'buf' must be a fully formatted protocol command as no +parsing of the buffer occurs within this function. + +RETURN VALUE +------------ + +The *upscli_sendline()* function returns 0 on success, or -1 if an +error occurs. + +SEE ALSO +-------- + +linkman:upscli_fd[3], linkman:upscli_get[3], +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_ssl[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_splitaddr.3 b/docs/man/upscli_splitaddr.3 new file mode 100644 index 0000000..79145c6 --- /dev/null +++ b/docs/man/upscli_splitaddr.3 @@ -0,0 +1,68 @@ +'\" t +.\" Title: upscli_splitaddr +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_SPLITADDR" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_splitaddr \- split a listening address into its components +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_splitaddr(const char *buf, char **hostname, + int *port) +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_splitaddr()\fR function takes a pointer to the raw UPS definition \fIbuf\fR and returns pointers to dynamically allocated memory in \fIupsname\fR and \fIhostname\fR\&. It also copies the port number into \fIport\fR\&. +.SH "FORMATTING" +.sp +A listening address definition is specified according to this format: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[:] +.fi +.if n \{\ +.RE +.\} +.sp +Definitions without an explicit port value receive the default value of 3493\&. +.SH "MEMORY USAGE" +.sp +You must \fBfree\fR(3) the pointer \fIhostname\fR when you are done with it to avoid memory leaks\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_splitaddr()\fR function returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_splitname\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_splitaddr.txt b/docs/man/upscli_splitaddr.txt new file mode 100644 index 0000000..4633762 --- /dev/null +++ b/docs/man/upscli_splitaddr.txt @@ -0,0 +1,54 @@ +UPSCLI_SPLITADDR(3) +=================== + +NAME +---- + +upscli_splitaddr - split a listening address into its components + +SYNOPSIS +-------- + + + #include + + int upscli_splitaddr(const char *buf, char **hostname, + int *port) + +DESCRIPTION +----------- + +The *upscli_splitaddr()* function takes a pointer to the raw UPS +definition 'buf' and returns pointers to dynamically allocated +memory in 'upsname' and 'hostname'. It also copies the port +number into 'port'. + +FORMATTING +---------- + +A listening address definition is specified according to this format: + + [:] + +Definitions without an explicit port value receive the default value of +3493. + +MEMORY USAGE +------------ + +You must *free*(3) the pointer 'hostname' when you are done +with it to avoid memory leaks. + +RETURN VALUE +------------ + +The *upscli_splitaddr()* function returns 0 on success, or -1 if an +error occurs. + +SEE ALSO +-------- + +linkman:upscli_fd[3], linkman:upscli_get[3], +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_splitname[3], linkman:upscli_ssl[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_splitname.3 b/docs/man/upscli_splitname.3 new file mode 100644 index 0000000..ca0c3d0 --- /dev/null +++ b/docs/man/upscli_splitname.3 @@ -0,0 +1,70 @@ +'\" t +.\" Title: upscli_splitname +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_SPLITNAME" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_splitname \- split a UPS definition into its components +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_splitname(const char *buf, char **upsname, + char **hostname, int *port) +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_splitname()\fR function takes a pointer to the raw UPS definition \fIbuf\fR and returns pointers to dynamically allocated memory in \fIupsname\fR and \fIhostname\fR\&. It also copies the port number into \fIport\fR\&. +.SH "FORMATTING" +.sp +A UPS definition is specified according to this format: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[@[:]] +.fi +.if n \{\ +.RE +.\} +.sp +When the UPS name is not given, this function will print an error to stderr and return \-1 without changing anything\&. +.sp +Definitions without an explicit port value receive the default value of 3493\&. The default hostname is "localhost"\&. +.SH "MEMORY USAGE" +.sp +You must \fBfree\fR(3) the pointers to \fIupsname\fR and \fIhostname\fR when you are done with them to avoid memory leaks\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_splitname()\fR function returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_splitaddr\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_splitname.txt b/docs/man/upscli_splitname.txt new file mode 100644 index 0000000..1b714c6 --- /dev/null +++ b/docs/man/upscli_splitname.txt @@ -0,0 +1,55 @@ +UPSCLI_SPLITNAME(3) +=================== + +NAME +---- + +upscli_splitname - split a UPS definition into its components + +SYNOPSIS +-------- + + #include + + int upscli_splitname(const char *buf, char **upsname, + char **hostname, int *port) + +DESCRIPTION +----------- + +The *upscli_splitname()* function takes a pointer to the raw UPS +definition 'buf' and returns pointers to dynamically allocated +memory in 'upsname' and 'hostname'. It also copies the port +number into 'port'. + +FORMATTING +---------- + +A UPS definition is specified according to this format: + + [@[:]] + +When the UPS name is not given, this function will print an error to +stderr and return -1 without changing anything. + +Definitions without an explicit port value receive the default value of +3493. The default hostname is "localhost". + +MEMORY USAGE +------------ +You must *free*(3) the pointers to 'upsname' and 'hostname' +when you are done with them to avoid memory leaks. + +RETURN VALUE +------------ + +The *upscli_splitname()* function returns 0 on success, or -1 if an +error occurs. + +SEE ALSO +-------- + +linkman:upscli_fd[3], linkman:upscli_get[3], +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_splitaddr[3], linkman:upscli_ssl[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_ssl.3 b/docs/man/upscli_ssl.3 new file mode 100644 index 0000000..70bdd99 --- /dev/null +++ b/docs/man/upscli_ssl.3 @@ -0,0 +1,49 @@ +'\" t +.\" Title: upscli_ssl +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_SSL" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_ssl \- Check SSL mode for current connection +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_ssl(UPSCONN_t *ups); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_ssl\fR() function takes the pointer \fIups\fR to a UPSCONN_t state structure\&. It only returns 1 if SSL support has been compiled into the \fBupsclient\fR(3) library, and if it was successfully enabled for this connection\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_ssl\fR() function returns 1 if SSL is running, and 0 if not\&. It returns \-1 in the event of an error\&. +.SH "SEE ALSO" +.sp +\fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_ssl.txt b/docs/man/upscli_ssl.txt new file mode 100644 index 0000000..1b1620e --- /dev/null +++ b/docs/man/upscli_ssl.txt @@ -0,0 +1,36 @@ +UPSCLI_SSL(3) +============= + +NAME +---- + +upscli_ssl - Check SSL mode for current connection + +SYNOPSIS +-------- + + #include + + int upscli_ssl(UPSCONN_t *ups); + +DESCRIPTION +----------- + +The *upscli_ssl*() function takes the pointer 'ups' to a +`UPSCONN_t` state structure. It only returns 1 if SSL support has been +compiled into the linkman:upsclient[3] library, and if it was successfully +enabled for this connection. + + +RETURN VALUE +------------ + +The *upscli_ssl*() function returns 1 if SSL is running, and 0 if +not. It returns -1 in the event of an error. + +SEE ALSO +-------- + +linkman:upscli_fd[3], linkman:upscli_get[3], +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_strerror.3 b/docs/man/upscli_strerror.3 new file mode 100644 index 0000000..64ff539 --- /dev/null +++ b/docs/man/upscli_strerror.3 @@ -0,0 +1,49 @@ +'\" t +.\" Title: upscli_strerror +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_STRERROR" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_strerror \- return string describing error condition +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +char *upscli_strerror(UPSCONN_t *ups); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_strerror\fR() function takes the pointer \fIups\fR to a UPSCONN_t state structure and returns a string describing the last error which occurred on this connection\&. The string is valid until the next call to \fBupscli_strerror\fR()\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_strerror\fR() function returns a description of the error, or an unknown error message if the error code is not recognized\&. +.SH "SEE ALSO" +.sp +\fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_strerror.txt b/docs/man/upscli_strerror.txt new file mode 100644 index 0000000..fa6da66 --- /dev/null +++ b/docs/man/upscli_strerror.txt @@ -0,0 +1,36 @@ +UPSCLI_STRERROR(3) +================== + +NAME +---- + +upscli_strerror - return string describing error condition + +SYNOPSIS +-------- + + #include + + char *upscli_strerror(UPSCONN_t *ups); + +DESCRIPTION +----------- + +The *upscli_strerror*() function takes the pointer 'ups' to a +`UPSCONN_t` state structure and returns a string describing the last error +which occurred on this connection. The string is valid until the next +call to *upscli_strerror*(). + +RETURN VALUE +------------ + +The *upscli_strerror*() function returns a description of the error, +or an unknown error message if the error code is not recognized. + +SEE ALSO +-------- + +linkman:upscli_fd[3], linkman:upscli_get[3], +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_ssl[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_upserror.3 b/docs/man/upscli_upserror.3 new file mode 100644 index 0000000..36711c0 --- /dev/null +++ b/docs/man/upscli_upserror.3 @@ -0,0 +1,53 @@ +'\" t +.\" Title: upscli_upserror +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_UPSERROR" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_upserror \- Get current error number for connection +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_upserror(UPSCONN_t *ups); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_upserror\fR() function takes the pointer \fIups\fR to a UPSCONN_t state structure and returns the value of the internal error number, if any\&. +.sp +This is typically used to check for certain error values like UPSCLI_ERR_UNKCOMMAND\&. That specific error can be used for detecting older versions of \fBupsd\fR(8) which might not support a given command\&. +.sp +Some error messages have additional meanings, so you should use \fBupscli_strerror\fR(3) to obtain readable error messages\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_upserror\fR() function returns one of the UPSCLI_ERR_* values from upsclient\&.h, or 0 if no error has occurred\&. +.SH "SEE ALSO" +.sp +\fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_strerror\fR(3) diff --git a/docs/man/upscli_upserror.txt b/docs/man/upscli_upserror.txt new file mode 100644 index 0000000..b8ac616 --- /dev/null +++ b/docs/man/upscli_upserror.txt @@ -0,0 +1,40 @@ +UPSCLI_UPSERROR(3) +================== + +NAME +---- + +upscli_upserror - Get current error number for connection + +SYNOPSIS +-------- + + #include + + int upscli_upserror(UPSCONN_t *ups); + +DESCRIPTION +----------- + +The *upscli_upserror*() function takes the pointer 'ups' to a +`UPSCONN_t` state structure and returns the value of the internal error +number, if any. + +This is typically used to check for certain error values like +`UPSCLI_ERR_UNKCOMMAND`. That specific error can be used for detecting +older versions of linkman:upsd[8] which might not support a given command. + +Some error messages have additional meanings, so you should use +linkman:upscli_strerror[3] to obtain readable error messages. + +RETURN VALUE +------------ + +The *upscli_upserror*() function returns one of the `UPSCLI_ERR_*` +values from `upsclient.h`, or 0 if no error has occurred. + +SEE ALSO +-------- + +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_strerror[3] diff --git a/docs/man/upsclient.3 b/docs/man/upsclient.3 new file mode 100644 index 0000000..1496883 --- /dev/null +++ b/docs/man/upsclient.3 @@ -0,0 +1,51 @@ +'\" t +.\" Title: upsclient +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLIENT" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsclient \- Network UPS Tools client access library +.SH "DESCRIPTION" +.sp +The Network UPS Tools (NUT) \fBupsclient\fR library provides a number of useful functions for programs to use when communicating with \fBupsd\fR(8)\&. Many of the low\-level socket and protocol details are handled automatically when using this interface\&. +.sp +State is maintained across calls in an opaque structure called UPSCONN_t\&. Callers are expected to create one per connection\&. These will be provided to most of the \fBupsclient\fR functions\&. The format of this structure is subject to change, and client programs must not reference elements within it directly\&. +.SH "NETWORK FUNCTIONS" +.sp +To create a new connection, use \fBupscli_connect\fR(3)\&. This will also initialize the UPSCONN_t structure\&. To verify that a connection has been established later, \fBupscli_fd\fR(3) can be used to return the file descriptor\&. Clients wishing to check for the presence and operation of SSL on a connection may call \fBupscli_ssl\fR(3)\&. +.sp +The majority of clients will use \fBupscli_get\fR(3) to retrieve single items from the server\&. To retrieve a list, use \fBupscli_list_start\fR(3) to get it started, then call \fBupscli_list_next\fR(3) for each element\&. +.sp +Raw lines of text may be sent to \fBupsd\fR(8) with \fBupscli_sendline\fR(3)\&. Reading raw lines is possible with \fBupscli_readline\fR(3)\&. Client programs are expected to format these lines according to the protocol, as no checking will be performed before transmission\&. +.sp +At the end of a connection, you must call \fBupsclient_disconnect\fR(3) to disconnect from \fBupsd\fR and release any dynamic memory associated with the UPSCONN_t structure\&. Failure to call this function will result in memory and file descriptor leaks in your program\&. +.SH "ERROR HANDLING" +.sp +In the event of an error, \fBupscli_strerror\fR(3) will provide human\-readable details on what happened\&. \fBupscli_upserror\fR(3) may also be used to retrieve the error number\&. These numbers are defined in \fBupsclient\&.h\fR as \fIUPSCLI_ERR_*\fR\&. +.SH "SEE ALSO" +.sp +\fBlibupsclient-config\fR(1), \fBupscli_connect\fR(3), \fBupscli_disconnect\fR(3), \fBupscli_fd\fR(3), \fBupscli_getvar\fR(3), \fBupscli_list_next\fR(3), \fBupscli_list_start\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_splitaddr\fR(3), \fBupscli_splitname\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upsclient.txt b/docs/man/upsclient.txt new file mode 100644 index 0000000..ec9931c --- /dev/null +++ b/docs/man/upsclient.txt @@ -0,0 +1,64 @@ +UPSCLIENT(3) +============ + +NAME +---- + +upsclient - Network UPS Tools client access library + +DESCRIPTION +----------- + +The Network UPS Tools (NUT) *upsclient* library provides a number of +useful functions for programs to use when communicating with +linkman:upsd[8]. Many of the low-level socket and protocol details are +handled automatically when using this interface. + +State is maintained across calls in an opaque structure called `UPSCONN_t`. +Callers are expected to create one per connection. These will be +provided to most of the *upsclient* functions. The format of this +structure is subject to change, and client programs must not reference +elements within it directly. + +NETWORK FUNCTIONS +----------------- + +To create a new connection, use linkman:upscli_connect[3]. This will also +initialize the `UPSCONN_t` structure. To verify that a connection has been +established later, linkman:upscli_fd[3] can be used to return the +file descriptor. Clients wishing to check for the presence and +operation of SSL on a connection may call linkman:upscli_ssl[3]. + +The majority of clients will use linkman:upscli_get[3] to retrieve single +items from the server. To retrieve a list, use +linkman:upscli_list_start[3] to get it started, then call +linkman:upscli_list_next[3] for each element. + +Raw lines of text may be sent to linkman:upsd[8] with +linkman:upscli_sendline[3]. Reading raw lines is possible with +linkman:upscli_readline[3]. Client programs are expected to format these +lines according to the protocol, as no checking will be performed before +transmission. + +At the end of a connection, you must call linkman:upsclient_disconnect[3] +to disconnect from *upsd* and release any dynamic memory associated +with the `UPSCONN_t` structure. Failure to call this function will result +in memory and file descriptor leaks in your program. + +ERROR HANDLING +-------------- +In the event of an error, linkman:upscli_strerror[3] will provide +human-readable details on what happened. linkman:upscli_upserror[3] may +also be used to retrieve the error number. These numbers are defined in +*upsclient.h* as 'UPSCLI_ERR_*'. + +SEE ALSO +-------- +linkman:libupsclient-config[1], +linkman:upscli_connect[3], linkman:upscli_disconnect[3], linkman:upscli_fd[3], +linkman:upscli_getvar[3], linkman:upscli_list_next[3], +linkman:upscli_list_start[3], linkman:upscli_readline[3], +linkman:upscli_sendline[3], +linkman:upscli_splitaddr[3], linkman:upscli_splitname[3], +linkman:upscli_ssl[3], linkman:upscli_strerror[3], +linkman:upscli_upserror[3] diff --git a/docs/man/upscmd.8 b/docs/man/upscmd.8 new file mode 100644 index 0000000..944264a --- /dev/null +++ b/docs/man/upscmd.8 @@ -0,0 +1,94 @@ +'\" t +.\" Title: upscmd +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCMD" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscmd \- UPS administration program for instant commands +.SH "SYNOPSIS" +.sp +\fBupscmd\fR \-h +.sp +\fBupscmd\fR \-l \fIups\fR +.sp +\fBupscmd\fR [\-u \fIusername\fR] [\-p \fIpassword\fR] \fIups\fR \fIcommand\fR +.SH "DESCRIPTION" +.sp +\fBupscmd\fR allows you to invoke "instant commands" in your UPS hardware\&. Not all hardware supports this, so check the list with \-l to see if anything will work on your equipment\&. +.sp +On hardware that supports it, you can use this program to start and stop battery tests, invoke a front panel test (beep!), turn the load on or off, and more\&. +.SH "OPTIONS" +.PP +\fB\-h\fR +.RS 4 +Display the help message\&. +.RE +.PP +\fB\-l\fR \fIups\fR +.RS 4 +Show the list of supported instant commands on that UPS\&. Some hardware may not support any of them\&. +.RE +.PP +\fB\-u\fR \fIusername\fR +.RS 4 +Set the username for the connection to the server\&. This is optional, and you will be prompted for this when invoking a command if \-u is not used\&. +.RE +.PP +\fB\-p\fR \fIpassword\fR +.RS 4 +Set the password to authenticate to the server\&. This is also optional like \-u, and you will be prompted for it if necessary\&. +.RE +.PP +\fIups\fR +.RS 4 +Connect to this UPS\&. The format is +upsname[@hostname[:port]]\&. The default hostname is "localhost"\&. +.RE +.SH "UNATTENDED MODE" +.sp +If you run this program inside a shell script or similar to invoke a command, you will need to specify all of the information on the command line\&. This means using \-u and \-p\&. Otherwise it will put up a prompt and your program will hang\&. +.sp +This is not necessary when displaying the list, as the username and password are not required for read\-only mode\&. +.SH "DANGEROUS COMMANDS" +.sp +Some drivers like \fBapcsmart\fR(8) have built\-in paranoia for the dangerous commands like load\&.off\&. To make them actually turn off the load, you will have to send the command twice within a short window\&. That is, you will have to send it once, then send it again after 3 seconds elapse but before 15 seconds pass\&. +.sp +This paranoia is entirely defined within the driver\&. upsd and upscmd have no control over the timing\&. +.SH "DIAGNOSTICS" +.sp +upscmd won\(cqt work unless you provide a valid username and password\&. If you get "access denied" errors, make sure that your \fBupsd.users\fR(5) has an entry for you, and that the username you are using has permissions to SET variables\&. +.SH "BUGS" +.sp +There is currently no way to tell the user when the driver requires confirmation to invoke a command such as load\&.off\&. Similarly, there is not yet a way to tell the user if a command succeeds or fails\&. +.sp +This is on the list of things to fix in the future, so don\(cqt despair\&. It involves magic cookies\&. +.SH "SEE ALSO" +.sp +\fBupsd\fR(8), \fBupsrw\fR(8) +.SH "INTERNET RESOURCES" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upscmd.8 b/docs/man/upscmd.txt similarity index 52% rename from man/upscmd.8 rename to docs/man/upscmd.txt index c70ab73..d8550a9 100644 --- a/man/upscmd.8 +++ b/docs/man/upscmd.txt @@ -1,59 +1,67 @@ -.TH UPSCMD 8 "Mon Jan 22 2007" "" "Network UPS Tools (NUT)" -.SH NAME -upscmd \- UPS administration program for instant commands -.SH SYNOPSIS -.B upscmd \-h +UPSCMD(8) +========= -.B upscmd \-l \fIups\fR +NAME +---- +upscmd - UPS administration program for instant commands -.B upscmd [\-u \fIusername\fB] [\-p \fIpassword\fB] \fIups\fB \fIcommand\fR +SYNOPSIS +-------- +*upscmd* -h -.SH DESCRIPTION +*upscmd* -l 'ups' -.B upscmd -allows you to invoke "instant commands" in your UPS hardware. -Not all hardware supports this, so check the list with \-l to see if -anything will work on your equipment. +*upscmd* [-u 'username'] [-p 'password'] 'ups' 'command' + +DESCRIPTION +----------- + +*upscmd* allows you to invoke "instant commands" in your UPS hardware. +Not all hardware supports this, so check the list with -l to see if anything +will work on your equipment. On hardware that supports it, you can use this program to start and stop battery tests, invoke a front panel test (beep!), turn the load on or off, and more. -.SH OPTIONS +OPTIONS +------- -.IP \-h +*-h*:: Display the help message. -.IP "\-l \fIups\fR" +*-l* 'ups':: Show the list of supported instant commands on that UPS. Some hardware may not support any of them. -.IP "\-u \fIusername\fR" +*-u* 'username':: Set the username for the connection to the server. This is optional, and -you will be prompted for this when invoking a command if \-u is not used. +you will be prompted for this when invoking a command if -u is not used. -.IP "\-p \fIpassword\fR" +*-p* 'password':: Set the password to authenticate to the server. This is also optional -like \-u, and you will be prompted for it if necessary. +like -u, and you will be prompted for it if necessary. -.IP \fIups\fR -Connect to this UPS. The format is upsname[@hostname[:port]]. The default +'ups':: +Connect to this UPS. The format is `upsname[@hostname[:port]]`. The default hostname is "localhost". -.SH UNATTENDED MODE +UNATTENDED MODE +--------------- If you run this program inside a shell script or similar to invoke a command, you will need to specify all of the information on the command -line. This means using \-u and \-p. Otherwise it will put up a prompt and +line. This means using -u and -p. Otherwise it will put up a prompt and your program will hang. This is not necessary when displaying the list, as the username and -password are not required for read\(hyonly mode. +password are not required for read-only mode. -.SH DANGEROUS COMMANDS +DANGEROUS COMMANDS +------------------ -Some drivers like \fBapcsmart\fR(8) have built\(hyin paranoia for the -dangerous commands like load.off. To make them actually turn off the +Some drivers like linkman:apcsmart[8] have built-in paranoia for the +dangerous commands like `load.off`. To make them actually turn off the load, you will have to send the command twice within a short window. That is, you will have to send it once, then send it again after 3 seconds elapse but before 15 seconds pass. @@ -61,24 +69,28 @@ seconds elapse but before 15 seconds pass. This paranoia is entirely defined within the driver. upsd and upscmd have no control over the timing. -.SH DIAGNOSTICS +DIAGNOSTICS +----------- upscmd won't work unless you provide a valid username and password. If -you get "access denied" errors, make sure that your \fBupsd.users\fR(5) has +you get "access denied" errors, make sure that your linkman:upsd.users[5] has an entry for you, and that the username you are using has permissions to SET variables. -.SH BUGS +BUGS +---- There is currently no way to tell the user when the driver requires -confirmation to invoke a command such as load.off. Similarly, there is +confirmation to invoke a command such as `load.off`. Similarly, there is not yet a way to tell the user if a command succeeds or fails. This is on the list of things to fix in the future, so don't despair. It involves magic cookies. -.SH SEE ALSO -\fBupsd\fR(8), \fBupsrw\fR(8) +SEE ALSO +-------- +linkman:upsd[8], linkman:upsrw[8] -.SS Internet resources: +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upscode2.8 b/docs/man/upscode2.8 new file mode 100644 index 0000000..194362b --- /dev/null +++ b/docs/man/upscode2.8 @@ -0,0 +1,180 @@ +'\" t +.\" Title: upscode2 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCODE2" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscode2 \- Driver for UPScode II compatible UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the upscode2 driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports UPS equipment which can be controlled via the UPScode II protocol\&. This is mainly Fiskars, Powerware equipment, but also some (probably OEM\(cqed) products from Compaq\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBmanufacturer\fR=\fIvalue\fR +.RS 4 +Autodetection of this parameter is not possible yet (and it probably never will be)\&. Therefore, this user\-defined string accepts any name\&. The default is +\fIunknown\fR\&. +.RE +.PP +\fBinput_timeout\fR=\fIvalue\fR +.RS 4 +The timeout waiting for a response from the UPS\&. Some UPS models have shown to be rather slow, resulting in frequent messages about empty responses from the UPS\&. If you see this, try increasing this value\&. +.RE +.PP +\fBoutput_pace\fR=\fIvalue\fR +.RS 4 +Delay between characters sent to the UPS\&. This was added for completeness with the above parameter\&. It has not shown to be needed yet\&. +.RE +.PP +\fBbaudrate\fR=\fIvalue\fR +.RS 4 +The default baudrate is 1200, which is the standard for the UPScode II protocol\&. +.RE +.PP +\fBfull_update_timer\fR=\fIvalue\fR +.RS 4 +Number of seconds between collection of normative values\&. +.RE +.PP +\fBuse_crlf\fR +.RS 4 +Flag to set if commands towards to UPS need to be terminated with CR\-LF, and not just CR\&. +.RE +.PP +\fBuse_pre_lf\fR +.RS 4 +Flag to set if commands towards to UPS need to be introduced with an LF\&. A Compaq T1500h is known to need this\&. +.RE +.SH "COMMANDS" +.sp +The driver supports the following commands for those UPSen that support them\&. The available commands are autodetected during initialization, so you should check availability with \fIupscmd \-l\fR\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +test\&.panel\&.start \- Start UPS self test +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +test\&.battery\&.start \- Start battery self test +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +beeper\&.enable \- Enable UPS beeper +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +beeper\&.disable \- Disable UPS beeper +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.return \- Shut down in 1 second and wait for power to return +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.stayoff \- Shut down in 1 seconds +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.reboot \- Shut down in 1 seconds and reboot after 1 minute +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.reboot\&.graceful \- Shut down in 20 seconds and reboot after 1 minute +.RE +.SH "NOTES" +.sp +The Powerware UPS models that this driver has been tested against until now have not returned a value for \fIbattery\&.charge\fR\&. Therefore, the driver will guestimate a value based on the nominal battery min/max and the current battery voltage\&. +.SH "AUTHOR" +.sp +Håvard Lygre , Niels Baggesen +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upscode2.txt b/docs/man/upscode2.txt new file mode 100644 index 0000000..5e9cfda --- /dev/null +++ b/docs/man/upscode2.txt @@ -0,0 +1,99 @@ +UPSCODE2(8) +=========== + +NAME +---- +upscode2 - Driver for UPScode II compatible UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +upscode2 driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports UPS equipment which can be controlled via the UPScode II +protocol. This is mainly Fiskars, Powerware equipment, but also +some (probably OEM'ed) products from Compaq. + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in the +linkman:ups.conf[5]: + +*manufacturer*='value':: +Autodetection of this parameter is not possible yet (and it probably +never will be). Therefore, this user-defined string accepts any name. The +default is 'unknown'. + +*input_timeout*='value':: +The timeout waiting for a response from the UPS. Some UPS models have +shown to be rather slow, resulting in frequent messages about empty +responses from the UPS. If you see this, try increasing this value. + +*output_pace*='value':: +Delay between characters sent to the UPS. This was added for completeness +with the above parameter. It has not shown to be needed yet. + +*baudrate*='value':: +The default baudrate is 1200, which is the standard for the UPScode II +protocol. + +*full_update_timer*='value':: +Number of seconds between collection of normative values. + +*use_crlf*:: +Flag to set if commands towards to UPS need to be terminated with CR-LF, +and not just CR. + +*use_pre_lf*:: +Flag to set if commands towards to UPS need to be introduced with an LF. +A Compaq T1500h is known to need this. + +COMMANDS +-------- + +The driver supports the following commands for those UPSen that support them. +The available commands are autodetected during initialization, +so you should check availability with 'upscmd -l'. + + * test.panel.start - Start UPS self test + + * test.battery.start - Start battery self test + + * beeper.enable - Enable UPS beeper + + * beeper.disable - Disable UPS beeper + + * shutdown.return - Shut down in 1 second and wait for power to return + + * shutdown.stayoff - Shut down in 1 seconds + + * shutdown.reboot - Shut down in 1 seconds and reboot after 1 minute + + * shutdown.reboot.graceful - Shut down in 20 seconds and reboot after 1 minute + +NOTES +----- + +The Powerware UPS models that this driver has been tested against until now +have not returned a value for 'battery.charge'. Therefore, the driver will +guestimate a value based on the nominal battery min/max and the current +battery voltage. + +AUTHOR +------ +Håvard Lygre , +Niels Baggesen + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsd.8 b/docs/man/upsd.8 new file mode 100644 index 0000000..1d29102 --- /dev/null +++ b/docs/man/upsd.8 @@ -0,0 +1,140 @@ +'\" t +.\" Title: upsd +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSD" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsd \- UPS information server +.SH "SYNOPSIS" +.sp +\fBupsd\fR \-h +.sp +\fBupsd\fR [\fIOPTIONS\fR] +.SH "DESCRIPTION" +.sp +\fBupsd\fR is responsible for serving the data from the drivers to the clients\&. It connects to each driver and maintains a local cache of the current state\&. Queries from the clients are served from this cache, so delays are minimal\&. +.sp +It also conveys administrative messages from the clients back to the drivers, such as starting tests, or setting values\&. +.sp +Communication between \fBupsd\fR and clients is handled on a TCP port\&. Configuration details for this port are described in \fBupsd.conf\fR(8)\&. +.sp +This program is essential, and must be running at all times to actually make any use out of the drivers and clients\&. +.sp +Controls in the configuration files allow you to limit access to the server, but you should also use a firewall for extra protection\&. Client processes such as \fBupsmon\fR(8) trust \fBupsd\fR for status information about the UPS hardware, so keep it secure\&. +.SH "OPTIONS" +.PP +\fB\-c\fR \fIcommand\fR +.RS 4 +Send +\fIcommand\fR +to the background process as a signal\&. Valid commands are: +.PP +\fBreload\fR +.RS 4 +reread configuration files +.RE +.PP +\fBstop\fR +.RS 4 +stop process and exit +.RE +.RE +.PP +\fB\-D\fR +.RS 4 +Raise the debug level\&. Use this multiple times for additional details\&. +.RE +.PP +\fB\-h\fR +.RS 4 +Display the help text\&. +.RE +.PP +\fB\-r\fR \fIdirectory\fR +.RS 4 +upsd will +\fBchroot\fR(2) to +\fIdirectory\fR +shortly after startup and before parsing any configuration files with this option set\&. You can use this to create a "jail" for greater security\&. +.sp +You must coordinate this with your drivers, as upsd must be able to find the state path within +\fIdirectory\fR\&. See +\fBupsdrvctl\fR(8) +and +\fBnutupsdrv\fR(8)\&. +.RE +.PP +\fB\-u\fR \fIuser\fR +.RS 4 +Switch to user +\fIuser\fR +after startup if started as root\&. This overrides whatever you may have compiled in with +configure \-\-with\-user\&. +.RE +.PP +\fB\-V\fR +.RS 4 +Display the version of the program\&. +.RE +.SH "RELOADING" +.sp +upsd can reload its configuration files without shutting down the process if you send it a SIGHUP or start it again with \-c reload\&. This only works if the background process is able to read those files\&. +.sp +If you think that upsd can\(cqt reload, check your syslogs for error messages\&. If it\(cqs complaining about not being able to read the files, then you need to adjust your system to make it possible\&. Either change the permissions on the files, or run upsd as another user that will be able to read them\&. +.sp +DO NOT make your upsd\&.conf or upsd\&.users world\-readable, as those files hold important authentication information\&. In the wrong hands, it could be used by some evil person to spoof your master upsmon and command your systems to shut down\&. +.SH "DIAGNOSTICS" +.sp +upsd expects the drivers to either update their status regularly or at least answer periodic queries, called pings\&. If a driver doesn\(cqt answer, upsd will declare it "stale" and no more information will be provided to the clients\&. +.sp +If upsd complains about staleness when you start it, then either your driver or configuration files are probably broken\&. Be sure that the driver is actually running, and that the UPS definition in \fBups.conf\fR(5) is correct\&. Also make sure that you start your driver(s) before starting upsd\&. +.sp +Data can also be marked stale if the driver can no longer communicate with the UPS\&. In this case, the driver should also provide diagnostic information in the syslog\&. If this happens, check the serial or USB cabling, or inspect the network path in the case of a SNMP UPS\&. +.SH "ACCESS CONTROL" +.sp +If the server is build with tcp\-wrappers support enabled, it will check if the NUT username is allowed to connect from the client address through the /etc/hosts\&.allow and /etc/hosts\&.deny files\&. Note that this will only be done for commands that require to be logged into the server\&. Further details are described in \fBhosts_access\fR(5)\&. +.SH "FILES" +.sp +The general upsd configuration file is \fBupsd.conf\fR(5)\&. The administrative functions like SET and INSTCMD for users are defined and controlled in \fBupsd.users\fR(5)\&. UPS definitions are found in \fBups.conf\fR(5)\&. +.SH "ENVIRONMENT VARIABLES" +.sp +\fBNUT_CONFPATH\fR is the path name of the directory that contains upsd\&.conf and other configuration files\&. If this variable is not set, \fBupsd\fR uses a built\-in default, which is often /usr/local/ups/etc\&. +.sp +\fBNUT_STATEPATH\fR is the path name of the directory in which \fBupsd\fR keeps state information\&. If this variable is not set, \fBupsd\fR uses a built\-in default, which is often /var/state/ups\&. The \fBSTATEPATH\fR directive in \fBupsd.conf\fR(5) overrides this variable\&. +.SH "SEE ALSO" +.SS "Clients:" +.sp +\fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8), \fBupslog\fR(8), \fBupsmon\fR(8) +.SS "CGI programs:" +.sp +\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) +.SS "Drivers:" +.sp +\fBnutupsdrv\fR(8), \fBapcsmart\fR(8), \fBbelkin\fR(8), \fBbelkinunv\fR(8), \fBbestuferrups\fR(8), \fBbestups\fR(8), \fBcyberpower\fR(8), \fBenergizerups\fR(8), \fBetapro\fR(8), \fBeverups\fR(8), \fBgenericups\fR(8), \fBisbmex\fR(8), \fBliebert\fR(8), \fBmasterguard\fR(8), \fBmge-shut\fR(8), \fBmge-utalk\fR(8), \fBoneac\fR(8), \fBpowercom\fR(8), \fBsafenet\fR(8), \fBsnmp-ups\fR(8), \fBtripplite\fR(8), \fBtripplitesu\fR(8), \fBvictronups\fR(8), +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsd.conf.5 b/docs/man/upsd.conf.5 new file mode 100644 index 0000000..2f9b2a8 --- /dev/null +++ b/docs/man/upsd.conf.5 @@ -0,0 +1,94 @@ +'\" t +.\" Title: upsd.conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSD\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsd.conf \- Configuration for Network UPS Tools upsd +.SH "DESCRIPTION" +.sp +upsd uses this file to control access to the server and set some other miscellaneous configuration values\&. This file contains details on access controls, so keep it secure\&. Ideally, only the upsd process should be able to read it\&. +.SH "CONFIGURATION DIRECTIVES" +.PP +"MAXAGE \fIseconds\fR" +.RS 4 +upsd usually allows a driver to stop responding for up to 15 seconds before declaring the data "stale"\&. If your driver takes a very long time to process updates but is otherwise operational, you can use MAXAGE to make upsd wait longer\&. +.sp +Most users should leave this at the default value\&. +.RE +.PP +"STATEPATH \fIpath\fR" +.RS 4 +Tell upsd to look for the driver state sockets in +\fIpath\fR +rather than the default that was compiled into the program\&. +.RE +.PP +"LISTEN \fIinterface\fR \fIport\fR" +.RS 4 +Bind a listening port to the interface specified by its Internet address\&. This may be useful on hosts with multiple interfaces\&. You should not rely exclusively on this for security, as it can be subverted on many systems\&. +.sp +Listen on TCP port +\fIport\fR +instead of the default value which was compiled into the code\&. This overrides any value you may have set with +\fIconfigure \-\-with\-port\fR\&. If you don\(cqt change it with configure or this value, upsd will listen on port 3493 for this interface\&. +.sp +Multiple LISTEN addresses may be specified\&. The default is to bind to 127\&.0\&.0\&.1 if no LISTEN addresses are specified (and ::1 if IPv6 support is compiled in)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +LISTEN 127\&.0\&.0\&.1 +LISTEN 192\&.168\&.50\&.1 +LISTEN ::1 +LISTEN 2001:0db8:1234:08d3:1319:8a2e:0370:7344 +.fi +.if n \{\ +.RE +.\} +.sp +This parameter will only be read at startup\&. You\(cqll need to restart (rather than reload) upsd to apply any changes made here\&. +.RE +.PP +"MAXCONN \fIconnections\fR" +.RS 4 +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\(cqre doing\&. +.RE +.PP +"CERTFILE \fIcertificate file\fR" +.RS 4 +When compiled with SSL support, you can enter the certificate file here\&. The certificates must be in PEM format and must be sorted starting with the subject\(cqs certificate (server certificate), followed by intermediate CA certificates (if applicable_ and the highest level (root) CA\&. It should end with the server key\&. See +\fIdocs/security\&.txt\fR +or the Security chapter of NUT user manual for more information on the SSL support in NUT\&. +.RE +.SH "SEE ALSO" +.sp +\fBupsd\fR(8), \fBnutupsdrv\fR(8), \fBupsd.users\fR(5) +.SH "INTERNET RESOURCES" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsd.conf.5 b/docs/man/upsd.conf.txt similarity index 51% rename from man/upsd.conf.5 rename to docs/man/upsd.conf.txt index f9245df..ab4d9c8 100644 --- a/man/upsd.conf.5 +++ b/docs/man/upsd.conf.txt @@ -1,67 +1,81 @@ -.TH UPSD.CONF 5 "Mon Nov 30 2009" "" "Network UPS Tools (NUT)" -.SH NAME -upsd.conf \- Configuration for Network UPS Tools upsd +UPSD.CONF(5) +============ -.SH DESCRIPTION +NAME +---- + +upsd.conf - Configuration for Network UPS Tools upsd + +DESCRIPTION +----------- upsd uses this file to control access to the server and set some other miscellaneous configuration values. This file contains details on access controls, so keep it secure. Ideally, only the upsd process should be able to read it. -.SH CONFIGURATION DIRECTIVES +CONFIGURATION DIRECTIVES +------------------------ -.IP "MAXAGE \fIseconds\fR" +"MAXAGE 'seconds'":: upsd usually allows a driver to stop responding for up to 15 seconds before declaring the data "stale". If your driver takes a very long time to process updates but is otherwise operational, you can use MAXAGE to make upsd wait longer. - ++ Most users should leave this at the default value. -.IP "STATEPATH \fIpath\fR" +"STATEPATH 'path'":: -Tell upsd to look for the driver state sockets in \fIpath\fR rather +Tell upsd to look for the driver state sockets in 'path' rather than the default that was compiled into the program. -.IP "LISTEN \fIinterface\fR \fIport\fR" +"LISTEN 'interface' 'port'":: Bind a listening port to the interface specified by its Internet address. This may be useful on hosts with multiple interfaces. You should not rely exclusively on this for security, as it can be subverted on many systems. - -Listen on TCP port \fIport\fR instead of the default value which was ++ +Listen on TCP port 'port' instead of the default value which was compiled into the code. This overrides any value you may have set -with 'configure \-\-with\-port'. If you don't change it with configure +with 'configure --with-port'. If you don't change it with configure or this value, upsd will listen on port 3493 for this interface. - ++ Multiple LISTEN addresses may be specified. The default is to bind to 127.0.0.1 if no LISTEN addresses are specified (and ::1 if IPv6 support is compiled in). -.IP -.nf LISTEN 127.0.0.1 LISTEN 192.168.50.1 LISTEN ::1 LISTEN 2001:0db8:1234:08d3:1319:8a2e:0370:7344 -.fi -.LP - ++ This parameter will only be read at startup. You'll need to restart (rather than reload) upsd to apply any changes made here. -.SH UPGRADING FROM OLDER VERSIONS +"MAXCONN 'connections'":: -The ACL/ACCEPT/REJECT mechanism that existed in versions before -nut-2.4.0 has been removed. You'll want to use the LISTEN directive -to limit the addresses the server listens at on multihomed systems. -If this is not fine grained enough, use a firewall. +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. -.SH SEE ALSO -\fBupsd\fR(8), \fBnutupsdrv\fR(8), \fBupsd.users\fR(5) +"CERTFILE 'certificate file'":: -.SS Internet resources: +When compiled with SSL support, you can enter the certificate file here. +The certificates must be in PEM format and must be sorted starting with +the subject's certificate (server certificate), followed by intermediate +CA certificates (if applicable_ and the highest level (root) CA. It should +end with the server key. See 'docs/security.txt' or the Security chapter of +NUT user manual for more information on the SSL support in NUT. + +SEE ALSO +-------- + +linkman:upsd[8], linkman:nutupsdrv[8], linkman:upsd.users[5] + +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsd.txt b/docs/man/upsd.txt new file mode 100644 index 0000000..64cff41 --- /dev/null +++ b/docs/man/upsd.txt @@ -0,0 +1,160 @@ +UPSD(8) +======= + +NAME +---- + +upsd - UPS information server + +SYNOPSIS +-------- +*upsd* -h + +*upsd* ['OPTIONS'] + +DESCRIPTION +----------- + +*upsd* is responsible for serving the data from the drivers to the clients. It +connects to each driver and maintains a local cache of the current state. +Queries from the clients are served from this cache, so delays are minimal. + +It also conveys administrative messages from the clients back to the drivers, +such as starting tests, or setting values. + +Communication between *upsd* and clients is handled on a TCP port. +Configuration details for this port are described in linkman:upsd.conf[8]. + +This program is essential, and must be running at all times to actually +make any use out of the drivers and clients. + +Controls in the configuration files allow you to limit access to the +server, but you should also use a firewall for extra protection. Client +processes such as linkman:upsmon[8] trust *upsd* for status information about +the UPS hardware, so keep it secure. + +OPTIONS +------- + +*-c* 'command':: +Send 'command' to the background process as a signal. Valid commands +are: + + *reload*;; reread configuration files + *stop*;; stop process and exit + +*-D*:: +Raise the debug level. Use this multiple times for additional details. + +*-h*:: +Display the help text. + +*-r* 'directory':: +upsd will *chroot*(2) to 'directory' shortly after startup +and before parsing any configuration files with this option set. You +can use this to create a "jail" for greater security. ++ +You must coordinate this with your drivers, as upsd must be able to find +the state path within 'directory'. See linkman:upsdrvctl[8] and +linkman:nutupsdrv[8]. + +*-u* 'user':: +Switch to user 'user' after startup if started as root. This +overrides whatever you may have compiled in with `configure +--with-user`. + +*-V*:: +Display the version of the program. + +RELOADING +--------- + +upsd can reload its configuration files without shutting down the process +if you send it a SIGHUP or start it again with `-c reload`. This only works +if the background process is able to read those files. + +If you think that upsd can't reload, check your syslogs for error messages. +If it's complaining about not being able to read the files, then you need +to adjust your system to make it possible. Either change the permissions +on the files, or run upsd as another user that will be able to read them. + +DO NOT make your upsd.conf or upsd.users world-readable, as those files +hold important authentication information. In the wrong hands, it could +be used by some evil person to spoof your master upsmon and command your +systems to shut down. + +DIAGNOSTICS +----------- + +upsd expects the drivers to either update their status regularly or at +least answer periodic queries, called pings. If a driver doesn't +answer, upsd will declare it "stale" and no more information will be +provided to the clients. + +If upsd complains about staleness when you start it, then either your +driver or configuration files are probably broken. Be sure that the +driver is actually running, and that the UPS definition in +linkman:ups.conf[5] is correct. Also make sure that you start your +driver(s) before starting upsd. + +Data can also be marked stale if the driver can no longer communicate +with the UPS. In this case, the driver should also provide diagnostic +information in the syslog. If this happens, check the serial or +USB cabling, or inspect the network path in the case of a SNMP UPS. + +ACCESS CONTROL +-------------- + +If the server is build with tcp-wrappers support enabled, it will check if +the NUT username is allowed to connect from the client address through the +`/etc/hosts.allow` and `/etc/hosts.deny` files. Note that this will +only be done for commands that require to be logged into the server. Further +details are described in *hosts_access*(5). + +FILES +----- + +The general upsd configuration file is linkman:upsd.conf[5]. The +administrative functions like SET and INSTCMD for users are defined and +controlled in linkman:upsd.users[5]. UPS definitions are found in +linkman:ups.conf[5]. + +ENVIRONMENT VARIABLES +--------------------- + +*NUT_CONFPATH* is the path name of the directory that contains +`upsd.conf` and other configuration files. If this variable is not set, +*upsd* uses a built-in default, which is often `/usr/local/ups/etc`. + +*NUT_STATEPATH* is the path name of the directory in which +*upsd* keeps state information. If this variable is not set, +*upsd* uses a built-in default, which is often `/var/state/ups`. +The *STATEPATH* directive in linkman:upsd.conf[5] overrides this variable. + +SEE ALSO +-------- + +Clients: +~~~~~~~~ +linkman:upsc[8], linkman:upscmd[8], +linkman:upsrw[8], linkman:upslog[8], linkman:upsmon[8] + +CGI programs: +~~~~~~~~~~~~~ +linkman:upsset.cgi[8], linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] + +Drivers: +~~~~~~~~ +linkman:nutupsdrv[8], +linkman:apcsmart[8], linkman:belkin[8], linkman:belkinunv[8], +linkman:bestuferrups[8], linkman:bestups[8], +linkman:cyberpower[8], linkman:energizerups[8], linkman:etapro[8], +linkman:everups[8], linkman:genericups[8], +linkman:isbmex[8], linkman:liebert[8], linkman:masterguard[8], +linkman:mge-shut[8], linkman:mge-utalk[8], linkman:oneac[8], +linkman:powercom[8], linkman:safenet[8], linkman:snmp-ups[8], +linkman:tripplite[8], linkman:tripplitesu[8], linkman:victronups[8], + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsd.users.5 b/docs/man/upsd.users.5 new file mode 100644 index 0000000..f6246ab --- /dev/null +++ b/docs/man/upsd.users.5 @@ -0,0 +1,133 @@ +'\" t +.\" Title: upsd.users +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSD\&.USERS" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsd.users \- Administrative user definitions for NUT upsd +.SH "DESCRIPTION" +.sp +Administrative commands such as setting variables and the instant commands are powerful, and access to them needs to be restricted\&. This file defines who may access them, and what is available\&. +.sp +Each user gets its own section\&. The fields in that section set the parameters associated with that user\(cqs privileges\&. The section begins with the name of the user in brackets, and continues until the next user name in brackets or EOF\&. These users are independent of /etc/passwd\&. +.sp +Here are some examples to get you started: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[admin] + password = mypass + actions = set + instcmds = all +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +[pfy] + password = duh + instcmds = test\&.panel\&.start + instcmds = test\&.panel\&.stop +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +[monmaster] + password = blah + upsmon master +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +[monslave] + password = abcd + upsmon slave +.fi +.if n \{\ +.RE +.\} +.SH "FIELDS" +.PP +\fBpassword\fR +.RS 4 +Set the password for this user\&. +.RE +.PP +\fBactions\fR +.RS 4 +Allow the user to do certain things with upsd\&. Valid actions are: +.PP +SET +.RS 4 +change the value of certain variables in the UPS +.RE +.PP +FSD +.RS 4 +set the forced shutdown flag in the UPS\&. This is equivalent to an "on battery + low battery" situation for the purposes of monitoring\&. +.sp +The list of actions is expected to grow in the future\&. +.RE +.RE +.PP +\fBinstcmds\fR +.RS 4 +Let a user initiate specific instant commands\&. Use "ALL" to grant all commands automatically\&. To specify multiple commands, use multiple instances of the instcmds field\&. For the full list of what your UPS supports, use "upscmd \-l"\&. +.sp +The +cmdvartab +file supplied with the distribution contains a list of most of the known command names\&. +.RE +.PP +\fBupsmon\fR +.RS 4 +Add the necessary actions for a upsmon process to work\&. This is either set to "master" or "slave"\&. +.sp +Do not attempt to assign actions to upsmon by hand, as you may miss something important\&. This method of designating a "upsmon user" was created so internal capabilities could be changed later on without breaking existing installations\&. +.RE +.SH "SEE ALSO" +.sp +\fBupsd\fR(8), \fBupsd.conf\fR(5) +.SH "INTERNET RESOURCES" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsd.users.5 b/docs/man/upsd.users.txt similarity index 64% rename from man/upsd.users.5 rename to docs/man/upsd.users.txt index 01f42a2..457bc33 100644 --- a/man/upsd.users.5 +++ b/docs/man/upsd.users.txt @@ -1,8 +1,12 @@ -.TH UPSD.USERS 5 "Mon Nov 30 2009" "" "Network UPS Tools (NUT)" -.SH NAME -upsd.users \- Administrative user definitions for NUT upsd +UPSD.USERS(5) +============= -.SH DESCRIPTION +NAME +---- +upsd.users - Administrative user definitions for NUT upsd + +DESCRIPTION +----------- Administrative commands such as setting variables and the instant commands are powerful, and access to them needs to be restricted. This @@ -11,12 +15,10 @@ file defines who may access them, and what is available. Each user gets its own section. The fields in that section set the parameters associated with that user's privileges. The section begins with the name of the user in brackets, and continues until the next user -name in brackets or EOF. +name in brackets or EOF. These users are independent of /etc/passwd. Here are some examples to get you started: -.IP -.nf [admin] password = mypass actions = set @@ -25,6 +27,7 @@ Here are some examples to get you started: [pfy] password = duh instcmds = test.panel.start + instcmds = test.panel.stop [monmaster] password = blah @@ -33,57 +36,53 @@ Here are some examples to get you started: [monslave] password = abcd upsmon slave -.fi -.LP -.SH FIELDS +FIELDS +------ -.IP password +*password*:: Set the password for this user. -.IP actions +*actions*:: Allow the user to do certain things with upsd. Valid actions are: - SET \(hy change the value of certain variables in the UPS + SET;; change the value of certain variables in the UPS - FSD \(hy set the forced shutdown flag in the UPS. This is + FSD;; set the forced shutdown flag in the UPS. This is equivalent to an "on battery + low battery" situation for the purposes of monitoring. - ++ The list of actions is expected to grow in the future. -.IP instcmds +*instcmds*:: Let a user initiate specific instant commands. Use "ALL" to grant all -commands automatically. For the full list of what your UPS supports, -use "upscmd \-l". - -The \fBcmdvartab\fR file supplied with the distribution contains a list +commands automatically. To specify multiple commands, use multiple +instances of the instcmds field. For the full list of what your UPS +supports, use "upscmd -l". ++ +The +cmdvartab+ file supplied with the distribution contains a list of most of the known command names. -.IP upsmon +*upsmon*:: Add the necessary actions for a upsmon process to work. This is either set to "master" or "slave". - ++ Do not attempt to assign actions to upsmon by hand, as you may miss something important. This method of designating a "upsmon user" was created so internal capabilities could be changed later on without breaking existing installations. -.SH UPGRADING FROM OLDER VERSIONS +SEE ALSO +-------- -The \fIallowfrom\fR mechanism that existed in versions before nut-2.4.0 -has been replaced by tcp-wrappers. Further details are described in -\fBupsd\fR(8). +linkman:upsd[8], linkman:upsd.conf[5] -.SH SEE ALSO - -\fBupsd\fR(8), \fBupsd.conf\fR(5) - -.SS Internet resources: +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsdrvctl.8 b/docs/man/upsdrvctl.8 new file mode 100644 index 0000000..2b9b068 --- /dev/null +++ b/docs/man/upsdrvctl.8 @@ -0,0 +1,127 @@ +'\" t +.\" Title: upsdrvctl +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSDRVCTL" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsdrvctl \- UPS driver controller +.SH "SYNOPSIS" +.sp +\fBupsdrvctl\fR \-h +.sp +\fBupsdrvctl\fR [\fIOPTIONS\fR] {start | stop | shutdown} [\fIups\fR] +.SH "DESCRIPTION" +.sp +\fBupsdrvctl\fR provides a uniform interface for controlling your UPS drivers\&. You should use upsdrvctl instead of direct calls to the drivers whenever possible\&. +.sp +When used properly, upsdrvctl lets you maintain identical startup scripts across multiple systems with different UPS configurations\&. +.SH "OPTIONS" +.PP +\fB\-h\fR +.RS 4 +Display the help text\&. +.RE +.PP +\fB\-r\fR \fIdirectory\fR +.RS 4 +If starting a driver, this value will direct it to +\fBchroot\fR(2) into +\fIdirectory\fR\&. This can be useful when securing systems\&. +.RE +.sp +This may be set in the ups\&.conf with "chroot" in the global section\&. +.PP +\fB\-t\fR +.RS 4 +Enable testing mode\&. This also enables debug mode\&. Testing mode makes upsdrvctl display the actions it would execute without actually doing them\&. Use this to test out your configuration without actually doing anything to your UPS drivers\&. This may be helpful when defining the +\fIsdorder\fR +directive in your +\fBups.conf\fR(5)\&. +.RE +.PP +\fB\-u\fR \fIusername\fR +.RS 4 +If starting a driver, this value will direct it to +\fBsetuid\fR(2) to the user id associated with +\fIusername\fR\&. +.RE +.sp +If the driver is started as root without specifying this value, it will use the username that was compiled into the binary\&. This defaults to "nobody", and is far from ideal\&. +.sp +This may be set in ups\&.conf with "user" in the global section\&. +.PP +\fB\-D\fR +.RS 4 +Raise the debug level\&. Use this multiple times for additional details\&. +.RE +.SH "COMMANDS" +.sp +upsdrvctl supports three commands \- start, stop and shutdown\&. They take an optional argument which is a UPS name from \fBups.conf\fR(5)\&. Without that argument, they operate on every UPS that is currently configured\&. +.PP +\fBstart\fR +.RS 4 +Start the UPS driver(s)\&. +.RE +.PP +\fBstop\fR +.RS 4 +Stop the UPS driver(s)\&. +.RE +.PP +\fBshutdown\fR +.RS 4 +Command the UPS driver(s) to run their shutdown sequence\&. Drivers are stopped according to their sdorder value \- see +\fBups.conf\fR(5)\&. +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +.sp +this will probably power off your computers, so don\(cqt play around with this option\&. Only use it when your systems are prepared to lose power\&. +.sp .5v +.RE +.SH "ENVIRONMENT VARIABLES" +.sp +\fBNUT_CONFPATH\fR is the path name of the directory that contains upsd\&.conf and other configuration files\&. If this variable is not set, \fBupsdrvctl\fR the driver use a built\-in default, which is often /usr/local/ups/etc\&. +.SH "DIAGNOSTICS" +.sp +upsdrvctl will return a nonzero exit code if it encounters an error while performing the desired operation\&. This will also happen if a driver takes longer than the \fImaxstartdelay\fR period to enter the background\&. +.SH "SEE ALSO" +.sp +\fBnutupsdrv\fR(8), \fBupsd\fR(8), \fBups.conf\fR(5) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsdrvctl.8 b/docs/man/upsdrvctl.txt similarity index 52% rename from man/upsdrvctl.8 rename to docs/man/upsdrvctl.txt index 96031b9..f19fd77 100644 --- a/man/upsdrvctl.8 +++ b/docs/man/upsdrvctl.txt @@ -1,41 +1,49 @@ -.TH UPSDRVCTL 8 "Sat Jan 31 2004" "" "Network UPS Tools (NUT)" -.SH NAME -upsdrvctl \- UPS driver controller -.SH SYNOPSIS -.B upsdrvctl \-h +UPSDRVCTL(8) +============ -.B upsdrvctl [OPTIONS] {start | stop | shutdown} [\fIups\fB] +NAME +---- -.SH DESCRIPTION +upsdrvctl - UPS driver controller -upsdrvctl provides a uniform interface for controlling your UPS drivers. +SYNOPSIS +-------- +*upsdrvctl* -h + +*upsdrvctl* ['OPTIONS'] {start | stop | shutdown} ['ups'] + +DESCRIPTION +----------- + +*upsdrvctl* provides a uniform interface for controlling your UPS drivers. You should use upsdrvctl instead of direct calls to the drivers whenever possible. When used properly, upsdrvctl lets you maintain identical startup scripts across multiple systems with different UPS configurations. -.SH OPTIONS +OPTIONS +------- -.IP \-h -Display the help message. +*-h*:: +Display the help text. -.IP "\-r \fIdirectory\fR" -If starting a driver, this value will direct it to \fBchroot\fR(2) into -\fIdirectory\fR. This can be useful when securing systems. +*-r* 'directory':: +If starting a driver, this value will direct it to *chroot*(2) into +'directory'. This can be useful when securing systems. This may be set in the ups.conf with "chroot" in the global section. -.IP \-t +*-t*:: Enable testing mode. This also enables debug mode. Testing mode makes upsdrvctl display the actions it would execute without actually doing them. Use this to test out your configuration without actually doing anything to your UPS drivers. This may be helpful when defining the 'sdorder' -directive in your \fBups.conf\fR(5). +directive in your linkman:ups.conf[5]. -.IP "\-u \fIusername\fR" -If starting a driver, this value will direct it to \fBsetuid\fR(2) to -the user id associated with \fIusername\fR. +*-u* 'username':: +If starting a driver, this value will direct it to *setuid*(2) to +the user id associated with 'username'. If the driver is started as root without specifying this value, it will use the username that was compiled into the binary. This defaults to @@ -43,44 +51,51 @@ use the username that was compiled into the binary. This defaults to This may be set in ups.conf with "user" in the global section. -.IP "\-D" +*-D*:: Raise the debug level. Use this multiple times for additional details. -.SH COMMANDS +COMMANDS +-------- -upsdrvctl supports three commands \(hy start, stop and shutdown. They take -an optional argument which is a UPS name from \fBups.conf\fR(5). +upsdrvctl supports three commands - start, stop and shutdown. They take +an optional argument which is a UPS name from linkman:ups.conf[5]. Without that argument, they operate on every UPS that is currently configured. -.IP start +*start*:: Start the UPS driver(s). -.IP stop +*stop*:: Stop the UPS driver(s). -.IP shutdown +*shutdown*:: Command the UPS driver(s) to run their shutdown sequence. Drivers are -stopped according to their sdorder value \(hy see \fBups.conf\fR(5). +stopped according to their sdorder value - see linkman:ups.conf[5]. WARNING: this will probably power off your computers, so don't play around with this option. Only use it when your systems are prepared to lose power. -.SH ENVIRONMENT VARIABLES -\fBNUT_CONFPATH\fR is the path name of the directory that contains -\fBups.conf\fR. If this variable is not set, \fBupsdrvctl\fR and the -driver use a built\(hyin default, which is often \fB/usr/local/ups/etc\fR. +ENVIRONMENT VARIABLES +--------------------- -.SH DIAGNOSTICS +*NUT_CONFPATH* is the path name of the directory that contains +`upsd.conf` and other configuration files. If this variable is not set, +*upsdrvctl* the driver use a built-in default, which is often +`/usr/local/ups/etc`. + +DIAGNOSTICS +----------- upsdrvctl will return a nonzero exit code if it encounters an error while performing the desired operation. This will also happen if a -driver takes longer than the \fImaxstartdelay\fR period to enter the +driver takes longer than the 'maxstartdelay' period to enter the background. -.SH SEE ALSO -\fBnutupsdrv\fR(8), \fBupsd\fR(8) \fBups.conf\fR(5) +SEE ALSO +-------- +linkman:nutupsdrv[8], linkman:upsd[8], linkman:ups.conf[5] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsimage.cgi.8 b/docs/man/upsimage.cgi.8 new file mode 100644 index 0000000..d1f5eba --- /dev/null +++ b/docs/man/upsimage.cgi.8 @@ -0,0 +1,69 @@ +'\" t +.\" Title: upsimage.cgi +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSIMAGE\&.CGI" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsimage.cgi \- Image\-generating helper for upsstats\&.cgi +.SH "SYNOPSIS" +.sp +\fBupsimage\&.cgi\fR +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +As a CGI program, this should be invoked through your web server\&. If you run it from the command line, it will either complain about unauthorized access or spew a PNG at you\&. +.sp .5v +.RE +.SH "DESCRIPTION" +.sp +\fBupsimage\&.cgi\fR generates the graphical bars that make up the right side of the page generated by \fBupsstats.cgi\fR(8)\&. These represent the current battery charge, utility voltage, and UPS load where available\&. +.sp +The images are in PNG format, and are created by linking to Boutell\(cqs excellent gd library\&. +.SH "ACCESS CONTROL" +.sp +upsstats will only talk to \fBupsd\fR(8) servers that have been defined in your \fBhosts.conf\fR(5)\&. If it complains about "Access to that host is not authorized", check that file first\&. +.SH "FILES" +.sp +\fBhosts.conf\fR(5) +.SH "SEE ALSO" +.sp +\fBupsd\fR(8), \fBupsstats.cgi\fR(8) +.SS "Internet resources:" +.sp +The gd home page: http://www\&.boutell\&.com/gd/ +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsimage.cgi.txt b/docs/man/upsimage.cgi.txt new file mode 100644 index 0000000..1118bd2 --- /dev/null +++ b/docs/man/upsimage.cgi.txt @@ -0,0 +1,50 @@ +UPSIMAGE.CGI(8) +=============== + +NAME +---- + +upsimage.cgi - Image-generating helper for upsstats.cgi + +SYNOPSIS +-------- + +*upsimage.cgi* + +NOTE: As a CGI program, this should be invoked through your web server. +If you run it from the command line, it will either complain about +unauthorized access or spew a PNG at you. + +DESCRIPTION +----------- + +*upsimage.cgi* generates the graphical bars that make up the right side +of the page generated by linkman:upsstats.cgi[8]. These represent the +current battery charge, utility voltage, and UPS load where available. + +The images are in PNG format, and are created by linking to Boutell's +excellent gd library. + +ACCESS CONTROL +-------------- + +upsstats will only talk to linkman:upsd[8] servers that have been defined +in your linkman:hosts.conf[5]. If it complains about "Access to that host +is not authorized", check that file first. + +FILES +----- + +linkman:hosts.conf[5] + +SEE ALSO +-------- + +linkman:upsd[8], linkman:upsstats.cgi[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ + +The gd home page: http://www.boutell.com/gd/ + +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upslog.8 b/docs/man/upslog.8 new file mode 100644 index 0000000..e3ff7f3 --- /dev/null +++ b/docs/man/upslog.8 @@ -0,0 +1,153 @@ +'\" t +.\" Title: upslog +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSLOG" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upslog \- UPS status logger +.SH "SYNOPSIS" +.sp +\fBupslog \-h\fR +.sp +\fBupslog\fR [\fIOPTIONS\fR] +.SH "DESCRIPTION" +.sp +\fBupslog\fR is a daemon that will poll a UPS at periodic intervals, fetch the variables that interest you, format them, and write them to a file\&. +.sp +The default format string includes variables that are supported by many common UPS models\&. See the description below to make your own\&. +.SH "OPTIONS" +.PP +\fB\-h\fR +.RS 4 +Display the help message\&. +.RE +.PP +\fB\-f\fR \fIformat\fR +.RS 4 +Monitor the UPS using this format string\&. Be sure to enclose +\fIformat\fR +in quotes so your shell doesn\(cqt split it up\&. Valid escapes within this string are: +.PP +%% +.RS 4 +Insert a single "%" +.RE +.PP +%TIME format% +.RS 4 +Insert the time with strftime formatting +.RE +.PP +%ETIME% +.RS 4 +Insert the number of seconds, ala time_t\&. This is now a 10 digit number\&. +.RE +.PP +%HOST% +.RS 4 +insert the local hostname +.RE +.PP +%UPSHOST% +.RS 4 +insert the host of the UPS being monitored +.RE +.PP +%PID% +.RS 4 +insert the pid of upslog +.RE +.PP +%VAR varname% +.RS 4 +insert the value of variable varname +.RE +.RE +.sp +The default format string is: +.sp +.if n \{\ +.RS 4 +.\} +.nf +%TIME @Y@m@d @H@M@S% %VAR battery\&.charge% %VAR input\&.voltage% +%VAR ups\&.load% [%VAR ups\&.status%] %VAR ups\&.temperature% +%VAR input\&.frequency% +.fi +.if n \{\ +.RE +.\} +.PP +\fB\-i\fR \fIinterval\fR +.RS 4 +Wait this many seconds between polls\&. This defaults to 30 seconds\&. +.sp +If you require tighter timing, you should write your own logger using the +\fBupsclient\fR(3) +library\&. +.RE +.PP +\fB\-l\fR \fIlogfile\fR +.RS 4 +Store the results in this file\&. +.sp +You can use "\-" for stdout, but upslog will remain in the foreground\&. +.RE +.PP +\fB\-s\fR \fIups\fR +.RS 4 +Monitor this UPS\&. The format for this option is +upsname[@hostname[:port]]\&. The default hostname is "localhost"\&. +.RE +.PP +\fB\-u\fR \fIusername\fR +.RS 4 +If started as root, upsmon will +\fBsetuid\fR(2) to the user id associated with +\fIusername\fR +for security\&. +.sp +If +\fIusername\fR +is not defined, it will use the value that was compiled into the program\&. This defaults to "nobody", which is less than ideal\&. +.RE +.SH "SERVICE DELAYS" +.sp +The interval value is merely the number given to \fBsleep\fR(3) after running through the format string\&. Therefore, a query will actually take slightly longer than the interval, depending on the speed of your system\&. +.SH "LOG ROTATION" +.sp +\fBupslog\fR writes its PID to upslog\&.pid, and will reopen the log file if you send it a SIGHUP\&. This allows it to keep running when the log is rotated by an external program\&. +.SH "SEE ALSO" +.SS "Server:" +.sp +\fBupsd\fR(8) +.SS "Clients:" +.sp +\fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8), \fBupsmon\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upslog.txt b/docs/man/upslog.txt new file mode 100644 index 0000000..b3603d8 --- /dev/null +++ b/docs/man/upslog.txt @@ -0,0 +1,110 @@ +UPSLOG(8) +========= + +NAME +---- + +upslog - UPS status logger + +SYNOPSIS +-------- + +*upslog -h* + +*upslog* ['OPTIONS'] + +DESCRIPTION +----------- + +*upslog* is a daemon that will poll a UPS at periodic intervals, fetch the +variables that interest you, format them, and write them to a file. + +The default format string includes variables that are supported by many +common UPS models. See the description below to make your own. + +OPTIONS +------- + +*-h*:: +Display the help message. + +*-f* 'format':: +Monitor the UPS using this format string. Be sure to enclose +'format' in quotes so your shell doesn't split it up. Valid escapes +within this string are: + +%%;; Insert a single "%" + +%TIME format%;; Insert the time with strftime formatting + +%ETIME%;; Insert the number of seconds, ala time_t. This is now a +10 digit number. + +%HOST%;; insert the local hostname + +%UPSHOST%;; insert the host of the UPS being monitored + +%PID%;; insert the pid of upslog + +%VAR varname%;; insert the value of variable varname + +The default format string is: + + %TIME @Y@m@d @H@M@S% %VAR battery.charge% %VAR input.voltage% + %VAR ups.load% [%VAR ups.status%] %VAR ups.temperature% + %VAR input.frequency% + +*-i* 'interval':: + +Wait this many seconds between polls. This defaults to 30 seconds. ++ +If you require tighter timing, you should write your own logger using +the linkman:upsclient[3] library. + +*-l* 'logfile':: + +Store the results in this file. ++ +You can use "-" for stdout, but upslog will remain in the foreground. + +*-s* 'ups':: +Monitor this UPS. The format for this option is ++upsname[@hostname[:port]]+. The default hostname is "localhost". + +*-u* 'username':: + +If started as root, upsmon will *setuid*(2) to the user id +associated with 'username' for security. ++ +If 'username' is not defined, it will use the value that was compiled into the +program. This defaults to "nobody", which is less than ideal. + +SERVICE DELAYS +-------------- + +The interval value is merely the number given to *sleep*(3) after running +through the format string. Therefore, a query will actually take slightly +longer than the interval, depending on the speed of your system. + +LOG ROTATION +------------ + +*upslog* writes its PID to `upslog.pid`, and will reopen the log file if you +send it a SIGHUP. This allows it to keep running when the log is rotated +by an external program. + +SEE ALSO +-------- + +Server: +~~~~~~~ +linkman:upsd[8] + +Clients: +~~~~~~~~ +linkman:upsc[8], linkman:upscmd[8], +linkman:upsrw[8], linkman:upsmon[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsmon.8 b/docs/man/upsmon.8 new file mode 100644 index 0000000..6f9c028 --- /dev/null +++ b/docs/man/upsmon.8 @@ -0,0 +1,426 @@ +'\" t +.\" Title: upsmon +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSMON" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsmon \- UPS monitor and shutdown controller +.SH "SYNOPSIS" +.sp +\fBupsmon\fR \-h +.sp +\fBupsmon\fR \-c \fIcommand\fR +.sp +\fBupsmon\fR [\-D] [\-p] [\-u \fIuser\fR] +.SH "DESCRIPTION" +.sp +\fBupsmon\fR is the client process that is responsible for the most important part of UPS monitoring\(emshutting down the system when the power goes out\&. It can call out to other helper programs for notification purposes during power events\&. +.sp +upsmon can monitor multiple systems using a single process\&. Every UPS that is defined in the \fBupsmon.conf\fR(5) configuration file is assigned a power value and a type (slave or master)\&. +.SH "OPTIONS" +.PP +\fB\-h\fR +.RS 4 +Display the help message\&. +.RE +.PP +\fB\-c\fR \fIcommand\fR +.RS 4 +Send the command +\fIcommand\fR +to the existing upsmon process\&. Valid commands are: +.PP +\fBfsd\fR +.RS 4 +shutdown all master UPSes (use with caution) +.RE +.PP +\fBstop\fR +.RS 4 +stop monitoring and exit +.RE +.PP +\fBreload\fR +.RS 4 +reread +\fBupsmon.conf\fR(5) +configuration file\&. See "reloading nuances" below if this doesn\(cqt work\&. +.RE +.RE +.PP +\fB\-D\fR +.RS 4 +Raise the debugging level\&. upsmon will run in the foreground and prints information on stdout about the monitoring process\&. Use this multiple times for more details\&. +.RE +.PP +\fB\-K\fR +.RS 4 +Test for the shutdown flag\&. If it exists and contains the magic string from upsmon, then upsmon will exit with +EXIT_SUCCESS\&. Any other condition will make upsmon exit with +EXIT_FAILURE\&. +.sp +You can test for a successful exit from +upsmon \-K +in your shutdown scripts to know when to call +\fBupsdrvctl\fR(8) +to shut down the UPS\&. +.RE +.PP +\fB\-p\fR +.RS 4 +Run privileged all the time\&. Normally upsmon will split into two processes\&. The majority of the code runs as an unprivileged user, and only a tiny stub runs as root\&. This switch will disable that mode, and run the old "all root all the time" system\&. +.sp +This is not the recommended mode, and you should not use this unless you have a very good reason\&. +.RE +.PP +\fB\-u\fR \fIuser\fR +.RS 4 +Set the user for the unprivileged monitoring process\&. This has no effect when using \-p\&. +.sp +The default user is set at configure time with +\fIconfigure \-\-with\-user=\&...\fR\&. Typically this is +\fInobody\fR, but other distributions will probably have a specific +\fInut\fR +user for this task\&. If your notification scripts need to run as a specific user, set it here\&. +.sp +You can also set this in the +\fBupsmon.conf\fR(5) +file with the RUN_AS_USER directive\&. +.RE +.SH "UPS DEFINITIONS" +.sp +In the \fBupsmon.conf\fR(5), you must specify at least one UPS that will be monitored\&. Use the MONITOR directive\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +MONITOR \*(Aqsystem\*(Aq \*(Aqpowervalue\*(Aq \*(Aqusername\*(Aq \*(Aqpassword\*(Aq \*(Aqtype\*(Aq +.fi +.if n \{\ +.RE +.\} +.sp +The \fIsystem\fR refers to a \fBupsd\fR(8) server, in the form upsname[@hostname[:port]]\&. The default hostname is "localhost"\&. Some examples follow: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +"su700@mybox" means a UPS called "su700" on a system called "mybox"\&. This is the normal form\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +"fenton@bigbox:5678" is a UPS called "fenton" on a system called "bigbox" which runs +\fBupsd\fR(8) +on port "5678"\&. +.RE +.sp +The \fIpowervalue\fR refers to how many power supplies on this system are being driven this UPS\&. This is typically set to 1, but see the section on power values below\&. +.sp +The \fIusername\fR is a section in your \fBupsd.users\fR(5) file\&. Whatever password you set in that section must match the \fIpassword\fR set in this file\&. +.sp +The type set in that section must also match the \fItype\fR here\-\- \fBmaster\fR or \fBslave\fR\&. In general, a master process is one running on the system with the UPS actually plugged into a serial port, and a slave is drawing power from the UPS but can\(cqt talk to it directly\&. See the section on UPS types for more\&. +.SH "NOTIFY EVENTS" +.sp +\fBupsmon\fR senses several events as it monitors each UPS\&. They are called notify events as they can be used to tell the users and admins about the change in status\&. See the additional NOTIFY\-related sections below for information on customizing the delivery of these messages\&. +.PP +\fBONLINE\fR +.RS 4 +The UPS is back on line\&. +.RE +.PP +\fBONBATT\fR +.RS 4 +The UPS is on battery\&. +.RE +.PP +\fBLOWBATT\fR +.RS 4 +The UPS battery is low (as determined by the driver)\&. +.RE +.PP +\fBFSD\fR +.RS 4 +The UPS has been commanded into the "forced shutdown" mode\&. +.RE +.PP +\fBCOMMOK\fR +.RS 4 +Communication with the UPS has been established\&. +.RE +.PP +\fBCOMMBAD\fR +.RS 4 +Communication with the UPS was just lost\&. +.RE +.PP +\fBSHUTDOWN\fR +.RS 4 +The local system is being shut down\&. +.RE +.PP +\fBREPLBATT\fR +.RS 4 +The UPS needs to have its battery replaced\&. +.RE +.PP +\fBNOCOMM\fR +.RS 4 +The UPS can\(cqt be contacted for monitoring\&. +.RE +.SH "NOTIFY COMMAND" +.sp +In \fBupsmon.conf\fR(5), you can configure a program called the NOTIFYCMD that will handle events that occur\&. +.sp +NOTIFYCMD "\fIpath to program\fR" +.sp +NOTIFYCMD "/usr/local/bin/notifyme" +.sp +Remember to wrap the path in "quotes" if it contains any spaces\&. +.sp +The program you run as your NOTIFYCMD can use the environment variables NOTIFYTYPE and UPSNAME to know what has happened and on which UPS\&. It also receives the notification message (see below) as the first (and only) argument, so you can deliver a preformatted message too\&. +.sp +Note that the NOTIFYCMD will only be called for a given event when you set the EXEC flag by using the notify flags, below: +.SH "NOTIFY FLAGS" +.sp +By default, all notify events (see above) generate a global message (wall) to all users, plus they are logged via the syslog\&. You can change this with the NOTIFYFLAG directive in the configuration file: +.sp +NOTIFYFLAG \fInotifytype\fR \fIflags\fR +.sp +Examples: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +NOTIFYFLAG ONLINE SYSLOG +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +NOTIFYFLAG ONBATT SYSLOG+WALL +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC +.RE +.sp +The flags that can be set on a given notify event are: +.PP +\fBSYSLOG\fR +.RS 4 +Write this message to the syslog\&. +.RE +.PP +\fBWALL\fR +.RS 4 +Send this message to all users on the system via +\fBwall\fR(1)\&. +.RE +.PP +\fBEXEC\fR +.RS 4 +Execute the NOTIFYCMD\&. +.RE +.PP +\fBIGNORE\fR +.RS 4 +Don\(cqt do anything\&. If you use this, don\(cqt use any of the other flags\&. +.RE +.sp +You can mix these flags\&. "SYSLOG+WALL+EXEC" does all three for a given event\&. +.SH "NOTIFY MESSAGES" +.sp +upsmon comes with default messages for each of the NOTIFY events\&. These can be changed with the NOTIFYMSG directive\&. +.sp +NOTIFYMSG \fItype\fR "\fImessage\fR" +.sp +Examples: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +NOTIFYMSG ONLINE "UPS %s is getting line power" +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +` NOTIFYMSG ONBATT "Someone pulled the plug on %s"` +.RE +.sp +The first instance of %s is replaced with the identifier of the UPS that generated the event\&. These messages are used when sending walls to the users directly from upsmon, and are also passed to the NOTIFYCMD\&. +.SH "POWER VALUES" +.sp +The "current overall power value" is the sum of all UPSes that are currently able to supply power to the system hosting upsmon\&. Any UPS that is either on line or just on battery contributes to this number\&. If a UPS is critical (on battery and low battery) or has been put into "forced shutdown" mode, it no longer contributes\&. +.sp +A "power value" on a MONITOR line in the config file is the number of power supplies that the UPS runs on the current system\&. +.sp +MONITOR \fIupsname\fR \fIpowervalue\fR \fIusername\fR \fIpassword\fR \fItype\fR +.sp +Normally, you only have one power supply, so it will be set to 1\&. +.sp +MONITOR myups@myhost 1 username mypassword master +.sp +On a large server with redundant power supplies, the power value for a UPS may be greater than 1\&. You may also have more than one of them defined\&. +.sp +MONITOR ups\-alpha@myhost 2 username mypassword master +.sp +MONITOR ups\-beta@myhost 2 username mypassword master +.sp +You can also set the power value for a UPS to 0 if it does not supply any power to that system\&. This is generally used when you want to use the upsmon notification features for a UPS even though it\(cqs not actually running the system that hosts upsmon\&. Don\(cqt set this to "master" unless you really want to power this UPS off when this instance of upsmon needs to shut down for its own reasons\&. +.sp +MONITOR faraway@anotherbox 0 username mypassword slave +.sp +The "minimum power value" is the number of power supplies that must be receiving power in order to keep the computer running\&. +.sp +MINSUPPLIES \fIvalue\fR +.sp +Typical PCs only have 1, so most users will leave this at the default\&. +.sp +MINSUPPLIES 1 +.sp +If you have a server or similar system with redundant power, then this value will usually be set higher\&. One that requires three power supplies to be running at all times would simply set it to 3\&. +.sp +MINSUPPLIES 3 +.sp +When the current overall power value drops below the minimum power value, upsmon starts the shutdown sequence\&. This design allows you to lose some of your power supplies in a redundant power environment without bringing down the entire system while still working properly for smaller systems\&. +.SH "UPS TYPES" +.sp +\fBupsmon\fR and \fBupsd\fR(8) don\(cqt always run on the same system\&. When they do, any UPSes that are directly attached to the upsmon host should be monitored in "master" mode\&. This makes upsmon take charge of that equipment, and it will wait for slaves to disconnect before shutting down the local system\&. This allows the distant systems (monitoring over the network) to shut down cleanly before upsdrvctl shutdown runs and turns them all off\&. +.sp +When upsmon runs as a slave, it is relying on the distant system to tell it about the state of the UPS\&. When that UPS goes critical (on battery and low battery), it immediately invokes the local shutdown command\&. This needs to happen quickly\&. Once it disconnects from the distant \fBupsd\fR(8) server, the master upsmon will start its own shutdown process\&. Your slaves must all shut down before the master turns off the power or filesystem damage may result\&. +.sp +upsmon deals with slaves that get wedged, hang, or otherwise fail to disconnect from \fBupsd\fR(8) in a timely manner with the HOSTSYNC timer\&. During a shutdown situation, the master upsmon will give up after this interval and it will shut down anyway\&. This keeps the master from sitting there forever (which would endanger that host) if a slave should break somehow\&. This defaults to 15 seconds\&. +.sp +If your master system is shutting down too quickly, set the FINALDELAY interval to something greater than the default 15 seconds\&. Don\(cqt set this too high, or your UPS battery may run out of power before the master upsmon process shuts down that system\&. +.SH "TIMED SHUTDOWNS" +.sp +For those rare situations where the shutdown process can\(cqt be completed between the time that low battery is signalled and the UPS actually powers off the load, use the \fBupssched\fR(8) helper program\&. You can use it along with upsmon to schedule a shutdown based on the "on battery" event\&. upssched can then come back to upsmon to initiate the shutdown once it has run on battery too long\&. +.sp +This can be complicated and messy, so stick to the default critical UPS handling if you can\&. +.SH "REDUNDANT POWER SUPPLIES" +.sp +If you have more than one power supply for redundant power, you may also have more than one UPS feeding your computer\&. upsmon can handle this\&. Be sure to set the UPS power values appropriately and the MINSUPPLIES value high enough so that it keeps running until it really does need to shut down\&. +.sp +For example, the HP NetServer LH4 by default has 3 power supplies installed, with one bay empty\&. It has two power cords, one per side of the box\&. This means that one power cord powers two power supply bays, and that you can only have two UPSes supplying power\&. +.sp +Connect UPS "alpha" to the cord feeding two power supplies, and UPS "beta" to the cord that feeds the third and the empty slot\&. Define alpha as a powervalue of 2, and beta as a powervalue of 1\&. Set the MINSUPPLIES to 2\&. +.sp +When alpha goes on battery, your current overall power value will stay at 3, as it\(cqs still supplying power\&. However, once it goes critical (on battery and low battery), it will stop contributing to the current overall power value\&. That means the value will be 1 (beta alone), which is less than 2\&. That is insufficient to run the system, and upsmon will invoke the shutdown sequence\&. +.sp +However, if beta goes critical, subtracting its contribution will take the current overall value from 3 to 2\&. This is just high enough to satisfy the minimum, so the system will continue running as before\&. If beta returns later, it will be re\-added and the current value will go back to 3\&. This allows you to swap out UPSes, change a power configuration, or whatever, as long as you maintain the minimum power value at all times\&. +.SH "MIXED OPERATIONS" +.sp +Besides being able to monitor multiple UPSes, upsmon can also monitor them as different roles\&. If you have a system with multiple power supplies serviced by separate UPS batteries, it\(cqs possible to be a master on one and a slave on the other\&. This usually happens when you run out of serial ports and need to do the monitoring through another system nearby\&. +.sp +This is also complicated, especially when it comes time to power down a UPS that has gone critical but doesn\(cqt supply the local system\&. You can do this with some scripting magic in your notify command script, but it\(cqs beyond the scope of this manual\&. +.SH "FORCED SHUTDOWNS" +.sp +When upsmon is forced to bring down the local system, it sets the "FSD" (forced shutdown) flag on any UPSes that it is running in master mode\&. This is used to synchronize slaves in the event that a master UPS that is otherwise OK needs to be brought down due to some pressing event on the master\&. +.sp +You can manually invoke this mode on the master upsmon by starting another copy with \-c fsd\&. This is useful when you want to initiate a shutdown before the critical stage through some external means, such as \fBupssched\fR(8)\&. +.SH "DEAD UPSES" +.sp +In the event that upsmon can\(cqt reach \fBupsd\fR(8), it declares that UPS "dead" after some interval controlled by DEADTIME in the \fBupsmon.conf\fR(5)\&. If this happens while that UPS was last known to be on battery, it is assumed to have gone critical and no longer contributes to the overall power value\&. +.sp +upsmon will alert you to a UPS that can\(cqt be contacted for monitoring with a "NOCOMM" notifier by default every 300 seconds\&. This can be changed with the NOCOMMWARNTIME setting\&. +.SH "RELOADING NUANCES" +.sp +upsmon usually gives up root powers for the process that does most of the work, including handling signals like SIGHUP to reload the configuration file\&. This means your \fBupsmon.conf\fR(8) file must be readable by the non\-root account that upsmon switches to\&. +.sp +If you want reloads to work, upsmon must run as some user that has permissions to read the configuration file\&. I recommend making a new user just for this purpose, as making the file readable by "nobody" (the default user) would be a bad idea\&. +.sp +See the RUN_AS_USER section in \fBupsmon.conf\fR(8) for more on this topic\&. +.sp +Additionally, you can\(cqt change the SHUTDOWNCMD or POWERDOWNFLAG definitions with a reload due to the split\-process model\&. If you change those values, you \fBmust\fR stop upsmon and start it back up\&. upsmon will warn you in the syslog if you make changes to either of those values during a reload\&. +.SH "SIMULATING POWER FAILURES" +.sp +To test a synchronized shutdown without pulling the plug on your UPS(es), you need only set the forced shutdown (FSD) flag on them\&. You can do this by calling upsmon again to set the flag, i\&.e\&.: +.sp +upsmon \-c fsd +.sp +After that, the master and the slaves will do their usual shutdown sequence as if the battery had gone critical\&. This is much easier on your UPS equipment, and it beats crawling under a desk to find the plug\&. +.SH "FILES" +.sp +\fBupsmon.conf\fR(5) +.SH "SEE ALSO" +.SS "Server:" +.sp +\fBupsd\fR(8) +.SS "Clients:" +.sp +\fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8), \fBupsmon\fR(8) +.SS "CGI programs:" +.sp +\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsmon.conf.5 b/docs/man/upsmon.conf.5 new file mode 100644 index 0000000..b00226c --- /dev/null +++ b/docs/man/upsmon.conf.5 @@ -0,0 +1,390 @@ +'\" t +.\" Title: upsmon.conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSMON\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsmon.conf \- Configuration for Network UPS Tools upsmon +.SH "DESCRIPTION" +.sp +This file\(cqs primary job is to define the systems that \fBupsmon\fR(8) will monitor and to tell it how to shut down the system when necessary\&. It will contain passwords, so keep it secure\&. Ideally, only the upsmon process should be able to read it\&. +.sp +Additionally, other optional configuration values can be set in this file\&. +.SH "CONFIGURATION DIRECTIVES" +.PP +\fBDEADTIME\fR \fIseconds\fR +.RS 4 +upsmon allows a UPS to go missing for this many seconds before declaring it "dead"\&. The default is 15 seconds\&. +.sp +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\&. +.sp +A dead UPS that was last known to be on battery is assumed to have changed to a low battery condition\&. This may force a shutdown if it is providing a critical amount of power to your system\&. This seems disruptive, but the alternative is barreling ahead into oblivion and crashing when you run out of power\&. +.sp +Note: DEADTIME should be a multiple of POLLFREQ and POLLFREQALERT\&. Otherwise, you\(cqll have "dead" UPSes simply because upsmon isn\(cqt polling them quickly enough\&. Rule of thumb: take the larger of the two POLLFREQ values, and multiply by 3\&. +.RE +.PP +\fBFINALDELAY\fR \fIseconds\fR +.RS 4 +When running in master mode, upsmon waits this long after sending the NOTIFY_SHUTDOWN to warn the users\&. After the timer elapses, it then runs your SHUTDOWNCMD\&. By default this is set to 5 seconds\&. +.sp +If you need to let your users do something in between those events, increase this number\&. Remember, at this point your UPS battery is almost depleted, so don\(cqt make this too big\&. +.sp +Alternatively, you can set this very low so you don\(cqt wait around when it\(cqs time to shut down\&. Some UPSes don\(cqt give much warning for low battery and will require a value of 0 here for a safe shutdown\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +If FINALDELAY on the slave is greater than HOSTSYNC on the master, the master will give up waiting for the slave to disconnect\&. +.sp .5v +.RE +.RE +.PP +\fBHOSTSYNC\fR \fIseconds\fR +.RS 4 +upsmon will wait up to this many seconds in master mode for the slaves to disconnect during a shutdown situation\&. By default, this is 15 seconds\&. +.sp +When a UPS goes critical (on battery + low battery, or "FSD": forced shutdown), the slaves are supposed to disconnect and shut down right away\&. The HOSTSYNC timer keeps the master upsmon from sitting there forever if one of the slaves gets stuck\&. +.sp +This value is also used to keep slave systems from getting stuck if the master fails to respond in time\&. After a UPS becomes critical, the slave will wait up to HOSTSYNC seconds for the master to set the FSD flag\&. If that timer expires, the slave will assume that the master is broken and will shut down anyway\&. +.sp +This keeps the slaves from shutting down during a short\-lived status change to "OB LB" that the slaves see but the master misses\&. +.RE +.PP +\fBMINSUPPLIES\fR \fInum\fR +.RS 4 +Set the number of power supplies that must be receiving power to keep this system running\&. Normal computers have just one power supply, so the default value of 1 is acceptable\&. +.sp +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\(cqd set it to 2\&. The idea is to keep the box running as long as possible, right? +.sp +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\&. +.sp +Also see the section on "power values" in +\fBupsmon\fR(8)\&. +.RE +.PP +\fBMONITOR\fR \fIsystem\fR \fIpowervalue\fR \fIusername\fR \fIpassword\fR \fItype\fR +.RS 4 +Each UPS that you need to be monitor should have a MONITOR line\&. Not all of these need supply power to the system that is running upsmon\&. You may monitor other systems if you want to be able to send notifications about status changes on them\&. +.RE +.sp +You must have at least one MONITOR directive in upsmon\&.conf\&. +.sp +\fIsystem\fR is a UPS identifier\&. It is in this form: +.sp +[@[:]] +.sp +The default hostname is "localhost"\&. Some examples: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +"su700@mybox" means a UPS called "su700" on a system called "mybox"\&. This is the normal form\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +"fenton@bigbox:5678" is a UPS called "fenton" on a system called "bigbox" which runs +\fBupsd\fR(8) +on port "5678"\&. +.RE +.sp +\fIpowervalue\fR is an integer representing the number of power supplies that the UPS feeds on this system\&. Most normal computers have one power supply, and the UPS feeds it, so this value will be 1\&. You need a very large or special system to have anything higher here\&. +.sp +You can set the \fIpowervalue\fR to 0 if you want to monitor a UPS that doesn\(cqt actually supply power to this system\&. This is useful when you want to have upsmon do notifications about status changes on a UPS without shutting down when it goes critical\&. +.sp +The \fIusername\fR and \fIpassword\fR on this line must match an entry in that system\(cqs \fBupsd.users\fR(5)\&. If your username is "monmaster" and your password is "blah", the MONITOR line might look like this: +.sp +MONITOR myups@bigserver 1 monmaster blah master +.sp +Meanwhile, the upsd\&.users on bigserver would look like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[monmaster] + password = blah + upsmon master # (or slave) +.fi +.if n \{\ +.RE +.\} +.sp +The \fItype\fR refers to the relationship with \fBupsd\fR(8)\&. It can be either "master" or "slave"\&. See \fBupsmon\fR(8) for more information on the meaning of these modes\&. The mode you pick here also goes in the upsd\&.users file, as seen in the example above\&. +.PP +\fBNOCOMMWARNTIME\fR \fIseconds\fR +.RS 4 +upsmon will trigger a NOTIFY_NOCOMM after this many seconds if it can\(cqt reach any of the UPS entries in this configuration file\&. It keeps warning you until the situation is fixed\&. By default this is 300 seconds\&. +.RE +.PP +\fBNOTIFYCMD\fR \fIcommand\fR +.RS 4 +upsmon calls this to send messages when things happen\&. +.sp +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\&. +.sp +If you need to use +\fBupssched\fR(8), then you must make it your NOTIFYCMD by listing it here\&. +.sp +Note that this is only called for NOTIFY events that have EXEC set with NOTIFYFLAG\&. See NOTIFYFLAG below for more details\&. +.sp +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\&. +.sp +Remember, this command also needs to be one element in the configuration file, so if your command has spaces, then wrap it in quotes\&. +.sp +NOTIFYCMD "/path/to/script \-\-foo \-\-bar" +.sp +This script is run in the background\(emthat is, upsmon forks before it calls out to start it\&. This means that your NOTIFYCMD may have multiple instances running simultaneously if a lot of stuff happens all at once\&. Keep this in mind when designing complicated notifiers\&. +.RE +.PP +\fBNOTIFYMSG\fR \fItype\fR \fImessage\fR +.RS 4 +upsmon comes with a set of stock messages for various events\&. You can change them if you like\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +NOTIFYMSG ONLINE "UPS %s is getting line power" +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +NOTIFYMSG ONBATT "Someone pulled the plug on %s" +.fi +.if n \{\ +.RE +.\} +.sp +Note that +%s +is replaced with the identifier of the UPS in question\&. +.sp +The message must be one element in the configuration file, so if it contains spaces, you must wrap it in quotes\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +NOTIFYMSG NOCOMM "Someone stole UPS %s" +.fi +.if n \{\ +.RE +.\} +.sp +Possible values for +\fItype\fR: +.PP +ONLINE +.RS 4 +UPS is back online +.RE +.PP +ONBATT +.RS 4 +UPS is on battery +.RE +.PP +LOWBATT +.RS 4 +UPS is on battery and has a low battery (is critical) +.RE +.PP +FSD +.RS 4 +UPS is being shutdown by the master (FSD = "Forced Shutdown") +.RE +.PP +COMMOK +.RS 4 +Communications established with the UPS +.RE +.PP +COMMBAD +.RS 4 +Communications lost to the UPS +.RE +.PP +SHUTDOWN +.RS 4 +The system is being shutdown +.RE +.PP +REPLBATT +.RS 4 +The UPS battery is bad and needs to be replaced +.RE +.PP +NOCOMM +.RS 4 +A UPS is unavailable (can\(cqt be contacted for monitoring) +.RE +.RE +.PP +\fBNOTIFYFLAG\fR \fItype\fR \fIflag\fR[+\fIflag\fR][+\fIflag\fR]\&... +.RS 4 +By default, upsmon sends walls global messages to all logged in users) via /bin/wall and writes to the syslog when things happen\&. You can change this\&. +.sp +Examples: +.sp +.if n \{\ +.RS 4 +.\} +.nf +NOTIFYFLAG ONLINE SYSLOG +NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC +.fi +.if n \{\ +.RE +.\} +.sp +Possible values for the flags: +.PP +SYSLOG +.RS 4 +Write the message to the syslog +.RE +.PP +WALL +.RS 4 +Write the message to all users with /bin/wall +.RE +.PP +EXEC +.RS 4 +Execute NOTIFYCMD (see above) with the message +.RE +.PP +IGNORE +.RS 4 +Don\(cqt do anything +.sp +If you use IGNORE, don\(cqt use any other flags on the same line\&. +.RE +.RE +.PP +\fBPOLLFREQ\fR \fIseconds\fR +.RS 4 +Normally upsmon polls the +\fBupsd\fR(8) +server every 5 seconds\&. If this is flooding your network with activity, you can make it higher\&. You can also make it lower to get faster updates in some cases\&. +.sp +There are some catches\&. First, if you set the POLLFREQ too high, you may miss short\-lived power events entirely\&. You also risk triggering the DEADTIME (see above) if you use a very large number\&. +.sp +Second, there is a point of diminishing returns if you set it too low\&. While upsd normally has all of the data available to it instantly, most drivers only refresh the UPS status once every 2 seconds\&. Polling any more than that usually doesn\(cqt get you the information any faster\&. +.RE +.PP +\fBPOLLFREQALERT\fR \fIseconds\fR +.RS 4 +This is the interval that upsmon waits between polls if any of its UPSes are on battery\&. You can use this along with POLLFREQ above to slow down polls during normal behavior, but get quicker updates when something bad happens\&. +.sp +This should always be equal to or lower than the POLLFREQ value\&. By default it is also set 5 seconds\&. +.sp +The warnings from the POLLFREQ entry about too\-high and too\-low values also apply here\&. +.RE +.PP +\fBPOWERDOWNFLAG\fR \fIfilename\fR +.RS 4 +upsmon creates this file when running in master mode when the UPS needs to be powered off\&. You should check for this file in your shutdown scripts and call +upsdrvctl shutdown +if it exists\&. +.sp +This is done to forcibly reset the slaves, so they don\(cqt get stuck at the "halted" stage even if the power returns during the shutdown process\&. This usually does not work well on contact\-closure UPSes that use the genericups driver\&. +.sp +See the shutdown\&.txt file in the docs subdirectory for more information\&. +.RE +.PP +\fBRBWARNTIME\fR \fIseconds\fR +.RS 4 +When a UPS says that it needs to have its battery replaced, upsmon will generate a NOTIFY_REPLBATT event\&. By default, this happens every 43200 seconds (12 hours)\&. +.sp +If you need another value, set it here\&. +.RE +.PP +\fBRUN_AS_USER\fR \fIusername\fR +.RS 4 +upsmon normally runs the bulk of the monitoring duties under another user ID after dropping root privileges\&. On most systems this means it runs as "nobody", since that\(cqs the default from compile\-time\&. +.sp +The catch is that "nobody" can\(cqt read your upsmon\&.conf, since by default it is installed so that only root can open it\&. This means you won\(cqt be able to reload the configuration file, since it will be unavailable\&. +.sp +The solution is to create a new user just for upsmon, then make it run as that user\&. I suggest "nutmon", but you can use anything that isn\(cqt already taken on your system\&. Just create a regular user with no special privileges and an impossible password\&. +.sp +Then, tell upsmon to run as that user, and make +upsmon\&.conf +readable by it\&. Your reloads will work, and your config file will stay secure\&. +.sp +This file should not be writable by the upsmon user, as it would be possible to exploit a hole, change the SHUTDOWNCMD to something malicious, then wait for upsmon to be restarted\&. +.RE +.PP +\fBSHUTDOWNCMD\fR \fIcommand\fR +.RS 4 +upsmon runs this command when the system needs to be brought down\&. If it is a slave, it will do that immediately whenever the current overall power value drops below the MINSUPPLIES value above\&. +.sp +When upsmon is a master, it will allow any slaves to log out before starting the local shutdown procedure\&. +.sp +Note that the command needs to be one element in the config file\&. If your shutdown command includes spaces, then put it in quotes to keep it together, i\&.e\&.: +.sp +.if n \{\ +.RS 4 +.\} +.nf +SHUTDOWNCMD "/sbin/shutdown \-h +0" +.fi +.if n \{\ +.RE +.\} +.RE +.SH "SEE ALSO" +.sp +\fBupsmon\fR(8), \fBupsd\fR(8), \fBnutupsdrv\fR(8)\&. +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsmon.conf.5 b/docs/man/upsmon.conf.txt similarity index 67% rename from man/upsmon.conf.5 rename to docs/man/upsmon.conf.txt index 592c929..7491806 100644 --- a/man/upsmon.conf.5 +++ b/docs/man/upsmon.conf.txt @@ -1,180 +1,183 @@ -.TH UPSMON.CONF 5 "Mon Jan 22 2007" "" "Network UPS Tools (NUT)" -.SH NAME -upsmon.conf \- Configuration for Network UPS Tools upsmon +UPSMON.CONF(5) +============== -.SH DESCRIPTION +NAME +---- -This file's primary job is to define the systems that \fBupsmon\fR(8) +upsmon.conf - Configuration for Network UPS Tools upsmon + +DESCRIPTION +----------- + +This file's primary job is to define the systems that linkman:upsmon[8] will monitor and to tell it how to shut down the system when necessary. -It will contain passwords, so keep it secure. Ideally,only the upsmon +It will contain passwords, so keep it secure. Ideally, only the upsmon process should be able to read it. Additionally, other optional configuration values can be set in this file. -.SH CONFIGURATION DIRECTIVES +CONFIGURATION DIRECTIVES +------------------------ -.IP "DEADTIME \fIseconds\fR" +*DEADTIME* 'seconds':: upsmon allows a UPS to go missing for this many seconds before declaring it "dead". The default is 15 seconds. - ++ 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 changed to a low battery condition. This may force a shutdown if it is providing a critical amount of power to your system. This seems disruptive, but the alternative is barreling ahead into oblivion and crashing when you run out of power. - ++ 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. -.IP "FINALDELAY \fIseconds\fR" +*FINALDELAY* 'seconds':: When running in master mode, upsmon waits this long after sending the NOTIFY_SHUTDOWN to warn the users. After the timer elapses, it then runs your SHUTDOWNCMD. By default this is set to 5 seconds. - ++ If you need to let your users do something in between those events, increase this number. Remember, at this point your UPS battery is almost depleted, so don't make this too big. - ++ 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, ++ +NOTE: If FINALDELAY on the slave is greater than HOSTSYNC on the master, the master will give up waiting for the slave to disconnect. -.IP "HOSTSYNC \fIseconds\fR" +*HOSTSYNC* 'seconds':: upsmon will wait up to this many seconds in master mode for the slaves to disconnect during a shutdown situation. By default, this is 15 seconds. - -When a UPS goes critical (on battery + low battery, or "FSD" \(hy forced ++ +When a UPS goes critical (on battery + low battery, or "FSD": forced shutdown), the slaves are supposed to disconnect and shut down right away. The HOSTSYNC timer keeps the master upsmon from sitting there forever if one of the slaves gets stuck. - ++ This value is also used to keep slave systems from getting stuck if the master fails to respond in time. After a UPS becomes critical, the slave will wait up to HOSTSYNC seconds for the master to set the FSD flag. If that timer expires, the slave will assume that the master is broken and will shut down anyway. - -This keeps the slaves from shutting down during a short\(hylived status ++ +This keeps the slaves from shutting down during a short-lived status change to "OB LB" that the slaves see but the master misses. -.IP "MINSUPPLIES \fInum\fR" +*MINSUPPLIES* 'num':: Set the number of power supplies that must be receiving power to keep this system running. Normal computers have just one power supply, so the default value of 1 is acceptable. - ++ 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 it 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\(hyservers.txt in the docs +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. ++ +Also see the section on "power values" in linkman:upsmon[8]. -Also see the section on "power values" in \fBupsmon\fR(8). - -.IP "MONITOR \fIsystem\fR \fIpowervalue\fR \fIusername\fR \fIpassword\fR \fItype\fR" +*MONITOR* 'system' 'powervalue' 'username' 'password' 'type':: Each UPS that you need to be monitor should have a MONITOR line. Not all of these need supply power to the system that is running upsmon. You may monitor other systems if you want to be able to send notifications about status changes on them. -You must have at least one MONITOR directive in this file. +You must have at least one MONITOR directive in `upsmon.conf`. -\fIsystem\fR is a UPS identifier. It is in this form: +'system' is a UPS identifier. It is in this form: - [@[:]] ++[@[:]]+ The default hostname is "localhost". Some examples: - \(hy "su700@mybox" means a UPS called "su700" on a system called "mybox". + - "su700@mybox" means a UPS called "su700" on a system called "mybox". This is the normal form. + - "fenton@bigbox:5678" is a UPS called "fenton" on a system called +"bigbox" which runs linkman:upsd[8] on port "5678". - \(hy "fenton@bigbox:5678" is a UPS called "fenton" on a system called -"bigbox" which runs \fBupsd\fR(8) on port "5678". - -\fIpowervalue\fR is an integer representing the number of power supplies +'powervalue' is an integer representing the number of power supplies that the UPS feeds on this system. Most normal computers have one power supply, and the UPS feeds it, so this value will be 1. You need a very large or special system to have anything higher here. -You can set the \fIpowervalue\fR to 0 if you want to monitor a UPS that +You can set the 'powervalue' to 0 if you want to monitor a UPS that doesn't actually supply power to this system. This is useful when you want to have upsmon do notifications about status changes on a UPS without shutting down when it goes critical. -The \fIusername\fR and \fIpassword\fR on this line must match an entry -in that system's \fBupsd.users\fR(5). If your username is "monmaster" +The 'username' and 'password' on this line must match an entry +in that system's linkman:upsd.users[5]. If your username is "monmaster" and your password is "blah", the MONITOR line might look like this: -MONITOR myups@bigserver 1 monmaster blah master ++MONITOR myups@bigserver 1 monmaster blah master+ -Meanwhile, the upsd.users on 'bigserver' would look like this: +Meanwhile, the `upsd.users` on `bigserver` would look like this: [monmaster] - password = blah + upsmon master # (or slave) - upsmon master (or slave) - -The \fItype\fR refers to the relationship with \fBupsd\fR(8). It can -be either "master" or "slave". See \fBupsmon\fR(8) for more information +The 'type' refers to the relationship with linkman:upsd[8]. It can +be either "master" or "slave". See linkman:upsmon[8] for more information on the meaning of these modes. The mode you pick here also goes in -the upsd.users file, as seen in the example above. +the `upsd.users` file, as seen in the example above. -.IP "NOCOMMWARNTIME \fIseconds\fR" +*NOCOMMWARNTIME* 'seconds':: upsmon will trigger a NOTIFY_NOCOMM after this many seconds if it can't reach any of the UPS entries in this configuration file. It keeps warning you until the situation is fixed. By default this is 300 seconds. -.IP "NOTIFYCMD \fIcommand\fR" +*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. - -If you need to use \fBupssched\fR(8), then you must make it your ++ +If you need to use linkman:upssched[8], then you must make it your NOTIFYCMD by listing it here. - ++ 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. - -Remember, this also needs to be one element in the configuration file, ++ +Remember, this command also needs to be one element in the configuration file, so if your command has spaces, then wrap it in quotes. - - NOTIFYCMD "/path/to/script \-\-foo \-\-bar" - -This script is run in the background \(hy that is, upsmon forks before it ++ ++NOTIFYCMD "/path/to/script --foo --bar"+ ++ +This script is run in the background--that is, upsmon forks before it calls out to start it. This means that your NOTIFYCMD may have multiple instances running simultaneously if a lot of stuff happens all at once. Keep this in mind when designing complicated notifiers. -.IP "NOTIFYMSG \fItype\fR \fImessage\fR\" +*NOTIFYMSG* 'type' 'message':: upsmon comes with a set of stock messages for various events. You can change them if you like. @@ -182,146 +185,147 @@ change them if you like. NOTIFYMSG ONLINE "UPS %s is getting line power" NOTIFYMSG ONBATT "Someone pulled the plug on %s" - -Note that %s is replaced with the identifier of the UPS in question. - -Possible values for \fItype\fR: - - ONLINE \(hy UPS is back online - - ONBATT \(hy UPS is on battery - - LOWBATT \(hy UPS is on battery and has a low battery (is critical) - - FSD \(hy UPS is being shutdown by the master (FSD = "Forced Shutdown") - - COMMOK \(hy Communications established with the UPS - - COMMBAD \(hy Communications lost to the UPS - - SHUTDOWN \(hy The system is being shutdown - - REPLBATT \(hy The UPS battery is bad and needs to be replaced - - NOCOMM \(hy A UPS is unavailable (can't be contacted for monitoring) - ++ +Note that +%s+ is replaced with the identifier of the UPS in question. ++ The message must be one element in the configuration file, so if it contains spaces, you must wrap it in quotes. NOTIFYMSG NOCOMM "Someone stole UPS %s" ++ +Possible values for 'type': -.IP "NOTIFYFLAG \fItype\fR \fIflag\fR[+\fIflag\fR][+\fIflag\fR]..." +ONLINE;; UPS is back online + +ONBATT;; UPS is on battery + +LOWBATT;; UPS is on battery and has a low battery (is 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) + +*NOTIFYFLAG* 'type' 'flag'[\+'flag'][+'flag']...:: By default, upsmon sends walls global messages to all logged in users) via /bin/wall and writes to the syslog when things happen. You can change this. - ++ Examples: - ++ NOTIFYFLAG ONLINE SYSLOG - NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC - ++ Possible values for the flags: ++ +SYSLOG;; Write the message to the syslog - SYSLOG \(hy Write the message to the syslog +WALL;; Write the message to all users with /bin/wall - WALL \(hy Write the message to all users with /bin/wall - - EXEC \(hy Execute NOTIFYCMD (see above) with the message - - IGNORE \(hy Don't do anything +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. -.IP "POLLFREQ \fIseconds\fR" +*POLLFREQ* 'seconds':: -Normally upsmon polls the \fBupsd\fR(8) server every 5 seconds. If this +Normally upsmon polls the linkman:upsd[8] server every 5 seconds. If this is flooding your network with activity, you can make it higher. You can also make it lower to get faster updates in some cases. - ++ There are some catches. First, if you set the POLLFREQ too high, you -may miss short\(hylived power events entirely. You also risk triggering +may miss short-lived power events entirely. You also risk triggering the DEADTIME (see above) if you use a very large number. - ++ Second, there is a point of diminishing returns if you set it too low. While upsd normally has all of the data available to it instantly, most drivers only refresh the UPS status once every 2 seconds. Polling any more than that usually doesn't get you the information any faster. -.IP "POLLFREQALERT \fIseconds\fR" +*POLLFREQALERT* 'seconds':: This is the interval that upsmon waits between polls if any of its UPSes are on battery. You can use this along with POLLFREQ above to slow down polls during normal behavior, but get quicker updates when something bad happens. - ++ This should always be equal to or lower than the POLLFREQ value. By default it is also set 5 seconds. - -The warnings from the POLLFREQ entry about too\(hyhigh and too\(hylow values ++ +The warnings from the POLLFREQ entry about too-high and too-low values also apply here. -.IP "POWERDOWNFLAG \fIfilename\fR" +*POWERDOWNFLAG* 'filename':: upsmon creates this file when running in master mode when the UPS needs to be powered off. You should check for this file in your shutdown -scripts and call \fBupsdrvctl shutdown\fR if it exists. - +scripts and call `upsdrvctl shutdown` if it exists. ++ This is done to forcibly reset the slaves, so they don't get stuck at the "halted" stage even if the power returns during the shutdown -process. This usually does not work well on contact\(hyclosure UPSes that +process. This usually does not work well on contact-closure UPSes that use the genericups driver. - ++ See the shutdown.txt file in the docs subdirectory for more information. -.IP "RBWARNTIME \fIseconds\fR" +*RBWARNTIME* 'seconds':: When a UPS says that it needs to have its battery replaced, upsmon will -generate a NOTIFY_REPLBATT event. By default this happens every 43200 -seconds \(hy 12 hours. - +generate a NOTIFY_REPLBATT event. By default, this happens every 43200 +seconds (12 hours). ++ If you need another value, set it here. -.IP "RUN_AS_USER \fIusername\fR" +*RUN_AS_USER* 'username':: upsmon normally runs the bulk of the monitoring duties under another user ID after dropping root privileges. On most systems this means it runs -as "nobody", since that's the default from compile\(hytime. - +as "nobody", since that's the default from compile-time. ++ The catch is that "nobody" can't read your upsmon.conf, since by default it is installed so that only root can open it. This means you won't be able to reload the configuration file, since it will be unavailable. - ++ The solution is to create a new user just for upsmon, then make it run as that user. I suggest "nutmon", but you can use anything that isn't already taken on your system. Just create a regular user with no special privileges and an impossible password. - -Then, tell upsmon to run as that user, and make upsmon.conf readable by it. ++ +Then, tell upsmon to run as that user, and make `upsmon.conf` readable by it. Your reloads will work, and your config file will stay secure. - ++ This file should not be writable by the upsmon user, as it would be possible to exploit a hole, change the SHUTDOWNCMD to something malicious, then wait for upsmon to be restarted. -.IP "SHUTDOWNCMD \fIcommand\fR" +*SHUTDOWNCMD* 'command':: upsmon runs this command when the system needs to be brought down. If it is a slave, it will do that immediately whenever the current overall power value drops below the MINSUPPLIES value above. - ++ When upsmon is a master, it will allow any slaves to log out before starting the local shutdown procedure. - ++ Note that the command needs to be one element in the config file. If your shutdown command includes spaces, then put it in quotes to keep it together, i.e.: - SHUTDOWNCMD "/sbin/shutdown \-h +0" + SHUTDOWNCMD "/sbin/shutdown -h +0" -.SH SEE ALSO -\fBupsmon\fR(8), \fBupsd\fR(8), \fBnutupsdrv\fR(8). +SEE ALSO +-------- +linkman:upsmon[8], linkman:upsd[8], linkman:nutupsdrv[8]. -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/man/upsmon.8 b/docs/man/upsmon.txt similarity index 68% rename from man/upsmon.8 rename to docs/man/upsmon.txt index caca2ee..025c6e4 100644 --- a/man/upsmon.8 +++ b/docs/man/upsmon.txt @@ -1,149 +1,159 @@ -.TH UPSMON 8 "Mon Jan 22 2007" "" "Network UPS Tools (NUT)" -.SH NAME -upsmon \- UPS monitor and shutdown controller -.SH SYNOPSIS -.B upsmon \-h +UPSMON(8) +========= -.B upsmon \-c \fIcommand\fR +NAME +---- -.B upsmon [\-D] [\-p] [\-u \fIuser\fR] +upsmon - UPS monitor and shutdown controller -.SH DESCRIPTION +SYNOPSIS +-------- -.B upsmon -is the client process that is responsible for the most important part of -UPS monitoring \(hy shutting down the system when the power goes out. It +*upsmon* -h + +*upsmon* -c 'command' + +*upsmon* [-D] [-p] [-u 'user'] + +DESCRIPTION +----------- + +*upsmon* is the client process that is responsible for the most important part +of UPS monitoring--shutting down the system when the power goes out. It can call out to other helper programs for notification purposes during power events. upsmon can monitor multiple systems using a single process. Every UPS -that is defined in the \fBupsmon.conf\fR(5) configuration file is assigned +that is defined in the linkman:upsmon.conf[5] configuration file is assigned a power value and a type (slave or master). -.SH OPTIONS +OPTIONS +------- -.IP \-h +*-h*:: Display the help message. -.IP "\-c \fIcommand\fR" -Send the command \fIcommand\fR to the existing upsmon process. Valid +*-c* 'command':: +Send the command 'command' to the existing upsmon process. Valid commands are: -fsd \(hy shutdown all master UPSes (use with caution) +*fsd*;; shutdown all master UPSes (use with caution) -stop \(hy stop monitoring and exit +*stop*;; stop monitoring and exit -reload \(hy reread \fBupsmon.conf\fR(5) configuration file. See +*reload*;; reread linkman:upsmon.conf[5] configuration file. See "reloading nuances" below if this doesn't work. -.IP \-D +*-D*:: Raise the debugging level. upsmon will run in the foreground and prints information on stdout about the monitoring process. Use this multiple times for more details. -.IP \-K +*-K*:: Test for the shutdown flag. If it exists and contains the magic string -from upsmon, then upsmon will exit with EXIT_SUCCESS. Any other condition -will make upsmon exit with EXIT_FAILURE. +from upsmon, then upsmon will exit with `EXIT_SUCCESS`. Any other condition +will make upsmon exit with `EXIT_FAILURE`. ++ +You can test for a successful exit from `upsmon -K` in your shutdown +scripts to know when to call linkman:upsdrvctl[8] to shut down the UPS. -You can test for a successful exit from upsmon \-K in your shutdown -scripts to know when to call \fBupsdrvctl\fR(8) to shut down the UPS. - -.IP \-p +*-p*:: Run privileged all the time. Normally upsmon will split into two processes. The majority of the code runs as an unprivileged user, and only a tiny stub runs as root. This switch will disable that mode, and run the old "all root all the time" system. - ++ This is not the recommended mode, and you should not use this unless you have a very good reason. -.IP "\-u \fIuser\fR" +*-u* 'user':: Set the user for the unprivileged monitoring process. This has no effect -when using \-p. -.IP +when using -p. ++ The default user is set at configure time with 'configure -\-\-with\-user=...'. Typically this is 'nobody', but other distributions +--with-user=...'. Typically this is 'nobody', but other distributions will probably have a specific 'nut' user for this task. If your notification scripts need to run as a specific user, set it here. -.IP -You can also set this in the \fBupsmon.conf\fR(5) file with the ++ +You can also set this in the linkman:upsmon.conf[5] file with the RUN_AS_USER directive. -.SH UPS DEFINITIONS +UPS DEFINITIONS +--------------- -In the \fBupsmon.conf\fR(5), you must specify at least one UPS that will +In the linkman:upsmon.conf[5], you must specify at least one UPS that will be monitored. Use the MONITOR directive. - MONITOR \fIsystem\fR \fIpowervalue\fR \fIusername\fR -\fIpassword\fR \fItype\fR + MONITOR 'system' 'powervalue' 'username' 'password' 'type' -The \fIsystem\fR refers to a \fBupsd\fR(8) server, in the form -upsname[@hostname[:port]]. The default hostname is "localhost". Some +The 'system' refers to a linkman:upsd[8] server, in the form ++upsname[@hostname[:port]]+. The default hostname is "localhost". Some examples follow: - \(hy "su700@mybox" means a UPS called "su700" on a system called "mybox". + - "su700@mybox" means a UPS called "su700" on a system called "mybox". This is the normal form. - \(hy "fenton@bigbox:5678" is a UPS called "fenton" on a system called -"bigbox" which runs \fBupsd\fR(8) on port "5678". + - "fenton@bigbox:5678" is a UPS called "fenton" on a system called +"bigbox" which runs linkman:upsd[8] on port "5678". -The \fIpowervalue\fR refers to how many power supplies on this system are +The 'powervalue' refers to how many power supplies on this system are being driven this UPS. This is typically set to 1, but see the section on power values below. -The \fIusername\fR is a section in your \fBupsd.users\fR(5) file. -Whatever password you set in that section must match the \fIpassword\fR +The 'username' is a section in your linkman:upsd.users[5] file. +Whatever password you set in that section must match the 'password' set in this file. -The type set in that section must also match the \fItype\fR here \(hy -\fBmaster\fR or \fBslave\fR. In general, a master process is one +The type set in that section must also match the 'type' here-- +*master* or *slave*. In general, a master process is one running on the system with the UPS actually plugged into a serial port, and a slave is drawing power from the UPS but can't talk to it directly. See the section on UPS types for more. -.SH NOTIFY EVENTS +NOTIFY EVENTS +------------- -upsmon senses several events as it monitors each UPS. They are called +*upsmon* senses several events as it monitors each UPS. They are called notify events as they can be used to tell the users and admins about the -change in status. See the additional NOTIFY\(hyrelated sections below for +change in status. See the additional NOTIFY-related sections below for information on customizing the delivery of these messages. -.IP ONLINE +*ONLINE*:: The UPS is back on line. -.IP ONBATT +*ONBATT*:: The UPS is on battery. -.IP LOWBATT +*LOWBATT*:: The UPS battery is low (as determined by the driver). -.IP FSD +*FSD*:: The UPS has been commanded into the "forced shutdown" mode. -.IP COMMOK +*COMMOK*:: Communication with the UPS has been established. -.IP COMMBAD +*COMMBAD*:: Communication with the UPS was just lost. -.IP SHUTDOWN +*SHUTDOWN*:: The local system is being shut down. -.IP REPLBATT +*REPLBATT*:: The UPS needs to have its battery replaced. -.IP NOCOMM +*NOCOMM*:: The UPS can't be contacted for monitoring. -.SH NOTIFY COMMAND +NOTIFY COMMAND +-------------- -In \fBupsmon.conf\fR(5), you can configure a program called the NOTIFYCMD +In linkman:upsmon.conf[5], you can configure a program called the NOTIFYCMD that will handle events that occur. - NOTIFYCMD "\fIpath to program\fR" ++NOTIFYCMD+ "'path to program'" - NOTIFYCMD "/usr/local/bin/notifyme" ++NOTIFYCMD "/usr/local/bin/notifyme"+ Remember to wrap the path in "quotes" if it contains any spaces. @@ -155,57 +165,60 @@ only) argument, so you can deliver a preformatted message too. Note that the NOTIFYCMD will only be called for a given event when you set the EXEC flag by using the notify flags, below: -.SH NOTIFY FLAGS +NOTIFY FLAGS +------------ By default, all notify events (see above) generate a global message (wall) to all users, plus they are logged via the syslog. You can change this with the NOTIFYFLAG directive in the configuration file: - NOTIFYFLAG \fInotifytype\fR \fIflags\fR ++NOTIFYFLAG+ 'notifytype' 'flags' - Examples: +Examples: - NOTIFYFLAG ONLINE SYSLOG + - `NOTIFYFLAG ONLINE SYSLOG` - NOTIFYFLAG ONBATT SYSLOG+WALL + - `NOTIFYFLAG ONBATT SYSLOG+WALL` - NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC + - `NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC` The flags that can be set on a given notify event are: -.IP SYSLOG +*SYSLOG*:: Write this message to the syslog. -.IP WALL -Send this message to all users on the system via 'wall'. +*WALL*:: +Send this message to all users on the system via *wall*(1). -.IP EXEC +*EXEC*:: Execute the NOTIFYCMD. -.IP IGNORE +*IGNORE*:: Don't do anything. If you use this, don't use any of the other flags. -.P + You can mix these flags. "SYSLOG+WALL+EXEC" does all three for a given event. -.SH NOTIFY MESSAGES +NOTIFY MESSAGES +--------------- upsmon comes with default messages for each of the NOTIFY events. These can be changed with the NOTIFYMSG directive. - NOTIFYMSG \fItype\fR "\fImessage\fR" ++NOTIFYMSG+ 'type' "'message'" - Examples: +Examples: - NOTIFYMSG ONLINE "UPS %s is getting line power" + - `NOTIFYMSG ONLINE "UPS %s is getting line power"` - NOTIFYMSG ONBATT "Someone pulled the plug on %s" + - ` NOTIFYMSG ONBATT "Someone pulled the plug on %s"` The first instance of %s is replaced with the identifier of the UPS that generated the event. These messages are used when sending walls to the users directly from upsmon, and are also passed to the NOTIFYCMD. -.SH POWER VALUES +POWER VALUES +------------ The "current overall power value" is the sum of all UPSes that are currently able to supply power to the system hosting upsmon. Any @@ -216,18 +229,18 @@ put into "forced shutdown" mode, it no longer contributes. A "power value" on a MONITOR line in the config file is the number of power supplies that the UPS runs on the current system. - MONITOR \fIupsname\fR \fIpowervalue\fR \fIusername\fR \fIpassword\fR \fItype\fR ++MONITOR+ 'upsname' 'powervalue' 'username' 'password' 'type' Normally, you only have one power supply, so it will be set to 1. - MONITOR myups@myhost 1 username mypassword master ++MONITOR myups@myhost 1 username mypassword master+ On a large server with redundant power supplies, the power value for a UPS may be greater than 1. You may also have more than one of them defined. - MONITOR ups\-alpha@myhost 2 username mypassword master ++MONITOR ups-alpha@myhost 2 username mypassword master+ - MONITOR ups\-beta@myhost 2 username mypassword master ++MONITOR ups-beta@myhost 2 username mypassword master+ You can also set the power value for a UPS to 0 if it does not supply any power to that system. This is generally used when you want to use the @@ -236,48 +249,49 @@ running the system that hosts upsmon. Don't set this to "master" unless you really want to power this UPS off when this instance of upsmon needs to shut down for its own reasons. - MONITOR faraway@anotherbox 0 username mypassword slave ++MONITOR faraway@anotherbox 0 username mypassword slave+ The "minimum power value" is the number of power supplies that must be receiving power in order to keep the computer running. - MINSUPPLIES \fIvalue\fR ++MINSUPPLIES+ 'value' Typical PCs only have 1, so most users will leave this at the default. - MINSUPPLIES 1 ++MINSUPPLIES 1+ If you have a server or similar system with redundant power, then this value will usually be set higher. One that requires three power supplies to be running at all times would simply set it to 3. - MINSUPPLIES 3 ++MINSUPPLIES 3+ When the current overall power value drops below the minimum power value, upsmon starts the shutdown sequence. This design allows you to lose some of your power supplies in a redundant power environment without bringing down the entire system while still working properly for smaller systems. -.SH UPS TYPES +UPS TYPES +--------- -upsmon and \fBupsd\fR(8) don't always run on the same system. When they +*upsmon* and linkman:upsd[8] don't always run on the same system. When they do, any UPSes that are directly attached to the upsmon host should be monitored in "master" mode. This makes upsmon take charge of that equipment, and it will wait for slaves to disconnect before shutting down the local system. This allows the distant systems (monitoring over -the network) to shut down cleanly before \fBupsdrvctl shutdown\fR runs +the network) to shut down cleanly before `upsdrvctl shutdown` runs and turns them all off. When upsmon runs as a slave, it is relying on the distant system to tell it about the state of the UPS. When that UPS goes critical (on battery and low battery), it immediately invokes the local shutdown command. This needs to happen quickly. Once it disconnects from the distant -\fBupsd\fR(8) server, the master upsmon will start its own shutdown +linkman:upsd[8] server, the master upsmon will start its own shutdown process. Your slaves must all shut down before the master turns off the power or filesystem damage may result. upsmon deals with slaves that get wedged, hang, or otherwise fail to -disconnect from \fBupsd\fR(8) in a timely manner with the HOSTSYNC +disconnect from linkman:upsd[8] in a timely manner with the HOSTSYNC timer. During a shutdown situation, the master upsmon will give up after this interval and it will shut down anyway. This keeps the master from sitting there forever (which would endanger that host) if a slave should @@ -288,19 +302,21 @@ interval to something greater than the default 15 seconds. Don't set this too high, or your UPS battery may run out of power before the master upsmon process shuts down that system. -.SH TIMED SHUTDOWNS +TIMED SHUTDOWNS +--------------- For those rare situations where the shutdown process can't be completed between the time that low battery is signalled and the UPS actually powers -off the load, use the \fBupssched\fR(8) helper program. You can use it +off the load, use the linkman:upssched[8] helper program. You can use it along with upsmon to schedule a shutdown based on the "on battery" event. -upssched can then come back to upsmon to initiate the shutdown once it's +upssched can then come back to upsmon to initiate the shutdown once it has run on battery too long. This can be complicated and messy, so stick to the default critical UPS handling if you can. -.SH REDUNDANT POWER SUPPLIES +REDUNDANT POWER SUPPLIES +------------------------ If you have more than one power supply for redundant power, you may also have more than one UPS feeding your computer. upsmon can handle this. Be @@ -328,11 +344,12 @@ the shutdown sequence. However, if beta goes critical, subtracting its contribution will take the current overall value from 3 to 2. This is just high enough to satisfy the minimum, so the system will continue running as before. If beta -returns later, it will be re\(hyadded and the current value will go back to +returns later, it will be re-added and the current value will go back to 3. This allows you to swap out UPSes, change a power configuration, or whatever, as long as you maintain the minimum power value at all times. -.SH MIXED OPERATIONS +MIXED OPERATIONS +---------------- Besides being able to monitor multiple UPSes, upsmon can also monitor them as different roles. If you have a system with multiple power supplies @@ -345,7 +362,8 @@ UPS that has gone critical but doesn't supply the local system. You can do this with some scripting magic in your notify command script, but it's beyond the scope of this manual. -.SH FORCED SHUTDOWNS +FORCED SHUTDOWNS +---------------- When upsmon is forced to bring down the local system, it sets the "FSD" (forced shutdown) flag on any UPSes that it is running in master @@ -354,15 +372,16 @@ that is otherwise OK needs to be brought down due to some pressing event on the master. You can manually invoke this mode on the master upsmon by starting another -copy with '\-c fsd'. This is useful when you want to initiate a shutdown +copy with `-c fsd`. This is useful when you want to initiate a shutdown before the critical stage through some external means, such as -\fBupssched\fR(8). +linkman:upssched[8]. -.SH DEAD UPSES +DEAD UPSES +---------- -In the event that upsmon can't reach \fBupsd\fR(8), it declares that UPS +In the event that upsmon can't reach linkman:upsd[8], it declares that UPS "dead" after some interval controlled by DEADTIME in the -\fBupsmon.conf\fR(5). If this happens while that UPS was last known to be +linkman:upsmon.conf[5]. If this happens while that UPS was last known to be on battery, it is assumed to have gone critical and no longer contributes to the overall power value. @@ -370,53 +389,61 @@ upsmon will alert you to a UPS that can't be contacted for monitoring with a "NOCOMM" notifier by default every 300 seconds. This can be changed with the NOCOMMWARNTIME setting. -.SH RELOADING NUANCES +RELOADING NUANCES +----------------- upsmon usually gives up root powers for the process that does most of the work, including handling signals like SIGHUP to reload the configuration -file. This means your \fBupsmon.conf\fR(8) file must be readable by -the non\(hyroot account that upsmon switches to. +file. This means your linkman:upsmon.conf[8] file must be readable by +the non-root account that upsmon switches to. If you want reloads to work, upsmon must run as some user that has permissions to read the configuration file. I recommend making a new user just for this purpose, as making the file readable by "nobody" (the default user) would be a bad idea. -See the RUN_AS_USER section in \fBupsmon.conf\fR(8) for more on this topic. +See the RUN_AS_USER section in linkman:upsmon.conf[8] for more on this topic. Additionally, you can't change the SHUTDOWNCMD or POWERDOWNFLAG -definitions with a reload due to the split\(hyprocess model. If you change -those values, you \fBmust\fR stop upsmon and start it back up. upsmon +definitions with a reload due to the split-process model. If you change +those values, you *must* stop upsmon and start it back up. upsmon will warn you in the syslog if you make changes to either of those values during a reload. -.SH SIMULATING POWER FAILURES +SIMULATING POWER FAILURES +------------------------- To test a synchronized shutdown without pulling the plug on your UPS(es), you need only set the forced shutdown (FSD) flag on them. You can do this -by calling upsmon again to set the flag \(hy i.e.: +by calling upsmon again to set the flag, i.e.: - upsmon \-c fsd ++upsmon -c fsd+ After that, the master and the slaves will do their usual shutdown sequence as if the battery had gone critical. This is much easier on your UPS equipment, and it beats crawling under a desk to find the plug. -.SH FILES +FILES +----- -\fBupsmon.conf\fR(5) +linkman:upsmon.conf[5] -.SH SEE ALSO +SEE ALSO +-------- -.SS Server: -\fBupsd\fR(8) +Server: +~~~~~~~ +linkman:upsd[8] -.SS Clients: -\fBupsc\fR(8), \fBupscmd\fR(8), -\fBupsrw\fR(8), \fBupsmon\fR(8) +Clients: +~~~~~~~~ +linkman:upsc[8], linkman:upscmd[8], +linkman:upsrw[8], linkman:upsmon[8] -.SS CGI programs: -\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) +CGI programs: +~~~~~~~~~~~~~ +linkman:upsset.cgi[8], linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsrw.8 b/docs/man/upsrw.8 new file mode 100644 index 0000000..f052567 --- /dev/null +++ b/docs/man/upsrw.8 @@ -0,0 +1,102 @@ +'\" t +.\" Title: upsrw +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSRW" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsrw \- UPS variable administration tool +.SH "SYNOPSIS" +.sp +\fBupsrw\fR \fIups\fR +.sp +\fBupsrw\fR \-h +.sp +\fBupsrw\fR \-s \fIvariable\fR [\-u \fIusername\fR] [\-p \fIpassword\fR] \fIups\fR +.SH "DESCRIPTION" +.sp +\fBupsrw\fR allows you to view and change the read/write variables inside your UPS\&. It sends commands via the server \fBupsd\fR(8) to your driver, which configures the hardware for you\&. +.sp +The list of variables that allow you to change their values is based on the capabilities of your UPS equipment\&. Not all models support this feature\&. Typically, cheaper hardware does not support any of them\&. Run upsrw with a UPS identifier to see what will work for you\&. +.SH "OPTIONS" +.PP +\fB\-h\fR +.RS 4 +Display the help message\&. +.RE +.PP +\fB\-s\fR \fIvariable\fR +.RS 4 +Specify the variable to be changed inside the UPS\&. For unattended mode such as in shell scripts, use the format VAR=VALUE to specify both the variable and the value, for example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-s input\&.transfer\&.high=129 +.fi +.if n \{\ +.RE +.\} +.sp +Without this argument, upsrw will just display the list of the variables and their possible values\&. +.sp +Some variables are strings, and can be set to any value within the length limit\&. Others are enumerated types and can only be set to one of those values\&. Refer to the list to know what\(cqs available in your hardware\&. +.RE +.PP +\fB\-u\fR \fIusername\fR +.RS 4 +Set the NUT username for the connection to the server\&. This is optional, and you will be prompted for this when using the \-s option if you don\(cqt specify \-u on the command line\&. NUT usernames are defined in +\fBupsd.users\fR(5), and are not linked to system usernames\&. +.RE +.PP +\fB\-p\fR \fIpassword\fR +.RS 4 +Set the password to authenticate to the server\&. This is also optional like \-u, and you will be prompted for it if necessary\&. +.RE +.PP +\fIups\fR +.RS 4 +View or change the settings on this UPS\&. The format for this option is +upsname[@hostname[:port]]\&. The default hostname is "localhost"\&. +.RE +.SH "UNATTENDED MODE" +.sp +If you run this program inside a shell script or similar to set variables, you will need to specify all of the information on the command line\&. This means using \-s VAR=VALUE, \-u and \-p\&. Otherwise it will put up a prompt and your program will hang\&. +.sp +This is not necessary when displaying the list, as the username and password are not required for read\-only mode\&. +.SH "DIAGNOSTICS" +.sp +\fBupsrw\fR can\(cqt set variables on your UPS unless you provide a valid username and password\&. If you get "access denied" errors, make sure that your \fBupsd.users\fR(5) has an entry for you, and that the username you are using has permissions to SET variables\&. +.SH "HISTORY" +.sp +This program used to be called upsct2, which was ambiguous and confusing\&. +.SH "SEE ALSO" +.sp +\fBupsd\fR(8), \fBupscmd\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsrw.8 b/docs/man/upsrw.txt similarity index 54% rename from man/upsrw.8 rename to docs/man/upsrw.txt index ee5a74c..c58b040 100644 --- a/man/upsrw.8 +++ b/docs/man/upsrw.txt @@ -1,19 +1,25 @@ -.TH UPSRW 8 "Mon Jan 22 2007" "" "Network UPS Tools (NUT)" -.SH NAME -upsrw \- UPS variable administration tool -.SH SYNOPSIS -.B upsrw \fIups\fR +UPSRW(8) +======== -.B upsrw \-h +NAME +---- -.B upsrw \-s \fIvariable\fB [\-u \fIusername\fB] [\-p \fIpassword\fB] -\fIups\fR +upsrw - UPS variable administration tool -.SH DESCRIPTION +SYNOPSIS +-------- -.B upsrw -allows you to view and change the read/write variables inside your UPS. -It sends commands via the server \fBupsd\fR(8) to your driver, which +*upsrw* 'ups' + +*upsrw* -h + +*upsrw* -s 'variable' [-u 'username'] [-p 'password'] 'ups' + +DESCRIPTION +----------- + +*upsrw* allows you to view and change the read/write variables inside your UPS. +It sends commands via the server linkman:upsd[8] to your driver, which configures the hardware for you. The list of variables that allow you to change their values is based on @@ -21,63 +27,70 @@ the capabilities of your UPS equipment. Not all models support this feature. Typically, cheaper hardware does not support any of them. Run upsrw with a UPS identifier to see what will work for you. -.SH OPTIONS +OPTIONS +------- -.IP \-h +*-h*:: Display the help message. -.IP "\-s \fIvariable\fR" +*-s* 'variable':: Specify the variable to be changed inside the UPS. For unattended mode such as in shell scripts, use the format VAR=VALUE to specify both the variable and the value, for example: -\-s input.transfer.high=129 - + -s input.transfer.high=129 ++ Without this argument, upsrw will just display the list of the variables and their possible values. - ++ Some variables are strings, and can be set to any value within the length limit. Others are enumerated types and can only be set to one of those values. Refer to the list to know what's available in your hardware. -.IP "\-u \fIusername\fR" -Set the username for the connection to the server. This is optional, -and you will be prompted for this when using the \-s option if you don't -specify \-u on the command line. +*-u* 'username':: +Set the NUT username for the connection to the server. This is optional, +and you will be prompted for this when using the -s option if you don't +specify -u on the command line. NUT usernames are defined in +linkman:upsd.users[5], and are not linked to system usernames. -.IP "\-p \fIpassword\fR" +*-p* 'password':: Set the password to authenticate to the server. This is also optional -like \-u, and you will be prompted for it if necessary. +like -u, and you will be prompted for it if necessary. -.IP \fIups\fR +'ups':: View or change the settings on this UPS. The format for this option is -upsname[@hostname[:port]]. The default hostname is "localhost". +`upsname[@hostname[:port]]`. The default hostname is "localhost". -.SH UNATTENDED MODE +UNATTENDED MODE +--------------- If you run this program inside a shell script or similar to set variables, you will need to specify all of the information on the -command line. This means using \-s VAR=VALUE, \-u and \-p. Otherwise it +command line. This means using `-s VAR=VALUE`, `-u` and `-p`. Otherwise it will put up a prompt and your program will hang. This is not necessary when displaying the list, as the username and -password are not required for read\(hyonly mode. +password are not required for read-only mode. -.SH DIAGNOSTICS +DIAGNOSTICS +----------- -upsrw can't set variables on your UPS unless you provide a valid +*upsrw* can't set variables on your UPS unless you provide a valid username and password. If you get "access denied" errors, make sure -that your \fBupsd.users\fR(5) has an entry for you, and that the +that your linkman:upsd.users[5] has an entry for you, and that the username you are using has permissions to SET variables. -.SH HISTORY +HISTORY +------- This program used to be called upsct2, which was ambiguous and confusing. -.SH SEE ALSO -\fBupsd\fR(8), \fBupscmd\fR(8) +SEE ALSO +-------- +linkman:upsd[8], linkman:upscmd[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upssched.8 b/docs/man/upssched.8 new file mode 100644 index 0000000..2704421 --- /dev/null +++ b/docs/man/upssched.8 @@ -0,0 +1,139 @@ +'\" t +.\" Title: upssched +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSSCHED" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upssched \- Timer helper for scheduling events from upsmon +.SH "SYNOPSIS" +.sp +\fBupssched\fR +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +\fBupssched\fR should be run from \fBupsmon\fR(8) via the NOTIFYCMD\&. You should never run it directly during normal operations\&. +.sp .5v +.RE +.SH "DESCRIPTION" +.sp +\fBupssched\fR was created to allow users to execute programs at times relative to events being monitored by \fBupsmon\fR(8)\&. The original purpose was to allow for a shutdown to occur after some fixed period on battery, but there are other uses that are possible\&. +.SH "INTEGRATION" +.sp +upssched needs to be called as the NOTIFYCMD in your \fBupsmon.conf\fR(5)\&. It determines what is happening based on the UPSNAME and NOTIFYTYPE environment variables\&. You should never have to deal with them directly\&. +.sp +Set the EXEC flag on the events that you want to see in upssched\&. For example, to make sure that upssched hears about ONLINE, ONBATT and LOWBATT events, the flags would look like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +NOTIFYFLAG ONLINE EXEC +NOTIFYFLAG ONBATT EXEC +NOTIFYFLAG LOWBATT EXEC +.fi +.if n \{\ +.RE +.\} +.sp +If you also want to continue writing to the syslog, just add it in: +.sp +.if n \{\ +.RS 4 +.\} +.nf +NOTIFYFLAG ONLINE SYSLOG+EXEC +NOTIFYFLAG ONBATT SYSLOG+EXEC +NOTIFYFLAG LOWBATT SYSLOG+EXEC +.fi +.if n \{\ +.RE +.\} +.sp +For a full list of notify flags, see the \fBupsmon\fR(8) documentation\&. +.SH "CONFIGURATION" +.sp +See \fBupssched.conf\fR(5) for information on configuring this program\&. +.SH "EARLY SHUTDOWNS" +.sp +To shut down the system early, define a timer that starts due to an ONBATT condition\&. When it triggers, make your CMDSCRIPT call your shutdown routine\&. It should finish by calling upsmon \-c fsd so that upsmon gets to shut down the slaves in a controlled manner\&. +.sp +Be sure you cancel the timer if power returns (ONLINE)\&. +.SH "DEBOUNCING EVENTS" +.sp +If your UPS goes on and off battery frequently, you can use this program to reduce the number of pager messages that are sent out\&. Rather than sending pages directly from \fBupsmon\fR(8), use a short timer here\&. If the timer triggers with the UPS still on battery, then send the page\&. If the power returns before then, the timer can be cancelled and no page is necessary\&. +.SH "BACKGROUND" +.sp +This program was written primarily to fulfill the requests of users for the early shutdown scenario\&. The "outboard" design of the program (relative to upsmon) was intended to reduce the load on the average system\&. Most people don\(cqt have the requirement of shutting down after \fIN\fR seconds on battery, since the usual OB+LB testing is sufficient\&. +.sp +This program was created separately so those people don\(cqt have to spend CPU time and RAM on something that will never be used in their environments\&. +.sp +The design of the timer handler is also geared towards minimizing impact\&. It will come and go from the process list as necessary\&. When a new timer is started, a process will be forked to actually watch the clock and eventually start the CMDSCRIPT\&. When a timer triggers, it is removed from the queue\&. Cancelling a timer will also remove it from the queue\&. When no timers are present in the queue, the background process exits\&. +.sp +This means that you will only see upssched running when one of two things is happening: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +There\(cqs a timer of some sort currently running +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +upsmon just called it, and you managed to catch the brief instance +.RE +.sp +The final optimization handles the possibility of trying to cancel a timer when there are none running\&. If the timer daemon isn\(cqt running, there are no timers to cancel, and furthermore there is no need to start a clock\-watcher\&. So, it skips that step and exits sooner\&. +.SH "FILES" +.sp +\fBupssched.conf\fR(5) +.SH "SEE ALSO" +.sp +\fBupsmon\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upssched.conf.5 b/docs/man/upssched.conf.5 new file mode 100644 index 0000000..2bace08 --- /dev/null +++ b/docs/man/upssched.conf.5 @@ -0,0 +1,186 @@ +'\" t +.\" Title: upssched.conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSSCHED\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upssched.conf \- Configuration for upssched timer program +.SH "DESCRIPTION" +.sp +This file controls the operations of \fBupssched\fR(8), the timer\-based helper program for \fBupsmon\fR(8)\&. +.SH "CONFIGURATION DIRECTIVES" +.PP +\fBCMDSCRIPT\fR \fIscriptname\fR +.RS 4 +Required\&. This must be above any AT lines\&. This script is used to invoke commands when your timers are triggered\&. It receives a single argument which is the name of the timer that caused it to trigger\&. +.RE +.PP +\fBPIPEFN\fR \fIfilename\fR +.RS 4 +Required\&. This sets the file name of the socket which will be used for interprocess communications\&. This should be in a directory where normal users can\(cqt create the file, due to the possibility of symlinking and other evil\&. +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBCaution\fR +.ps -1 +.br +.sp +if you are running Solaris or similar, the permissions that upssched sets on this file \fBare not enough\fR to keep you safe\&. If your OS ignores the permissions on a FIFO, then you MUST put this in a protected directory! +.sp .5v +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +by default, \fBupsmon\fR(8) will run upssched as whatever user you have defined with RUN_AS_USER in \fBupsmon.conf\fR(8)\&. Make sure that user can create files and write to files in the path you use for PIPEFN and LOCKFN\&. +.sp .5v +.RE +.sp +My recommendation: create a special directory for upssched, make it owned by your upsmon user, then use it for both\&. +.sp +The stock version of the upssched\&.conf ships with PIPEFN disabled to make you visit this portion of the documentation and think about how your system works before potentially opening a security hole\&. +.PP +\fBLOCKFN\fR \fIfilename\fR +.RS 4 +Required\&. upssched attempts to create this file 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\&. +.sp +You should put this in the same directory as PIPEFN\&. +.RE +.PP +\fBAT\fR \fInotifytype\fR \fIupsname\fR \fIcommand\fR +.RS 4 +Define a handler for a specific event +\fInotifytype\fR +on UPS +\fIupsname\fR\&. +\fIupsname\fR +can be the special value * to apply this handler to every UPS\&. +.sp +This will perform the command +\fIcommand\fR +when the +\fInotifytype\fR +and +\fIupsname\fR +match the current activity\&. Possible values for +\fIcommand\fR +are: +.PP +\fBSTART\-TIMER\fR \fItimername\fR \fIinterval\fR +.RS 4 +Start a timer of +\fIinterval\fR +seconds\&. When it triggers, it will pass the argument +\fItimername\fR +as an argument to your CMDSCRIPT\&. +.sp +Example: +.sp +Start a timer that\(cqll execute when any UPS (*) has been gone for 10 seconds +.sp +.if n \{\ +.RS 4 +.\} +.nf +AT COMMBAD * START\-TIMER upsgone 10 +.fi +.if n \{\ +.RE +.\} +.RE +.PP +\fBCANCEL\-TIMER\fR \fItimername\fR [\fIcmd\fR] +.RS 4 +Cancel a running timer called +\fItimername\fR, if possible\&. If the timer has passed then pass the optional argument +\fIcmd\fR +to CMDSCRIPT\&. +.sp +Example: +.sp +If a specific UPS (myups@localhost) comes back online, then stop the timer before it triggers +.sp +.if n \{\ +.RS 4 +.\} +.nf +AT COMMOK myups@localhost CANCEL\-TIMER upsgone +.fi +.if n \{\ +.RE +.\} +.RE +.PP +\fBEXECUTE\fR \fIcommand\fR +.RS 4 +Immediately pass +\fIcommand\fR +as an argument to CMDSCRIPT\&. +.sp +Example: +.sp +If any UPS (*) reverts to utility power, then execute +ups\-back\-on\-line +via CMDSCRIPT\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +AT ONLINE * EXECUTE ups\-back\-on\-line +.fi +.if n \{\ +.RE +.\} +.RE +.RE +.sp +Note that any AT that matches both the \fInotifytype\fR and the \fIupsname\fR for the current event will be used\&. +.sp +For a complete list of \fInotifytype\fR possible values, refer to the section NOTIFY EVENTS in \fBupsmon\fR(8)\&. +.SH "SEE ALSO" +.sp +\fBupssched\fR(8), \fBupsmon\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upssched.conf.txt b/docs/man/upssched.conf.txt new file mode 100644 index 0000000..96aea56 --- /dev/null +++ b/docs/man/upssched.conf.txt @@ -0,0 +1,110 @@ +UPSSCHED.CONF(5) +================ + +NAME +---- + +upssched.conf - Configuration for upssched timer program + +DESCRIPTION +----------- + +This file controls the operations of linkman:upssched[8], the timer-based +helper program for linkman:upsmon[8]. + +CONFIGURATION DIRECTIVES +------------------------ + +*CMDSCRIPT* 'scriptname':: +Required. This must be above any AT lines. This script is used to +invoke commands when your timers are triggered. It receives a single +argument which is the name of the timer that caused it to trigger. + +*PIPEFN* 'filename':: +Required. This sets the file name of the socket which will be used for +interprocess communications. This should be in a directory where normal +users can't create the file, due to the possibility of symlinking +and other evil. + +CAUTION: 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: by default, linkman:upsmon[8] will run upssched as whatever user +you have defined with RUN_AS_USER in linkman:upsmon.conf[8]. 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. + +The stock version of the upssched.conf ships with PIPEFN disabled +to make you visit this portion of the documentation and think about how +your system works before potentially opening a security hole. + +*LOCKFN* 'filename':: +Required. upssched attempts to create this file 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. + +*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 UPS. ++ +This will perform the command 'command' when the 'notifytype' +and 'upsname' match the current activity. Possible values for +'command' are: + +*START-TIMER* 'timername' 'interval';; +Start a timer of 'interval' seconds. When it triggers, it +will pass the argument 'timername' as an argument to your +CMDSCRIPT. ++ +Example: ++ +Start a timer that'll execute when any UPS (*) has been +gone for 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 + +Note that any AT that matches both the 'notifytype' and the +'upsname' for the current event will be used. + +For a complete list of 'notifytype' possible values, refer to the section +NOTIFY EVENTS in linkman:upsmon[8]. + +SEE ALSO +-------- + +linkman:upssched[8], linkman:upsmon[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/man/upssched.8 b/docs/man/upssched.txt similarity index 68% rename from man/upssched.8 rename to docs/man/upssched.txt index 1adf3ad..2e377be 100644 --- a/man/upssched.8 +++ b/docs/man/upssched.txt @@ -1,20 +1,30 @@ -.TH UPSSCHED 8 "Wed Feb 6 2002" "" "Network UPS Tools (NUT)" -.SH NAME -upssched \- Timer helper for scheduling events from upsmon -.SH SYNOPSIS -.B upssched -.SH NOTE -\fBupssched\fR should be run from \fBupsmon\fR(8) via the NOTIFYCMD. +UPSSCHED(8) +=========== + +NAME +---- + +upssched - Timer helper for scheduling events from upsmon + +SYNOPSIS +-------- +*upssched* + +NOTE: *upssched* should be run from linkman:upsmon[8] via the NOTIFYCMD. You should never run it directly during normal operations. -.SH DESCRIPTION -\fBupssched\fR was created to allow users to execute programs at times -relative to events being monitored by \fBupsmon\fR(8). The original +DESCRIPTION +----------- + +*upssched* was created to allow users to execute programs at times +relative to events being monitored by linkman:upsmon[8]. The original purpose was to allow for a shutdown to occur after some fixed period on battery, but there are other uses that are possible. -.SH INTEGRATION -upssched needs to be called as the NOTIFYCMD in your \fBupsmon.conf\fR(5). +INTEGRATION +----------- + +upssched needs to be called as the NOTIFYCMD in your linkman:upsmon.conf[5]. It determines what is happening based on the UPSNAME and NOTIFYTYPE environment variables. You should never have to deal with them directly. @@ -22,54 +32,50 @@ Set the EXEC flag on the events that you want to see in upssched. For example, to make sure that upssched hears about ONLINE, ONBATT and LOWBATT events, the flags would look like this: -.IP -.nf NOTIFYFLAG ONLINE EXEC NOTIFYFLAG ONBATT EXEC NOTIFYFLAG LOWBATT EXEC -.fi -.LP If you also want to continue writing to the syslog, just add it in: -.IP -.nf NOTIFYFLAG ONLINE SYSLOG+EXEC NOTIFYFLAG ONBATT SYSLOG+EXEC NOTIFYFLAG LOWBATT SYSLOG+EXEC -.fi -.LP -For a full list of notify flags, see the \fBupsmon\fR(8) documentation. +For a full list of notify flags, see the linkman:upsmon[8] documentation. -.SH CONFIGURATION +CONFIGURATION +------------- -See \fBupssched.conf\fR(5) for information on configuring this program. +See linkman:upssched.conf[5] for information on configuring this program. -.SH EARLY SHUTDOWNS +EARLY SHUTDOWNS +--------------- To shut down the system early, define a timer that starts due to an ONBATT condition. When it triggers, make your CMDSCRIPT call your shutdown -routine. It should finish by calling "upsmon \-c fsd" so that upsmon gets +routine. It should finish by calling `upsmon -c fsd` so that upsmon gets to shut down the slaves in a controlled manner. Be sure you cancel the timer if power returns (ONLINE). -.SH DEBOUNCING EVENTS +DEBOUNCING EVENTS +----------------- If your UPS goes on and off battery frequently, you can use this program to reduce the number of pager messages that are sent out. Rather than -sending pages directly from \fBupsmon\fR(8), use a short timer here. +sending pages directly from linkman:upsmon[8], use a short timer here. If the timer triggers with the UPS still on battery, then send the page. If the power returns before then, the timer can be cancelled and no page is necessary. -.SH BACKGROUND +BACKGROUND +---------- This program was written primarily to fulfill the requests of users for the early shutdown scenario. The "outboard" design of the program (relative to upsmon) was intended to reduce the load on the average -system. Most people don't have the requirement of shutting down after n +system. Most people don't have the requirement of shutting down after 'N' seconds on battery, since the usual OB+LB testing is sufficient. This program was created separately so those people don't have to spend @@ -86,20 +92,24 @@ no timers are present in the queue, the background process exits. This means that you will only see upssched running when one of two things is happening: -\(hy There's a timer of some sort currently running - -\(hy upsmon just called it, and you managed to catch the brief instance + - There's a timer of some sort currently running + - upsmon just called it, and you managed to catch the brief instance The final optimization handles the possibility of trying to cancel a timer when there are none running. If the timer daemon isn't running, there are no timers to cancel, and furthermore there is no need to start -a clock\(hywatcher. So, it skips that step and exits sooner. +a clock-watcher. So, it skips that step and exits sooner. -.SH FILES -\fBupssched.conf\fR(5) +FILES +----- -.SH SEE ALSO -\fBupsmon\fR(8) +linkman:upssched.conf[5] -.SS Internet resources: +SEE ALSO +-------- + +linkman:upsmon[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsset.cgi.8 b/docs/man/upsset.cgi.8 new file mode 100644 index 0000000..7c09012 --- /dev/null +++ b/docs/man/upsset.cgi.8 @@ -0,0 +1,104 @@ +'\" t +.\" Title: upsset.cgi +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSSET\&.CGI" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsset.cgi \- Web\-based UPS administration program +.SH "SYNOPSIS" +.sp +\fBupsset\&.cgi\fR +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +As a CGI program, this should be invoked through your web server\&. If you run it from the command line, it will sit there until you give it input resembling a POST request\&. +.sp .5v +.RE +.SH "DESCRIPTION" +.sp +\fBupsset\&.cgi\fR lets you access many administrative functions within the UPS software from your web browser\&. You can change settings and invoke instant commands where available\&. +.SH "CHANGING SETTINGS" +.sp +Some UPS hardware allows you to change certain variables to other values\&. To see what\(cqs available, pick a UPS from the chooser and select "settings", then select "View" to update the page\&. +.sp +You should see a list of items with the descriptions on the left side and the possible options or input spaces on the right\&. After changing something, be sure to "Save changes" to update the values in your UPS\&. +.sp +If your UPS doesn\(cqt support any read/write variables, there will be nothing to do on this page\&. +.sp +Setting values in read/write variables can also be done from the command line with \fBupsrw\fR(8)\&. +.SH "INSTANT COMMANDS" +.sp +Some UPS hardware also has provisions for performing certain actions at the user\(cqs command\&. These include battery tests, battery calibration, front panel tests (beep!) and more\&. To access this section, do as above, but pick "Commands" as the function\&. +.sp +If your UPS supports any instant commands, they will be listed in a chooser widget\&. Pick the one you like and "Issue command" to make it happen\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +some dangerous commands like "Turn off load" may not happen right away\&. This is a feature, not a bug\&. +.sp .5v +.RE +.sp +The apcsmart driver and some others require that you send this command twice within a short window in order to make it happen\&. This is to keep you from accidentally killing your systems by picking the wrong one\&. +.sp +To actually turn off the load, you have to send the command once, then send it again after 3 seconds elapse but before 15 seconds pass\&. If you do it too quickly or slowly, you have to wait at least 3 seconds but not 15 seconds again\&. +.sp +You can also invoke instant commands from the command line with \fBupscmd\fR(8)\&. +.SH "ACCESS CONTROL" +.sp +upsset will only talk to \fBupsd\fR(8) servers that have been defined in your \fBhosts.conf\fR(8)\&. If it complains about "Access to that host is not authorized", check your hosts\&.conf first\&. +.SH "SECURITY" +.sp +upsset will not run until you convince it that your CGI directory has been secured\&. This is due to the possibility of someone using upsset to try password combinations against your \fBupsd\fR(8) server\&. +.sp +See the example upsset\&.conf file for more information on how you do this\&. The short explanation is\(emif you can\(cqt lock it down, don\(cqt try to run it\&. +.SH "FILES" +.sp +\fBhosts.conf\fR(5), \fBupsset.conf\fR(5) +.SH "SEE ALSO" +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsset.cgi.8 b/docs/man/upsset.cgi.txt similarity index 60% rename from man/upsset.cgi.8 rename to docs/man/upsset.cgi.txt index b93bde9..3cb7410 100644 --- a/man/upsset.cgi.8 +++ b/docs/man/upsset.cgi.txt @@ -1,21 +1,31 @@ -.TH upsset.cgi 8 "Sat Aug 31 2002" "" "Network UPS Tools (NUT)" -.SH NAME -upsset.cgi \- Web\(hybased UPS administration program -.SH SYNOPSIS -.B upsset.cgi +UPSSET.CGI(8) +============= -.SH NOTE -As a CGI program, this should be invoked through your web server. +NAME +---- + +upsset.cgi - Web-based UPS administration program + +SYNOPSIS +-------- + +*upsset.cgi* + +NOTE: As a CGI program, this should be invoked through your web server. If you run it from the command line, it will sit there until you give it input resembling a POST request. -.SH DESCRIPTION -.B upsset.cgi +DESCRIPTION +----------- + +*upsset.cgi* lets you access many administrative functions within the UPS software from your web browser. You can change settings and invoke instant commands where available. -.SH CHANGING SETTINGS +CHANGING SETTINGS +----------------- + Some UPS hardware allows you to change certain variables to other values. To see what's available, pick a UPS from the chooser and select "settings", then select "View" to update the page. @@ -28,9 +38,10 @@ If your UPS doesn't support any read/write variables, there will be nothing to do on this page. Setting values in read/write variables can also be done from the command -line with \fBupsrw\fR(8). +line with linkman:upsrw[8]. -.SH INSTANT COMMANDS +INSTANT COMMANDS +---------------- Some UPS hardware also has provisions for performing certain actions at the user's command. These include battery tests, battery calibration, front @@ -41,11 +52,12 @@ If your UPS supports any instant commands, they will be listed in a chooser widget. Pick the one you like and "Issue command" to make it happen. -Note \(hy some dangerous commands like "Turn off load" may not happen right -away. This is a feature, not a bug. The apcsmart driver and some -others require that you send this command twice within a short window in -order to make it happen. This is to keep you from accidentally killing -your systems by picking the wrong one. +NOTE: some dangerous commands like "Turn off load" may not happen right +away. This is a feature, not a bug. + +The apcsmart driver and some others require that you send this command twice +within a short window in order to make it happen. This is to keep you from +accidentally killing your systems by picking the wrong one. To actually turn off the load, you have to send the command once, then send it again after 3 seconds elapse but before 15 seconds pass. If @@ -53,26 +65,33 @@ you do it too quickly or slowly, you have to wait at least 3 seconds but not 15 seconds again. You can also invoke instant commands from the command line with -\fBupscmd\fR(8). +linkman:upscmd[8]. -.SH ACCESS CONTROL -upsset will only talk to \fBupsd\fR(8) servers that have been defined -in your \fBhosts.conf\fR(8). If it complains about "Access to that host +ACCESS CONTROL +-------------- + +upsset will only talk to linkman:upsd[8] servers that have been defined +in your linkman:hosts.conf[8]. If it complains about "Access to that host is not authorized", check your hosts.conf first. -.SH SECURITY +SECURITY +-------- upsset will not run until you convince it that your CGI directory has been secured. This is due to the possibility of someone using upsset -to try password combinations against your \fBupsd\fR(8) server. +to try password combinations against your linkman:upsd[8] server. -See the example upsset.conf file for more information on how you do this. -The short explanation is \(hy if you can't lock it down, don't try to run it. +See the example `upsset.conf` file for more information on how you do this. +The short explanation is--if you can't lock it down, don't try to run it. -.SH FILES -\fBhosts.conf\fR(5) +FILES +----- -.SH SEE ALSO +linkman:hosts.conf[5], linkman:upsset.conf[5] -.SS Internet resources: +SEE ALSO +-------- + +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsset.conf.5 b/docs/man/upsset.conf.5 new file mode 100644 index 0000000..5e89519 --- /dev/null +++ b/docs/man/upsset.conf.5 @@ -0,0 +1,80 @@ +'\" t +.\" Title: upsset.conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSSET\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsset.conf \- Configuration for Network UPS Tools upsset\&.cgi +.SH "DESCRIPTION" +.sp +This file only does one job\(emit lets you convince \fBupsset.cgi\fR(8) that your system\(cqs CGI directory is secure\&. The program will not run until this file has been properly defined\&. +.SH "SECURITY REQUIREMENTS" +.sp +\fBupsset.cgi\fR(8) allows you to try login name and password combinations\&. There is no rate limiting, as the program shuts down between every request\&. Such is the nature of CGI programs\&. +.sp +Normally, attackers would not be able to access your \fBupsd\fR(8) server directly as it would be protected by the LISTEN directives in your \fBupsd.conf\fR(5) file, tcp\-wrappers (if available when NUT was built), and hopefully local firewall settings in your OS\&. +.sp +\fBupsset\fR runs on your web server, so upsd will see it as a connection from a host on an internal network\&. It doesn\(cqt know that the connection is actually coming from someone on the outside\&. This is why you must secure it\&. +.sp +On Apache, you can use the \&.htaccess file or put the directives in your httpd\&.conf\&. It looks something like this, assuming the \&.htaccess method: +.sp +.if n \{\ +.RS 4 +.\} +.nf + +deny from all +allow from your\&.network\&.addresses + +.fi +.if n \{\ +.RE +.\} +.sp +You will probably have to set "AllowOverride Limit" for this directory in your server\-level configuration file as well\&. +.sp +If this doesn\(cqt make sense, then stop reading and leave this program alone\&. It\(cqs not something you absolutely need to have anyway\&. +.sp +Assuming you have all this done, and it actually works (test it!), then you may add the following directive to this file: +.sp +.if n \{\ +.RS 4 +.\} +.nf +I_HAVE_SECURED_MY_CGI_DIRECTORY +.fi +.if n \{\ +.RE +.\} +.sp +If you lie to the program and someone beats on your upsd through your web server, don\(cqt blame me\&. +.SH "SEE ALSO" +.sp +\fBupsset.cgi\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsset.conf.5 b/docs/man/upsset.conf.txt similarity index 59% rename from man/upsset.conf.5 rename to docs/man/upsset.conf.txt index 9010ff5..e04a927 100644 --- a/man/upsset.conf.5 +++ b/docs/man/upsset.conf.txt @@ -1,25 +1,31 @@ -.TH UPSSET.CONF 5 "Wed Nov 26 2003" "" "Network UPS Tools (NUT)" -.SH NAME -upsset.conf \- Configuration for Network UPS Tools upsset.cgi +UPSSET.CONF(5) +============== -.SH DESCRIPTION +NAME +---- -This file only does one job \(hy it lets you convince \fBupsset.cgi\fR(8) +upsset.conf - Configuration for Network UPS Tools upsset.cgi + +DESCRIPTION +----------- + +This file only does one job--it lets you convince linkman:upsset.cgi[8] that your system's CGI directory is secure. The program will not run until this file has been properly defined. -.SH SECURITY REQUIREMENTS +SECURITY REQUIREMENTS +--------------------- -\fBupsset.cgi\fR(8) allows you to try login name and password combinations. +linkman:upsset.cgi[8] allows you to try login name and password combinations. There is no rate limiting, as the program shuts down between every request. Such is the nature of CGI programs. -Normally, attackers would not be able to access your \fBupsd\fR(8) server -directly as it would be protected by the ACL/ACCEPT/REJECT directives in -your \fBupsd.conf\fR(5) file and hopefully local firewall settings in -your OS. +Normally, attackers would not be able to access your linkman:upsd[8] server +directly as it would be protected by the LISTEN directives in +your linkman:upsd.conf[5] file, tcp-wrappers (if available when NUT was built), +and hopefully local firewall settings in your OS. -upsset runs on your web server, so upsd will see it as a connection from +*upsset* runs on your web server, so upsd will see it as a connection from a host on an internal network. It doesn't know that the connection is actually coming from someone on the outside. This is why you must secure it. @@ -28,17 +34,13 @@ On Apache, you can use the .htaccess file or put the directives in your httpd.conf. It looks something like this, assuming the .htaccess method: -.IP -.nf deny from all allow from your.network.addresses -.fi -.LP You will probably have to set "AllowOverride Limit" for this directory -in your server\(hylevel configuration file as well. +in your server-level configuration file as well. If this doesn't make sense, then stop reading and leave this program alone. It's not something you absolutely need to have anyway. @@ -51,8 +53,10 @@ you may add the following directive to this file: If you lie to the program and someone beats on your upsd through your web server, don't blame me. -.SH SEE ALSO -\fBupsset.cgi\fR(8) +SEE ALSO +-------- +linkman:upsset.cgi[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsstats.cgi.8 b/docs/man/upsstats.cgi.8 new file mode 100644 index 0000000..2aa8c97 --- /dev/null +++ b/docs/man/upsstats.cgi.8 @@ -0,0 +1,74 @@ +'\" t +.\" Title: upsstats.cgi +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSSTATS\&.CGI" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsstats.cgi \- Web\-based UPS status viewer +.SH "SYNOPSIS" +.sp +\fBupsstats\&.cgi\fR +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +As a CGI program, this should be invoked through your web server\&. If you run it from the command line, it will either complain about unauthorized access or spew a bunch of HTML at you\&. +.sp .5v +.RE +.SH "DESCRIPTION" +.sp +\fBupsstats\&.cgi\fR uses template files to build web pages containing status information from UPS hardware\&. It can repeat sections of those template files to monitor several UPSes simultaneously, or focus on a single UPS\&. +.sp +These templates can also include references to \fBupsimage.cgi\fR(8) for graphical displays of battery charge levels, voltage readings, and the UPS load\&. +.SH "ACCESS CONTROL" +.sp +upsstats will only talk to \fBupsd\fR(8) servers that have been defined in your \fBhosts.conf\fR(5)\&. If it complains that "Access to that host is not authorized", check that file first\&. +.SH "TEMPLATES" +.sp +The web page that is displayed is actually a template containing commands to upsstats which are replaced by status information\&. The default file used for the overview is upsstats\&.html\&. +.sp +When monitoring a single UPS, the file displayed is upsstats\-single\&.html\&. +.sp +The format of these files, including the possible commands, is documented in \fBupsstats.html\fR(5)\&. +.SH "FILES" +.sp +\fBhosts.conf\fR(5), \fBupsstats.html\fR(5), upsstats\-single\&.html +.SH "SEE ALSO" +.sp +\fBupsimage.cgi\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsstats.cgi.8 b/docs/man/upsstats.cgi.txt similarity index 53% rename from man/upsstats.cgi.8 rename to docs/man/upsstats.cgi.txt index 3bada83..141cfef 100644 --- a/man/upsstats.cgi.8 +++ b/docs/man/upsstats.cgi.txt @@ -1,46 +1,62 @@ -.TH upsstats.cgi 8 "Mon Sep 2 2002" "" "Network UPS Tools (NUT)" -.SH NAME -upsstats.cgi \- Web\(hybased UPS status viewer -.SH SYNOPSIS -.B upsstats.cgi +UPSSTATS.CGI(8) +=============== -.SH NOTE -As a CGI program, this should be invoked through your web server. +NAME +---- + +upsstats.cgi - Web-based UPS status viewer + +SYNOPSIS +-------- + +*upsstats.cgi* + +NOTE: As a CGI program, this should be invoked through your web server. If you run it from the command line, it will either complain about unauthorized access or spew a bunch of HTML at you. -.SH DESCRIPTION -.B upsstats.cgi +DESCRIPTION +----------- + +*upsstats.cgi* uses template files to build web pages containing status information from UPS hardware. It can repeat sections of those template files to monitor several UPSes simultaneously, or focus on a single UPS. -These templates can also include references to \fBupsimage.cgi\fR(8) +These templates can also include references to linkman:upsimage.cgi[8] for graphical displays of battery charge levels, voltage readings, and the UPS load. -.SH ACCESS CONTROL -upsstats will only talk to \fBupsd\fR(8) servers that have been defined -in your \fBhosts.conf\fR(5). If it complains that "Access to that host +ACCESS CONTROL +-------------- + +upsstats will only talk to linkman:upsd[8] servers that have been defined +in your linkman:hosts.conf[5]. If it complains that "Access to that host is not authorized", check that file first. -.SH TEMPLATES +TEMPLATES +--------- + The web page that is displayed is actually a template containing commands to upsstats which are replaced by status information. The default file used for the overview is upsstats.html. When monitoring a single UPS, the file displayed is -upsstats\-single.html. +`upsstats-single.html`. The format of these files, including the possible commands, is -documented in \fBupsstats.html\fR(5). +documented in linkman:upsstats.html[5]. +FILES +----- -.SH FILES -\fBhosts.conf\fR(5) \fBupsstats.html\fR(5) +linkman:hosts.conf[5], linkman:upsstats.html[5], upsstats-single.html -.SH SEE ALSO -\fBupsimage.cgi\fR(8) +SEE ALSO +-------- -.SS Internet resources: +linkman:upsimage.cgi[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsstats.html.5 b/docs/man/upsstats.html.5 new file mode 100644 index 0000000..b20ae24 --- /dev/null +++ b/docs/man/upsstats.html.5 @@ -0,0 +1,370 @@ +'\" t +.\" Title: upsstats.html +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSSTATS\&.HTML" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsstats.html \- HTML template for Network UPS Tools upsstats +.SH "DESCRIPTION" +.sp +This file is used by \fBupsstats.cgi\fR(8) to generate status pages\&. Certain commands are recognized, and will be replaced with various status elements on the fly\&. +.SH "FORMATTING" +.sp +Commands can be placed anywhere on a line, but must start and end with @\&. Any extra characters before or after the commands will be passed through unchanged\&. It is allowed to use more than one command on a single line, as long as each command has its own start and end character\&. If you need to use the @ sign, use @ to prevent it from being treated as a start character\&. +.SH "BLOCK CONTROL" +.sp +Some commands begin blocks \- sections of the template that will be included, excluded, or repeated depending on certain parameters\&. +.SS "BLOCK CONTROL \- ITERATION" +.PP +\fB@FOREACHUPS@\fR +.RS 4 +Starts a block that will be repeated for each MONITOR directive in the +\fBhosts.conf\fR(5)\&. This is how you can generate pages that monitor all of your systems simultaneously\&. +.RE +.PP +\fB@ENDFOR@\fR +.RS 4 +Ends a FOREACHUPS block\&. +.RE +.SS "BLOCK CONTROL \- MATCHING SPECIFIC CASES" +.PP +\fB@IFSUPP \fR\fB\fIvar\fR\fR@* +.RS 4 +Starts a block that will only be printed if the variable var is supported by the current UPS\&. This is generally used to suppress "not supported" messages by avoiding the label and variable call entirely\&. +.RE +.PP +\fB@IFEQ\fR \fIvar\fR \fIvalue\fR\fB@\fR +.RS 4 +Starts a block if the value returned from the variable +\fIvar\fR +matches +\fIvalue\fR\&. +.RE +.PP +\fB@IFBETWEEN\fR \fIvarlow\fR \fIvarhigh\fR \fIvarvalue\fR\fB@\fR +.RS 4 +Starts a block if the value returned by the variable +\fIvarvalue\fR +is between the values returned by the variables +\fIvarlow\fR +and +\fIvarhigh\fR\&. +.RE +.PP +\fB@ELSE@\fR +.RS 4 +If the previous IF\-command did not match, perform this instead\&. +.RE +.PP +\fB@ENDIF@\fR +.RS 4 +Ends an IF/ELSE\-block\&. +.RE +.SS "BLOCK CONTROL \- ADVANCED EXPRESSIONS" +.sp +Even though the parser is pretty limited, it\(cqs still possible to create rather advanced expressions\&. The key to this is the fact that multiple block control commands are AND:ed\&. This is illustrated with an example (more examples are available in upsstats\&.html)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +@IFSUPP ambient\&.humidity@ +@IFSUPP ambient\&.temperature@ +This UPS knows both ambient temperature and humidity\&. +@ELSE@ +@IFSUPP ambient\&.humidity@ +This UPS only knows ambient humidity\&. +@ELSE@ +@IFSUPP ambient\&.temperature@ +This UPS only knows ambient temperature\&. +@ELSE@ +This UPS knows nothing, how annoying\&. +@ENDIF@ +.fi +.if n \{\ +.RE +.\} +.SH "OTHER COMMANDS" +.PP +\fB@AMBTEMP@\fR +.RS 4 +Insert the ambient temperature in the current temperature scale\&. +.RE +.PP +\fB@DATE\fR \fIformat\fR\fB@\fR +.RS 4 +Insert the current date and time\&. The format string is passed to strftime, so almost anything is possible\&. See +\fBstrftime\fR(3) for possible values\&. +.RE +.PP +\fB@DEGREES@\fR +.RS 4 +Insert the entity for degrees (\(de) and either C or F depending on the current temperature scale\&. +.RE +.PP +\fB@HOST@\fR +.RS 4 +Insert the designation of the host being monitored, like +myups@localhost\&. +.RE +.PP +\fB@HOSTDESC@\fR +.RS 4 +Insert the hout\(cqs description from +\fBhosts.conf\fR(5)\&. +.RE +.PP +\fB@HOSTLINK@\fR +.RS 4 +Insert a link to upsstats\&.cgi with the "host" variable set to the current UPS\&. This is only useful within a FOREACHUPS block\&. +.RE +.PP +\fB@IMG\fR \fIvarname\fR \fB@\fR +.RS 4 +Insert an IMG SRC to +\fBupsimage.cgi\fR(8) +for one of these status variables: +.PP +battery\&.charge +.RS 4 +Battery charge \- a percentage +.RE +.PP +battery\&.voltage +.RS 4 +The charge on the battery in volts +.RE +.PP +input\&.frequency +.RS 4 +Incoming utility frequency (Hz) +.RE +.PP +input\&.voltage +.RS 4 +Incoming utility voltage +.RE +.PP +input\&.L1\-L2\&.voltage +.RS 4 +Incoming voltage, L1\-L2 (3phase) +.RE +.PP +input\&.L2\-L3\&.voltage +.RS 4 +Incoming voltage, L2\-L3 (3phase) +.RE +.PP +input\&.L3\-L1\&.voltage +.RS 4 +Incoming voltage, L3\-L1 (3phase) +.RE +.PP +output\&.frequency +.RS 4 +Outgoing utility frequency (Hz) +.RE +.PP +output\&.voltage +.RS 4 +Outgoing voltage (from the UPS) +.RE +.PP +output\&.L1\-L2\&.voltage +.RS 4 +Outgoing voltage, L1\-L2 (3phase) +.RE +.PP +output\&.L2\-L3\&.voltage +.RS 4 +Outgoing voltage, L2\-L3 (3phase) +.RE +.PP +output\&.L3\-L1\&.voltage +.RS 4 +Outgoing voltage, L3\-L1 (3phase) +.RE +.PP +output\&.L1\&.power\&.percent +.RS 4 +UPS load, L1 (3phase) +.RE +.PP +output\&.L2\&.power\&.percent +.RS 4 +UPS load, L2 (3phase) +.RE +.PP +output\&.L3\&.power\&.percent +.RS 4 +UPS load, L3 (3phase) +.RE +.PP +ups\&.load +.RS 4 +UPS load \- percentage +.RE +.PP +ups\&.temperature +.RS 4 +UPS temperature +.RE +.RE +.sp +\fIextra\fR is where you can put additional definitions\&. Right now the valid definitions are colors for various parts of the bars drawn by upsimage\&.cgi\&. Possible color names are: +.PP +back_col +.RS 4 +background color +.RE +.PP +scale_num_col +.RS 4 +scale number color +.RE +.PP +summary_col +.RS 4 +summary color (number at the bottom) +.RE +.PP +ok_zone_maj_col +.RS 4 +major scale color for the normal ("ok") zone +.RE +.PP +ok_zone_min_col +.RS 4 +minor scale color for the normal ("ok") zone +.RE +.PP +neutral_zone_maj_col +.RS 4 +major scale color for the neutral zone +.RE +.PP +neutral_zone_min_col +.RS 4 +minor scale color for the neutral zone +.RE +.PP +warn_zone_maj_col +.RS 4 +major scale color for the warning zone +.RE +.PP +warn_zone_min_col +.RS 4 +minor scale color for the warning zone +.RE +.PP +bar_col +.RS 4 +the color of the bar in the middle +.RE +.sp +All colors are hex triplets \- 0xff0000 is red, 0x00ff00 is green, and 0x0000ff is blue\&. +.sp +Examples: +.sp +.if n \{\ +.RS 4 +.\} +.nf +@IMG battery\&.charge@ +@IMG battery\&.charge back_col=0xff00ff bar_col=0xaabbcc@ +@IMG input\&.voltage ok_zone_maj_col=0x123456@ +.fi +.if n \{\ +.RE +.\} +.PP +\fB@REFRESH@\fR +.RS 4 +Insert the META header magic for refreshing the page if that variable has been set by the browser\&. This needs to be in the HEAD section of the page\&. +.RE +.PP +\fB@STATUS@\fR +.RS 4 +Expand the abbreviations in the ups\&.status variable \- OL becomes "On line", OB becomes "On battery", and so on\&. +.RE +.PP +\fB@STATUSCOLOR@\fR +.RS 4 +Insert red, green, or yellow color triplets depending on the severity of the current UPS status\&. Normal operations are green, warnings like voltage trim/boost or "off" are yellow, and other events like being on battery or having a low battery are red\&. +.RE +.PP +\fB@VAR\fR \fIvarname\fR\fB@\fR +.RS 4 +Insert the current value of the status variable varname on the host being monitored, or "Not supported"\&. +.RE +.PP +\fB@RUNTIME@\fR +.RS 4 +Inserts the current runtime, in +hh:mm:ss +format\&. +.RE +.PP +\fB@TEMPC@\fR +.RS 4 +Use the Celsius scale for temperature data (default)\&. +.RE +.PP +\fB@TEMPF@\fR +.RS 4 +Use the Fahrenheit scale for temperature data\&. +.RE +.PP +\fB@UPSTEMP@\fR +.RS 4 +Insert the UPS temperature in the current scale\&. +.RE +.PP +\fB@BATTTEMP@\fR +.RS 4 +Insert the battery temperature in the current scale\&. +.RE +.PP +\fB@UTILITYCOLOR@\fR +.RS 4 +Obsoleted\&. Use IFBETWEEN instead (see example in upsstats\&.html)\&. +.RE +.PP +\fB@VERSION@\fR +.RS 4 +Insert the version number of the software\&. +.RE +.SH "OTHER TEMPLATES" +.sp +\fBupsstats.cgi\fR(8) will also open a file called upsstats\-single\&.html if you call it with "host=" set in the URL\&. That file uses the same rules and techniques documented here\&. +.SH "SEE ALSO" +.sp +\fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsstats.html.txt b/docs/man/upsstats.html.txt new file mode 100644 index 0000000..d08c5d0 --- /dev/null +++ b/docs/man/upsstats.html.txt @@ -0,0 +1,235 @@ +UPSSTATS.HTML(5) +================ + +NAME +---- + +upsstats.html - HTML template for Network UPS Tools upsstats + +DESCRIPTION +----------- + +This file is used by linkman:upsstats.cgi[8] to generate status pages. +Certain commands are recognized, and will be replaced with various +status elements on the fly. + +FORMATTING +---------- + +Commands can be placed anywhere on a line, but must start and end with `@`. +Any extra characters before or after the commands will be passed through +unchanged. It is allowed to use more than one command on a single line, +as long as each command has its own start and end character. If you need +to use the `@` sign, use @ to prevent it from being treated as a start +character. + +BLOCK CONTROL +------------- + +Some commands begin blocks - sections of the template that will be +included, excluded, or repeated depending on certain parameters. + +BLOCK CONTROL - ITERATION +~~~~~~~~~~~~~~~~~~~~~~~~~ + +*@FOREACHUPS@*:: +Starts a block that will be repeated for each MONITOR directive in the +linkman:hosts.conf[5]. This is how you can generate pages that monitor +all of your systems simultaneously. + +*@ENDFOR@*:: +Ends a FOREACHUPS block. + +BLOCK CONTROL - MATCHING SPECIFIC CASES +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +*@IFSUPP 'var'*@*:: +Starts a block that will only be printed if the variable var is +supported by the current UPS. This is generally used to suppress "not +supported" messages by avoiding the label and variable call entirely. + +*@IFEQ* 'var' 'value'*@*:: +Starts a block if the value returned from the variable 'var' matches +'value'. + +*@IFBETWEEN* 'varlow' 'varhigh' 'varvalue'*@*:: +Starts a block if the value returned by the variable 'varvalue' is between +the values returned by the variables 'varlow' and 'varhigh'. + +*@ELSE@*:: +If the previous IF-command did not match, perform this instead. + +*@ENDIF@*:: +Ends an IF/ELSE-block. + +BLOCK CONTROL - ADVANCED EXPRESSIONS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Even though the parser is pretty limited, it's still possible to create +rather advanced expressions. The key to this is the fact that +multiple block control commands are AND:ed. This is illustrated with an +example (more examples are available in upsstats.html). + + @IFSUPP ambient.humidity@ + @IFSUPP ambient.temperature@ + This UPS knows both ambient temperature and humidity. + @ELSE@ + @IFSUPP ambient.humidity@ + This UPS only knows ambient humidity. + @ELSE@ + @IFSUPP ambient.temperature@ + This UPS only knows ambient temperature. + @ELSE@ + This UPS knows nothing, how annoying. + @ENDIF@ + +OTHER COMMANDS +-------------- + +*@AMBTEMP@*:: +Insert the ambient temperature in the current temperature scale. + +*@DATE* 'format'*@*:: +Insert the current date and time. The format string is passed to strftime, +so almost anything is possible. See *strftime*(3) for possible values. + +*@DEGREES@*:: +Insert the entity for degrees (°) and either C or F depending on +the current temperature scale. + +*@HOST@*:: +Insert the designation of the host being monitored, like `myups@localhost`. + +*@HOSTDESC@*:: +Insert the hout's description from linkman:hosts.conf[5]. + +*@HOSTLINK@*:: +Insert a link to upsstats.cgi with the "host" variable set to the +current UPS. This is only useful within a FOREACHUPS block. + +*@IMG* 'varname' ['extra']*@*:: +Insert an IMG SRC to linkman:upsimage.cgi[8] for one of these +status variables: + + battery.charge;; Battery charge - a percentage + + battery.voltage;; The charge on the battery in volts + + input.frequency;; Incoming utility frequency (Hz) + + input.voltage;; Incoming utility voltage + + input.L1-L2.voltage;; Incoming voltage, L1-L2 (3phase) + + input.L2-L3.voltage;; Incoming voltage, L2-L3 (3phase) + + input.L3-L1.voltage;; Incoming voltage, L3-L1 (3phase) + + output.frequency;; Outgoing utility frequency (Hz) + + output.voltage;; Outgoing voltage (from the UPS) + + output.L1-L2.voltage;; Outgoing voltage, L1-L2 (3phase) + + output.L2-L3.voltage;; Outgoing voltage, L2-L3 (3phase) + + output.L3-L1.voltage;; Outgoing voltage, L3-L1 (3phase) + + output.L1.power.percent;; UPS load, L1 (3phase) + + output.L2.power.percent;; UPS load, L2 (3phase) + + output.L3.power.percent;; UPS load, L3 (3phase) + + ups.load;; UPS load - percentage + + ups.temperature;; UPS temperature + +'extra' is where you can put additional definitions. Right now +the valid definitions are colors for various parts of the bars drawn +by upsimage.cgi. Possible color names are: + + back_col;; background color + + scale_num_col;; scale number color + + summary_col;; summary color (number at the bottom) + + ok_zone_maj_col;; major scale color for the normal ("ok") zone + + ok_zone_min_col;; minor scale color for the normal ("ok") zone + + neutral_zone_maj_col;; major scale color for the neutral zone + + neutral_zone_min_col;; minor scale color for the neutral zone + + warn_zone_maj_col;; major scale color for the warning zone + + warn_zone_min_col;; minor scale color for the warning zone + + bar_col;; the color of the bar in the middle + +All colors are hex triplets - 0xff0000 is red, 0x00ff00 is green, and +0x0000ff is blue. + +Examples: + + @IMG battery.charge@ + @IMG battery.charge back_col=0xff00ff bar_col=0xaabbcc@ + @IMG input.voltage ok_zone_maj_col=0x123456@ + +*@REFRESH@*:: +Insert the META header magic for refreshing the page if that variable +has been set by the browser. This needs to be in the HEAD section of +the page. + +*@STATUS@*:: +Expand the abbreviations in the ups.status variable - OL becomes +"On line", OB becomes "On battery", and so on. + +*@STATUSCOLOR@*:: +Insert red, green, or yellow color triplets depending on the severity of +the current UPS status. Normal operations are green, warnings like +voltage trim/boost or "off" are yellow, and other events like being on +battery or having a low battery are red. + +*@VAR* 'varname'*@*:: +Insert the current value of the status variable varname on the host being +monitored, or "Not supported". + +*@RUNTIME@*:: +Inserts the current runtime, in `hh:mm:ss` format. + +*@TEMPC@*:: +Use the Celsius scale for temperature data (default). + +*@TEMPF@*:: +Use the Fahrenheit scale for temperature data. + +*@UPSTEMP@*:: +Insert the UPS temperature in the current scale. + +*@BATTTEMP@*:: +Insert the battery temperature in the current scale. + +*@UTILITYCOLOR@*:: +Obsoleted. Use IFBETWEEN instead (see example in upsstats.html). + +*@VERSION@*:: +Insert the version number of the software. + +OTHER TEMPLATES +--------------- + +linkman:upsstats.cgi[8] will also open a file called `upsstats-single.html` +if you call it with "host=" set in the URL. That file uses the same +rules and techniques documented here. + +SEE ALSO +-------- + +linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/usbhid-ups.8 b/docs/man/usbhid-ups.8 new file mode 100644 index 0000000..37c149d --- /dev/null +++ b/docs/man/usbhid-ups.8 @@ -0,0 +1,327 @@ +'\" t +.\" Title: usbhid-ups +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "USBHID\-UPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +usbhid-ups \- Driver for USB/HID UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the usbhid\-ups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.sp +This driver, formerly called \fInewhidups\fR, replaces the legacy \fIhidups\fR driver, which only supported Linux systems\&. +.SH "SUPPORTED HARDWARE" +.sp +\fBusbhid\-ups\fR brings USB/HID UPS monitoring to NUT on all platform supporting USB through libusb\&. It should detect any UPS that uses the HID power device class, but the amount of data will vary depending on the manufacturer and model\&. +.sp +At the present time, usbhid\-ups supports: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +the newer Eaton USB models, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +all MGE USB models, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +all Dell USB models, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +some APC models, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +some Belkin models, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +some Cyber Power Systems models\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +some TrippLite models +.RE +.sp +For a more complete list, refer to the NUT hardware compatibility list, available in the source distribution as data/drivers\&.list, or on the NUT website\&. You may use the "explore" driver option to gather information from HID UPSes which are not yet supported; see below for details\&. +.sp +This driver is known to work on: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +most Linux systems, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +FreeBSD (beta stage) and maybe other *BSD, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Darwin / Mac OS X, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Solaris 10\&. +.RE +.SH "EXTRA ARGUMENTS" +.sp +This driver also supports the following optional settings: +.PP +\fBoffdelay\fR=\fInum\fR +.RS 4 +Set the timer before the UPS is turned off after the kill power command is sent (via the +\fB\-k\fR +switch)\&. +.sp +The default value is 20 (in seconds)\&. Usually this +\fBmust be lower\fR +than +\fIondelay\fR, but the driver will +\fBnot\fR +warn you upon startup if it isn\(cqt\&. +.RE +.PP +\fBondelay\fR=\fInum\fR +.RS 4 +Set the timer for the UPS to switch on in case the power returns after the kill power command had been sent but before the actual switch off\&. This ensures the machines connected to the UPS are, in all cases, rebooted after a power failure\&. +.sp +The default value is 30 (in seconds)\&. Usually this +\fBmust be greater\fR +than offdelay, but the driver will +\fBnot\fR +warn you upon startup if it isn\(cqt\&. Some UPS\(cqes will restart no matter what, even if the power is (still) out at the moment this timer elapses\&. In that case, you could try if setting +\fIondelay = \-1\fR +in +\fBups\&.conf\fR +helps\&. +.RE +.PP +\fBpollfreq\fR=\fInum\fR +.RS 4 +Set polling frequency, in seconds, to reduce the USB data flow\&. Between two polling requests, the driver will wait for interrupts (aka UPS notifications), which are data changes returned by the UPS by itself\&. This mechanism allow to avoid or reduce staleness message, due to the UPS being temporarily overloaded with too much polling requests\&. The default value is 30 (in seconds)\&. +.RE +.PP +\fBpollonly\fR +.RS 4 +If this flag is set, the driver will ignore interrupts it receives from the UPS (not recommended, but needed if these reports are broken on your UPS)\&. +.RE +.PP +\fBvendor\fR=\fIregex\fR, \fBproduct\fR=\fIregex\fR, \fBserial\fR=\fIregex\fR, \fBvendorid\fR=\fIregex\fR, \fBproductid\fR=\fIregex\fR +.RS 4 +Select a specific UPS, in case there is more than one connected via USB Each option specifies an extended regular expression (see regex(7)) that must match the UPS\(cqs entire vendor/product/serial string (minus any surrounding whitespace), or the whole 4\-digit hexadecimal code for vendorid and productid\&. Try +\fB\-DD\fR +for finding out the strings to match\&. +.sp +Examples: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\-x vendor="Foo\&.Corporation\&.*" +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\-x vendorid=051d* +(APC) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\-x product="\&.*(Smart|Back)\-?UPS\&.*" +.RE +.RE +.PP +\fBbus\fR=\fIregex\fR +.RS 4 +Select a UPS on a specific USB bus or group of busses\&. The argument is a regular expression that must match the bus name where the UPS is connected (e\&.g\&. bus="002", bus="00[2\-3]")\&. +.RE +.PP +\fBexplore\fR +.RS 4 +With this option, the driver will connect to any device, including ones that are not yet supported\&. This must always be combined with the "vendorid" option\&. In this mode, the driver will not do anything useful except for printing debugging information (typically used with \-DD)\&. +.RE +.SH "INSTALLATION" +.sp +This driver is not built by default\&. You can build it by using "configure \-\-with\-usb=yes"\&. Note that it will also install other USB drivers\&. +.sp +You also need to install manually the legacy hotplug files (libhidups and libhid\&.usermap, generally in /etc/hotplug/usb/), or the udev file (nut\-usbups\&.rules, generally in /etc/udev/rules\&.d/) to address the permission settings problem\&. For more information, refer to the README file in nut/scripts/hotplug or nut/scripts/udev\&. +.sp +On Linux with MGE equipment, you will need at least a 2\&.4\&.25 or 2\&.6\&.2 kernel as well as libusb\-0\&.1\&.8 or later to disable hiddev support and avoid conflict\&. +.SH "IMPLEMENTATION" +.sp +The driver ignores the "port" value in \fBups\&.conf\fR\&. Unlike previous versions of this driver, it is now possible to control multiple UPS units simultaneously with this driver, provided they can be distinguished by setting some combination of the "vendor", "product", "serial", "vendorid", and "productid" options\&. For instance: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[mge] + driver = usbhid\-ups + port = auto + vendorid = 0463 +[tripplite] + driver = usbhid\-ups + port = auto + vendorid = 09ae +.fi +.if n \{\ +.RE +.\} +.SH "KNOWN ISSUES AND BUGS" +.SS "Repetitive timeout and staleness" +.sp +Some models tends to be unresponsive with the default polling frequency\&. The result is that your system log will have lots of messages like: +.sp +.if n \{\ +.RS 4 +.\} +.nf +usb 2\-1: control timeout on ep0in +usb 2\-1: usbfs: USBDEVFS_CONTROL failed cmd usbhid\-ups rqt 128 rq 6 len 256 +ret \-110 +.fi +.if n \{\ +.RE +.\} +.sp +In this case, simply modify the general parameter "pollinterval" to a higher value (like 10 for 10 seconds)\&. This should solve the issue\&. +.SS "Got EPERM: Operation not permitted upon driver startup" +.sp +You have forgotten to install the hotplug files, as explained in the INSTALLATION section above\&. Don\(cqt forget to restart hotplug so that it applies these changes\&. +.SS "Unattended shutdowns" +.sp +The hardware which was used for development of this driver is almost certainly different from what you have, and not all manufacturers follow the USB HID Power Device Class specifications to the letter\&. You don\(cqt want to find out that yours has issues here when a power failure hits your server room and you\(cqre not around to manually restart your servers\&. +.sp +If you rely on the UPS to shutdown your systems in case of mains failure and to restart them when the power returns, you \fBmust\fR test this\&. You can do so by running \fIupsmon \-c fsd\fR\&. With the mains present, this should bring your systems down and then cycle the power to restart them again\&. If you do the same without mains present, it should do the same, but in this case, the outputs shall remain off until mains power is applied again\&. +.SH "AUTHORS" +.sp +Originally sponsored by MGE UPS SYSTEMS\&. Now sponsored by Eaton http://opensource\&.eaton\&.com Arnaud Quette, Peter Selinger, Arjen de Korte +.SH "SEE ALSO" +.SS "The core driver" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/usbhid-ups.8 b/docs/man/usbhid-ups.txt similarity index 61% rename from man/usbhid-ups.8 rename to docs/man/usbhid-ups.txt index b8ae970..6443dc0 100644 --- a/man/usbhid-ups.8 +++ b/docs/man/usbhid-ups.txt @@ -1,30 +1,38 @@ -.TH USBHID-UPS 8 "Tue Nov 10 2009" "" "Network UPS Tools (NUT)" -.SH NAME -usbhid-ups \- Driver for USB/HID UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the +USBHID-UPS(8) +============= + +NAME +---- + +usbhid-ups - Driver for USB/HID UPS equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the usbhid-ups driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +linkman:nutupsdrv[8]. -This driver replaces the legacy hidups driver, which only supported -Linux systems, and was formerly called newhidups. +This driver, formerly called 'newhidups', replaces the legacy 'hidups' driver, +which only supported Linux systems. -.SH SUPPORTED HARDWARE -.B usbhid-ups -brings USB/HID UPS monitoring to NUT on all platform supporting USB -through libusb.It should detect any UPS that uses the HID power device -class, but the amount of data will vary depending on the manufacturer -and model. +SUPPORTED HARDWARE +------------------ + +*usbhid-ups* brings USB/HID UPS monitoring to NUT on all platform supporting +USB through libusb. It should detect any UPS that uses the HID power device +class, but the amount of data will vary depending on the manufacturer and +model. At the present time, usbhid-ups supports: - the newer Eaton USB models, - all MGE USB models, - all the Dell USB models, - some APC models, - some Belkin models, - some Cyber Power Systems models. - some TrippLite models + - the newer Eaton USB models, + - all MGE USB models, + - all Dell USB models, + - some APC models, + - some Belkin models, + - some Cyber Power Systems models. + - some TrippLite models For a more complete list, refer to the NUT hardware compatibility list, available in the source distribution as data/drivers.list, or on the @@ -34,34 +42,36 @@ details. This driver is known to work on: - most Linux systems, - FreeBSD (beta stage) and maybe other *BSD, - Darwin / Mac OS X, - Solaris 10. + - most Linux systems, + - FreeBSD (beta stage) and maybe other *BSD, + - Darwin / Mac OS X, + - Solaris 10. + +EXTRA ARGUMENTS +--------------- -.SH EXTRA ARGUMENTS This driver also supports the following optional settings: -.IP "offdelay=\fInum\fR" +*offdelay*='num':: Set the timer before the UPS is turned off after the kill power command is -sent (via the \fB\-k\fR switch). - -The default value is 20 (in seconds). Usually this \fBmust be lower\fR than -ondelay, but the driver will \fBnot\fR warn you upon startup if it isn't. +sent (via the *-k* switch). ++ +The default value is 20 (in seconds). Usually this *must be lower* than +'ondelay', but the driver will *not* warn you upon startup if it isn't. -.IP "ondelay=\fInum\fR" +*ondelay*='num':: Set the timer for the UPS to switch on in case the power returns after the kill power command had been sent but before the actual switch off. This ensures the machines connected to the UPS are, in all cases, rebooted after a power failure. - -The default value is 30 (in seconds). Usually this \fBmust be greater\fR -than offdelay, but the driver will \fBnot\fR warn you upon startup if it ++ +The default value is 30 (in seconds). Usually this *must be greater* +than offdelay, but the driver will *not* warn you upon startup if it isn't. Some UPS'es will restart no matter what, even if the power is (still) out at the moment this timer elapses. In that case, you could try -if setting 'ondelay = -1' in \fBups.conf\fR helps. +if setting 'ondelay = -1' in *ups.conf* helps. -.IP "pollfreq=\fInum\fR" +*pollfreq*='num':: Set polling frequency, in seconds, to reduce the USB data flow. Between two polling requests, the driver will wait for interrupts (aka UPS notifications), which are data changes returned by the UPS by itself. @@ -69,67 +79,66 @@ This mechanism allow to avoid or reduce staleness message, due to the UPS being temporarily overloaded with too much polling requests. The default value is 30 (in seconds). -.IP "pollonly" +*pollonly*:: If this flag is set, the driver will ignore interrupts it receives from the UPS (not recommended, but needed if these reports are broken on your UPS). -.IP "vendor=\fIregex\fR" -.IP "product=\fIregex\fR" -.IP "serial=\fIregex\fR" -.IP "vendorid=\fIregex\fR" -.IP "productid=\fIregex\fR" +*vendor*='regex':: +*product*='regex':: +*serial*='regex':: +*vendorid*='regex':: +*productid*='regex':: Select a specific UPS, in case there is more than one connected via -USB. Each option specifies an extended regular expression (see -\fBregex(7)\fR) that must match the UPS's entire vendor/product/serial +USB Each option specifies an extended regular expression (see +regex(7)) that must match the UPS's entire vendor/product/serial string (minus any surrounding whitespace), or the whole 4-digit -hexadecimal code for vendorid and productid. Try \fB-DD\fR for +hexadecimal code for vendorid and productid. Try *-DD* for finding out the strings to match. - ++ Examples: - \fB-x vendor="Foo.Corporation.*"\fR + - `-x vendor="Foo.Corporation.*"` + - `-x vendorid=051d*` (APC) + - `-x product=".*(Smart|Back)-?UPS.*"` - \fB-x vendorid=051d\fR (APC) - - \fB-x product=".*(Smart|Back)-?UPS.*"\fR - -.IP "bus=\fIregex\fR" +*bus*='regex':: Select a UPS on a specific USB bus or group of busses. The argument is a regular expression that must match the bus name where the UPS is connected (e.g. bus="002", bus="00[2-3]"). -.IP "explore" +*explore*:: With this option, the driver will connect to any device, including ones that are not yet supported. This must always be combined with the "vendorid" option. In this mode, the driver will not do anything useful except for printing debugging information (typically used with -\fB-DD\fR). +-DD). + +INSTALLATION +------------ -.SH INSTALLATION This driver is not built by default. You can build it by using -"configure \-\-with\-usb=yes". Note that it will also install other USB +"configure --with-usb=yes". Note that it will also install other USB drivers. You also need to install manually the legacy hotplug files (libhidups and libhid.usermap, generally in /etc/hotplug/usb/), or the udev file -(nut-usbups.rules, generally in /etc/udev/rules.d/)to address the +(nut-usbups.rules, generally in /etc/udev/rules.d/) to address the permission settings problem. For more information, refer to the README file in nut/scripts/hotplug or nut/scripts/udev. On Linux with MGE equipment, you will need at least a 2.4.25 or 2.6.2 kernel as well as libusb-0.1.8 or later to disable hiddev support and avoid conflict. - -.SH IMPLEMENTATION -The driver ignores the "port" value in \fBups.conf\fR. Unlike previous +IMPLEMENTATION +-------------- +The driver ignores the "port" value in *ups.conf*. Unlike previous versions of this driver, it is now possible to control multiple UPS units simultaneously with this driver, provided they can be distinguished by setting some combination of the "vendor", "product", "serial", "vendorid", and "productid" options. For instance: -.nf [mge] driver = usbhid-ups port = auto @@ -138,52 +147,61 @@ by setting some combination of the "vendor", "product", "serial", driver = usbhid-ups port = auto vendorid = 09ae -.fi -.SH KNOWN ISSUES AND BUGS -.SS "Repetitive timeout and staleness" +KNOWN ISSUES AND BUGS +--------------------- + +Repetitive timeout and staleness +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Some models tends to be unresponsive with the default polling frequency. The result is that your system log will have lots of messages like: -.nf - usb 2-1: control timeout on ep0in - usb 2-1: usbfs: USBDEVFS_CONTROL failed cmd usbhid-ups rqt 128 rq 6 len 256 - ret -110 -.fi + + usb 2-1: control timeout on ep0in + usb 2-1: usbfs: USBDEVFS_CONTROL failed cmd usbhid-ups rqt 128 rq 6 len 256 + ret -110 In this case, simply modify the general parameter "pollinterval" to a higher value (like 10 for 10 seconds). This should solve the issue. -.SS "Got EPERM: Operation not permitted upon driver startup" +Got EPERM: Operation not permitted upon driver startup +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You have forgotten to install the hotplug files, as explained in the INSTALLATION section above. Don't forget to restart hotplug so that it applies these changes. -.SS "Unattended shutdowns" +Unattended shutdowns +~~~~~~~~~~~~~~~~~~~~ The hardware which was used for development of this driver is almost -certainly different from what you have and not all manufacturers follow +certainly different from what you have, and not all manufacturers follow the USB HID Power Device Class specifications to the letter. You don't want to find out that yours has issues here when a power failure hits your server room and you're not around to manually restart your servers. If you rely on the UPS to shutdown your systems in case of mains failure -and to restart them when the power returns, you \fBmust\fR test this. You +and to restart them when the power returns, you *must* test this. You can do so by running 'upsmon -c fsd'. With the mains present, this should bring your systems down and then cycle the power to restart them again. If you do the same without mains present, it should do the same, but in this case, the outputs shall remain off until mains power is applied again. -.SH AUTHORS -.SS Sponsored by MGE UPS SYSTEMS +AUTHORS +------- + +Originally sponsored by MGE UPS SYSTEMS. +Now sponsored by Eaton Arnaud Quette, Peter Selinger, Arjen de Korte -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources +~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/victronups.8 b/docs/man/victronups.8 new file mode 100644 index 0000000..ae9fdae --- /dev/null +++ b/docs/man/victronups.8 @@ -0,0 +1,70 @@ +'\" t +.\" Title: victronups +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "VICTRONUPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +victronups \- Driver for IMV/Victron UPS unit Match, Match Lite, NetUps +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the the victronups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The victronups driver should recognize all Victron models that use a serial protocol at 1200 bps\&. These include Match Lite, Match and the NetUps line\&. +.sp +The Match Lite line may only report a handful of variables\&. This is usually not a bug \- they just don\(cqt support anything else\&. +.SH "CABLING" +.sp +If your Victron cable is broken or missing, use this diagram to build a clone: +.sp +docs/cables/victron\&.txt +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional setting in the \fBups.conf\fR(5): +.PP +\fBmodelname\fR=\fIname\fR +.RS 4 +Set model name +.RE +.PP +\fBusd\fR=\fIdelay\fR +.RS 4 +Set delay before shutdown on UPS +.RE +.SH "BUGS" +.sp +The protocol for this UPS is not officially documented\&. +.SH "AUTHOR" +.sp +Radek Benedikt , Daniel Prynych +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/victronups.txt b/docs/man/victronups.txt new file mode 100644 index 0000000..7c8e98a --- /dev/null +++ b/docs/man/victronups.txt @@ -0,0 +1,60 @@ +VICTRONUPS(8) +============= + +NAME +---- +victronups - Driver for IMV/Victron UPS unit Match, Match Lite, NetUps + +NOTE +---- +This man page only documents the hardware-specific features of the the +victronups driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +The victronups driver should recognize all Victron models that use a serial +protocol at 1200 bps. These include Match Lite, Match and the NetUps line. + +The Match Lite line may only report a handful of variables. This is +usually not a bug - they just don't support anything else. + +CABLING +------- + +If your Victron cable is broken or missing, use this diagram to build +a clone: + +docs/cables/victron.txt + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional setting in the +linkman:ups.conf[5]: + +*modelname*='name':: +Set model name + +*usd*='delay':: +Set delay before shutdown on UPS + + +BUGS +---- +The protocol for this UPS is not officially documented. + +AUTHOR +------ +Radek Benedikt , +Daniel Prynych + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/megatec.txt b/docs/megatec.txt deleted file mode 100644 index b0d10b8..0000000 --- a/docs/megatec.txt +++ /dev/null @@ -1,69 +0,0 @@ -Desc: Issues and direction for the megatec driver -File: megatec.txt -Date: 29 March 2006 -Auth: Carlos Rodrigues - -Overall concept -=============== - -The "powermust" driver was originally developed to support the Mustek Powermust -series of UPSes, but since there are some other drivers implementing (mostly) -the same protocol, an idea came up to unify all these other drivers under a -renamed version of "powermust": "megatec". - -The idea is to support all the hardware previously supported by the other -drivers with a minimum number of special cases. Most of the time this isn't -difficult, as the protocol states that all unknown/unimplemented commands -should be ignored (the commands are simply echoed back). - -Target drivers -============== - -The following drivers are targeted for "assimilation": - - * blazer (1) - * fentonups (1) - * mustek (1) - * esupssmart (1) - * ippon (1) - * sms (1) - * masterguard (3) - -(1) megatec already supercedes this driver in functionality. -(2) megatec partially supercedes this driver in functionality, but some - small features are missing (non-critical for normal operation). -(3) megatec partially supercedes this driver in functionality, but some - important features are missing, which means some hardware may not be - supported. - -The above status is infered from some testing and from looking at the code -of the drivers. Although I have a high degree of certainty about it, more -testing is needed/welcome. - -Notes -===== - -The "masterguard" driver seems to be the most problematic: it implements a -"Q3" command (similar to "Q1" but with extra information), and the command -to get information from the UPS is "WH" instead of "I" (with a different -response also). - -All drivers cancel the battery tests with "CT". The protocol seems to imply -that the 10 second battery test can't be cancelled (which makes sense). - -The beeper can be toggled with "Q", but there doesn't seem to exist a way to -check if it is on or off, which may confuse users when a "beeper.on" command -actually turns it off and vice-versa (maybe some models default to "on", and -others to "off", this may make this command fit better as a blind -"beeper.toggle"). - -The "sms" driver implements a simple watchdog (send and "SxxRxxx" command to -power cycle the UPS every time the "reset.watchdog" command is called). -There are two battery tests: failure ("T" - 10sec?) and until LOWBATT ("TL"). -Moreover, there are some "S.3" or "S.3R0003" commands which fly in the face -of "S05R0003" which the driver also issues (this last one matches all the -other drivers, the first two seem to imply that the UPS also accepts those -format variations to the standard "SxxRxxxx" shutdown+return commands). - --- -Carlos Rodrigues diff --git a/docs/net-protocol.txt b/docs/net-protocol.txt new file mode 100644 index 0000000..1c52d62 --- /dev/null +++ b/docs/net-protocol.txt @@ -0,0 +1,600 @@ +Network protocol information +============================ + +Since May 2002, this protocol has an official port number from IANA, +which is *3493*. The old number (3305) was a relic of the original code's +ancestry, and conflicted with other services. Version 0.50.0 and up +use 3493 by default. + +This protocol runs over TCP. UDP support was dropped in July 2003. It +had been deprecated for some time and was only capable of the simplest +query commands as authentication is impossible over a UDP socket. + +A library, named libupsclient, that implement this protocol is provided +in both static and shared version to help the client application development. + +Old command removal notice +-------------------------- + +Before version 1.5.0, a number of old commands were supported. These +have been removed from the specification. For more information, consult +an older version of the software. + +Command reference +----------------- + +Multi-word elements are contained within "quotes" for easier parsing. +Embedded quotes are escaped with backslashes. Embedded backslashes are +also escaped by representing them as \\. This protocol is intended to +be interpreted with parseconf (NUT parser) or something similar. + +GET +--- + +Retrieve a single response from the server. + +Possible sub-commands: + +NUMLOGINS +~~~~~~~~~ + +Form: + + GET NUMLOGINS + GET NUMLOGINS su700 + +Response: + + NUMLOGINS + NUMLOGINS su700 1 + +'' is the number of clients which have done LOGIN for this UPS. +This is used by the master upsmon to determine how many clients are +still connected when starting the shutdown process. + +This replaces the old "REQ NUMLOGINS" command. + +UPSDESC +~~~~~~~ + +Form: + + GET UPSDESC + GET UPSDESC su700 + +Response: + + UPSDESC "" + UPSDESC su700 "Development box" + +'' is the value of "desc=" from ups.conf for this UPS. If it +is not set, upsd will return "Unavailable". + +This can be used to provide human-readable descriptions instead of a +cryptic "upsname@hostname" string. + +VAR +~~~ + +Form: + + GET VAR + GET VAR su700 ups.status + +Response: + + VAR "" + VAR su700 ups.status "OL" + +This replaces the old "REQ" command. + +TYPE +~~~~ + +Form: + + GET TYPE + GET TYPE su700 input.transfer.low + +Response: + + TYPE ... + TYPE su700 input.transfer.low ENUM + +'' can be several values, and multiple words may be returned: + +- 'RW': this variable may be set to another value with SET +- 'ENUM': an enumerated type, which supports a few specific values +- 'STRING:n': this is a string of maximum length n + +ENUM and STRING are usually associated with RW, but not always. + +This replaces the old "VARTYPE" command. + +DESC +~~~~ + +Form: + + GET DESC + GET DESC su700 ups.status + +Response: + + DESC "" + DESC su700 ups.status "UPS status" + +'' is a string that gives a brief explanation of the named +variable. upsd may return "Unavailable" if the file which provides this +description is not installed. + +Different versions of this file may be used in some situations to +provide for localization and internationalization. + +This replaces the old "VARDESC" command. + +CMDDESC +~~~~~~~ + +Form: + + GET CMDDESC + GET CMDDESC su700 load.on + +Response: + + CMDDESC "" + CMDDESC su700 load.on "Turn on the load immediately" + +This is like DESC above, but it applies to the instant commands. + +This replaces the old "INSTCMDDESC" command. + +LIST +---- + +The LIST functions all share a common container format. They will +return "BEGIN LIST" and then repeat the initial query. The list then +follows, with as many lines are necessary to convey it. "END LIST" with +the initial query attached then follows. + +The formatting may seem a bit redundant, but it makes a different form +of client possible. You can send a LIST query and then go off and wait +for it to get back to you. When it arrives, you don't need complicated +state machines to remember which list is which. + +UPS +~~~ + +Form: + + LIST UPS + +Response: + + BEGIN LIST UPS + UPS "" + ... + END LIST UPS + + BEGIN LIST UPS + UPS su700 "Development box" + END LIST UPS + +'' is a name from ups.conf, and is the value of +desc= from ups.conf, if available. It will be set to "Unavailable" +otherwise. + +This can be used to determine what values of are valid before +calling other functions on the server. This is also a good way to +handle situations where a single upsd supports multiple drivers. + +Clients which perform a UPS discovery process may find this useful. + +VAR +~~~ + +Form: + + LIST VAR + LIST VAR su700 + +Response: + + BEGIN LIST VAR + VAR "" + ... + END LIST VAR + + BEGIN LIST VAR su700 + VAR su700 ups.mfr "APC" + VAR su700 ups.mfr.date "10/17/96" + ... + END LIST VAR su700 + +This replaces the old "LISTVARS" command. + +RW +~~ + +Form: + + LIST RW + LIST RW su700 + +Response: + + BEGIN LIST RW + RW "" + ... + END LIST RW + + BEGIN LIST RW su700 + RW su700 output.voltage.nominal "115" + RW su700 ups.delay.shutdown "020" + ... + END LIST RW su700 + +This replaces the old "LISTRW" command. + +CMD +~~~ + +Form: + + LIST CMD + LIST CMD su700 + +Response: + + BEGIN LIST CMD + CMD + ... + END LIST CMD + + BEGIN LIST CMD su700 + CMD su700 load.on + CMD su700 test.panel.start + ... + END LIST CMD su700 + +This replaces the old "LISTINSTCMD" command. + +ENUM +~~~~ + +Form: + + LIST ENUM + LIST ENUM su700 input.transfer.low + +Response: + + BEGIN LIST ENUM + ENUM "" + ... + END LIST ENUM + + BEGIN LIST ENUM su700 input.transfer.low + ENUM su700 input.transfer.low "103" + ENUM su700 input.transfer.low "100" + ... + END LIST ENUM su700 input.transfer.low + +This replaces the old "ENUM" command. + +NOTE: this does not support the old "SELECTED" notation. You must +request the current value separately. + +SET +--- + +Form: + + SET VAR "" + SET VAR su700 ups.id "My UPS" + +INSTCMD +------- + +Form: + + INSTCMD + INSTCMD su700 test.panel.start + +LOGOUT +------ + +Form: + + LOGOUT + +Response: + + OK Goodbye (recent versions) + Goodbye... (older versions) + +Used to disconnect gracefully from the server. + +LOGIN +----- + +Form: + + LOGIN + +Response: + + OK (upon success) + or <> + +NOTE: This requires "upsmon slave" or "upsmon master" in upsd.users + +Use this to log the fact that a system is drawing power from this UPS. +The upsmon master will wait until the count of attached systems reaches +1 - itself. This allows the slaves to shut down first. + +NOTE: You probably shouldn't send this command unless you are upsmon, +or a upsmon replacement. + +MASTER +------ + +Form: + + MASTER + +Response: + + OK (upon success) + or <> + +NOTE: This requires "upsmon master" in upsd.users + +This function doesn't do much by itself. It is used by upsmon to make +sure that master-level functions like FSD are available if necessary. + +FSD +--- + +Form: + + FSD + +Response: + + OK FSD-SET (success) + or <> + +NOTE: This requires "upsmon master" in upsd.users, or "FSD" action +granted in upsd.users + +upsmon in master mode is the primary user of this function. It sets this +"forced shutdown" flag on any UPS when it plans to power it off. This is +done so that slave systems will know about it and shut down before the +power disappears. + +Setting this flag makes "FSD" appear in a STATUS request for this UPS. +Finding "FSD" in a status request should be treated just like a "OB LB". + +It should be noted that FSD is currently a latch - once set, there is +no way to clear it short of restarting upsd or dropping then re-adding +it in the ups.conf. This may cause issues when upsd is running on a +system that is not shut down due to the UPS event. + +PASSWORD +-------- + +Form: + + PASSWORD + +Response: + + OK (upon success) + or <> + +Sets the password associated with a connection. Used for later +authentication for commands that require it. + +USERNAME +-------- + +Form: + + USERNAME + +Response: + + OK (upon success) + or <> + +Sets the username associated with a connection. This is also used for +authentication, specifically in conjunction with the upsd.users file. + +STARTTLS +-------- + +Form: + + STARTTLS + +Response: + + OK STARTTLS + or <> + +This tells upsd to switch to TLS mode internally, so all future +communications will be encrypted. You must also change to TLS mode in +the client after receiving the OK, or the connection will be useless. + +Other commands +-------------- + +- HELP: lists the commands supported by this server +- VER: shows the version of the server currently in use + +These two are not intended to be used directly by programs. Humans can +make use of this program by using telnet or netcat. If you use +telnet, make sure you don't have it set to negotiate extra options. +upsd doesn't speak telnet and will probably misunderstand your first +request due to the extra junk in the buffer. + +Error responses +--------------- + +An error response has the following format: + + ERR [...] + + is always one element; it never contains spaces. This may +be used to allow additional information () in the future. + + can have the following values: + +- 'ACCESS-DENIED' ++ +The client's host and/or authentication details (username, password) +are not sufficient to execute the requested command. + +- 'UNKNOWN-UPS' ++ +The UPS specified in the request is not known to upsd. This usually +means that it didn't match anything in ups.conf. + +- 'VAR-NOT-SUPPORTED' ++ +The specified UPS doesn't support the variable in the request. ++ +This is also sent for unrecognized variables which are in a space +which is handled by upsd, such as server.*. + +- 'CMD-NOT-SUPPORTED' ++ +The specified UPS doesn't support the instant command in the request. + +- 'INVALID-ARGUMENT' ++ +The client sent an argument to a command which is not recognized or +is otherwise invalid in this context. This is typically caused by +sending a valid command like GET with an invalid subcommand. + +- 'INSTCMD-FAILED' ++ +upsd failed to deliver the instant command request to the driver. +No further information is available to the client. This typically +indicates a dead or broken driver. + +- 'SET-FAILED' ++ +upsd failed to deliver the set request to the driver. This is + just like INSTCMD-FAILED above. + +- 'READONLY' ++ +The requested variable in a SET command is not writable. + +- 'TOO-LONG' ++ +The requested value in a SET command is too long. + +- 'FEATURE-NOT-SUPPORTED' ++ +This instance of upsd does not support the requested feature. This +is only used for TLS/SSL mode (STARTTLS) at the moment. + +- 'FEATURE-NOT-CONFIGURED' ++ +This instance of upsd hasn't been configured properly to allow the +requested feature to operate. This is also limited to STARTTLS for now. + +- 'ALREADY-SSL-MODE' ++ +TLS/SSL mode is already enabled on this connection, so upsd can't +start it again. + +- 'DRIVER-NOT-CONNECTED' ++ +upsd can't perform the requested command, since the driver for that +UPS is not connected. This usually means that the driver is not +running, or if it is, the ups.conf is misconfigured. + +- 'DATA-STALE' ++ +upsd is connected to the driver for the UPS, but that driver isn't +providing regular updates or has specifically marked the data +as stale. upsd refuses to provide variables on stale units to avoid +false readings. ++ +This generally means that the driver is running, but it has lost +communications with the hardware. Check the physical connection +to the equipment. + +- 'ALREADY-LOGGED-IN' ++ +The client already sent LOGIN for a UPS and can't do it again. +There is presently a limit of one LOGIN record per connection. + +- 'INVALID-PASSWORD' ++ +The client sent an invalid PASSWORD - perhaps an empty one. + +- 'ALREADY-SET-PASSWORD' ++ +The client already set a PASSWORD and can't set another. This also +should never happen with normal NUT clients. + +- 'INVALID-USERNAME' ++ +The client sent an invalid USERNAME. + +- 'ALREADY-SET-USERNAME' ++ +The client has already set a USERNAME, and can't set another. This +should never happen with normal NUT clients. + +- 'USERNAME-REQUIRED' ++ +The requested command requires a username for authentication, +but the client hasn't set one. + +- 'PASSWORD-REQUIRED' ++ +The requested command requires a passname for authentication, +but the client hasn't set one. + +- 'UNKNOWN-COMMAND' ++ +upsd doesn't recognize the requested command. ++ +This can be useful for backwards compatibility with older versions +of upsd. Some NUT clients will try GET and fall back on REQ after +receiving this response. + +- 'INVALID-VALUE' ++ +The value specified in the request is not valid. This usually +applies to a SET of an ENUM type which is using a value which is +not in the list of allowed values. + +Future ideas +------------ + +Dense lists +~~~~~~~~~~~ + +The LIST commands may be given the ability to handle options some day. +For example, "LIST VARS +DESC" would return the current value +like now, but it would also append the description of that variable. + +Command status +~~~~~~~~~~~~~~ + +After sending an INSTCMD or SET, a client will eventually be able to +poll to see whether it was completed successfully by the driver. + +Get collection +~~~~~~~~~~~~~~ + +Allow to request only a subtree, which can be a collection, or a sub +collection. diff --git a/docs/new-clients.txt b/docs/new-clients.txt new file mode 100644 index 0000000..da2e3ac --- /dev/null +++ b/docs/new-clients.txt @@ -0,0 +1,125 @@ +Creating new client +=================== + +NUT provides bindings for several common languages that are +presented below. All these are released under the same license as +NUT (the GNU General Public License). + +If none of these suits you for technical or legal reasons, you can +implement one easily using the <>. + +The latter approach has been used to create the Python 'PyNUT' module, the +Nagios 'check_ups' plugin (and probably others), which can serve as a +reference. + +C / C++ +------- + +Client access library +~~~~~~~~~~~~~~~~~~~~~ + +The upsclient library can be linked into other programs to give access +to upsd and UPS status information. Both static and shared versions are provided. + +Clients like upsc are provided as examples of how to retrieve data using the +upsclient functions. +link:http://www.networkupstools.org/projects.html[Other programs] not included +in this package may also use this library, such as wmnut. + +This library file and the associated header files are not installed by +default. You must `./configure --with-lib` to enable building and +installing these files. The libraries can then be built and installed +with `make` and `make install` as usual. This must be done before +building other (non-NUT) programs which depend on them. + +For more information, refer to the linkman:upsclient[3], +manual page and the various +link:man/index.html#Developer_man[upscli_*(3)] functions documentation +referenced in the same file. + +Configuration helpers +~~~~~~~~~~~~~~~~~~~~~ + +NUT provides helper scripts to ease the configuration step of your program, by +detecting the right compilation and link flags: + +- one for platforms providing pkg-config, +- and the other (libupsclient-config) for platforms not providing pkg-config. + +If you have pkg-config installed, and you need to find the location of the NUT +client include files, add the output of the following command to your build +system (which can be combined with other pkg-config invocations): + + pkg-config libupsclient --cflags + +If you don't have pkg-config, use this: + + libupsclient-config --cflags + +Reference: linkman:libupsclient-config[1] + +Python +------ + +The PyNUT module, contributed by David Goncalves, can be used for connecting a +Python script to `upsd`. Note that this code (and the accompanying NUT-Monitor +application) is licensed under the GPL v3. + +The `PyNUTClient` class abstracts the connection to the server. In order to +list the status variables for `ups1` on the local `upsd`, the following +commands could be used: + + $ cd scripts/python/module + $ python + ... + >>> import PyNUT + >>> from pprint import pprint + >>> client = PyNUT.PyNUTClient() + >>> vars = client.GetUPSVars('ups1') + >>> pprint(vars) + {'battery.charge': '90', + 'battery.charge.low': '30', + 'battery.runtime': '3690', + 'battery.voltage': '230.0', + ... + +Further examples are given in the `test_nutclient.py` file. To see the entire +API, you can run `pydoc` from the `module` directory. + +If you wish to make the module available to everyone on the system, you will +probably want to install it in the `site-packages` directory for your Python +interpreter. (This is usually one of the last items in `sys.path`.) + +Perl +---- + +The old Perl bindings from CPAN have recently been updated and merged into the +NUT source code. These operate in a similar fashion to the Python bindings, +with the addition of access to single variables, and additional interpretation +of the results. The Perl class instance encapsulates a single UPS, where the +Python class instance represents a connection to the server (which may service +multiple UPS units). + + use UPS::Nut; + + $ups = new UPS::Nut( NAME => "myups", + HOST => "somemachine.somewhere.com", + PORT => "3493", + USERNAME => "upsuser", + PASSWORD => "upspasswd", + TIMEOUT => 30, + DEBUG => 1, + DEBUGOUT => "/some/file/somewhere", + ); + if ($ups->Status() =~ /OB/) { + print "Oh, no! Power failure!\n"; + } + + tie %other_ups, 'UPS::Nut', + NAME => "myups", + HOST => "somemachine.somewhere.com", + ... # same options as new(); + ; + + print $other_ups{MFR}, " ", $other_ups{MODEL}, "\n"; + diff --git a/docs/new-drivers.txt b/docs/new-drivers.txt index 091583d..2ebc5de 100644 --- a/docs/new-drivers.txt +++ b/docs/new-drivers.txt @@ -1,32 +1,38 @@ -Desc: How to make a new driver to support another UPS -File: new-drivers.txt -Date: 14 March 2004 -Auth: Russell Kroll - Arnaud Quette +Creating a new driver to support another device +=============================================== + +This chapter will present the process to create a new driver to support +another device. + +Since NUT already supports all major power devices protocols, through +several generic drivers (genericups, usbhid-ups, snmp-ups, blazer_*, ...), +creation of new drivers has become rare. + +So most of the time, it will be limited to completing one of these +generic driver. Smart vs. Contact-closure -========================= +------------------------- If your UPS only does contact closure readings, then go straight to the -contact-closure.txt document for information on adding support. It's a -lot easier to add a few lines to a header file than it is to create a -whole new driver. +<> chapter for information on +adding support. It's a lot easier to add a few lines to a header file +than it is to create a whole new driver. Serial vs. USB vs. SNMP and more -================================ +-------------------------------- If your UPS connects to your computer via a USB port, then go straight -to the document hid-subdrivers.txt. You can probably add support for -your device by writing a new subdriver to the existing usbhid-ups -driver, which is easier than writing an entire new driver. +to the <> chapter. You can probably add +support for your device by writing a new subdriver to the existing +usbhid-ups driver, which is easier than writing an entire new driver. Similarly, if your UPS connects to your computer via an SNMP network card, you can probably add support for your device by writing a new -subdriver to the existing snmp-ups driver, which is easier than writing -an entire new driver. +subdriver to the existing snmp-ups driver. Overall concept -=============== +--------------- The basic design of drivers is simple. main.c handles most of the work for you. You don't have to worry about arguments, config files, or @@ -34,51 +40,51 @@ anything else like that. Your only concern is talking to the hardware and providing data to the outside world. Skeleton driver -=============== +--------------- Familiarize yourself with the design of skel.c in the drivers directory. It shows a few examples of the functions that main will call to obtain updated information from the hardware. Essential structure -=================== +------------------- upsdrv_info_t -------------- +~~~~~~~~~~~~~ This structure tracks several description information about the driver: - * name: the driver full name, for banner printing. - * version: the driver's own version. For sub driver information, refer below - to sub_upsdrv_info. This value has the form "X.YZ", and is - published by main as "driver.version.internal". - * authors: the driver's author(s) name. If multiple authors are listed, separate - them with '\n' so that it can be broken up by author if needed. - * status: the driver development status. The following values are allowed: - - DRV_BROKEN: setting this value will cause main to print an error - and exit. This is only used during conversions of the driver core - to keep users from using drivers which have not been converted. - Drivers in this state will be removed from the tree after some - period if they are not fixed. - - DRV_EXPERIMENTAL: set this value if your driver is potentially - broken. This will trigger a warning when it starts so the user - doesn't take it for granted. - - DRV_BETA: this value means that the driver is more stable and - complete. But it is still not recommended for production systems. - - DRV_STABLE: the driver is suitable for production systems, but not - 100 % feature complete. - - DRV_COMPLETE: this is the gold level! It implies that 100 % of the - protocol is implemented, and a full QA pass. - * subdrv_info: array of upsdrv_info_t for sub driver(s) information. This - is used for example by usbhid-ups and megatec. + * *name*: the driver full name, for banner printing. + * *version*: the driver's own version. For sub driver information, refer below + to sub_upsdrv_info. This value has the form "X.YZ", and is + published by main as "driver.version.internal". + * *authors*: the driver's author(s) name. If multiple authors are listed, separate + them with a newline character so that it can be broken up by author if needed. + * *status*: the driver development status. The following values are allowed: + - DRV_BROKEN: setting this value will cause main to print an error + and exit. This is only used during conversions of the driver core + to keep users from using drivers which have not been converted. + Drivers in this state will be removed from the tree after some + period if they are not fixed. + - DRV_EXPERIMENTAL: set this value if your driver is potentially + broken. This will trigger a warning when it starts so the user + doesn't take it for granted. + - DRV_BETA: this value means that the driver is more stable and + complete. But it is still not recommended for production systems. + - DRV_STABLE: the driver is suitable for production systems, but not + 100 % feature complete. + - DRV_COMPLETE: this is the gold level! It implies that 100 % of the + protocol is implemented, and a full QA pass. + * *subdrv_info*: array of upsdrv_info_t for sub driver(s) information. For + example, this is used by usbhid-ups. -These information are currently used for the startup banner printing and tests. +This information is currently used for the startup banner printing and tests. Essential functions -=================== +------------------- upsdrv_initups --------------- +~~~~~~~~~~~~~~ Open the port (device_path) and do any low-level things that it may need to start using that port. If you have to set DTR or RTS on a serial @@ -88,7 +94,7 @@ Don't do any sort of hardware detection here, since you may be going into upsdrv_shutdown next. upsdrv_initinfo ---------------- +~~~~~~~~~~~~~~~ Try to detect what kind of UPS is out there, if any, assuming that's possible for your hardware. If there is a way to detect that hardware @@ -99,7 +105,7 @@ This is usually a good place to create variables like ups.mfr, ups.model, ups.serial, and other "one time only" items. upsdrv_updateinfo ------------------ +~~~~~~~~~~~~~~~~~ Poll the hardware, and update any variables that you care about monitoring. Use dstate_setinfo() to store the new values. @@ -122,7 +128,7 @@ running. Calling exit() or any of the fatal*() functions is specifically not allowed anymore. upsdrv_shutdown ---------------- +~~~~~~~~~~~~~~~ Do whatever you can to make the UPS power off the load but also return after the power comes back on. You may use a different command that @@ -135,7 +141,7 @@ vulnerable to a race if the power comes back on during the shutdown process. Data types -========== +---------- To be of any use, you must supply data in ups.status. That is the minimum needed to let upsmon do its job. Whenever possible, you should @@ -149,7 +155,7 @@ needs to support many similar hardware models but can't probe to see what is actually attached. Manipulating the data -===================== +--------------------- All status data lives in structures that are managed by the dstate functions. All access and modifications must happen through those @@ -157,7 +163,7 @@ functions. Any other changes are forbidden, as they will not pushed out as updates to things like upsd. Adding variables ----------------- +~~~~~~~~~~~~~~~~ dstate_setinfo("ups.model", "Mega-Zapper 1500"); @@ -167,7 +173,7 @@ values right there: dstate_setinfo("ups.model", "Mega-Zapper %d", rating); Setting flags -------------- +~~~~~~~~~~~~~ Some variables have special properties. They can be writable, and some are strings. The ST_FLAG_* values can be used to tell upsd more about @@ -176,44 +182,44 @@ what it can do. dstate_setflags("input.transfer.high", ST_FLAG_RW); Status data -=========== +~~~~~~~~~~~ UPS status flags like on line (OL) and on battery (OB) live in ups.status. Don't manipulate this by hand. There are functions which will do this for you. - status_init() - before doing anything else + status_init() - before doing anything else - status_set(val) - add a status word (OB, OL, etc) + status_set(val) - add a status word (OB, OL, etc) - status_commit() - push out the update + status_commit() - push out the update Possible values for status_set: - OL - On line (mains is present) - OB - On battery (mains is not present) - LB - Low battery - RB - The battery needs to be replaced - CHRG - The battery is charging - DISCHRG - The battery is discharging (inverter is providing load power) - BYPASS - UPS bypass circuit is active - no battery protection is available - CAL - UPS is currently performing runtime calibration (on battery) - OFF - UPS is offline and is not supplying power to the load - OVER - UPS is overloaded - TRIM - UPS is trimming incoming voltage (called "buck" in some hardware) - BOOST - UPS is boosting incoming voltage + OL - On line (mains is present) + OB - On battery (mains is not present) + LB - Low battery + RB - The battery needs to be replaced + CHRG - The battery is charging + DISCHRG - The battery is discharging (inverter is providing load power) + BYPASS - UPS bypass circuit is active - no battery protection is available + CAL - UPS is currently performing runtime calibration (on battery) + OFF - UPS is offline and is not supplying power to the load + OVER - UPS is overloaded + TRIM - UPS is trimming incoming voltage (called "buck" in some hardware) + BOOST - UPS is boosting incoming voltage Anything else will not be recognized by the usual clients. Coordinate -with me before creating something new, since there will be duplication -and ugliness otherwise. +with the nut-upsdev list before creating something new, since there will be +duplication and ugliness otherwise. -Note: upsd injects "FSD" by itself following that command by a master +NOTE: upsd injects "FSD" by itself following that command by a master upsmon process. Drivers must not set that value. -Note: the OL and OB flags are an indication of the input line status only. +NOTE: the OL and OB flags are an indication of the input line status only. UPS alarms -========== +---------- These work like ups.status, and have three special functions which you must use to manage them. @@ -224,7 +230,7 @@ must use to manage them. alarm_commit() - push the value into ups.alarm -Note: the ALARM flag in ups.status is automatically set whenever you use +NOTE: the ALARM flag in ups.status is automatically set whenever you use alarm_set. To remove that flag from ups.status, call alarm_init and alarm_commit without calling alarm_set in the middle. @@ -238,7 +244,7 @@ There is no official list of alarm words as of this writing, so don't use these functions until you check with the upsdev list. Staleness control -================= +----------------- If you're not talking to a polled UPS, then you must ensure that it is still out there and is alive before calling dstate_dataok(). Even @@ -247,15 +253,15 @@ else to ensure that it is really available. If the attempts to contact the UPS fail, you must call dstate_datastale() to inform the server and clients. - - dstate_dataok() +- dstate_dataok() ++ +You must call this if polls are succeeding. A good place to call this +is the bottom of upsdrv_updateinfo(). - You must call this if polls are succeeding. A good place to call this - is the bottom of upsdrv_updateinfo(). - - - dstate_datastale() - - You must call this if your status is unusable. A good technique is - to call this before exiting prematurely from upsdrv_updateinfo(). +- dstate_datastale() ++ +You must call this if your status is unusable. A good technique is +to call this before exiting prematurely from upsdrv_updateinfo(). Don't hide calls to these functions deep inside helper functions. It is very hard to find the origin of staleness warnings, if you call these from @@ -265,21 +271,19 @@ either of these regularly as was stated in previous versions of this document (that requirement has long gone). Serial port handling -==================== +-------------------- Drivers which use serial port functions should include serial.h and use these functions whenever possible: - - - int ser_open(const char *port) +- int ser_open(const char *port) This opens the port and locks it if possible, using one of fcntl, lockf, or uu_lock depending on what may be available. If something fails, it calls fatal for you. If it succeeds, it always returns the fd that was opened. - - - int ser_set_speed(int fd, const char *port, speed_t speed) +- int ser_set_speed(int fd, const char *port, speed_t speed) This sets the speed of the port and also does some basic configuring with tcgetattr and tcsetattr. If you have a special serial @@ -290,39 +294,33 @@ a useful error message. This is the only place that will generate a message if someone passes a non-serial port /dev entry to your driver, so it needs the extra detail. - - - int ser_set_dtr(int fd, int state) - - int ser_set_rts(int fd, int state) + - int ser_set_dtr(int fd, int state) + - int ser_set_rts(int fd, int state) These functions can be used to set the modem control lines to provide cable power on the RS232 interface. Use state = 0 to set the line to 0 and any other value to set it to 1. - - - int set_get_dsr(int fd) - - int ser_get_cts(int fd) - - int set_get_dcd(int fd) + - int ser_get_dsr(int fd) + - int ser_get_cts(int fd) + - int ser_get_dcd(int fd) These functions read the state of the modem control lines. They will return 0 if the line is logic 0 and a non-zero value if the line is logic 1. - - - int ser_close(int fd, const char *port) + - int ser_close(int fd, const char *port) This function unlocks the port if possible and closes the fd. You should call this in your upsdrv_cleanup handler. - - - int ser_send_char(int fd, char ch) + - int ser_send_char(int fd, char ch) This attempts to write one character and returns the return value from write. You could call write directly, but using this function allows for future error handling in one place. - - - int ser_send_pace(int fd, unsigned long d_usec, - const char *fmt, ...) + - int ser_send_pace(int fd, unsigned long d_usec, const char *fmt, ...) If you need to send a formatted buffer with an intercharacter delay, use this function. There are a number of UPS controllers which can't take @@ -333,39 +331,32 @@ one. The return value is the number of characters that was sent to the port, or -1 if something failed. - - - int ser_send(int fd, const char *fmt, ...) + - int ser_send(int fd, const char *fmt, ...) Like ser_send_pace, but without a delay. Only use this if you're sure that your UPS can handle characters at the full line rate. - - - int ser_send_buf(int fd, const char *buf, size_t buflen) + - int ser_send_buf(int fd, const char *buf, size_t buflen) This sends a raw buffer to the fd. It is typically used for binary transmissions. It returns the results of the call to write. - - - int ser_send_buf_pace(int fd, unsigned long d_usec, const char *buf, - size_t buflen) + - int ser_send_buf_pace(int fd, unsigned long d_usec, const char *buf, size_t buflen) This is just ser_send_buf with an intercharacter delay. - - - int ser_get_char(int fd, char *ch, long d_sec, long d_usec) + - int ser_get_char(int fd, char *ch, long d_sec, long d_usec) This will wait up to d_sec seconds + d_usec microseconds for one character to arrive, storing it at ch. It returns 1 on success, -1 if something fails and 0 on a timeout. -Note: the delay value must not be too large, or your driver will not get +NOTE: the delay value must not be too large, or your driver will not get back to the usual idle loop in main in time to answer the PINGs from upsd. That will cause an oscillation between staleness and normal behavior. - - - int ser_get_buf(int fd, char *buf, size_t buflen, long d_sec, - long d_usec) + - int ser_get_buf(int fd, char *buf, size_t buflen, long d_sec, long d_usec) Like ser_get_char, but this one reads up to buflen bytes storing all of them in buf. The buffer is zeroed regardless of success or failure. It @@ -373,9 +364,7 @@ returns the number of bytes read, -1 on failure and 0 on a timeout. This is essentially a single read() function with a timeout. - - - int ser_get_buf_len(int fd, char *buf, size_t buflen, long d_sec, - long d_usec) + - int ser_get_buf_len(int fd, char *buf, size_t buflen, long d_sec, long d_usec) Like ser_get_buf, but this one waits for buflen bytes to arrive, storing all of them in buf. The buffer is zeroed regardless of success @@ -385,9 +374,8 @@ and 0 on a timeout. This should only be used for binary reads. See ser_get_line for protocols that are terminated by characters like CR or LF. - - - int ser_get_line(int fd, char *buf, size_t buflen, char endchar, - const char *ignset, long d_sec, long d_usec) + - int ser_get_line(int fd, char *buf, size_t buflen, char endchar, + const char *ignset, long d_sec, long d_usec) This is the reading function you should use if your UPS tends to send responses like "OK\r" or "1234\n". It reads up to buflen bytes and @@ -404,7 +392,7 @@ an empty string - "". The buffer is always cleared and is always null-terminated. It does this by reading at most (buflen - 1) bytes. -Note: any other data which is read after the endchar in the serial +NOTE: any other data which is read after the endchar in the serial buffer will be lost forever. As a result, you should not use this unless your UPS uses a polled protocol. @@ -416,9 +404,9 @@ This also means that you should not "pipeline" commands to the UPS. Send a query, then read the response, then send the next query. - - int ser_get_line_alert(int fd, char *buf, size_t buflen, - char endchar, const char *ignset, const char *alertset, - void handler(char ch), long d_sec, long d_usec) + - int ser_get_line_alert(int fd, char *buf, size_t buflen, + char endchar, const char *ignset, const char *alertset, + void handler(char ch), long d_sec, long d_usec) This is just like ser_get_line, but it allows you to specify a set of alert characters which may be received at any time. They are not added @@ -429,8 +417,7 @@ Implementation note: this function actually does all of the work, and ser_get_line is just a wrapper that sets an empty alertset and a NULL handler. - - - int ser_flush_in(int fd, const char *ignset, int verbose) + - int ser_flush_in(int fd, const char *ignset, int verbose) This function will drain the input buffer. If verbose is set to a positive number, then it will announce the characters which have been @@ -441,14 +428,12 @@ This function returns the number of characters which were read, so you can check for extra bytes by looking for a nonzero return value. Zero will also be returned if the read fails for some reason. - - - int set_flush_io(int fd) + - int set_flush_io(int fd) This function drains both the in- and output buffers. Return zero on success. - - - void ser_comm_fail(const char *fmt, ...) + - void ser_comm_fail(const char *fmt, ...) Call this whenever your serial communications fail for some reason. It takes a format string, so you can use variables and other things to @@ -468,10 +453,9 @@ If your UPS frequently fails to acknowledge polls and this is a known situation, you should make a couple of attempts before calling this function. -Note: this does not call dstate_datastale. You still need to do that. +NOTE: this does not call dstate_datastale. You still need to do that. - - - void ser_comm_good(void) + - void ser_comm_good(void) This will clear the error counter and write a "re-established" message to the syslog after communications have been lost. Your driver should @@ -479,32 +463,38 @@ call this whenever it has successfully contacted the UPS. A good place for most drivers is where it calls dstate_dataok. USB port handling -================= +----------------- Drivers which use USB functions should include usb-common.h and use these: - * structure and macro: +Structure and macro +~~~~~~~~~~~~~~~~~~~ - You should us the usb_device_id structure, and the USB_DEVICE macro to - declare the supported devices. This allows the automatic extraction of - USB information, to generate the HAL, Hotplug and udev support files. +You should us the usb_device_id structure, and the USB_DEVICE macro to +declare the supported devices. This allows the automatic extraction of +USB information, to generate the HAL, Hotplug, udev and DeviceKit-power +support files. - For example: - /* SomeVendor name */ - #define SOMEVENDOR_VENDORID 0xXXXX +For example: - /* USB IDs device table */ - static usb_device_id sv_usb_device_table [] = { - /* some models 1 */ - { USB_DEVICE(SOMEVENDOR_VENDORID, 0xYYYY), NULL }, - /* various models */ - { USB_DEVICE(SOMEVENDOR_VENDORID, 0xZZZZ), NULL }, - { USB_DEVICE(SOMEVENDOR_VENDORID, 0xAAAA), NULL }, - /* Terminating entry */ - { -1, -1, NULL } - }; +-------------------------------------------------------------------------------- +/* SomeVendor name */ +#define SOMEVENDOR_VENDORID 0xXXXX - * function: +/* USB IDs device table */ +static usb_device_id sv_usb_device_table [] = { + /* some models 1 */ + { USB_DEVICE(SOMEVENDOR_VENDORID, 0xYYYY), NULL }, + /* various models */ + { USB_DEVICE(SOMEVENDOR_VENDORID, 0xZZZZ), NULL }, + { USB_DEVICE(SOMEVENDOR_VENDORID, 0xAAAA), NULL }, + /* Terminating entry */ + { -1, -1, NULL } +}; +-------------------------------------------------------------------------------- + +Function +~~~~~~~~ - is_usb_device_supported(usb_device_id **usb_device_id_list, int dev_VendorID, int dev_ProductID) @@ -513,18 +503,18 @@ Call this in your device opening / matching function. Pass your usb_device_id structure, and a set of VendorID / DeviceID. This function returns one of the following value: -NOT_SUPPORTED (0), POSSIBLY_SUPPORTED (1) or SUPPORTED (2) -POSSIBLY_SUPPORTED is returned when the VendorID is matched, but the DeviceID -is unknown. + +- NOT_SUPPORTED (0), +- POSSIBLY_SUPPORTED (1, returned when the VendorID is matched, but the DeviceID is unknown), +- or SUPPORTED (2). For implementation examples, refer to the various USB drivers, and search for the above patterns. - -This set of USB helpers is due to expand is the near future... +NOTE: This set of USB helpers is due to expand is the near future... Variable names -============== +-------------- PLEASE don't make up new variables and commands just because you can. The new dstate functions give us the power to create just about @@ -532,18 +522,77 @@ anything, but that is a privilege and not a right. Imagine the mess that would happen if every developer decided on their own way to represent a common status element. -Check new-names.txt first to find the closest fit. If nothing matches, -contact the upsdev list or mail me directly, and we'll figure it out. +Check the <> section first to +find the closest fit. If nothing matches, contact the upsdev list, and we'll +figure it out. Patches which introduce unlisted names may be modified or dropped. +[[commands]] Message passing support -======================= +----------------------- + +upsd can call drivers to store values in read/write variables and to kick +off instant commands. This is how you register handlers for those events. + +The driver core (drivers/main.c) has a structure called upsh. You +should populate it with function pointers in your upsdrv_initinfo() +function. Right now, there are only two possibilities: + +- setvar = setting UPS variables (SET VAR protocol command) +- instcmd = instant UPS commands (INSTCMD protocol command) + +SET +~~~ + +If your driver's function for handling variable set events is called +my_ups_set(), then you'd do this to add the pointer: + + upsh.setvar = my_ups_set; + +my_ups_set() will receive two parameters: + + const char * - the variable being changed + const char * - the new value + +You should return either STAT_SET_HANDLED if your driver recognizes the +command, or STAT_SET_UNKNOWN if it doesn't. Other possibilities will be +added at some point in the future. + +INSTCMD +~~~~~~~ + +This works just like the set process, with slightly different values +arriving from the server. + + upsh.instcmd = my_ups_cmd; + +Your function will receive two args: + + const char * - the command name + const char * - (reserved) + +You should return either STAT_INSTCMD_HANDLED or STAT_INSTCMD_UNKNOWN +depending on whether your driver can handle the requested command. + +Notes +~~~~~ + +Use strcasecmp. The command names arriving from upsd should be treated +without regards to case. + +Responses +~~~~~~~~~ + +Drivers will eventually be expected to send responses to commands. +Right now, there is no channel to get these back through upsd to +the client, so this is not implemented. + +This will probably be implemented with a polling scheme in the clients. -See commands.txt. Enumerated types -================ +---------------- If you have a variable that can have several specific values, it is enumerated. You should add each one to make it available to the client: @@ -554,10 +603,10 @@ enumerated. You should add each one to make it available to the client: dstate_addenum("input.transfer.low", "105"); Writable strings -================ +---------------- Strings that may be changed by the client should have the ST_FLAG_STRING -flag set, and a maximum length byte set in the auxdata. +flag set, and a maximum length (in bytes) set in the auxdata. dstate_setinfo("ups.id", "Big UPS"); dstate_setflags("ups.id", ST_FLAG_STRING | ST_FLAG_RW); @@ -567,21 +616,21 @@ If the variable is not writable, don't bother with the flags or the auxiliary data. It won't be used. Instant commands -================ +---------------- If your hardware and driver can support a command, register it. dstate_addcmd("load.on"); Delays and ser_* functions -========================== +-------------------------- The new ser_* functions may perform reads faster than the UPS is able to respond in some cases. This means that your driver will call select() and read() numerous times if your UPS responds in bursts. This also depends on how fast your system is. -You should check your driver with strace or its equivalent on your +You should check your driver with `strace` or its equivalent on your system. If the driver is calling read() multiple times, consider adding a call to usleep before going into the ser_read_* call. That will give it a chance to accumulate so you get the whole thing with one call to @@ -600,9 +649,9 @@ The select returns almost instantly, and read gets a tiny chunk of the data. Add the delay and you get a nice four-line status poll. Canonical input mode processing -=============================== +------------------------------- -If your UPS uses '\n' and/or '\r' as endchar, consider the use of +If your UPS uses "\n" and/or "\r" as endchar, consider the use of Canonical Input Mode Processing instead of the ser_get_line* functions. Using a serial port in this mode means that select() will wait until @@ -613,8 +662,18 @@ that you no longer have to worry about the case that your UPS sends and "abcd\n" on consecutive reads, without risk of losing data (which is an often forgotten side effect of the ser_get_line* functions). -Currently an example how this works can be found in the safenet and -upscode2 drivers. The first uses a single '\r' as endchar, while the -latter accepts either '\n', "\n\r" or "\r\n" as line termination. You +Currently, an example how this works can be found in the safenet and +upscode2 drivers. The first uses a single "\r" as endchar, while the +latter accepts either "\n", "\n\r" or "\r\n" as line termination. You can define other termination characters as well, but can't undefine -'\r' and '\n' (so if you need these as data, this is not for you). +"\r" and "\n" (so if you need these as data, this is not for you). + + +[[contact-closure]] + +include::contact-closure.txt[] + + +[[hid-subdrivers]] + +include::hid-subdrivers.txt[] diff --git a/docs/new-names.txt b/docs/new-names.txt deleted file mode 100644 index 69a508e..0000000 --- a/docs/new-names.txt +++ /dev/null @@ -1,574 +0,0 @@ -Desc: New command and variable naming scheme -File: new-names.txt -Date: 09 September 2005 -Auth: Russell Kroll - Arnaud Quette - -*** NOTE *** : When updating this file, also update data/cmdvartab. - -This is a dump of the standard variables and command names used in NUT. -Don't use a name with any of the dstate functions unless it exists here. - -If you need a new variable or command name, contact the Development Team -first. - -Put another way: if you make up a name that's not in this list and it -gets into the tree, and then we come up with a better name later, clients -that use the undocumented variable will break when it is changed. - - Note: "opaque" means programs should not attempt to parse the value for - that variable as it may vary greatly from one UPS to the next. These - strings are best handled directly by the user. - - Variables - -device: General unit information - Note: these data will be redundant with some ups.* information - during a transition period. The ups.* data will then be removed. - - +-------------------------------------------------------------------------+ - | Name | Description | Typical value | - |-----------------------+---------------------------+---------------------| - | device.model | Device model | BladeUPS | - |-----------------------+---------------------------+---------------------| - | device.mfr | Device manufacturer | Eaton | - |-----------------------+---------------------------+---------------------| - | device.serial | Device serial number | WS9643050926 | - | | (opaque string) | | - |-----------------------+---------------------------+---------------------| - | device.type | Device type (ups, pdu) | ups | - +-------------------------------------------------------------------------+ - -ups: General unit information - - +-------------------------------------------------------------------------+ - | Name | Description | Typical value | - |-----------------------+------------------------------+------------------| - | ups.status | UPS status | OL (see | - | | | new-drivers.txt) | - |-----------------------+------------------------------+------------------| - | ups.alarm | UPS alarms | OVERHEAT | - |-----------------------+------------------------------+------------------| - | ups.time | Internal UPS clock time | 12:34 | - | | (opaque string) | | - |-----------------------+------------------------------+------------------| - | ups.date | Internal UPS clock date | 01-02-03 | - | | (opaque string) | | - |-----------------------+------------------------------+------------------| - | ups.model | UPS model | SMART-UPS 700 | - |-----------------------+------------------------------+------------------| - | ups.mfr | UPS manufacturer | APC | - |-----------------------+------------------------------+------------------| - | ups.mfr.date | UPS manufacturing date | 10/17/96 | - | | (opaque string) | | - |-----------------------+------------------------------+------------------| - | ups.serial | UPS serial number (opaque | WS9643050926 | - | | string) | | - |-----------------------+------------------------------+------------------| - | ups.vendorid | Vendor ID for USB devices | 0463 | - |-----------------------+------------------------------+------------------| - | ups.productid | Product ID for USB devices | 0001 | - |-----------------------+------------------------------+------------------| - | ups.firmware | UPS firmware (opaque string) | 50.9.D | - |-----------------------+------------------------------+------------------| - | ups.firmware.aux | Auxiliary device firmware | 4Kx | - |-----------------------+------------------------------+------------------| - | ups.temperature | UPS temperature (degrees C) | 042.7 | - |-----------------------+------------------------------+------------------| - | ups.load | Load on UPS (percent) | 023.4 | - |-----------------------+------------------------------+------------------| - | ups.load.high | Load when UPS | 100 | - | | switches to overload | | - | | condition ("OVER") (percent) | | - |-----------------------+------------------------------+------------------| - | ups.id | UPS system identifier | Sierra | - | | (opaque string) | | - |-----------------------+------------------------------+------------------| - | | Interval to wait before | | - | ups.delay.start | restarting the load | 0 | - | | (seconds) | | - |-----------------------+------------------------------+------------------| - | ups.delay.reboot | Interval to wait before | 60 | - | | rebooting the UPS (seconds) | | - |-----------------------+------------------------------+------------------| - | | Interval to wait after | | - | ups.delay.shutdown | shutdown with delay command | 20 | - | | (seconds) | | - |-----------------------+------------------------------+------------------| - | ups.timer.start | Time before the load will be | 30 | - | | started (seconds) | | - |-----------------------+------------------------------+------------------| - | ups.timer.reboot | Time before the load will be | 10 | - | | rebooted (seconds) | | - |-----------------------+------------------------------+------------------| - | ups.timer.shutdown | Time before the load will be | 20 | - | | shutdown (seconds) | | - |-----------------------+------------------------------+------------------| - | ups.test.interval | Interval between self tests | 1209600 (two | - | | (seconds) | weeks) | - |-----------------------+------------------------------+------------------| - | ups.test.result | Results of last self test | Bad battery pack | - | | (opaque string) | | - |-----------------------+------------------------------+------------------| - | ups.display.language | Language to use on front | E | - | | panel (*** opaque) | | - |-----------------------+------------------------------+------------------| - | ups.contacts | UPS external contact sensors | F0 | - | | (*** opaque) | | - |-----------------------+------------------------------+------------------| - | ups.power | Current value of apparent | 500 | - | | power (Volt-Amps) | | - |-----------------------+------------------------------+------------------| - | ups.power.nominal | Nominal value of apparent | 500 | - | | power (Volt-Amps) | | - |-----------------------+------------------------------+------------------| - | ups.realpower | Current value of real | 300 | - | | power (Watts) | | - |-----------------------+------------------------------+------------------| - | ups.realpower.nominal | Nominal value of real | 300 | - | | power (Watts) | | - |-----------------------+------------------------------+------------------| - | ups.beeper.status | UPS beeper status | enabled | - | | (enabled, disabled or muted) | | - |-----------------------+------------------------------+------------------| - | ups.type | UPS type (*** opaque) | offline | - |-----------------------+------------------------------+------------------| - | ups.watchdog.status | UPS watchdog status | disabled | - | | (enabled or disabled) | | - |-----------------------+------------------------------+------------------| - | ups.start.auto | UPS starts when mains is | yes | - | | (re)applied | | - +-----------------------+------------------------------+------------------+ - | ups.start.battery | Allow to start UPS from | yes | - | | battery | | - +-----------------------+------------------------------+------------------+ - | ups.start.reboot | UPS coldstarts from battery | yes | - | | (enabled or disabled) | | - +-------------------------------------------------------------------------+ - -input: Incoming line/power information - - +------------------------------------------------------------------------+ - | Name | Description | Typical value | - |---------------------------+----------------------------+---------------| - | input.voltage | Input voltage | 121.5 | - |---------------------------+----------------------------+---------------| - | input.voltage.maximum | Maximum incoming voltage | 130 | - | | seen | | - |---------------------------+----------------------------+---------------| - | input.voltage.minimum | Minimum incoming voltage | 100 | - | | seen | | - |---------------------------+----------------------------+---------------| - | input.voltage.nominal | Nominal input voltage | 120 | - |---------------------------+----------------------------+---------------| - | input.voltage.extended | Extended input voltage | no | - | | range | | - |---------------------------+----------------------------+---------------| - | input.transfer.reason | Reason for last transfer | T | - | | to battery (*** opaque) | | - |---------------------------+----------------------------+---------------| - | input.transfer.low | Low voltage transfer point | 91 | - |---------------------------+----------------------------+---------------| - | input.transfer.high | High voltage transfer | 132 | - | | point | | - |---------------------------+----------------------------+---------------| - | input.transfer.low.min | smallest settable low | 85 | - | | voltage transfer point | | - |---------------------------+----------------------------+---------------| - | input.transfer.low.max | greatest settable low | 95 | - | | voltage transfer point | | - |---------------------------+----------------------------+---------------| - | input.transfer.high.min | smallest settable high | 131 | - | | voltage transfer point | | - |---------------------------+----------------------------+---------------| - | input.transfer.high.max | greatest settable high | 136 | - | | voltage transfer point | | - |---------------------------+----------------------------+---------------| - | input.sensitivity | Input power sensitivity | H (high) | - |---------------------------+----------------------------+---------------| - | input.quality | Input power quality (*** | FF | - | | opaque) | | - |---------------------------+----------------------------+---------------| - | input.current | Input current (A) | 4.25 | - |---------------------------+----------------------------+---------------| - | input.current.nominal | Nominal input current (A) | 5.0 | - |---------------------------+----------------------------+---------------| - | input.frequency | Input line frequency (Hz) | 60.00 | - |---------------------------+----------------------------+---------------| - | input.frequency.nominal | Nominal input line | 60 | - | | frequency (Hz) | | - |---------------------------+----------------------------+---------------| - | input.frequency.low | Input line frequency low | 47 | - | | (Hz) | | - |---------------------------+----------------------------+---------------| - | input.frequency.high | Input line frequency high | 63 | - | | (Hz) | | - |---------------------------+----------------------------+---------------| - | input.frequency.extended | Extended input frequency | no | - | | range | | - |---------------------------+----------------------------+---------------| - | input.transfer.boost.low | Low voltage boosting | 190 | - | | transfer point | | - |---------------------------+----------------------------+---------------| - | input.transfer.boost.high | High voltage boosting | 210 | - | | transfer point | | - |---------------------------+----------------------------+---------------| - | input.transfer.trim.low | Low voltage trimming | 230 | - | | transfer point | | - |---------------------------+----------------------------+---------------| - | input.transfer.trim.high | High voltage trimming | 240 | - | | transfer point | | - +------------------------------------------------------------------------+ - -output: Outgoing power/inverter information - - +------------------------------------------------------------------------+ - | output.voltage | Output voltage (V) | 120.9 | - |-------------------------------+--------------------------------+-------| - | output.voltage.nominal | Nominal output voltage (V) | 120 | - |-------------------------------+--------------------------------+-------| - | output.frequency | Output frequency (Hz) | 59.9 | - |-------------------------------+--------------------------------+-------| - | output.frequency.nominal | Nominal output frequency (Hz) | 60 | - |-------------------------------+--------------------------------+-------| - | output.current | Output current (A) | 4.25 | - |-------------------------------+--------------------------------+-------| - | output.current.nominal | Nominal output current (A) | 5.0 | - +------------------------------------------------------------------------+ - -Three-phase additions: ----------------------- - -The additions for three-phase measurements would produce a very long table -due to all the combinations that are possible, so these additions are -broken down to their base components. - -PHASE COUNT DETERMINATION: --------------------------- -input.phases (3 for 3phase, absent or 1 for 1phase) -output.phases (as for input.phases) - -DOMAINs: --------- -Any input or output is considered a valid DOMAIN. - -input (should really be called input.mains, but keep this for compat) -input.bypass -input.servicebypass - -output (should really be called output.load, but keep this for compat) -output.bypass -output.inverter -output.servicebypass - -SPECIFICATION (SPEC): -------------------------- -Voltage, current, frequency, etc are considered to be a specification of -the measurement. - -With this notation, the old 1phase naming scheme becomes DOMAIN.SPEC -Example: input.current - -CONTEXT: --------- -When in 3phase mode we need some way to specify the target for most -measurements in more detail, we call this the CONTEXT. - -With this notation, the naming scheme becomes DOMAIN.CONTEXT.SPEC when -in 3phase mode. -Example: input.L1.current - -Valid CONTEXTs: ---------------- -L1-L2 \ -L2-L3 \ -L3-L1 for voltage measurements -L1-N / -L2-N / -L3-N / - -L1 \ -L2 for currrent and power measurements -L3 / -N - for current measurement - -Valid SPECs: ------------ -Valid with/without context (ie. per phase or aggregated/averaged) -current Current (A) -current.maximum Maximum seen current (A) -current.minimum Minimum seen current (A) -peakcurrent Peak current -voltage Voltage (V) -voltage.nominal Nominal voltage (V) -voltage.maximum Maximum seen voltage (V) -voltage.minimum Minimum seen voltage (V) -power Apparent power (VA) -power.maximum Maximum seen apparent power (VA) -power.minimum Maximum seen apparent power (VA) -power.percent Percentage of apparent power related to maximum load -power.maximum.percent Max seen percentage of apparent power -power.minimum.percent Min seen percentage of apparent power -realpower Real power (W) -powerfactor Power Factor (dimensionless value between 0.00 and 1.00) - -Valid without context (ie. aggregation of all phases): -frequency Frequency (Hz) -frequency.nominal Nominal frequency (Hz) - -EXAMPLES: ---------- -Partial Three phase - Three phase example: -input.phases: 3 -input.frequency: 50.0 -input.L1.current: 133.0 -input.bypass.L1-L2.voltage: 398.3 -output.phases: 3 -output.L1.power: 35700 -output.powerfactor: 0.82 - -Partial Three phase - One phase example: -input.phases: 3 -input.L2.current: 48.2 -input.N.current: 3.4 -input.L3-L1.voltage: 405.4 -input.frequency: 50.1 -output.phases: 1 -output.current: 244.2 -output.voltage: 120 -output.frequency.nominal: 60.0 - - -battery: Any battery details - - +------------------------------------------------------------------------+ - | battery.charge | Battery charge (percent) | 100.0 | - |-------------------------+------------------------------+---------------| - | battery.charge.low | Remaining battery level when | 20 | - | | UPS switches to LB (percent) | | - |-------------------------+------------------------------+---------------| - | battery.charge.restart | Minimum battery level for | 20 | - | | UPS restart after power-off | | - |-------------------------+------------------------------+---------------| - | battery.charge.warning | Battery level when UPS | | - | | switches to "Warning" state | 50 | - | | (percent) | | - |-------------------------+------------------------------+---------------| - | battery.voltage | Battery voltage (V) | 24.84 | - |-------------------------+------------------------------+---------------| - | battery.capacity | Battery capacity (Ah) | 7.2 | - |-------------------------+------------------------------+---------------| - | battery.current | Battery current (A) | 1.19 | - |-------------------------+------------------------------+---------------| - | battery.temperature | Battery temperature (degrees | 050.7 | - | | C) | | - |-------------------------+------------------------------+---------------| - | battery.voltage.nominal | Nominal battery voltage (V) | 024 | - |-------------------------+------------------------------+---------------| - | battery.runtime | Battery runtime (seconds) | 1080 | - |-------------------------+------------------------------+---------------| - | battery.runtime.elapsed | Elapsed battery runtime | 60 | - | | (seconds) | | - |-------------------------+------------------------------+---------------| - | | Remaining battery runtime | | - | battery.runtime.low | when UPS switches to LB | 180 | - | | (seconds) | | - |-------------------------+------------------------------+---------------| - | battery.alarm.threshold | Battery alarm threshold | 0 (immediate) | - |-------------------------+------------------------------+---------------| - | battery.date | Battery change date (opaque | 11/14/00 | - | | string) | | - |-------------------------+------------------------------+---------------| - | battery.mfr.date | Battery manufacturing date | 2005/04/02 | - | | (opaque string) | | - |-------------------------+------------------------------+---------------| - | battery.packs | Number of battery packs | 001 | - |-------------------------+------------------------------+---------------| - | battery.packs.bad | Number of bad battery packs | 000 | - +-------------------------+------------------------------+---------------+ - | battery.type | Battery chemistry | PbAc | - | | (opaque string) | | - +-------------------------+------------------------------+---------------+ - | battery.protection | Prevent deep discharge of | yes | - | | battery | | - +-------------------------+------------------------------+---------------+ - | battery.energysave | Switch off when running on | no | - | | battery and no/low load | | - +------------------------------------------------------------------------+ - -ambient: Conditions from external probe equipment - - +--------------------------------------------------------------------------+ - | ambient.temperature | Ambient temperature | 25.40 | - | | (degrees C) | | - |-----------------------------------+----------------------------+---------| - | ambient.temperature.alarm | Temperature alarm | enabled | - | | (enabled/disabled) | | - |-----------------------------------+----------------------------+---------| - | ambient.temperature.high | Temperature threshold high | 40 | - | | (degrees C) | | - |-----------------------------------+----------------------------+---------| - | ambient.temperature.low | Temperature threshold low | 5 | - | | (degrees C) | | - |-----------------------------------+----------------------------+---------| - | ambient.temperature.maximum | Maximum temperature seen | 37.6 | - | | (degrees C) | | - |-----------------------------------+----------------------------+---------| - | ambient.temperature.minimum | Minimum temperature seen | 18.1 | - | | (degrees C) | | - |-----------------------------------+----------------------------+---------| - | ambient.humidity | Ambient relative humidity | 038.8 | - | | (percent) | | - |-----------------------------------+----------------------------+---------| - | ambient.humidity.alarm | Relative humidity alarm | enabled | - | | (enabled/disabled) | | - |-----------------------------------+----------------------------+---------| - | ambient.humidity.high | Relative humidity | 80 | - | | threshold high (percent) | | - |-----------------------------------+----------------------------+---------| - | ambient.humidity.low | Relative humidity | 10 | - | | threshold high (percent) | | - |-----------------------------------+----------------------------+---------| - | ambient.humidity.maximum | Maximum relative humidity | 60 | - | | seen (percent) | | - |-----------------------------------+----------------------------+---------| - | ambient.humidity.minimum | Minimum relative humidity | 13 | - | | seen (percent) | | - +--------------------------------------------------------------------------+ - -outlet: Smart outlet management (smart on/off switch, ...) - - +------------------------------------------------------------------------+ - | | Outlet system | | - | outlet.n.id | identifier (opaque | 1 | - | | string) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.desc | Outlet description | Main outlet | - | | (opaque string) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.switch | Outlet switch control | on | - | | (on/off) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.status | Outlet switch status | on | - | | (on/off) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.switchable | Outlet switch ability | yes | - | | (yes/no) | | - |--------------------------------+-------------------------+-------------| - | | Remaining battery level | | - | outlet.n.autoswitch.charge.low | to power off this | 90 | - | | outlet (percent) | | - |--------------------------------+-------------------------+-------------| - | | Interval to wait before | | - | outlet.n.delay.shutdown | shutting down this | 180 | - | | outlet (seconds) | | - |--------------------------------+-------------------------+-------------| - | | Interval to wait before | | - | outlet.n.delay.start | restarting this outlet | 120 | - | | (seconds) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.current | Current (A) | 0.19 | - |--------------------------------+-------------------------+-------------| - | outlet.n.current.maximum | Maximum seen current | 0.56 | - | | (A) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.realpower | Current value of real | 28 | - | | power (W) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.voltage | Voltage (V) | 247.0 | - |--------------------------------+-------------------------+-------------| - | | Power Factor | | - | outlet.n.powerfactor | (dimensionless value | 0.85 | - | | between 0 and 1) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.power | Apparent power (VA) | 46 | - +------------------------------------------------------------------------+ - -driver: Internal driver information - - +------------------------------------------------------------------------+ - | driver.name | Driver name | apcsmart | - |-------------------------+----------------------------+-----------------| - | driver.version | Driver version (NUT | X.Y.Z | - | | release) | | - |-------------------------+----------------------------+-----------------| - | driver.version.internal | Internal driver version | 1.23.45 | - | | (if tracked separately) | | - |-------------------------+----------------------------+-----------------| - | driver.parameter.xxx | Parameter xxx (ups.conf or | (varies) | - | | cmdline -x) setting | | - |-------------------------+----------------------------+-----------------| - | driver.flag.xxx | Flag xxx (ups.conf or | enabled (or not | - | | cmdline -x) status | present) | - +------------------------------------------------------------------------+ - -server: Internal server information - - +------------------------------------------------------------------------+ - | server.info | Server | Network UPS Tools upsd vX.Y.Z - | - | | information | http://www.networkupstools.org/ | - |----------------+----------------+--------------------------------------| - | server.version | Server version | X.Y.Z | - +------------------------------------------------------------------------+ - - Instant commands - - +------------------------------------------------------------------------+ - | Name | Description | - |--------------------------+---------------------------------------------| - | load.off | Turn off the load immediately | - |--------------------------+---------------------------------------------| - | load.on | Turn on the load immediately | - |--------------------------+---------------------------------------------| - | shutdown.return | Turn off the load possibly after a delay | - | | and return when power is back | - |--------------------------+---------------------------------------------| - | shutdown.stayoff | Turn off the load possibly after a delay | - | | and remain off even if power returns | - |--------------------------+---------------------------------------------| - | shutdown.stop | Stop a shutdown in progress | - |--------------------------+---------------------------------------------| - | shutdown.reboot | Shut down the load briefly while rebooting | - | | the UPS | - |--------------------------+---------------------------------------------| - | shutdown.reboot.graceful | After a delay, shut down the load briefly | - | | while rebooting the UPS | - |--------------------------+---------------------------------------------| - | test.panel.start | Start testing the UPS panel | - |--------------------------+---------------------------------------------| - | test.panel.stop | Stop a UPS panel test | - |--------------------------+---------------------------------------------| - | test.failure.start | Start a simulated power failure | - |--------------------------+---------------------------------------------| - | test.failure.stop | Stop simulating a power failure | - |--------------------------+---------------------------------------------| - | test.battery.start | Start a battery test | - |--------------------------+---------------------------------------------| - | test.battery.start.quick | Start a "quick" battery test | - |--------------------------+---------------------------------------------| - | test.battery.start.deep | Start a "deep" battery test | - |--------------------------+---------------------------------------------| - | test.battery.stop | Stop the battery test | - |--------------------------+---------------------------------------------| - | calibrate.start | Start runtime calibration | - |--------------------------+---------------------------------------------| - | calibrate.stop | Stop runtime calibration | - |--------------------------+---------------------------------------------| - | bypass.start | Put the UPS in bypass mode | - |--------------------------+---------------------------------------------| - | bypass.stop | Take the UPS out of bypass mode | - |--------------------------+---------------------------------------------| - | reset.input.minmax | Reset minimum and maximum input voltage | - | | status | - |--------------------------+---------------------------------------------| - | reset.watchdog | Reset watchdog timer (forced reboot of | - | | load) | - |--------------------------+---------------------------------------------| - | beeper.enable | Enable UPS beeper/buzzer | - |--------------------------+---------------------------------------------| - | beeper.disable | Disable UPS beeper/buzzer | - |--------------------------+---------------------------------------------| - | beeper.mute | Temporarily mute UPS beeper/buzzer | - |--------------------------+---------------------------------------------| - | beeper.toggle | Toggle UPS beeper/buzzer | - +------------------------------------------------------------------------+ diff --git a/docs/nut-names.txt b/docs/nut-names.txt new file mode 100644 index 0000000..80d173e --- /dev/null +++ b/docs/nut-names.txt @@ -0,0 +1,466 @@ +ifndef::external_title[] +NUT command and variable naming scheme +====================================== +endif::external_title[] + +This is a dump of the standard variables and command names used in NUT. +Don't use a name with any of the dstate functions unless it exists here. + +If you need a new variable or command name, contact the Development Team +first. + +Put another way: if you make up a name that's not in this list and it +gets into the tree, and then we come up with a better name later, clients +that use the undocumented variable will break when it is changed. + +NOTE: "opaque" means programs should not attempt to parse the value for +that variable as it may vary greatly from one UPS to the next. These +strings are best handled directly by the user. + +Variables +--------- + +device: General unit information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +NOTE: these data will be redundant with some ups.* information +during a transition period. The ups.* data will then be removed. + +[options="header"] +|======================================================================== +| Name | Description | Example value +| device.model | Device model | BladeUPS +| device.mfr | Device manufacturer | Eaton +| device.serial | Device serial number (opaque string) | WS9643050926 +| device.type | Device type (ups, pdu, scd) | ups +|======================================================================== + +ups: General unit information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| ups.status | UPS status | linkdoc:developer-guide[OL,_status_data] +| ups.alarm | UPS alarms | OVERHEAT +| ups.time | Internal UPS clock time + (opaque string) | 12:34 +| ups.date | Internal UPS clock date + (opaque string) | 01-02-03 +| ups.model | UPS model | SMART-UPS 700 +| ups.mfr | UPS manufacturer | APC +| ups.mfr.date | UPS manufacturing date + (opaque string) | 10/17/96 +| ups.serial | UPS serial number (opaque + string) | WS9643050926 +| ups.vendorid | Vendor ID for USB devices | 0463 +| ups.productid | Product ID for USB devices | 0001 +| ups.firmware | UPS firmware (opaque string) | 50.9.D +| ups.firmware.aux | Auxiliary device firmware | 4Kx +| ups.temperature | UPS temperature (degrees C) | 042.7 +| ups.load | Load on UPS (percent) | 023.4 +| ups.load.high | Load when UPS + switches to overload + condition ("OVER") (percent) | 100 +| ups.id | UPS system identifier + (opaque string) | Sierra +| ups.delay.start | Interval to wait before + restarting the load + (seconds) | 0 +| ups.delay.reboot | Interval to wait before + rebooting the UPS (seconds) | 60 +| ups.delay.shutdown | Interval to wait after + shutdown with delay command + (seconds) | 20 +| ups.timer.start | Time before the load will be + started (seconds) | 30 +| ups.timer.reboot | Time before the load will be + rebooted (seconds) | 10 +| ups.timer.shutdown | Time before the load will be + shutdown (seconds) | 20 +| ups.test.interval | Interval between self tests + (seconds) | 1209600 (two weeks) +| ups.test.result | Results of last self test + (opaque string) | Bad battery pack +| ups.display.language | Language to use on front + panel (*** opaque) | E +| ups.contacts | UPS external contact sensors + (*** opaque) | F0 +| ups.power | Current value of apparent + power (Volt-Amps) | 500 +| ups.power.nominal | Nominal value of apparent + power (Volt-Amps) | 500 +| ups.realpower | Current value of real + power (Watts) | 300 +| ups.realpower.nominal | Nominal value of real + power (Watts) | 300 +| ups.beeper.status | UPS beeper status + (enabled, disabled or muted) | enabled +| ups.type | UPS type (*** opaque) | offline +| ups.watchdog.status | UPS watchdog status + (enabled or disabled) | disabled +| ups.start.auto | UPS starts when mains is + (re)applied | yes +| ups.start.battery | Allow to start UPS from + battery | yes +| ups.start.reboot | UPS coldstarts from battery + (enabled or disabled) | yes +|=============================================================================== + + +input: Incoming line/power information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| input.voltage | Input voltage | 121.5 +| input.voltage.maximum | Maximum incoming voltage seen | 130 +| input.voltage.minimum | Minimum incoming voltage seen | 100 +| input.voltage.nominal | Nominal input voltage | 120 +| input.voltage.extended | Extended input voltage range | no +| input.transfer.reason | Reason for last transfer + to battery (*** opaque) | T +| input.transfer.low | Low voltage transfer point | 91 +| input.transfer.high | High voltage transfer point | 132 +| input.transfer.low.min | smallest settable low + voltage transfer point | 85 +| input.transfer.low.max | greatest settable low + voltage transfer point | 95 +| input.transfer.high.min | smallest settable high + voltage transfer point | 131 +| input.transfer.high.max | greatest settable high + voltage transfer point | 136 +| input.sensitivity | Input power sensitivity | H (high) +| input.quality | Input power quality (*** + opaque) | FF +| input.current | Input current (A) | 4.25 +| input.current.nominal | Nominal input current (A) | 5.0 +| input.frequency | Input line frequency (Hz) | 60.00 +| input.frequency.nominal | Nominal input line + frequency (Hz) | 60 +| input.frequency.low | Input line frequency low (Hz) | 47 +| input.frequency.high | Input line frequency high (Hz) | 63 +| input.frequency.extended | Extended input frequency range | no +| input.transfer.boost.low | Low voltage boosting + transfer point | 190 +| input.transfer.boost.high | High voltage boosting + transfer point | 210 +| input.transfer.trim.low | Low voltage trimming + transfer point | 230 +| input.transfer.trim.high | High voltage trimming + transfer point | 240 +|=============================================================================== + + +output: Outgoing power/inverter information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| output.voltage | Output voltage (V) | 120.9 +| output.voltage.nominal | Nominal output voltage (V) | 120 +| output.frequency | Output frequency (Hz) | 59.9 +| output.frequency.nominal | Nominal output frequency (Hz) | 60 +| output.current | Output current (A) | 4.25 +| output.current.nominal | Nominal output current (A) | 5.0 +|=============================================================================== + +Three-phase additions +~~~~~~~~~~~~~~~~~~~~~ + +The additions for three-phase measurements would produce a very long table +due to all the combinations that are possible, so these additions are +broken down to their base components. + +Phase Count Determination +^^^^^^^^^^^^^^^^^^^^^^^^^ +input.phases (3 for three-phase, absent or 1 for 1phase) +output.phases (as for input.phases) + +DOMAINs +^^^^^^^ +Any input or output is considered a valid DOMAIN. + +input (should really be called input.mains, but keep this for compat) +input.bypass +input.servicebypass + +output (should really be called output.load, but keep this for compat) +output.bypass +output.inverter +output.servicebypass + +Specification (SPEC) +^^^^^^^^^^^^^^^^^^^^ + +Voltage, current, frequency, etc are considered to be a specification of +the measurement. + +With this notation, the old 1phase naming scheme becomes DOMAIN.SPEC +Example: `input.current` + +CONTEXT +^^^^^^^ + +When in three-phase mode, we need some way to specify the target for most +measurements in more detail. We call this the CONTEXT. + +With this notation, the naming scheme becomes DOMAIN.CONTEXT.SPEC when +in three-phase mode. +Example: `input.L1.current` + +Valid CONTEXTs +^^^^^^^^^^^^^^ + + L1-L2 \ + L2-L3 \ + L3-L1 for voltage measurements + L1-N / + L2-N / + L3-N / + + L1 \ + L2 for currrent and power measurements + L3 / + N - for current measurement + +Valid SPECs +^^^^^^^^^^^ + +Valid with/without context (ie. per phase or aggregated/averaged) + +[options="header"] +|=============================================================================== +| Name | Description +| current | Current (A) +| current.maximum | Maximum seen current (A) +| current.minimum | Minimum seen current (A) +| peakcurrent | Peak current +| voltage | Voltage (V) +| voltage.nominal | Nominal voltage (V) +| voltage.maximum | Maximum seen voltage (V) +| voltage.minimum | Minimum seen voltage (V) +| power | Apparent power (VA) +| power.maximum | Maximum seen apparent power (VA) +| power.minimum | Maximum seen apparent power (VA) +| power.percent | Percentage of apparent power related to maximum load +| power.maximum.percent | Max seen percentage of apparent power +| power.minimum.percent | Min seen percentage of apparent power +| realpower | Real power (W) +| powerfactor | Power Factor (dimensionless value between 0.00 and 1.00) +| crestfactor | Crest Factor (dimensionless value greater or equal to 1) +|=============================================================================== + +Valid without context (ie. aggregation of all phases): + +[options="header"] +|=============================================================================== +| Name | Description +| frequency | Frequency (Hz) +| frequency.nominal | Nominal frequency (Hz) +|=============================================================================== + +EXAMPLES +~~~~~~~~ + +Partial Three phase - Three phase example: + + input.phases: 3 + input.frequency: 50.0 + input.L1.current: 133.0 + input.bypass.L1-L2.voltage: 398.3 + output.phases: 3 + output.L1.power: 35700 + output.powerfactor: 0.82 + +Partial Three phase - One phase example: + + input.phases: 3 + input.L2.current: 48.2 + input.N.current: 3.4 + input.L3-L1.voltage: 405.4 + input.frequency: 50.1 + output.phases: 1 + output.current: 244.2 + output.voltage: 120 + output.frequency.nominal: 60.0 + +battery: Any battery details +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| battery.charge | Battery charge (percent) | 100.0 +| battery.charge.low | Remaining battery level when + UPS switches to LB (percent) | 20 +| battery.charge.restart | Minimum battery level for + UPS restart after power-off | 20 +| battery.charge.warning | Battery level when UPS switches + to "Warning" state (percent) | 50 +| battery.voltage | Battery voltage (V) | 24.84 +| battery.capacity | Battery capacity (Ah) | 7.2 +| battery.current | Battery current (A) | 1.19 +| battery.temperature | Battery temperature (degrees C) | 050.7 +| battery.voltage.nominal | Nominal battery voltage (V) | 024 +| battery.runtime | Battery runtime (seconds) + Remaining battery runtime | 1080 +| battery.runtime.low | when UPS switches to LB + (seconds) | 180 +| battery.alarm.threshold | Battery alarm threshold | 0 (immediate) +| battery.date | Battery change date (opaque + string) | 11/14/00 +| battery.mfr.date | Battery manufacturing date + (opaque string) | 2005/04/02 +| battery.packs | Number of battery packs | 001 +| battery.packs.bad | Number of bad battery packs | 000 +| battery.type | Battery chemistry (opaque + (opaque string) | PbAc +| battery.protection | Prevent deep discharge of + battery | yes +| battery.energysave | Switch off when running on + battery and no/low load | no +|=============================================================================== + + +ambient: Conditions from external probe equipment +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| ambient.temperature | Ambient temperature + (degrees C) | 25.40 +| ambient.temperature.alarm | Temperature alarm + (enabled/disabled) | enabled +| ambient.temperature.high | Temperature threshold high + (degrees C) | 40 +| ambient.temperature.low | Temperature threshold low + (degrees C) | 5 +| ambient.temperature.maximum | Maximum temperature seen + (degrees C) | 37.6 +| ambient.temperature.minimum | Minimum temperature seen + (degrees C) | 18.1 +| ambient.humidity | Ambient relative humidity + (percent) | 038.8 +| ambient.humidity.alarm | Relative humidity alarm + (enabled/disabled) | enabled +| ambient.humidity.high | Relative humidity + threshold high (percent) | 80 +| ambient.humidity.low | Relative humidity + threshold high (percent) | 10 +| ambient.humidity.maximum | Maximum relative humidity + seen (percent) | 60 +| ambient.humidity.minimum | Minimum relative humidity + seen (percent) | 13 +|=============================================================================== + + +outlet: Smart outlet management +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +NOTE: *n* stands for the outlet index. For more information, refer to the +NUT outlets management and PDU notes chapter of the user manual. + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| outlet.n.id | Outlet system identifier + (opaque string) | 1 +| outlet.n.desc | Outlet description + (opaque string) | Main outlet +| outlet.n.switch | Outlet switch control + (on/off) | on +| outlet.n.status | Outlet switch status + (on/off) | on +| outlet.n.switchable | Outlet switch ability + (yes/no) | yes +| outlet.n.autoswitch.charge.low | Remaining battery level to + power off this outlet + (percent) | 80 +| outlet.n.delay.shutdown | Interval to wait before + shutting down this outlet + (seconds) | 180 + +| outlet.n.delay.start | Interval to wait before + restarting this outlet + (seconds) | 120 +| outlet.n.current | Current (A) | 0.19 +| outlet.n.current.maximum | Maximum seen current (A) | 0.56 +| outlet.n.realpower | Current value of real + power (W) | 28 +| outlet.n.voltage | Voltage (V) | 247.0 +| outlet.n.powerfactor | Power Factor + (dimensionless value + between 0 and 1) | 0.85 +| outlet.n.crestfactor | Crest Factor + (dimensionless, equal + to or greater than 1) | 1.41 +| outlet.n.power | Apparent power (VA) | 46 +|=============================================================================== + + +driver: Internal driver information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| driver.name | Driver name | usbhid-ups +| driver.version | Driver version (NUT release) | X.Y.Z +| driver.version.internal | Internal driver version + (if tracked separately) | 1.23.45 +| driver.parameter.xxx | Parameter xxx (ups.conf or + cmdline -x) setting | (varies) +| driver.flag.xxx | Flag xxx (ups.conf or + cmdline -x) status | enabled (or absent) +|=============================================================================== + +server: Internal server information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| server.info | Server information | Network UPS Tools upsd vX.Y.Z - + http://www.networkupstools.org/ +| server.version | Server version | X.Y.Z +|=============================================================================== + +Instant commands +---------------- + +[options="header"] +|======================================================================== +| Name | Description +| load.off | Turn off the load immediately +| load.on | Turn on the load immediately +| shutdown.return | Turn off the load possibly after a delay + and return when power is back +| shutdown.stayoff | Turn off the load possibly after a delay + and remain off even if power returns +| shutdown.stop | Stop a shutdown in progress +| shutdown.reboot | Shut down the load briefly while rebooting the UPS +| shutdown.reboot.graceful | After a delay, shut down the load briefly + while rebooting the UPS +| test.panel.start | Start testing the UPS panel +| test.panel.stop | Stop a UPS panel test +| test.failure.start | Start a simulated power failure +| test.failure.stop | Stop simulating a power failure +| test.battery.start | Start a battery test +| test.battery.start.quick | Start a "quick" battery test +| test.battery.start.deep | Start a "deep" battery test +| test.battery.stop | Stop the battery test +| calibrate.start | Start runtime calibration +| calibrate.stop | Stop runtime calibration +| bypass.start | Put the UPS in bypass mode +| bypass.stop | Take the UPS out of bypass mode +| reset.input.minmax | Reset minimum and maximum input voltage status +| reset.watchdog | Reset watchdog timer (forced reboot of load) +| beeper.enable | Enable UPS beeper/buzzer +| beeper.disable | Disable UPS beeper/buzzer +| beeper.mute | Temporarily mute UPS beeper/buzzer +| beeper.toggle | Toggle UPS beeper/buzzer +|======================================================================== diff --git a/docs/nut-qa.txt b/docs/nut-qa.txt new file mode 100644 index 0000000..f27e698 --- /dev/null +++ b/docs/nut-qa.txt @@ -0,0 +1,112 @@ +NUT Quality Assurance +===================== + +Recognizing the critical nature of NUT, the NUT Quality Assurance (NQA) effort +has been established to improve NUT where necessary, and to maintain software +quality as high as it should be. + +NQA is present in many aspects and areas of NUT. + +Documentation +------------- + +The documentation toolchain now use link:http://www.methods.co.nz/asciidoc/[AsciiDoc] +to output both HTML pages and manual pages (troff). + +- the NUT website and HTML documentation are tested for W3C XHTML 1.1 and CSS +compliance + +- the manual pages conformance is tested with link:http://catb.org/~esr/doclifter/index.html[doclifter] + + +Source code +----------- + +Use of standards +~~~~~~~~~~~~~~~~ + +NUT promotes and uses many standards, like: + +- the variable names standard used in NUT, +- the coding rules and best practices for developers, +- the use of a software architecture limiting developments to the very minimum, +- the use of standard Free and OpenSource Software components, like: + * the USB library, + * the Net SNMP project, + * the Neon library, + * the OpenSSL library (to be replaced by NSS, which is more license compliant + with NUT and is FIPS 140 certified), + * the TCP Wrappers library. + +QA tools and metrics +~~~~~~~~~~~~~~~~~~~~ + +NUT's quality is constently monitored using many tools, like: + +- a Revision Control System (link:http://svn.debian.org/wsvn/nut[Subversion]) to +track development and ease regression fixes. Any modification on the NUT source +trees are reported on the link:http://lists.alioth.debian.org/mailman/listinfo/nut-commits[NUT Commits] +mailing list. +- link:http://buildbot.networkupstools.org/public/nut/[Buildbot] to automate the compile/test +cycle. Any build failure is caught early, reported through the +link:http://lists.alioth.debian.org/mailman/listinfo/nut-commits[NUT Commits] +mailing list, and fixed quickly. +- a project portal with trackers for bugs, feature request, patchs +and tasks + +NUT QA also relies on external tools, like: + +//////////////////////////////////////////////////////////////////////////////// +FIXME (POST): +- integrate static code analysis + - consider splint, Frama-C, BLAST and Clang, and choose one. + - integrate link:http://scan.coverity.com[Coverity Scan] program. + Note: request made by Arnaud to scan-admin@coverity.com on Sep 24 2009 +- point other distro BTS (use Launchpad as an aggregator?!) + +//////////////////////////////////////////////////////////////////////////////// + + +- the Debian QA tools, available through the link:http://packages.qa.debian.org/n/nut.html[NUT Package Tracking System]: + + * Lintian general QA checks, + * link:http://piuparts.debian.org/sid/source/n/nut.html[piuparts] automates + the installation, upgrade and removal testing processes. + +- a runtime testing suite, which automates the inter layer communication testing +(driver - upsd - upsmon / clients), that is part of Ubuntu. +link:http://bazaar.launchpad.net/~ubuntu-bugcontrol/qa-regression-testing/master/annotate/257?file_id=testnut.py-20080227144343-m47lrqbrwv3xm20b-1[The NUT testing script] +is available in the link:https://code.edge.launchpad.net/qa-regression-testing[Ubuntu QA Regression Testing suite]. +It installs nut, configure with for the dummy-ups driver, changes a few data and +check that these are well propagated with upsc. + + +Runtime quality +~~~~~~~~~~~~~~~ + +- NUT provides many link:user-manual.html#NUT_Security[security features] to +ensure a maximum runtime security level. + +- Packages use several link:http://wiki.debian.org/Hardening[Hardening methods] +to protect NUT binaries. + +//////////////////////////////////////////////////////////////////////////////// +FIXME (POST): + +- write a code conformance checker (nut-lint) +- write a § on driver maintainance status +- consider using [http://forge.novell.com/modules/xfmod/project/?opensuse OpenSUSE Build Service tools] +- provide software metrics and evolution over the time + + * [http://www.flossmetrics.org/ FlossMetrics] + * [http://en.wikipedia.org/wiki/Software_metric Wikipedia] + * [http://cccc.sourceforge.net/ CCCC - C and C++ Code Counter] + * [http://open.ncsu.edu/se/tutorials/metrics/ Metrics with Eclipse] + +- Code documentation, for the core architecture (client and drivers are already +documented) + + * [http://doxygen.org/ Doxygen] + * [http://naturaldocs.org/ NaturalDocs] + +//////////////////////////////////////////////////////////////////////////////// diff --git a/docs/osd-notify.txt b/docs/osd-notify.txt deleted file mode 100644 index ee4d82f..0000000 --- a/docs/osd-notify.txt +++ /dev/null @@ -1,86 +0,0 @@ -Desc: Using upsmon to make On Screen Display (OSD) notification -File: osd-notify.txt -Date: 12 April 2003 -Auth: Arnaud Quette - -This document presents how to display NUT notification using -an On Screen Display (OSD) system. - -It is a complement to Russell Kroll's pager.txt, which -can be found on NUT website, or in NUT source tree. Have -a look at this document before reading more. - -Pre requisites --------------- - -You must have a running NUT installation (driver, upsd and upsmon). -Refer, if necessary, to NUT documentation for installing -and configuring those. - -You also need X OSD to be installed. You can either: -- get it on: http://www.ignavus.net/software.html -- Debian: apt-get install xosd-bin -- Mandrake: urpmi xosd -- Others RPM based: get and install xosd (for example, from -http://rpmfind.net/linux/rpm2html/search.php) - -Creating osd-notify shell script --------------------------------- - -X OSD provides a really nice program, called osd_cat. -For more information on osd_cat, look at its manpage. - -For convenience, I've written a small script called -osd-notify which should be available with the present -file. - -You can adjust osd-notify settings to match your needs. -In particular, you must put a valid font in "FONT". -Use xfontsel to find one. - - -Configuring upsmon to use osd-notify ------------------------------------- - -1) You need to set EXEC flags on the event you want to -be osd-displayed in upsmon.conf. For example - - NOTIFYFLAG ONBATT EXEC - NOTIFYFLAG ONLINE EXEC - -You can of course set other actions, like WALL or SYSLOG, -and other events. Look at upsmon.conf manual page. - -2) Copy osd-notify somewhere on your system (/usr/local/bin -or whatever). - -3) Test osd-notify script by calling: -$> osd-notify NUT - -4) Tell upsmon where your script is - - NOTIFYCMD /path/to/osd-notify - -Show time ---------- - -You need to adjust X11 access right to allow upsmon's -user to display OSD notification on your screen. This -is done with, from within a xterm, by using: - -$> xhost +local:nutmon - -Don't forget to adjust upsmon's user name according to -your system settings. This must match the value of the -"RUN_AS_USER" field in upsmon.conf - -Now, restart upsmon, pull the plug, and see what happens... - -For screenshots, have a look at X OSD website: - http://www.ignavus.net/software.html - -Conclusion ----------- - -What great things we can do with a small nut ;-) -Feel free to send me your comments and enhancements. diff --git a/docs/outlets.txt b/docs/outlets.txt new file mode 100644 index 0000000..c722314 --- /dev/null +++ b/docs/outlets.txt @@ -0,0 +1,99 @@ +NUT outlets management and PDU notes +==================================== + +NUT supports advanced outlets management for any kind of device that proposes +it. This chapter introduces how to manage outlets in general, and how to take +advantage of the provided features. + +Introduction +------------ + +Outlets are the core of Power Distribution Units. They allow you to turn on, +turn off or cycle the load on each outlet. + +Some UPS models also provide manageable outlets (Eaton, MGE, Powerware, +Tripplite, ...) that help save power in various ways, and manage loads more +intelligently. + +Finally, some devices can be managed in a PDU-like way. Consider blade systems: +the blade chassis can be controlled remotely to turn on, turn off or +cycle the power on individual blade servers. + +NUT allows you to control all these devices! + + +NUT outlet data collection +-------------------------- + +NUT provides a complete and uniform integration of outlets related data, +through the 'outlet' collection. + +First, there is a special outlet, called 'main outlet'. +You can access it through 'outlet.{id, desc, ...}' without any index. + +Any modification through the 'main outlet' will affect *all* outlets. +For example, calling the command 'outlet.load.cycle' will cycle all outlets. + +Next, outlets index starts from *1*. Index '0' is implicitly reserved to +the 'main outlet'. So the first outlet is 'outlet.1.*'. + +For a complete list of outlet data and commands, refer to the +<>. + +An example upsc output (data/epdu-managed.dev) is available in the source +archive. + +NOTE: The variables supported depend on the exact device type. + + +Outlets on PDU +-------------- + +Smart Power Distribution Units provide at least various meters, related to +current, power and voltage. + +Some more advanced devices also provide control through the 'load.off', +'load.on' and 'load.cycle' commands. + +Outlets on UPS +-------------- + +Some advanced Uninterruptible Power Supplies provide smart outlet management. + +This allows to program a limited backup time to non-critical loads in order +to keep the maximum of the battery reserve for critical equipment. + +This also allows the same remote electrical management of devices provided +by PDUs, which can be very interesting in Data Centers. + +For example, on small setup, you can plug printers, USB devices, hubs, (...) +into managed outlets. Depending on your UPS's capabilities, you will be able to +turn off those loads: + +- after some minutes of back-up time using 'outlet.n.delay.start', +- when reaching a percentage battery charge using +'outlet.n.autoswitch.charge.low'. + +This will ensure a maximum runtime for the computer. + +On bigger systems, with bigger UPSs, this is the same thing with servers +instead of small devices. + +NOTE: If you need the scheduling function and your device doesn't support +it, you can still use +<>. + +WARNING: don't plug the UPS's communication cable (USB or network) on a managed outlet. +Otherwise, all computers will be stopped as soon as the communication is lost. + +Other type of devices +--------------------- + +As mentioned in the introduction, some other devices can be considered and managed like +PDUs. This is the case in most blade systems, where the blade chassis offers +power management services. + +This way, you can control remotely each blade server as if it were a PDU +outlet. + +This category of devices is generally called Remote Power Controls - RPC in NUT. diff --git a/docs/packager-guide.txt b/docs/packager-guide.txt new file mode 100644 index 0000000..e11a6f6 --- /dev/null +++ b/docs/packager-guide.txt @@ -0,0 +1,378 @@ +NUT Packager and Integrators Guide +================================== +Arnaud Quette + +WARNING: this is a Work In Progress document. + +Abstract +-------- + +The aim of this document is to describe the best way to package the +Network UPS Tools, and the best practices across the various packaging +implementation of NUT. + +So as to these can be spread on all supported platforms as a standard, +and as a foundation block to build upon. + +/////////////////////////////////////////////////////////////////////// +*sandbox* +that have been done to help those improving, and give advice on what's +the best way to package NUT for the remaining "not yet packaged" +platform (Sun, Aix, Mac, ...). The ultimate aim is to have NUT +well packaged (all NUT features available) on all supported +platforms. +/////////////////////////////////////////////////////////////////////// + +Introduction +------------ +Packaging is a final aim for software. It eases and completes the +software integration into an OS, and allows users to have an easy +software installation and support out of the box. + +NOTE: making NUT packaging more uniform should help its documentation, +support and maintenance accross the supported OSes. + +------------------------------------------------------------------------ +*sandbox* +This document assumes that you have read the other NUT document such +as INSTALL, FAQ, shutdown.txt, ... + +Facts about NUT packaging +========================= + +NUT has so much evolved those two last years (with USB and SNMP +support, the premices of libraries, ...) that the simple +"1, 2 or 3 package(s)" approach is no more suitable. + +This fact has reached a high level since NUT 1.4. Actually, +doing this would result in either being forced to install hosts +of unneeded dependencies (net-snmp, gd, ... as seen on SuSE), +to have a partially broken package [1] or not being able to +use all NUT features [2]. + +Let's now have an overview on how NUT is currently packaged: + + 1) Debian: + http://packages.qa.debian.org/n/nut.html + nut, nut-dev, nut-usb, nut-snmp, nut-xml, nut-cgi, nut-doc [, nut-hal-drivers] + + 2) Mandriva + http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/SPECS/nut/ + nut-server + nut + nut-cgi + + 3) SuSE / Novell + nut + + 4) RedHat + + 5) PLD + http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/nut.spec + + ... (FreeBSD, Gentoo Linux, IRIX, NetBSD, OpenBSD) + +This shows how much the packages name split is now scattered. +The result is: +- that a user of several systems will be lost, and will +waste time +- there is a big waste of energy +- this makes things hard to create standard configuration +wizards + +[1] NUT build on Debian GNU/Linux m68k and Hurd was once +broken due to hiddev dependencies, and usb support still +included in the core package. + +[2] +- snmp-ups driver is not available under Mandrake GNU/Linux, +but its man is present. See +http://rpms.mandrakeclub.com/rpms/mandrake/9.1/i586/Mandrake/RPMS/nut-server-1.2.1-4mdk.i586.html +- secured ssh network mode not available (due to deps and/or non free) +- some systems don't provide libupsclient lib/header/.pc so as to +client application (such as wmnut) can't be built +- the logger function is not (well) used, same goes for the syslog (triple +redundancy in Mandriva) +- the solution is partial in every system: lost of tests +case / feedback could be shared +... + +------------------------------------------------------------------------ + + +Packagers involved +------------------ + +The following packagers are working on this subject: + +- Debian (and derivatives): Arnaud Quette +- SuSE/Novell: Stanislav Brabec + +NOTE: the people below should be contacted to (re)launch discussions! + +The following packagers should be interested in working on this subject: + +- FreeBSD: Thierry Thomas? <> +- Mandriva: Oden Erikson? <> +- RedHat / Fedora Core: <> +- Gentoo: <> +- NetBSD: <> +- OpenBSD: <> +- PLD: Andrzej Zawadzki +- E-Smith: Charlie Brady +- openSolaris: <> + +- Windows: check with WinNUT author?! +- MacOS: <> => Charles Lepple? <> +- HP-UX: <> +- IBM AIX: <> + + + +Possible use cases +------------------ +- standalone (1 system + 1-n UPS) +- network server (same as standalone, but serving data to network clients) +- network monitoring client +- network supervision client + +TO BE COMPLETED... + +Optimised packaging proposal +---------------------------- + +NOTE: The below proposed packages split is subject to discussion. + +The aim of this is to: + +- rationalise split according to the above use cases, +- share ressources (descriptions, i18n, ...) +- find the best compromise between available features and dependencies, +- standardize nut packages name, +- create the foundation for the upcoming and underway improvements, +- improve nut integration +- ease and improve user experience. + + +This standard was created by: + +- capitalizing the experience of existing packages, +- using and improving the use of all nut features +- considering upcoming nut changes and improvements +- working closely with packagers. + +Overview of the package tree +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +FIXME: make a dependency graph + +- <> +- <> +- <> +- <> +- <> +- <> +- <> +- <> + +- <> +- <> +- <> (or nut-control-center or Ultimate NUT Tool...) +- <> + +Detailed view of the package tree +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[NOTE] +======================================================================== +- The *Desc* field represent the package's description, as exposed by +the packaging system. Each package's description is composed of a +paragraph common to all NUT packages, and a part that is specific to the +package. The common part (further referenced by *COMMON DESC*) is: +________________________________________________________________________ + Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share + uninterruptible power supply (UPS) and power distribution unit (PDU) + hardware. Clients access the hardware through the server, and are notified + whenever the power status changes. +________________________________________________________________________ +- The *Files* field lists the content of the package. +- The mentioned *Size* is a rough estimation of packaged and installed +size. This may varies across the systems and architecture, and is based +upon the Debian x86 packages. +- The *Deps* field lists the dependencies of the packages. The exact +name may vary across the various systems. +- The *Comment* field is used to place comment for points subject to +discussion. +======================================================================== + +[[pkg-nut]] +nut +^^^ +- Desc: +- Files: dummy/serial/USB drivers + upsd + upslog +- Size: +- Deps: + +[[pkg-libupsclient1]] +libupsclient1 +^^^^^^^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-libupsclient1-dev]] +libupsclient1-dev +^^^^^^^^^^^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +NOTE: the "-dev" suffix is to be replaced by "-devel" on RPM based platforms. + +[[pkg-nut-cgi]] +nut-cgi +^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-nut-hal-drivers]] +nut-hal-drivers +^^^^^^^^^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-nut-powerman-pdu]] +nut-powerman-pdu +^^^^^^^^^^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-nut-snmp]] +nut-snmp +^^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-nut-xml]] +nut-xml +^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-nut-clients]] +nut-clients +^^^^^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-python-pynut]] +python-pynut +^^^^^^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-python-nut-gui]] +python-nut-gui +^^^^^^^^^^^^^^ +(or nut-control-center or Ultimate NUT Tool...) + +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-nut-doc]] +nut-doc +^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + + +------------------------------------------------------------------------ +*sandbox* +nut-server +^^^^^^^^^^ + Desc: + Files: dummy/serial/USB drivers + upsd + upslog + Size: + Deps: nut-client, libusb, libc/ld + + B) nut-snmp + + Desc: + Files: SNMP driver [/ manager ] + Deps: nut-server, net-snmp, libc/ld + + C) nut-client + + Desc: don't force to have the server part/deps if not needed + Files: upsmon, upsc, upscmd, upsrw + driver.list [+nut-dev (lib, .h, .pc, man] + Deps: libc/ld + + E) nut-cgi + + Deps: + Files: snmp-ups and powernet + manpages + + F) nut-doc: + + Deps: + Files: dummycons + manpage + + G) nut-dev: + + Deps: + Files: upsmon, upsc, upscmd, upsrw + + + +Note: "nut" can be a meta package + +This kind of tree obviously need modification on the conf/make +files of NUT to allow build/install in a separate way. + + +... +TO BE CONTINUED +... + +Configuration option +^^^^^^^^^^^^^^^^^^^^ +name= "ups" or "nut" +./configure \ + --prefix=/ \ + --sysconfdir=/etc/$name \ + --mandir=/usr/share/man \ + --libdir=/usr/lib \ + --includedir=/usr/include \ + --datadir=/usr/share/$name \ + --with-statepath=/var/run/nut \ + --with-altpidpath=/var/run/nut \ + --with-drvpath=/lib/nut \ + --with-cgipath=/usr/lib/cgi-bin/$name \ +html-path + --with-pidpath=/var/run/$name \ + --with-user=$name \ + --with-cgi \ + --without-ssl +... + +------------------------------------------------------------------------ + diff --git a/docs/pager.txt b/docs/pager.txt deleted file mode 100644 index bf11159..0000000 --- a/docs/pager.txt +++ /dev/null @@ -1,68 +0,0 @@ -Desc: Using upsmon and your pager together -File: pager.txt -Date: 28 May 2001 -Auth: Russell Kroll - -upsmon can call out to a helper script or program when the UPS changes -state. The example upsmon.conf has a full list of which state changes -are available - ONLINE, ONBATT, LOWBATT, and more. - -The simple approach -------------------- - - - Set EXEC flags on various things in upsmon.conf - - NOTIFYFLAG ONBATT EXEC - NOTIFYFLAG ONLINE EXEC - - If you want other things like WALL or SYSLOG to happen, just add them. - - NOTIFYFLAG ONBATT EXEC+WALL+SYSLOG - - You get the idea. - - - Tell upsmon where your script is - - NOTIFYCMD /path/to/my/script - - - Make a simple script like this at that location: - - #! /bin/bash - echo "$*" | sendmail -F"ups@mybox" bofh@pager.example.com - - - Restart upsmon, pull the plug, and see what happens. - -That approach is bare-bones, but you should get the text content of the -alert in the body of the message, since upsmon passes the alert text -(from NOTIFYMSG) as an argument. - -This will send mail every time something happens which may become annoying -rather quickly, especially for simple power fluctuations. To only send -messages after some interval, see the upssched.txt file for information -on offset events. - -Using more advanced features ----------------------------- - -Your helper script will be run with a few environment variables set. - - UPSNAME - the name of the system that generated the change. - This will be one of your identifiers from the MONITOR - lines in upsmon.conf. - - NOTIFYTYPE - this will be ONLINE, ONBATT, or whatever event took - place which made upsmon call your script. - -You can use these to do different things based on which system has -changed state. You could have it only send pages for an important -system while totally ignoring a known trouble spot, for example. - -Suppressing notify storms -------------------------- - -upsmon will call your script every time an event happens that has the -EXEC flag set. This means a quick power failure that lasts mere seconds -might generate several pages in a row. To suppress this sort of -annoyance, use upssched as your NOTIFYCMD program, and configure it to -send pages after a timer has elapsed. See upssched.txt for more -information. diff --git a/docs/powersaving.txt b/docs/powersaving.txt deleted file mode 100644 index c08485d..0000000 --- a/docs/powersaving.txt +++ /dev/null @@ -1,135 +0,0 @@ -Desc: NUT Powersaving features and using outlet collection -File: powersaving.txt -Date: 14 June 2003 -Auth: Arnaud Quette - -This document introduces NUT PowerSaving features, and Smart -Outlet Management using Network UPS Tools. - -This feature is sponsored by MGE UPS SYSTEMS. - -Introduction ------------- - -This feature, which is supported by various manufacturers, -under various names, allows to manage separately the outlets -of an UPS, or a Power Distrubition Unit (PDU). This allows to -program a limited backup time to non-critical loads in order -to keep the maximum of the battery reserve for critical -equipment. This also allows a remote electrical management of -devices, which is very useful in DataCenters for example. - -On small setup, you can plug printers, hubs, (...) on -PowerSave'd outlets. During a power outage, the UPS will -turn off those after X minutes of back-up time (or when -passing below X % of battery charge) depending on your -UPS model and settings. This will ensure that all -remaining battery power is available for the computer. - -On huger setup (with a huger UPS), this is about the -same with the ability to (power and) control servers in -a smart way (need to notify those to shutdown first !). - -Manufacturers Powersaving technologies presentation -=================================================== - -1) MGE UPS SYSTEMS and MGE Office Protection Systems ----------------------------------------------------- - -This feature is called "PowerShare" and is available -on lots of models, with different behaviours. - -Features will vary according to your exact model. -For example: - -- on Pulsar Ellipse Premium 650/800/1200, you can -only set a low battery level which triggers a power -off of the PowerShare outlet(s). -Check http://www.mgeups.com/products/pdt230/smallups/ellipsep/ellipsep1.htm - -- on Pulsar Evolution (all models), you can either -do the same as above, or set a timer to shutdown -the outlet when expired. This latter needs to be -used in conjonction with upsmon/upssched to act -upon a power outage, and cancel the timer when -the power is back... - -2) Eaton | Powerware ePDU - -Depending on the exact model, you can see various measurements -(like current, voltage, power, ...) of the various outlets. You may -also have the hability to start, stop and cycle these. - -For more information: http://www.epdu.com - -3) Other manufacturers (Belkin, ...) - -To be completed... - - -Integration into the new NUT naming scheme -========================================== - -Have a look at new-names.txt, "outlet" section. - - -Note on outlet collection usage -=============================== - -1) outlet.{id, desc, ...} represents the -whole outlets (includes all outlet.x.*), -also called Main Outlet. - -An interesting fact is that _ALL_ models -have at least that outlet, which is always -considered as the UPS itself. Some values -from the "ups" collection are linked to -the outlet.*, ie: - - outlet.load is mapped from ups.load - - outlet.delay.* is mapped from ups.delay.* - -2) Indexes for other outlets begin by 1. So -the first outlet is "outlet.1.*". - - -Examples of upsc tree -===================== - -1) Here is an MGE Evolution tree with the -main and 2 outlets. - -... -outlet.desc: Main Outlet -outlet.id: 0 -outlet.switchable: 0 -outlet.1.autoswitch.charge.low: 0 -outlet.1.delay.shutdown: -1 -outlet.1.delay.start: -1 -outlet.1.desc: PowerShare Outlet 1 -outlet.1.id: 1 -outlet.1.switch: 1 -outlet.1.switchable: 1 -outlet.2.autoswitch.charge.low: 0 -outlet.2.delay.shutdown: -1 -outlet.2.delay.start: -1 -outlet.2.desc: PowerShare Outlet 2 -outlet.2.id: 2 -outlet.2.switch: 1 -outlet.2.switchable: 1 -... - - -2) Here is another MGE Ellipse Premium -tree with the main and 1 PowerSaving -outlets. - -... -outlet.desc: Main Outlet -outlet.id: 0 -outlet.switchable: 0 -outlet.1.autoswitch.charge.low: 0 -outlet.1.desc: PowerShare Outlet 1 -outlet.1.id: 1 -outlet.1.switch: 1 -outlet.1.switchable: 1 -... diff --git a/docs/protocol.txt b/docs/protocol.txt deleted file mode 100644 index d741333..0000000 --- a/docs/protocol.txt +++ /dev/null @@ -1,518 +0,0 @@ -Desc: Network protocol info -File: protocol.txt -Date: 18 February 2004 -Auth: Russell Kroll - -As of May 2002, this protocol now has an official port number from IANA, -which is 3493. The old number (3305) was a relic of the original code's -ancestry, and conflicted with other services. Version 0.50.0 and up -use 3493 by default. - -This protocol runs over TCP. UDP support was dropped in July 2003. It -had been deprecated for some time and was only capable of the simplest -query commands as authentication is impossible over a UDP socket. - -A library, named libupsclient, that implement this protocol is provided -in both static and shared version to help the client application development. - -Old command removal notice -========================== - -Before version 1.5.0, a number of old commands were supported. These -have been removed from the specification. For more information, consult -an older version of the software. - -Command reference -================= - -Multi-word elements are contained within "quotes" for easier parsing. -Embedded quotes are escaped with backslashes. Embedded backslashes are -also escaped by representing them as \\. This protocol is intended to -be interpreted with parseconf or something similar. - -GET -=== - -Retrieve a single response from the server. - -Possible sub-commands: - -NUMLOGINS ---------- - - Form: GET NUMLOGINS - GET NUMLOGINS su700 - -Response: NUMLOGINS - NUMLOGINS su700 1 - - is the number of clients which have done LOGIN for this UPS. -This is used by the master upsmon to determine how many clients are -still connected when starting the shutdown process. - -This replaces the old "REQ NUMLOGINS" command. - -UPSDESC -------- - - Form: GET UPSDESC - GET UPSDESC su700 - -Response: UPSDESC "" - UPSDESC su700 "Development box" - - is the value of "desc=" from ups.conf for this UPS. If it -is not set, upsd will return "Unavailable". - -This can be used to provide human-readable descriptions instead of a -cryptic "upsname@hostname" string. - -VAR ---- - - Form: GET VAR - GET VAR su700 ups.status - -Response: VAR "" - VAR su700 ups.status "OL" - -This replaces the old "REQ" command. - -TYPE ----- - - Form: GET TYPE - GET TYPE su700 input.transfer.low - -Response: TYPE ... - TYPE su700 input.transfer.low ENUM - - can be several values, and multiple words may be returned: - - RW - this variable may be set to another value with SET - ENUM - an enumerated type, which supports a few specific values -STRING:n - this is a string of maximum length n - -ENUM and STRING are usually associated with RW, but not always. - -This replaces the old "VARTYPE" command. - -DESC ----- - - Form: GET DESC - GET DESC su700 ups.status - -Response: DESC "" - DESC su700 ups.status "UPS status" - - is a string that gives a brief explanation of the named -variable. upsd may return "Unavailable" if the file which provides this -description is not installed. - -Different versions of this file may be used in some situations to -provide for localization and internationalization. - -This replaces the old "VARDESC" command. - -CMDDESC -------- - - Form: GET CMDDESC - GET CMDDESC su700 load.on - -Response: CMDDESC "" - CMDDESC su700 load.on "Turn on the load immediately" - -This is like DESC above, but it applies to the instant commands. - -This replaces the old "INSTCMDDESC" command. - -LIST -==== - -The LIST functions all share a common container format. They will -return "BEGIN LIST" and then repeat the initial query. The list then -follows, with as many lines are necessary to convey it. "END LIST" with -the initial query attached then follows. - -The formatting may seem a bit redundant, but it makes a different form -of client possible. You can send a LIST query and then go off and wait -for it to get back to you. When it arrives, you don't need complicated -state machines to remember which list is which. - -UPS ---- - - Form: LIST UPS - -Response: BEGIN LIST UPS - UPS "" - ... - END LIST UPS - - BEGIN LIST UPS - UPS su700 "Development box" - END LIST UPS - - is a name from ups.conf, and is the value of -desc= from ups.conf, if available. It will be set to "Unavailable" -otherwise. - -This can be used to determine what values of are valid before -calling other functions on the server. This is also a good way to -handle situations where a single upsd supports multiple drivers. - -Clients which perform a UPS discovery process may find this useful. - -VAR ---- - - Form: LIST VAR - LIST VAR su700 - -Response: BEGIN LIST VAR - VAR "" - ... - END LIST VAR - - BEGIN LIST VAR su700 - VAR su700 ups.mfr "APC" - VAR su700 ups.mfr.date "10/17/96" - ... - END LIST VAR su700 - -This replaces the old "LISTVARS" command. - -RW --- - - Form: LIST RW - LIST RW su700 - -Response: BEGIN LIST RW - RW "" - ... - END LIST RW - - BEGIN LIST RW su700 - RW su700 output.voltage.nominal "115" - RW su700 ups.delay.shutdown "020" - ... - END LIST RW su700 - -This replaces the old "LISTRW" command. - -CMD ---- - - Form: LIST CMD - LIST CMD su700 - -Response: BEGIN LIST CMD - CMD - ... - END LIST CMD - - BEGIN LIST CMD su700 - CMD su700 load.on - CMD su700 test.panel.start - ... - END LIST CMD su700 - -This replaces the old "LISTINSTCMD" command. - -ENUM ----- - - Form: LIST ENUM - LIST ENUM su700 input.transfer.low - -Response: BEGIN LIST ENUM - ENUM "" - ... - END LIST ENUM - - BEGIN LIST ENUM su700 input.transfer.low - ENUM su700 input.transfer.low "103" - ENUM su700 input.transfer.low "100" - ... - END LIST ENUM su700 input.transfer.low - -This replaces the old "ENUM" command. - -Note: this does not support the old "SELECTED" notation. You must -request the current value separately. - -SET ---- - - Form: SET VAR "" - SET VAR su700 ups.id "My UPS" - -INSTCMD -------- - - Form: INSTCMD - INSTCMD su700 test.panel.start - -LOGOUT -====== - -Form: LOGOUT - -Returns: OK Goodbye (recent versions) - -Used to disconnect gracefully from the server. - -Older versions just said "Goodbye...". - -LOGIN -===== - -Form: LOGIN - -Returns: OK (upon success) - or various errors - -Requires: "upsmon slave" or "upsmon master" in upsd.users - -Use this to log the fact that a system is drawing power from this UPS. -The upsmon master will wait until the count of attached systems reaches -1 - itself. This allows the slaves to shut down first. - -NOTE: You probably shouldn't send this command unless you are upsmon, - or a upsmon replacement. - -MASTER -====== - -Form: MASTER - -Returns: OK (upon success) - or various errors - -Requires: "upsmon master" in upsd.users - -This function doesn't do much by itself. It is used by upsmon to make -sure that master-level functions like FSD are available if necessary. - -FSD -=== - -Form: FSD - -Returns: OK FSD-SET (success) - or various errors - -Requires: "upsmon master" in upsd.users - or "FSD" action granted in upsd.users - -upsmon in master mode is the primary user of this function. It sets this -"forced shutdown" flag on any UPS when it plans to power it off. This is -done so that slave systems will know about it and shut down before the -power disappears. - -Setting this flag makes "FSD" appear in a STATUS request for this UPS. -Finding "FSD" in a status request should be treated just like a "OB LB". - -It should be noted that FSD is currently a latch - once set, there is -no way to clear it short of restarting upsd or dropping then re-adding -it in the ups.conf. This may cause issues when upsd is running on a -system that is not shut down due to the UPS event. - -PASSWORD -======== - -Form: PASSWORD - -Returns: OK (upon success) - or various errors - -Sets the password associated with a connection. Used for later -authentication for commands that require it. - -USERNAME -======== - -Form: USERNAME - -Returns: OK (upon success) - or various errors - -Sets the username associated with a connection. This is also used for -authentication, specifically in conjunction with the upsd.users file. - -STARTTLS -======== - -Form: STARTTLS - -Returns: OK STARTTLS - or various errors - -This tells upsd to switch to TLS mode internally, so all future -communications will be encrypted. You must also change to TLS mode in -the client after receiving the OK, or the connection will be useless. - -Other commands -============== - -HELP - lists the commands supported by this server -VER - shows the version of the server currently in use - -These two are not intended to be used directly by programs. Humans can -make use of this program by using telnet or netcat. If you use -telnet, make sure you don't have it set to negotiate extra options. -upsd doesn't speak telnet and will probably misunderstand your first -request due to the extra junk in the buffer. - -Error responses -=============== - -ERR [...] - - is always one element; it never contains spaces. This may -be used to allow additional information () in the future. - -ACCESS-DENIED - - - The client's host and/or authentication details (username, password) - are not sufficient to execute the requested command. - -UNKNOWN-UPS - - - The UPS specified in the request is not known to upsd. This usually - means that it didn't match anything in ups.conf. - -VAR-NOT-SUPPORTED - - - The specified UPS doesn't support the variable in the request. - - This is also sent for unrecognized variables which are in a space - which is handled by upsd, such as server.*. - -CMD-NOT-SUPPORTED - - - The specified UPS doesn't support the instant command in the request. - -INVALID-ARGUMENT - - - The client sent an argument to a command which is not recognized or - is otherwise invalid in this context. This is typically caused by - sending a valid command like GET with an invalid subcommand. - -INSTCMD-FAILED - - - upsd failed to deliver the instant command request to the driver. - No further information is available to the client. This typically - indicates a dead or broken driver. - -SET-FAILED - - - upsd failed to deliver the set request to the driver. This is - just like INSTCMD-FAILED above. - -READONLY - - - The requested variable in a SET command is not writable. - -TOO-LONG - - - The requested value in a SET command is too long. - -FEATURE-NOT-SUPPORTED - - - This instance of upsd does not support the requested feature. This - is only used for TLS/SSL mode (STARTTLS) at the moment. - -FEATURE-NOT-CONFIGURED - - - This instance of upsd hasn't been configured properly to allow the - requested feature to operate. This is also limited to STARTTLS for - now. - -ALREADY-SSL-MODE - - - TLS/SSL mode is already enabled on this connection, so upsd can't - start it again. - -DRIVER-NOT-CONNECTED - - - upsd can't perform the requested command, since the driver for that - UPS is not connected. This usually means that the driver is not - running, or if it is, the ups.conf is misconfigured. - -DATA-STALE - - - upsd is connected to the driver for the UPS, but that driver isn't - providing regular updates or has specifically marked the data - as stale. upsd refuses to provide variables on stale units to avoid - false readings. - - This generally means that the driver is running, but it has lost - communications with the hardware. Check the physical connection - to the equipment. - -ALREADY-LOGGED-IN - - - The client already sent LOGIN for a UPS and can't do it again. - There is presently a limit of one LOGIN record per connection. - -INVALID-PASSWORD - - - The client sent an invalid PASSWORD - perhaps an empty one. - -ALREADY-SET-PASSWORD - - - The client already set a PASSWORD and can't set another. This also - should never happen with normal NUT clients. - -INVALID-USERNAME - - - The client sent an invalid USERNAME. - -ALREADY-SET-USERNAME - - - The client has already set a USERNAME, and can't set another. This - should never happen with normal NUT clients. - -USERNAME-REQUIRED - - - The requested command requires a username for authentication, - but the client hasn't set one. - -PASSWORD-REQUIRED - - - The requested command requires a passname for authentication, - but the client hasn't set one. - -UNKNOWN-COMMAND - - - upsd doesn't recognize the requested command. - - This can be useful for backwards compatibility with older versions - of upsd. Some NUT clients will try GET and fall back on REQ after - receiving this response. - -INVALID-VALUE - - - The value specified in the request is not valid. This usually - applies to a SET of an ENUM type which is using a value which is - not in the list of allowed values. - -Future ideas -============ - -Dense lists ------------ - -The LIST commands may be given the ability to handle options some day. -For example, "LIST VARS +DESC" would return the current value -like now, but it would also append the description of that variable. - -Command status --------------- - -After sending an INSTCMD or SET, a client will eventually be able to -poll to see whether it was completed successfully by the driver. diff --git a/docs/upssched.txt b/docs/scheduling.txt similarity index 65% rename from docs/upssched.txt rename to docs/scheduling.txt index 5374916..8bb2b91 100644 --- a/docs/upssched.txt +++ b/docs/scheduling.txt @@ -1,7 +1,96 @@ -Desc: How to use upssched -File: upssched.txt -Date: 01 October 2005 -Auth: Russell Kroll +Advanced usage and scheduling notes +=================================== + +upsmon can call out to a helper script or program when the device changes +state. The example upsmon.conf has a full list of which state changes +are available - ONLINE, ONBATT, LOWBATT, and more. + +There are two options, that will be presented in details: + +- the simple approach: create your own helper, and manage all events and actions +yourself, +- the advanced approach: use the NUT provided helper, called 'upssched'. + + +The simple approach, using your own script +------------------------------------------ + +How it works relative to upsmon +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Your command will be called with the full text of the message as one argument. + +For the default values, refer to the sample upsmon.conf file. + +The environment string NOTIFYTYPE will contain the type string of whatever +caused this event to happen - ONLINE, ONBATT, LOWBATT, ... + +Making this some sort of shell script might be a good idea, but the helper can +be in any programming or scripting language. + +NOTE: Remember that your helper must be *executable*. If you are using a script, +make sure the execution flags are set. + +For more information, refer to linkman:upsmon[8] and +linkman:upsmon.conf[5] manual pages. + +Setting up everything +~~~~~~~~~~~~~~~~~~~~~ + +- Set EXEC flags on various things in linkman:upsmon.conf[5]: ++ + NOTIFYFLAG ONBATT EXEC + NOTIFYFLAG ONLINE EXEC ++ +If you want other things like WALL or SYSLOG to happen, just add them: ++ + NOTIFYFLAG ONBATT EXEC+WALL+SYSLOG ++ +You get the idea. + +- Tell upsmon where your script is + + NOTIFYCMD /path/to/my/script + +- Make a simple script like this at that location: + + #! /bin/bash + echo "$*" | sendmail -F"ups@mybox" bofh@pager.example.com + +- Restart upsmon, pull the plug, and see what happens. + +That approach is bare-bones, but you should get the text content of the +alert in the body of the message, since upsmon passes the alert text +(from NOTIFYMSG) as an argument. + +Using more advanced features +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Your helper script will be run with a few environment variables set. + +- UPSNAME: the name of the system that generated the change. ++ +This will be one of your identifiers from the MONITOR lines in upsmon.conf. + +- NOTIFYTYPE: this will be ONLINE, ONBATT, or whatever event took place which +made upsmon call your script. + +You can use these to do different things based on which system has +changed state. You could have it only send pages for an important +system while totally ignoring a known trouble spot, for example. + +Suppressing notify storms +~~~~~~~~~~~~~~~~~~~~~~~~~ + +upsmon will call your script every time an event happens that has the EXEC flag +set. This means a quick power failure that lasts mere seconds might generate a +notification storm. To suppress this sort of annoyance, use upssched as your +NOTIFYCMD program, and configure it to call your command after a timer has +elapsed. + + +The advanced approach, using upssched +------------------------------------- upssched is a helper for upsmon that will invoke commands for you at some interval relative to a UPS event. It can be used to send pages, mail out @@ -10,11 +99,11 @@ notices about things, or even shut down the box early. There will be examples scattered throughout. Change them to suit your pathnames, UPS locations, and so forth. -How it works relative to upsmon -=============================== +How upssched works relative to upsmon +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When an event occurs, upsmon will call whatever you specify as a NOTIFYCMD -in your upsmon.conf, if you also enable the EXEC in your NOTIFYFLAGS. In +When an event occurs, upsmon will call whatever you specify as a 'NOTIFYCMD' +in your upsmon.conf, if you also enable the 'EXEC' in your 'NOTIFYFLAGS'. In this case, we want upsmon to call upssched as the notifier, since it will be doing all the work for us. So, in the upsmon.conf: @@ -26,12 +115,13 @@ in the upsmon.conf we set the flags: NOTIFYFLAG ONLINE SYSLOG+EXEC NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC + ... and so on. -... and so on. For the purposes of this document I will only use those -three, but you can set the flags for any of the valid notify types. +For the purposes of this document I will only use those three, but you can set +the flags for any of the valid notify types. Setting up your upssched.conf -============================= +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Once upsmon has been configured with the NOTIFYCMD and EXEC flags, you're ready to deal with the upssched.conf details. In this file, you specify @@ -54,7 +144,7 @@ for additional information and advice about these variables. Now you can tell your CMDSCRIPT what to do when it is called by upsmon. The big picture ---------------- +^^^^^^^^^^^^^^^ The design in a nutshell is: @@ -65,7 +155,7 @@ initiating an early shutdown with 'upsmon -c fsd', sending a page by calling sendmail, or opening a subspace channel to V'ger. Establishing timers -------------------- +^^^^^^^^^^^^^^^^^^^ Let's say that you want to receive a page when any UPS has been running on battery for 30 seconds. Create a handler that starts a 30 second timer @@ -83,7 +173,7 @@ So, let's tell upssched that. AT ONLINE * CANCEL-TIMER onbattwarn Executing commands immediately ------------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ As an example, consider the scenario where a UPS goes onto battery power. However, the users are not informed until 60 seconds later - using a timer as @@ -104,7 +194,7 @@ will signal upssched. Upssched will see the above command and simply pass immediately, there are no timers involved. Writing the command script handler ----------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ OK, now that upssched knows how the timers are supposed to work, let's give it something to do when one actually triggers. The name of the @@ -112,34 +202,38 @@ example timer is onbattwarn, so that's the argument that will be passed into your CMDSCRIPT when it triggers. This means we need to do some shell script writing to deal with that input. +-------------------------------------------------------------------------------- + #! /bin/sh case $1 in onbattwarn) echo "The UPS has been on battery for awhile" \ | mail -s"UPS monitor" bofh@pager.example.com + ;; ups-back-on-power) /bin/rm -f /some/path/ups-on-battery + ;; *) logger -t upssched-cmd "Unrecognized command: $1" ;; esac +-------------------------------------------------------------------------------- + This is a very simple script example, but it shows how you can test for the presence of a given trigger. With multiple ATs creating various timer names, you will need to test for each possibility and handle it according to your desires. -Other possibilities -=================== +NOTE: You can invoke just about anything from inside the CMDSCRIPT. It doesn't +need to be a shell script, either - that's just an example. If you want to +write a program that will parse argv[1] and deal with the possibilities, that +will work too. -You can invoke just about anything from inside the CMDSCRIPT. It doesn't -need to be a shell script, either - that's just an example. If you want -to write a program that will parse argv[1] and deal with the -possibilities, that will work too. Early Shutdowns -=============== +~~~~~~~~~~~~~~~ One thing that gets requested a lot is early shutdowns in upsmon. With upssched, you can now have this functionality. Just set a timer for some @@ -158,8 +252,9 @@ from the CMDSCRIPT, since there's no synchronization with the slave systems hooked to the same UPS. FSD is the master's way of saying "we're shutting down *now* like it or not, so you'd better get ready". + Background -========== +~~~~~~~~~~ This program was written primarily to fulfill the requests of users for the early shutdown scenario. The "outboard" design of the program diff --git a/docs/security.txt b/docs/security.txt new file mode 100644 index 0000000..1a83c09 --- /dev/null +++ b/docs/security.txt @@ -0,0 +1,521 @@ +Notes on securing NUT +===================== + +The NUT Team is very interested in providing the highest security level to its +users. + +Many internal and external mechanisms exist to secure NUT. And several steps are +needed to ensure that your NUT setup meets your security requirements. + +This chapter will present you these mechanisms, by increasing order of security +level. This means that the more security you need, the more mechanisms you will +have to apply. + +NOTE: you may want to have a look at NUT Quality Assurance, since some +topics are related to NUT security and reliability. + + +[[verifySourceSig]] +How to verify the NUT source code signature +------------------------------------------- + +In order to verify the NUT source code signature for releases, perform the following steps: + +- Retrieve the link:http://www.networkupstools.org/download.html[NUT source code] (nut-X.Y.Z.tar.gz) and the matching signature (nut-X.Y.Z.tar.gz.sig) +- Retrieve the link:http://www.networkupstools.org/source/nut-key.gpg[NUT maintainer's signature]: + + $ gpg --fetch-keys http://www.networkupstools.org/source/nut-key.gpg + +- Launch the GPG checking using the following command: + + $ gpg --verify nut-X.Y.Z.tar.gz.sig + +- You should see a message mentioning a "Good signature", like: + + gpg: Signature made Thu Jul 5 16:15:05 2007 CEST using DSA key ID 204DDF1B + gpg: Good signature from "Arnaud Quette ..." + ... + + +System level privileges and ownership +------------------------------------- + +All configuration files should be protected so that the world can't read them. +Use the following commands to accomplish this: + + chown root:nut /etc/nut/* + chmod 640 /etc/nut/* + + +Finally, the <> directory, which holds the +communication between the driver(s) and upsd, should also be secured. + + chown root:nut /var/state/ups + chmod 0770 /var/state/ups + + +NUT level user privileges +------------------------- + +Administrative commands such as setting variables and the instant commands +are powerful, and access to them needs to be restricted. + +NUT provides an internal mechanism to do so, through +linkman:upsd.users[5]. + +This file defines who may access instant commands and settings, and what +is available. + +During the initial +<>, we have created a +monitoring user for upsmon. + +You can also create an 'administrator' user with full power using: + + [administrator] + password = mypass + actions = set + instcmds = all + +For more information on how to restrict actions and instant commands, refer +to linkman:upsd.users[5] manual page. + +NOTE: NUT administrative user definitions should be used in conjunction with +<>. + + +Network access control +---------------------- + +If you are not using NUT on a standalone setup, you will need to enforce +network access to upsd. + +There are various ways to do so. + +NUT LISTEN directive +~~~~~~~~~~~~~~~~~~~~ + +linkman:upsd.conf[5]. + + LISTEN interface port + +Bind a listening port to the interface specified by its Internet address. This +may be useful on hosts with multiple interfaces. You should not rely +exclusively on this for security, as it can be subverted on many systems. + +Listen on TCP port `port` instead of the default value which was compiled into +the code. This overrides any value you may have set with `configure +--with-port`. If you don't change it with configure or this value, `upsd` will +listen on port 3493 for this interface. + +Multiple LISTEN addresses may be specified. The default is to bind to +127.0.0.1 if no LISTEN addresses are specified (and ::1 if IPv6 support is +compiled in). + + LISTEN 127.0.0.1 + LISTEN 192.168.50.1 + LISTEN ::1 + LISTEN 2001:0db8:1234:08d3:1319:8a2e:0370:7344 + +This parameter will only be read at startup. You'll need to restart (rather +than reload) `upsd` to apply any changes made here. + + +Firewall +~~~~~~~~ + +NUT has its own official IANA port: 3493/tcp. + +The `upsmon` process on slave systems (as well as `upsc`) connects to the +`upsd` process on the master system via this TCP port. The `upsd` process does +not connect out. + +You should use this to restrict network access. + + +[[TCP_Wrappers]] +TCP Wrappers +~~~~~~~~~~~~ + +If the server is build with tcp-wrappers support enabled, it will check if the +NUT username is allowed to connect from the client address through the +'/etc/hosts.allow' and '/etc/hosts.deny' files. + +NOTE: this will only be done for commands that require the user to be logged +into the server. + +`hosts.allow`: + + ups : admin@127.0.0.1/32 + ups : monslave@127.0.0.1/32 monslave@192.168.1.0/24 + +`hosts.deny`: + + upsd : ALL + +Further details are described in hosts_access(5). + + +Configuring SSL +--------------- + +SSL is available as a build option ('--with-ssl'). + +It encrypts sessions between upsd and clients, and can also be used to +authenticate servers. + +This means that stealing port 3493 from upsd will no longer net you interesting +passwords. + +Several things must happen before this will work, however. This chapter will +present these steps. + +Install OpenSSL +~~~~~~~~~~~~~~~ + +Install link:http://www.openssl.org[OpenSSL] as usual, either from source +or binary packages. + +Recompile and install NUT +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Recompile NUT from source, starting with 'configure --with-ssl'. + +Then install everything as usual. + +Create a certificate and key for upsd +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +openssl (the program) should be in your PATH, unless you installed it from +source yourself, in which case it may be in /usr/local/ssl/bin. + +Use the following command to create the certificate: + + openssl req -new -x509 -nodes -out upsd.crt -keyout upsd.key + +You can also put a '-days nnn' in there to set the expiration. If +you skip this, it may default to 30 days. This is probably not what +you want. + +It will ask several questions. What you put in there doesn't matter a whole +lot, since nobody is going to see it for now. Future versions of the +clients may present data from it, so you might use this opportunity to +identify each server somehow. + +Figure out the hash for the key +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use the following command to determine the hash of the certificate: + + openssl x509 -hash -noout -in upsd.crt + +You'll get back a single line with 8 hex characters. This is the +hash of the certificate, which is used for naming the client-side +certificate. For the purposes of this example the hash is *0123abcd*. + +Install the client-side certificate +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use the following commands to install the client-side certificate: + + mkdir + chmod 0755 + cp upsd.crt /.0 + +Example: + + mkdir /usr/local/ups/etc/certs + chmod 0755 /usr/local/ups/etc/certs + cp upsd.crt /usr/local/ups/etc/certs/0123abcd.0 + +If you already have a file with that name in there, increment the +0 until you get a unique filename that works. + +If you have multiple client systems (like upsmon slaves), be sure +to install this file on them as well. + +We recommend making a directory under your existing confpath to +keep everything in the same place. Remember the path you created, +since you will need to put it in upsmon.conf later. + +It must not be writable by unprivileged users, since someone could +insert a new client certificate and fool upsmon into trusting a +fake upsd. + +Create the combined file for upsd +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To do so, use the below commands: + + cat upsd.crt upsd.key > upsd.pem + chown root:nut upsd.pem + chmod 0640 upsd.pem + +This file must be kept secure, since anyone possessing it could +pretend to be upsd and harvest authentication data if they get a +hold of port 3493. + +Having it be owned by 'root' and readable by group 'nut' allows upsd +to read the file without being able to change the contents. This +is done to minimize the impact if someone should break into upsd. + +Note on certification authorities (CAs) and signed keys +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are probably other ways to handle this, involving keys which have +been signed by a CA you recognize. Contact your local SSL guru. + +Install the server-side certificate +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Install the certificate with the following command: + + mv upsd.pem + +Example: + + mv upsd.pem /usr/local/ups/etc/upsd.pem + +After that, edit your upsd.conf and tell it where to find it: + + CERTFILE /usr/local/ups/etc/upsd.pem + +Clean up the temporary files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + rm -f upsd.crt upsd.key + +Restart upsd +~~~~~~~~~~~~ + +It should come back up without any complaints. If it says something +about keys or certificates, then you probably missed a step. + +If you run upsd as a separate user id (like nutsrv), make sure that +user can read the upsd.pem file. + +Point upsmon at the certificates +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Edit your upsmon.conf, and tell it where the CERTPATH is: + + CERTPATH + +Example: + + CERTPATH /usr/local/ups/etc/certs + +Recommended: make upsmon verify all connections with certificates +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Put this in upsmon.conf: + + CERTVERIFY 1 + +Without this, there is no guarantee that the upsd is the right host. +Enabling this greatly reduces the risk of man in the middle attacks. + +This effectively forces the use of SSL, so don't use this unless +all of your upsd hosts are ready for SSL and have their certificates +in order. + +Recommended: force upsmon to use SSL +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Again in upsmon.conf: + + FORCESSL 1 + +If you don't use 'CERTVERIFY 1', then this will at least make sure +that nobody can sniff your sessions without a large effort. Setting +this will make upsmon drop connections if the remote upsd doesn't +support SSL, so don't use it unless all of them have it running. + +Restart upsmon +~~~~~~~~~~~~~~ + +You should see something like this in the syslog from upsd: + + foo upsd[1234]: Client mon@localhost logged in to UPS [myups] (SSL) + +If upsd or upsmon give any error messages, or the (SSL) is missing, +then something isn't right. + +If in doubt about upsmon, start it with -D so it will stay in +the foreground and print debug messages. It should print something +like this every couple of seconds: + + polling ups: myups@localhost [SSL] + +Obviously, if the '[SSL]' isn't there, something's broken. + +Recommended: sniff the connection to see it for yourself +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Using tcpdump, Wireshark (Ethereal), or another network sniffer tool, +tell it to monitor port 3493/tcp and see what happens. You should only +see 'STARTTLS' go out, 'OK STARTTLS' come back, and the rest will be +certificate data and then seemingly random characters. + +If you see any plaintext besides that (USERNAME, PASSWORD, etc.) +then something is not working. + +Potential problems +~~~~~~~~~~~~~~~~~~ + +If you specify a certificate expiration date, you will eventually +see things like this in your syslog: + + Oct 29 07:27:25 rktoy upsmon[3789]: Poll UPS [for750@rktoy] failed - + SSL error: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE: certificate verify failed + +You can verify that it is expired by using openssl to display the date: + + openssl x509 -enddate -noout -in + +It'll display a date like this: + + notAfter=Oct 28 20:05:32 2002 GMT + +If that's after the current date, you need to generate another cert/key +pair using the procedure above. + +Conclusion +~~~~~~~~~~ + +SSL support should be considered stable but purposely underdocumented +since various bits of the implementation or configuration may change in +the future. In other words, if you use this and it stops working after +an upgrade, come back to this file to find out what changed. + +This is why the other documentation doesn't mention any of these +directives yet. SSL support is a treat for those of you that RTFM. + +There are also potential licensing issues for people who ship binary +packages since NUT is GPL and OpenSSL is not compatible with it. You +can still build and use it yourself, but you can't distribute the +results of it. Or maybe you can. It depends on what you consider +"essential system software", and some other legal junk that we're not +going to touch. + +Other packages have solved this by explicitly stating that an exception +has been granted. That is (purposely) impossible here, since NUT is the +combined effort of many people, and all of them would have to agree to a +license change. This is actually a feature, since it means nobody can +unilaterally run off with the source - not even the NUT team. + +Note that the replacement of OpenSSL by Mozilla Network Security Services +(NSS) is scheduled in the future, to avoid the above licensing issues. + + +chrooting and other forms of paranoia +------------------------------------- + +It has been possible to run the drivers and upsd in a chrooted jail for +some time, but it involved a number of evil hacks. From the 1.3 series, +a much saner chroot behavior exists, using BIND 9 as an inspiration. + +The old way involved creating an entire tree, complete with libraries, a +shell (!), and many auxiliary files. This was hard to maintain and +could have become an interesting playground for an intruder. The new +way is minimal, and leaves little in the way of usable materials within +the jail. + +This document assumes that you already have created at least one user +account for the software to use. If you're still letting it fall back +on "nobody", stop right here and go figure that out first. It also +assumes that you have everything else configured and running happily all +by itself. + +Generalities +~~~~~~~~~~~~ + +Essentially, you need to create your configuration directory and state +path in their own little world, plus a special device or two. + +For the purposes of this example, the chroot jail is /chroot/nut. The +programs have been built with the default prefix, so they are using +/usr/local/ups. First, create the confpath and bring over a few files. + + mkdir -p /chroot/nut/usr/local/ups/etc + cd /chroot/nut/usr/local/ups/etc + cp -a /usr/local/ups/etc/upsd.users . + cp -a /usr/local/ups/etc/upsd.conf . + cp -a /usr/local/ups/etc/ups.conf . + +We're using 'cp -a' to maintain the permissions on those files. + +Now bring over your state path, maintaining the same permissions as +before. + + mkdir -p /chroot/nut/var/state + cp -a /var/state/ups /chroot/nut/var/state + +Next we must put /etc/localtime inside the jail, or you may get very +strange readings in your syslog. You'll know you have this problem if +upsd shows up as UTC in the syslog while the rest of the system doesn't. + + mkdir -p /chroot/nut/etc + cp /etc/localtime /chroot/nut/etc + +Note that this is not "cp -a", since we want to copy the *content*, not +the symlink that it may be on some systems. + +Finally, create a tiny bit of /dev so the programs can enter the +background properly - they redirect fds into the bit bucket to make sure +nothing else grabs 0-2. + + mkdir -p /chroot/nut/dev + cp -a /dev/null /chroot/nut/dev + +Try to start your driver(s) and make sure everything fires up as before. + + upsdrvctl -r /chroot/nut -u nutdev start + +Once your drivers are running properly, try starting upsd. + + upsd -r /chroot/nut -u nutsrv + +Check your syslog. If nothing is complaining, try running clients like +upsc and upsmon. If they seem happy, then you're done. + +symlinks +~~~~~~~~ + +After you do this, you will have two copies of many things, like the +confpath and the state path. I recommend deleting the 'real' +/var/state/ups, replacing it with a symlink to +/chroot/nut/var/state/ups. That will let other programs reference the +.pid files without a lot of hassle. + +You can also do this with your confpath and point /usr/local/ups/etc at +/chroot/nut/usr/local/ups/etc unless you're worried about something +hurting the files inside that directory. In that case, you should +maintain a 'master' copy and push it into the chroot path after +making changes. + +upsdrvctl itself does not chroot, so the ups.conf still needs to be in +the usual confpath. + +upsmon +~~~~~~ + +This has not yet been applied to upsmon, since it can be quite +complicated when there are notifiers that need to be run. One +possibility would be for upsmon to have three instances: + + - privileged root parent that listens for a shutdown command + + - unprivileged child that listens for notify events + + - unprivileged chrooted child that does network I/O + +This one is messy, and may not happen for some time, if ever. + +Config files +~~~~~~~~~~~~ + +You may now set chroot= and user= in the global section of ups.conf. + +upsd chroots before opening any config files, so there is no way to +add support for that in upsd.conf at the present time. diff --git a/docs/shutdown.txt b/docs/shutdown.txt deleted file mode 100644 index f00eefb..0000000 --- a/docs/shutdown.txt +++ /dev/null @@ -1,230 +0,0 @@ -Desc: Configuring automatic UPS shutdowns -File: shutdown.txt -Date: 24 August 2003 -Auth: Russell Kroll - -Shutdown design -=============== - -When your UPS batteries get low, the operating system needs to be brought -down cleanly. Also, the UPS load should be turned off so that all devices -that are attached to it are forcibly rebooted. - -Here are the steps that occur when a critical power event happens: - -1. The UPS goes on battery - -2. The UPS reaches low battery (a "critical" UPS) - -3. The upsmon master notices and sets "FSD" - the "forced shutdown" - flag to tell all slave systems that it will soon power down the load. - - (If you have no slaves, skip to step 6) - -4. upsmon slave systems see "FSD" and: - - - generate a NOTIFY_SHUTDOWN event - - wait FINALDELAY seconds - typically 5 - - call their SHUTDOWNCMD - - disconnect from upsd - -5. The upsmon master system waits up to HOSTSYNC seconds (typically 15) - for the slaves to disconnect from upsd. If any are connected after - this time, upsmon stops waiting and proceeds with the shutdown - process. - -6. The upsmon master: - - - generates a NOTIFY_SHUTDOWN event - - waits FINALDELAY seconds - typically 5 - - creates the POWERDOWNFLAG file - usually /etc/killpower - - calls the SHUTDOWNCMD - -7. On most systems, init takes over, kills your processes, syncs and - unmounts some filesystems, and remounts some read-only. - -8. init then runs your shutdown script. This checks for the - POWERDOWNFLAG, finds it, and tells the UPS driver(s) to power off - the load. - -9. The system loses power. - -10. Time passes. The power returns, and the UPS switches back on. - -11. All systems reboot and go back to work. - -How you set it up -================= - -1. Make sure your POWERDOWNFLAG setting in upsmon.conf points somewhere - reasonable. Specifically, that filesystem must be mounted when your - shutdown script runs. - -2. Edit your shutdown scripts to check for the POWERDOWNFLAG so they know - when to power off the UPS. You must check for this file, as you don't - want this to happen during normal shutdowns! - - You can use upsdrvctl to start the shutdown process in your UPS - hardware. Use this script as an example, but change the paths to - suit your system: - - if (test -f /etc/killpower) - then - echo "Killing the power, bye!" - /usr/local/ups/bin/upsdrvctl shutdown - - sleep 120 - - # uh oh... the UPS poweroff failed! - # you probably should reboot here to avoid getting stuck - # *** see the section on power races below *** - fi - - Make sure the filesystem containing upsdrvctl, ups.conf and your UPS - driver(s) is mounted when the system gets to this point. Otherwise - it won't be able to figure out what to do. - -RAID warning -============ - - NOTE: If you run any sort of RAID equipment, make sure your arrays - are either halted (if possible) or switched to "read-only" mode. - Otherwise you may suffer a long resync once the system comes back up. - - The kernel may not ever run its final shutdown procedure, so you - must take care of all array shutdowns in userspace before upsdrvctl - runs. - - If you use software RAID (md) on Linux, get mdadm and try using - 'mdadm --readonly' to put your arrays in a safe state. This has to - happen after your shutdown scripts have remounted the filesystems. - - On hardware RAID or other kernels, you have to do some detective work. - It may be necessary to contact the vendor or the author of your - driver to find out how to put the array in a state where a power loss - won't leave it "dirty". - - My understanding is that 3ware devices on Linux will be fine unless - there are pending writes. Make sure your filesystems are remounted - read-only and you should be covered. - -Multiple UPS shutdowns -====================== - -If you have multiple UPSes connected to your system, chances are that you -need to shut them down in a specific order. The goal is to shut down -everything but the one keeping upsmon alive at first, then you do that one -last. - -To set the order in which your UPSes receive the shutdown commands, define -the "sdorder" value in your ups.conf. - - [bigone] - driver = apcsmart - port = /dev/ttyS0 - sdorder = 2 - - [littleguy] - driver = bestups - port = /dev/ttyS1 - sdorder = 1 - - [misc] - driver = megatec - port = /dev/ttyS2 - sdorder = 0 - -The order runs from 0 to the highest number available. So, for this -configuration, the order of shutdowns would be misc, littleguy, and then -bigone. - -If you have a UPS that shouldn't be shutdown when running "upsdrvctl -shutdown", set the sdorder to -1. - -Testing shutdowns -================= - -To see how upsdrvctl will behave without actually turning off power, use -the -t argument. It will display the sequence without actually calling -the drivers. - -Other issues -============ - -You may delete the POWERDOWNFLAG in the startup scripts, but it is not -necessary. upsmon will clear that file for you when it starts. - -Remember that some operating systems unmount a good number of filesystems -when going into read-only mode. If the UPS software is installed to /usr -and it's not mounted, your shutdowns will fail. If this happens, either -make sure it stays mounted at shutdown, or install to another partition. - -Power races -=========== - -There is a situation where the power may return during the shutdown -process. This is known as a race. Here's how we handle it. - -"Smart" UPSes typically handle this by using a command that forces the UPS -to power the load off and back on. This way, you are assured that the -systems will restart even if the power returns at the worst possible -moment. - -Contact closure units (ala genericups), on the other hand, have the -potential for a race when feeding multiple systems. This is due to the -design of most contact closure UPSes. Typically, the "kill power" line -only functions when running on battery. As a result, if the line power -returns during the shutdown process, there is no way to power down the -load. - -The workaround is to force your systems to reboot after some -interval. This way, they won't be stuck in the halted state with the UPS -running on line power. - -Testing power races -=================== - -The easiest way to see if your configuration will handle a power race -successfully is to do 'upsmon -c fsd'. This will force the UPS software -to shut down as if it had a OB+LB situation, and your shutdown script -should call the UPS driver(s) in shutdown mode. - -If everything works correctly, the computer will be forcibly powered off, -may remain off for a few seconds to a few minutes (depending on the -driver and UPS type), then will power on again. - -If your UPS just sits there and never resets the load, you are vulnerable -to the above power race and should add the "reboot after timeout" hack -at the very least. - -Know your hardware -================== - -UPS equipment varies from manufacturer to manufacturer and even within -model lines. You should test the shutdown sequence on your systems before -leaving them unattended. A successful sequence is one where the OS halts -before the battery runs out, and the system restarts when power returns. - -One more tip -============ - -If your UPS powers up immediately after a power failure instead of -waiting for the batteries to recharge, you can rig up a little hack to -handle it in software. - -Essentially, you need to test for the POWERDOWNFLAG in your *startup* -scripts while the filesystems are still read-only. If it's there, you -know your last shutdown was caused by a power failure and the UPS -battery is probably still quite weak. - -In this situation, your best bet is to sleep it off. Pausing in your -startup script to let the batteries recharge with the filesystems in a -safe state is recommended. This way, if the power goes out again, you -won't face a situation where there's not enough battery capacity left -for upsmon to do its thing. - -Exactly how long to wait is a function of your UPS hardware, and will -require careful testing. - -If this is too evil for you, buy another kind of UPS that will either -wait for a minimum amount of charge, a minimum amount of time, or both. diff --git a/docs/sock-protocol.txt b/docs/sock-protocol.txt index 9fb336c..7f25d9d 100644 --- a/docs/sock-protocol.txt +++ b/docs/sock-protocol.txt @@ -1,9 +1,7 @@ -Desc: Driver/server socket protocol -File: sock-protocol.txt -Date: 1 May 2003 -Auth: Russell Kroll +Driver/server socket protocol +============================= -Here's a brief explanation of the text-based protocol which is now used +Here's a brief explanation of the text-based protocol which is used between the drivers and server. The drivers may send things on the socket at any time. They will send @@ -12,7 +10,7 @@ prompting from the server. As a result, the server must always check on any driver sockets for activity. Formatting -========== +---------- All parsing on either side of the socket is done by parseconf, so the same rules about escaping characters and "quoting multi-word elements" @@ -23,55 +21,55 @@ The "" construct is used throughout to force a multi-word value to stay together on its way to the other end. Commands used by the drivers -============================ +---------------------------- SETINFO -------- +~~~~~~~ - SETINFO "" + SETINFO "" - SETINFO ups.status "OB LB" + SETINFO ups.status "OB LB" There is no "ADDINFO" - if a given variable does not exist, it is created upon receiving the first SETINFO command. DELINFO -------- +~~~~~~~ - DELINFO + DELINFO - DELINFO ups.temperature + DELINFO ups.temperature ADDENUM -------- +~~~~~~~ - ADDENUM "" + ADDENUM "" - ADDENUM input.transfer.low "95" + ADDENUM input.transfer.low "95" DELENUM -------- +~~~~~~~ - DELENUM "" + DELENUM "" - DELENUM input.transfer.low "98" + DELENUM input.transfer.low "98" SETAUX ------- +~~~~~~ - SETAUX + SETAUX - SETAUX ups.id 8 + SETAUX ups.id 8 This overrides any previous value. The auxiliary value is presently used as a length byte for read-write variables that are strings. SETFLAGS --------- +~~~~~~~~ - SETFLAGS ... + SETFLAGS ... - SETFLAGS ups.id RW STRING + SETFLAGS ups.id RW STRING Note that this command takes a variable number of arguments, as multiple flags are supported. Also note that they are not crammed together in @@ -80,23 +78,23 @@ flags are supported. Also note that they are not crammed together in This also replaces any previous flags for a given variable. ADDCMD ------- +~~~~~~ - ADDCMD + ADDCMD - ADDCMD load.off + ADDCMD load.off DELCMD ------- +~~~~~~ - DELCMD + DELCMD - DELCMD load.on + DELCMD load.on DUMPDONE --------- +~~~~~~~~ - DUMPDONE + DUMPDONE This is only used to tell the server that every possible item has been transmitted in response to its DUMPALL request. Once this has been @@ -104,27 +102,27 @@ received by the server, it can be sure that it knows everything that the driver does. PONG ----- +~~~~ - PONG + PONG This is sent in response to a PING from the server. It is only used as a sanity check to make sure that the driver has not gotten stuck somewhere. DATAOK ------- +~~~~~~ - DATAOK + DATAOK This means that the driver is able to communicate with the UPS, and the data should be treated as usable. It is always sent at the end of the dump if the data is not stale. It may also be sent at other times. DATASTALE ---------- +~~~~~~~~~ - DATASTALE + DATASTALE This is sent by the driver to inform any listeners that the data is no longer usable. This usually means that the driver is unable to get any @@ -135,12 +133,12 @@ This will be sent in the beginning of a dump if the data is stale, and may be repeated. It is cleared by DATAOK. Commands sent by the server -=========================== +--------------------------- PING ----- +~~~~ - PING + PING This is sent to check on the health of a driver. The server should only send this when it hasn't heard anything valid from a driver recently. @@ -152,23 +150,23 @@ most, it should be treated as dead/unavailable. Data stored in the server must not be passed on to the clients when this happens. INSTCMD -------- +~~~~~~~ - INSTCMD + INSTCMD - INSTCMD panel.test.start + INSTCMD panel.test.start SET ---- +~~~ - SET "" + SET "" - SET ups.id "Data room" + SET ups.id "Data room" DUMPALL -------- +~~~~~~~ - DUMPALL + DUMPALL The server uses this to request a complete copy of everything the driver knows. This is returned in the form of the same commands (SETINFO, @@ -180,10 +178,10 @@ DUMPDONE. That special response from the driver is sent once the entire set has been transmitted. Design notes -============ +------------ Requests --------- +~~~~~~~~ There is no way to request just one variable. This was done on purpose to limit the complexity of the drivers. Their job is to send out @@ -195,7 +193,7 @@ then only have handlers that remember values for the variables that matter. Anything else should be ignored. Access/Security ---------------- +~~~~~~~~~~~~~~~ There are no access controls in the drivers. Anything that can connect to their sockets can make requests, including SET and INSTCMD if @@ -205,7 +203,7 @@ sockets, then you must store them in a directory with suitable permissions to limit access. Command limitations -------------------- +~~~~~~~~~~~~~~~~~~~ As parseconf is used to handle decoding and chunking of the data, there are some limits on what may be used. These default to 32 arguments of @@ -217,7 +215,7 @@ necessary. parseconf itself can handle vast numbers of arguments and characters, with some speed penalty as things get really big. Re-establishing communications ------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If the server loses its connection to the driver and later reconnects, it must flush any local storage and start again with DUMPALL. The diff --git a/docs/ssl.txt b/docs/ssl.txt deleted file mode 100644 index 38c6549..0000000 --- a/docs/ssl.txt +++ /dev/null @@ -1,251 +0,0 @@ -Desc: Configuring SSL -File: ssl.txt -Date: 19 February 2004 -Auth: Russell Kroll - -SSL is now available as a development option. It encrypts sessions with -upsd and can also be used to authenticate servers. This means that -stealing port 3493 from upsd will no longer net you interesting -passwords. - -Several things must happen before this will work, however: - ------------------------------------------------------------------------------- - - 1. Install OpenSSL. - ------------------------------------------------------------------------------- - - 2. Recompile NUT from source, starting with 'configure --with-ssl'. - ------------------------------------------------------------------------------- - - 3. Install everything as usual. - ------------------------------------------------------------------------------- - - 4. Create a certificate and key for upsd. - - openssl (the program) should be in your PATH, unless you installed - it from source yourself, in which case it may be in - /usr/local/ssl/bin. - - openssl req -new -x509 -nodes -out upsd.crt -keyout upsd.key - - You can also put a "-days nnn" in there to set the expiration. If - you skip this, it may default to 30 days. This is probably not what - you want. - - It will ask several questions. What you put in there doesn't matter - a whole lot, since nobody is going to see it for now. Future - versions of the clients may present data from it, so you might use - this opportunity to identify each server somehow. - ------------------------------------------------------------------------------- - - 5. Figure out the hash for the key. - - openssl x509 -hash -noout -in upsd.crt - - You'll get back a single line with 8 hex characters. This is the - hash of the certificate, which is used for naming the client-side - certificate. For the purposes of this example the hash is - 0123abcd. - ------------------------------------------------------------------------------- - - 6. Install the client-side certificate. - - mkdir - chmod 0755 - cp upsd.crt /.0 - - Example: - - mkdir /usr/local/ups/etc/certs - chmod 0755 /usr/local/ups/etc/certs - cp upsd.crt /usr/local/ups/etc/certs/0123abcd.0 - - If you already have a file with that name in there, increment the - 0 until you get a unique filename that works. - - If you have multiple client systems (like upsmon slaves), be sure - to install this file on them as well. - - I recommend making a directory under your existing confpath to - keep everything in the same place. Remember the path you created, - since you will need to put it in upsmon.conf later. - - It must not be writable by unprivileged users, since someone could - insert a new client certificate and fool upsmon into trusting a - fake upsd. - ------------------------------------------------------------------------------- - - 7. Create the combined file for upsd. - - cat upsd.crt upsd.key > upsd.pem - - chown root:nut upsd.pem - chmod 0640 upsd.pem - - This file must be kept secure, since anyone possessing it could - pretend to be upsd and harvest authentication data if they get a - hold of port 3493. - - Having it be owned by root and readable by group nut allows upsd - to read the file without being able to change the contents. This - is done to minimize the impact if someone should break into upsd. - ------------------------------------------------------------------------------- - - 8. Install the server-side certificate. - - mv upsd.pem - - Example: - - mv upsd.pem /usr/local/ups/etc/upsd.pem - - After that, edit your upsd.conf and tell it where to find it: - - CERTFILE /usr/local/ups/etc/upsd.pem - ------------------------------------------------------------------------------- - - 9. Clean up the temporary files. - - rm -f upsd.crt upsd.key - ------------------------------------------------------------------------------- - -10. Restart upsd. - - It should come back up without any complaints. If it says something - about keys or certificates, then you probably missed a step. - - If you run upsd as a separate user id (like nutsrv), make sure that - user can read the upsd.pem file. - ------------------------------------------------------------------------------- - -11. Point upsmon at the certificates. - - Edit your upsmon.conf, and tell it where the CERTPATH is: - - CERTPATH - - CERTPATH /usr/local/ups/etc/certs - ------------------------------------------------------------------------------- - -12. Recommended: make upsmon verify all connections with certificates. - - Put this in upsmon.conf: - - CERTVERIFY 1 - - Without this, there is no guarantee that the upsd is the right host. - Enabling this greatly reduces the risk of man in the middle attacks. - - This effectively forces the use of SSL, so don't use this unless - all of your upsd hosts are ready for SSL and have their certificates - in order. - ------------------------------------------------------------------------------- - -13. Recommended: force upsmon to use SSL. - - Again in upsmon.conf: - - FORCESSL 1 - - If you don't use CERTVERIFY 1, then this will at least make sure - that nobody can sniff your sessions without a large effort. Setting - this will make upsmon drop connections if the remote upsd doesn't - support SSL, so don't use it unless all of them have it running. - ------------------------------------------------------------------------------- - -14. Restart upsmon. - - You should see something like this in the syslog from upsd: - - foo upsd[1234]: Client mon@localhost logged in to UPS [myups] (SSL) - - If upsd or upsmon give any error messages, or the (SSL) is missing, - then something isn't right. - - If in doubt about upsmon, start it with -D so it will stay in - the foreground and print debug messages. It should print something - like this every couple of seconds: - - polling ups: myups@localhost [SSL] - - Obviously, if the [SSL] isn't there, something's broken. - ------------------------------------------------------------------------------- - -15. Recommended: sniff the connection to see it for yourself. - - Using tcpdump, Ethereal, or another network sniffer tool, tell it - to monitor port 3493/tcp and see what happens. You should only see - "STARTTLS" go out, "OK STARTTLS" come back, and the rest will be - certificate data and then seemingly random characters. - - If you see any plaintext besides that (USERNAME, PASSWORD, etc.) - then something is not working. - ------------------------------------------------------------------------------- - -SSL support should be considered stable but purposely underdocumented -since various bits of the implementation or configuration may change in -the future. In other words, if you use this and it stops working after -an upgrade, come back to this file to find out what changed. - -This is why the other documentation doesn't mention any of these -directives yet. SSL support is a treat for those of you that RTFM. - -There are also potential licensing issues for people who ship binary -packages since NUT is GPL and OpenSSL is not compatible with it. You -can still build and use it yourself, but you can't distribute the -results of it. Or maybe you can. It depends on what you consider -"essential system software", and some other legal junk that I'm not -going to touch. - -Other packages have solved this by explicitly stating that an exception -has been granted. That is (purposely) impossible here, since NUT is the -combined effort of many people, and all of them would have to agree to a -license change. This is actually a feature, since it means nobody can -unilaterally run off with the source - not even me. - -It would be nice if we could also link against gnutls to avoid the -licensing issues. - -Potential problems -================== - -If you specify a certificate expiration date, you will eventually -see things like this in your syslog: - -Oct 29 07:27:25 rktoy upsmon[3789]: Poll UPS [for750@rktoy] failed - -SSL error: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE: -certificate verify failed - -You can verify that it is expired by using openssl to display the date: - - openssl x509 -enddate -noout -in - -It'll display a date like this: - - notAfter=Oct 28 20:05:32 2002 GMT - -If that's after the current date, you need to generate another cert/key -pair using the procedure above. - -CAs / signed keys -================= - -There are probably other ways to handle this, involving keys which have -been signed by a CA you recognize. Contact your local SSL guru. - diff --git a/docs/stable-hcl.txt b/docs/stable-hcl.txt new file mode 100644 index 0000000..49c799a --- /dev/null +++ b/docs/stable-hcl.txt @@ -0,0 +1,161 @@ +ifdef::website[] +Hardware compatibility list +=========================== +endif::website[] + +NOTE: Before you buy, take a look at the link:acknowledgements.html[Acknowledgements] +for information about which drivers are developed with the support of the manufacturer. + +ifdef::website[] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +
    + Filters +
    + Support level legend +
    +
    *
    protocol based on reverse engineering
    +
    **
    based on fragments of publicly available protocol
    +
    ***
    based on publicly available protocol
    +
    ****
    vendor provided protocol
    +
    *****
    vendor provided protocol and hardware
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    +
    + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +include::ups-html.txt[] + +endif::website[] + +[NOTE] +================================================================================ + + +*If your device isn't listed* + +First, if there are other models by the same manufacturer, try their drivers. +You may find that it "just works" or mostly works. + +In either case, send in a report so this list and the driver can be improved. + +Next, if you don't find any match, there are a few drivers that have a good +chance of working on random hardware. These are indicated in the *Various* +entries above. + +After doing that, if those aren't working, you might try running other ones +from the set to see if anything works. Sometimes you get lucky. Finally, if +absolutely nothing works and your cabling is OK, try contacting the list and +we will see what we can do for you. + +In general, if a driver does not exist, that's due to the lack of overlap +between the set of developers and the set of owners of that hardware. + +The way to fix it is to turn a developer into an owner or an owner into a +developer. + +*Omissions or errors* + +There is a lot of UPS hardware for sale, and it's possible that we have missed +listing some that are supported. + +Please report any omissions so that this list can be as accurate as possible. + +*Pointing the present HCL* + +You can create direct link to the present HCL, speficying some filters within +the URL. This allows to select devices that matches some specific criteria, +like a connexion type, a manufacturer, ... All filters available on the page +itself are also available for use in the URL. + +The form of the URL is the following: + + http://www.networkupstools.org/stable-hcl.html?= + +.Possible values for and +[cols="^,^",options="header"] +|========================================================================== +| | +| support-level | a number from '1' to '5' +.3+^.^| device-type | 'ups' for uninterruptible power supply + | 'pdu' for power distribution unit + | 'scd' for solar controller device +| manufacturer | a manufacturer name from the selection list +| model | a model name from the selection list +.3+^.^| connection | 'USB' + | 'Serial' + | 'Network' +|========================================================================== + +You can finally combine multiple filters, using ampersand (*&*). + +For example, if you only want to select USB units from Eaton, use: + + http://www.networkupstools.org/stable-hcl.html?manufacturer=Eaton&connection=USB + + + +================================================================================ + +//////////////////////////////////////////////////////////////////////////////// +FIXME: +- point and complete the "user manual -> support" section for success report +link:user-manual.html#Support_Request[Support instructions] in the user manual. +//////////////////////////////////////////////////////////////////////////////// diff --git a/docs/support.txt b/docs/support.txt new file mode 100644 index 0000000..abe2898 --- /dev/null +++ b/docs/support.txt @@ -0,0 +1,111 @@ +ifdef::website[] +Support instructions +==================== +endif::website[] + + +There are various ways to obtain support for NUT. + +Documentation +------------- + +- First, be sure to read the link:docs/FAQ.html[FAQ]. The most common problems are already +addressed there. + +ifdef::website[] +- Else, you can read the link:docs/user-manual.chunked/index.html[NUT User Manual]. +endif::website[] +ifndef::website[] +- Else, you can read the linkdoc:user-manual[NUT user manual]. +endif::website[] +It also covers many areas about installing, configuring and using NUT. +The specific steps on system integration are also discussed. + +- Finally, link:docs/man/index.html#User_man[User manual pages] will also +complete the User Manual provided information. At least, read the manual +page related to your driver(s). + +Mailing lists +------------- + +If you have still not found a solution, you should search the lists before +posting a question. + +Someone may have already solved the problem: + +ifdef::backend-xhtml11[] + +++++++++++++++++++++++++++++++++++++++ +
    + + + + + +
    +++++++++++++++++++++++++++++++++++++++ + +endif::backend-xhtml11[] + +ifndef::backend-xhtml11[] + +link:http://www.google.com/search?as_q=&as_oq=nut-upsuser+nut-upsdev&domains=lists.alioth.debian.org&sitesearch=lists.alioth.debian.org&btnG=Search+NUT+lists[search on the NUT lists using Google] + +endif::backend-xhtml11[] + +Finally, you can *subscribe* to a NUT mailing list to: + +Request help +~~~~~~~~~~~~ + +Use the link:http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser[NUT Users] +mailing list. + +In this case, be sure to include the following information: + +- OS name and version, +- exact NUT version, +- NUT installation method: from source tarball, package or subversion, +- exact device name and related information (manufacturing date, web pointers, ...), +- complete problem description, with any relevant trace, like system log excerpt, +and driver debug output. You can obtain this last using the following command, +as root and after having stopped NUT: + + /path/to/driver -DDDDD -a + +If you don't include the above information in your help request, we will not be +able to help you! + +Post a patch, ask a development question, ... +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use the link:http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev[NUT Developers] +mailing list. + +Refer to the +ifdef::website[] +link:docs/developer-guide.chunked/index.html[NUT Developer Guide] +for more information, and the chapter on how to +link:docs/developer-guide.chunked/ar01s03.html#_submitting_patches[submit patches]. +endif::website[] +ifndef::website[] +linkdoc:developer-guide[NUT Developer Guide] +for more information, and the chapter on how to +link:../developer-guide.chunked/ar01s03.html#_submitting_patches[submit patches]. +endif::website[] + + +Discuss packaging and related topics +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use the link:http://lists.alioth.debian.org/mailman/listinfo/nut-packaging[NUT Packagers] +mailing list. + +Refer to the +ifdef::website[] +link:docs/packager-guide.chunked/index.html[NUT Packager Guide] +endif::website[] +ifndef::website[] +linkdoc:packager-guide[NUT Packager Guide] +endif::website[] + for more information. diff --git a/docs/user-manual.txt b/docs/user-manual.txt new file mode 100644 index 0000000..4728454 --- /dev/null +++ b/docs/user-manual.txt @@ -0,0 +1,189 @@ +:titles.underlines: "__","==","--","~~","^^" + +Network UPS Tools User Manual +_____________________________ +:Author: Russell_Kroll,_Arnaud_Quette_and_Arjen_de_Korte +:Author Initials: RK, AQ & ADK + +Introduction +============ + +The primary goal of the Network UPS Tools (NUT) project is to provide support +for Power Devices, such as Uninterruptible Power Supplies, Power Distribution +Units and Solar Controllers. + +NUT provides many control and monitoring <>, with a uniform +control and management interface. + +More than 100 different manufacturers, and several thousands models are +<>. + +This software is the combined effort of many +<>. + +This document intend to describe how to install software support for your +<> (UPS, PDU, ...), and how to use the +NUT project. It is not intended to explain what are, nor distinguish the +different technologies that exist. For such information, have a look at the +<>. + +If you wish to discover how everything came together, have a look at the +<>. + + +[[Overview]] + +include::../README[] + + +[[Features]] + +include::features.txt[] + + +Compatibility information +------------------------- + +Hardware +~~~~~~~~ + +The current list of hardware supported by NUT can be viewed <>. + +Operating systems +~~~~~~~~~~~~~~~~~ + +This software has been reported to run on: + +- Linux distributions, +- the BSDs, +- Apple's OS X, +- Sun Solaris, +- SGI IRIX, +- HP/UX, +- Tru64 Unix, +- AIX. + +There is also a port of the client-side monitoring to Windows called WinNUT. +Windows users may be able to build it directly with Cygwin. + +Your system will probably run it too. You just need a good C compiler and +possibly some more packages to gain access to the serial ports. +Other features, such as USB / SNMP / whatever, will also need extra software +installed. + +Success reports are welcomed to keep this list accurate. + + +[[Download_instructions]] + +include::download.txt[] + + +[[_installation_instructions]] + +include::../INSTALL[] + + +[[Configuration_notes]] + +include::config-notes.txt[] + + +[[Advanced_usage_scheduling_notes]] + +include::scheduling.txt[] + + +[[Outlets_PDU_notes]] + +include::outlets.txt[] + + +[[NUT_Security]] + +include::security.txt[] + + +Appendix A: Glossary +==================== + +This section document the various acronyms used throughout the present +documentation. + +[template="glossary",id="terms"] +NUT:: + Network UPS Tools. +PDU:: + Power Distribution Unit. +SCD:: + Solar Controller Device. +UPS:: + Uninterruptible Power Supply. + + +[[Acknowledgements]] +Appendix B: Acknowledgements / Contributions +============================================ + +include::acknowledgements.txt[Acknowledgements / Contributions] + + +[[nut-names]] +Appendix C: NUT command and variable naming scheme +================================================== + +include::nut-names.txt[] + + +[[HCL]] +Appendix D: Hardware Compatibility List +======================================= + +ifdef::website[] +include::stable-hcl.txt[] +endif::website[] + +ifndef::website[] +Refer to the link:http://www.networkupstools.org/stable-hcl.html[online HCL]. +endif::website[] + + +Appendix E: Documentation +========================= + +include::documentation.txt[] + + +[[Support_Request]] +Appendix F: Support instructions +================================ + +include::support.txt[] + + +[[Cables_information]] +Appendix G: Cables information +============================== + +include::cables.txt[] + + +[[Configure_options]] +Appendix H: Configure options +============================= + +include::configure.txt[] + + +[[Upgrading_notes]] +Appendix I: Upgrading notes +=========================== + +include::../UPGRADING[] + + +[[Project_History]] +Appendix J: Project history +=========================== + +include::history.txt[] diff --git a/docs/website/Makefile.am b/docs/website/Makefile.am new file mode 100644 index 0000000..5be8085 --- /dev/null +++ b/docs/website/Makefile.am @@ -0,0 +1,126 @@ +# FIXME: do we really have to distribute these many Kb too? +# RCS should be enough, and website generation should use +# source from subversion tags! +EXTRA_DIST = news.txt projects.txt website.txt \ + ups-protocols.txt $(LAYOUT).conf $(SCRIPT_FILES) $(LAYOUT_FILES) \ + $(FAVICON_FILES) + +IMAGE_FILES = images/asciidoc.png \ + images/eaton-logo.png \ + images/blue-arrow.png \ + images/simple.png \ + images/advanced.png \ + images/bigbox.png \ + images/bizarre.png \ + images/note.png \ + images/warning.png + +FAVICON_FILES = faviconut.ico faviconut.png + +LAYOUT_FILES = css/ie-overrides.css \ + css/web-layout.css \ + css/xhtml11-quirks.css \ + css/xhtml11.css + +SCRIPT_FILES = scripts/filter_png.js \ + scripts/jquery.js \ + scripts/nut_jquery.js \ + scripts/toc.js + +WEBSITE_FILES = index.html projects.html stable-hcl.html \ + documentation.html acknowledgements.html features.html \ + ups-protocols.html \ + cables.html nut-qa.html download.html support.html + +WEBSITE_DEPS = ../user-manual.chunked ../packager-guide.chunked \ + ../FAQ.html ../developer-guide.chunked \ + ../user-manual.pdf \ + ../developer-guide.pdf \ + ../packager-guide.pdf \ + ../FAQ.pdf ../man/man-index.html + +# CSS based simulated frames layout. +LAYOUT = web-layout + +# Add --unsafe to allow includes on older versions of asciidoc ( < 8.5.3 ): +ASCIIDOC_PARAMS = --unsafe --backend=xhtml11 \ + --conf-file=$(srcdir)/$(LAYOUT).conf \ + --attribute icons \ + --attribute iconsdir=$(srcdir)/images \ + --attribute scriptsdir=$(srcdir)/scripts \ + --attribute=badges \ + --attribute=website \ + --attribute=revision=$(PACKAGE_VERSION) \ + --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ + --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + --attribute=date="`TZ=UTC date`" + +all: + +OUTDIR = output +$(WEBSITE_FILES): $(LAYOUT).conf + +images/: + $(MKDIR_P) images + +$(IMAGE_FILES): images/ + cp -f ../$@ images/ + + +if HAVE_ASCIIDOC +website: $(WEBSITE_FILES) $(WEBSITE_DEPS) $(IMAGE_FILES) $(SCRIPT_FILES) \ + $(LAYOUT_FILES) scripts/ups_data.js ../stable-hcl.txt ../ups-html.txt \ + $(OUTDIR) $(FAVICON_FILES) + +else !HAVE_ASCIIDOC +website: + @echo "Not building website since 'asciidoc' was not found." +endif !HAVE_ASCIIDOC + +.PHONY: website $(OUTDIR) + +$(OUTDIR): + $(RM) -r $(OUTDIR) + $(MKDIR_P) $(OUTDIR)/docs/man + cp -fR $(WEBSITE_FILES) css images scripts $(OUTDIR) + cp -fR $(WEBSITE_DEPS) $(OUTDIR)/docs/ + cp -f ../man/man-index.html $(OUTDIR)/docs/man/ + cp -f ../man/*.html $(OUTDIR)/docs/man/ + +clean-local: + rm -rf $(WEBSITE_FILES) $(OUTDIR) images/ + +SUFFIXES = .txt .html + +index.html: website.txt news.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a index-only $< + +acknowledgements.html: ../acknowledgements.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +features.html: ../features.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +cables.html: ../cables.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a toc $< + +download.html: ../download.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a toc $< + +documentation.html: ../documentation.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +projects.html: projects.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a toc $< + +support.html: ../support.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +nut-qa.html: ../nut-qa.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +stable-hcl.html: ../stable-hcl.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a hcl $< + +.txt.html: + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< diff --git a/docs/website/Makefile.in b/docs/website/Makefile.in new file mode 100644 index 0000000..ad40ad9 --- /dev/null +++ b/docs/website/Makefile.in @@ -0,0 +1,538 @@ +# Makefile.in generated by automake 1.11.1 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@ +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 = docs/website +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(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_asciidoc.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_config_libhal.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 = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +ASCIIDOC = @ASCIIDOC@ +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@ +DBLATEX = @DBLATEX@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ +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@ +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_LIBS = @LIBHAL_LIBS@ +LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ +LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ +LIBS = @LIBS@ +LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ +LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ +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@ + +# FIXME: do we really have to distribute these many Kb too? +# RCS should be enough, and website generation should use +# source from subversion tags! +EXTRA_DIST = news.txt projects.txt website.txt \ + ups-protocols.txt $(LAYOUT).conf $(SCRIPT_FILES) $(LAYOUT_FILES) \ + $(FAVICON_FILES) + +IMAGE_FILES = images/asciidoc.png \ + images/eaton-logo.png \ + images/blue-arrow.png \ + images/simple.png \ + images/advanced.png \ + images/bigbox.png \ + images/bizarre.png \ + images/note.png \ + images/warning.png + +FAVICON_FILES = faviconut.ico faviconut.png +LAYOUT_FILES = css/ie-overrides.css \ + css/web-layout.css \ + css/xhtml11-quirks.css \ + css/xhtml11.css + +SCRIPT_FILES = scripts/filter_png.js \ + scripts/jquery.js \ + scripts/nut_jquery.js \ + scripts/toc.js + +WEBSITE_FILES = index.html projects.html stable-hcl.html \ + documentation.html acknowledgements.html features.html \ + ups-protocols.html \ + cables.html nut-qa.html download.html support.html + +WEBSITE_DEPS = ../user-manual.chunked ../packager-guide.chunked \ + ../FAQ.html ../developer-guide.chunked \ + ../user-manual.pdf \ + ../developer-guide.pdf \ + ../packager-guide.pdf \ + ../FAQ.pdf ../man/man-index.html + + +# CSS based simulated frames layout. +LAYOUT = web-layout + +# Add --unsafe to allow includes on older versions of asciidoc ( < 8.5.3 ): +ASCIIDOC_PARAMS = --unsafe --backend=xhtml11 \ + --conf-file=$(srcdir)/$(LAYOUT).conf \ + --attribute icons \ + --attribute iconsdir=$(srcdir)/images \ + --attribute scriptsdir=$(srcdir)/scripts \ + --attribute=badges \ + --attribute=website \ + --attribute=revision=$(PACKAGE_VERSION) \ + --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ + --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + --attribute=date="`TZ=UTC date`" + +OUTDIR = output +SUFFIXES = .txt .html +all: all-am + +.SUFFIXES: +.SUFFIXES: .txt .html +$(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 docs/website/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/website/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): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +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: + $(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 clean-local 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-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: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + 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-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 + + +all: +$(WEBSITE_FILES): $(LAYOUT).conf + +images/: + $(MKDIR_P) images + +$(IMAGE_FILES): images/ + cp -f ../$@ images/ + +@HAVE_ASCIIDOC_TRUE@website: $(WEBSITE_FILES) $(WEBSITE_DEPS) $(IMAGE_FILES) $(SCRIPT_FILES) \ +@HAVE_ASCIIDOC_TRUE@ $(LAYOUT_FILES) scripts/ups_data.js ../stable-hcl.txt ../ups-html.txt \ +@HAVE_ASCIIDOC_TRUE@ $(OUTDIR) $(FAVICON_FILES) + +@HAVE_ASCIIDOC_FALSE@website: +@HAVE_ASCIIDOC_FALSE@ @echo "Not building website since 'asciidoc' was not found." + +.PHONY: website $(OUTDIR) + +$(OUTDIR): + $(RM) -r $(OUTDIR) + $(MKDIR_P) $(OUTDIR)/docs/man + cp -fR $(WEBSITE_FILES) css images scripts $(OUTDIR) + cp -fR $(WEBSITE_DEPS) $(OUTDIR)/docs/ + cp -f ../man/man-index.html $(OUTDIR)/docs/man/ + cp -f ../man/*.html $(OUTDIR)/docs/man/ + +clean-local: + rm -rf $(WEBSITE_FILES) $(OUTDIR) images/ + +index.html: website.txt news.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a index-only $< + +acknowledgements.html: ../acknowledgements.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +features.html: ../features.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +cables.html: ../cables.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a toc $< + +download.html: ../download.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a toc $< + +documentation.html: ../documentation.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +projects.html: projects.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a toc $< + +support.html: ../support.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +nut-qa.html: ../nut-qa.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +stable-hcl.html: ../stable-hcl.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a hcl $< + +.txt.html: + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +# 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: diff --git a/docs/website/css/ie-overrides.css b/docs/website/css/ie-overrides.css new file mode 100644 index 0000000..f21c9c5 --- /dev/null +++ b/docs/website/css/ie-overrides.css @@ -0,0 +1,7 @@ +#layout-content-box { + margin-left: 207px; +} + +#support-level-legend { width: 400px; } +#support-level-legend ul { margin: 0; } +.support-level-descr { float: none; } \ No newline at end of file diff --git a/docs/website/css/web-layout.css b/docs/website/css/web-layout.css new file mode 100644 index 0000000..9ebd1db --- /dev/null +++ b/docs/website/css/web-layout.css @@ -0,0 +1,136 @@ +body { + margin: 0; + font-size: 0.9em; + background-color: #f4f4f4; +} + +#layout-banner-box { + width: 100%; + height: 110px; + z-index: 2; + background-color: #0067cd; +} + +#layout-menu-box { + float: left; + height: 100%; + z-index: 1; +} + +#layout-content-box { + border-left: 3px solid #eeeeee; + background-color: white; + overflow-y: auto; +} + +h1 { + margin-top: 0.5em; +} + +#layout-banner { + color: white; + font-family: sans-serif; + text-align: left; + padding: 0.8em 20px; +} + +#layout-title { + font-family: monospace; + font-size: 3.5em; + font-weight: bold; + letter-spacing: 0.2em; + margin: 0; +} + +#layout-description { + font-size: 1.2em; + letter-spacing: 0.1em; +} + +#sponsor { + clear: both; + font-size: small; + margin-top: 50px; + margin-bottom: 10px; + color:#0067CD; + font-weight:bold; +} + +#sponsor span { margin-left: 10px; } +#sponsor img { border: 0; } + +#layout-menu { + padding-top: 0.8em; + padding-left: 20px; + margin-left: 0; + font-size: 1.0em; + font-family: sans-serif; + font-weight: bold; + list-style: none; + list-style-image: url(../images/blue-arrow.png) +} +#layout-menu li { margin-left: 10px; } +#layout-menu a { + line-height: 2em; + margin-left: 0.5em; +} +#layout-menu a:link, #layout-menu a:visited, #layout-menu a:hover { + color: #0067cd; + text-decoration: none; +} +#layout-menu a:hover { + color: navy; + text-decoration: none; +} +#layout-menu #page-source { + border-top: 2px solid silver; + margin-top: 0.2em; +} + +#layout-content { + padding-top: 0.2em; + padding-left: 1.0em; + padding-right: 0.4em; +} + +@media print { + #layout-banner-box { display: none; } + #layout-menu-box { display: none; } + #layout-content-box { margin-top: 0; margin-left: 0; } +} + + +#ups_list +{ + margin: 20px 0 0 0; width: 100%; + border-collapse: collapse; +} +#ups_list td { border: 1px solid silver; } +#ups_list thead { font-weight: bold; background: #bbb; } +#ups_list .odd { background: #eee; } +#ups_list .even { background: #ddd; } +.filter { min-width: 100px; } + +td#manufacturer-col { width: 20%; } +td#model-col { width: 50%; } +td#driver-col { width: 30%; } + +.blue { background-color: #cfd9fe; } +.green { background-color: #b1fea7; } +.yellow { background-color: #fdf88e; } +.orange { background-color: #fccb81; } +.red { background-color: #ffa4a4; } + +.hidden { display: none; } + +#filters-set, #filters-set fieldset { display: none; border: 1px solid silver; padding: 10px; } +#filters-set legend { font-weight: bold; } +#filters-set td { border: 0; } +#filters-set fieldset { display: block; } +#filters-set select { max-width: 200px } + +#support-level-legend { width: 31.25em; float: right; margin-right: 10px; padding: 10px; } +#support-level-legend dt { margin: 0; padding: 0; width: 15%; float: left; } +#support-level-legend dd { margin: 0; padding: 0; width: 85%; float: left; } + +/*.support-level-descr { margin-left: 20px; float: right; }*/ diff --git a/docs/website/css/xhtml11-quirks.css b/docs/website/css/xhtml11-quirks.css new file mode 100644 index 0000000..16e4015 --- /dev/null +++ b/docs/website/css/xhtml11-quirks.css @@ -0,0 +1,41 @@ +/* Workarounds for IE6's broken and incomplete CSS2. */ + +div.sidebar-content { + background: #ffffee; + border: 1px solid silver; + padding: 0.5em; +} +div.sidebar-title, div.image-title { + color: #527bbd; + font-family: sans-serif; + font-weight: bold; + margin-top: 0.0em; + margin-bottom: 0.5em; +} + +div.listingblock div.content { + border: 1px solid silver; + background: #f4f4f4; + padding: 0.5em; +} + +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock-content { + white-space: pre; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; +} + +div.exampleblock-content { + border-left: 2px solid silver; + padding-left: 0.5em; +} + +/* IE6 sets dynamically generated links as visited. */ +div#toc a:visited { color: blue; } diff --git a/docs/website/css/xhtml11.css b/docs/website/css/xhtml11.css new file mode 100644 index 0000000..1e6bf5a --- /dev/null +++ b/docs/website/css/xhtml11.css @@ -0,0 +1,333 @@ +/* Debug borders */ +p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { +/* + border: 1px solid red; +*/ +} + +body { + margin: 1em 5% 1em 5%; +} + +a { + color: blue; + text-decoration: underline; +} +a:visited { + color: fuchsia; +} + +em { + font-style: italic; + color: navy; +} + +strong { + font-weight: bold; + color: #083194; +} + +tt { + color: navy; +} + +h1, h2, h3, h4, h5, h6 { + color: #527bbd; + font-family: sans-serif; + margin-top: 1.2em; + margin-bottom: 0.5em; + line-height: 1.3; +} + +h1, h2, h3 { + border-bottom: 2px solid silver; +} +h2 { + padding-top: 0.5em; +} +h3 { + float: left; +} +h3 + * { + clear: left; +} + +div.sectionbody { + font-family: serif; + margin-left: 0; +} + +hr { + border: 1px solid silver; +} + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +ul, ol, li > p { + margin-top: 0; +} + +pre { + padding: 0; + margin: 0; +} + +span#author { + color: #527bbd; + font-family: sans-serif; + font-weight: bold; + font-size: 1.1em; +} +span#email { +} +span#revnumber, span#revdate, span#revremark { + font-family: sans-serif; +} + +div#footer { + font-family: sans-serif; + font-size: small; + border-top: 2px solid silver; + padding-top: 0.5em; + margin-top: 4.0em; +} +div#footer-text { + float: left; + padding-bottom: 0.5em; +} +div#footer-badges { + float: right; + padding-bottom: 0.5em; +} + +div#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} +div.tableblock, div.imageblock, div.exampleblock, div.verseblock, +div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, +div.admonitionblock { + margin-top: 1.5em; + margin-bottom: 1.5em; +} +div.admonitionblock { + margin-top: 2.5em; + margin-bottom: 2.5em; +} + +div.content { /* Block element content. */ + padding: 0; +} + +/* Block element titles. */ +div.title, caption.title { + color: #527bbd; + font-family: sans-serif; + font-weight: bold; + text-align: left; + margin-top: 1.0em; + margin-bottom: 0.5em; +} +div.title + * { + margin-top: 0; +} + +td div.title:first-child { + margin-top: 0.0em; +} +div.content div.title:first-child { + margin-top: 0.0em; +} +div.content + div.title { + margin-top: 0.0em; +} + +div.sidebarblock > div.content { + background: #ffffee; + border: 1px solid silver; + padding: 0.5em; +} + +div.listingblock > div.content { + border: 1px solid silver; + background: #f4f4f4; + padding: 0.5em; +} + +div.quoteblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.quoteblock > div.attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > div.content { + white-space: pre; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ +div.verseblock + div.attribution { + text-align: left; +} + +div.admonitionblock .icon { + vertical-align: top; + font-size: 1.1em; + font-weight: bold; + text-decoration: underline; + color: #527bbd; + padding-right: 0.5em; +} +div.admonitionblock td.content { + padding-left: 0.5em; + border-left: 2px solid silver; +} + +div.exampleblock > div.content { + border-left: 2px solid silver; + padding: 0.5em; +} + +div.imageblock div.content { padding-left: 0; } +span.image img { border-style: none; } +a.image:visited { color: white; } + +dl { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +dt { + margin-top: 0.5em; + margin-bottom: 0; + font-style: normal; + color: navy; +} +dd > *:first-child { + margin-top: 0.1em; +} + +ul, ol { + list-style-position: outside; +} +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { + list-style-type: lower-alpha; +} +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} + +div.tableblock > table { + border: 3px solid #527bbd; +} +thead { + font-family: sans-serif; + font-weight: bold; +} +tfoot { + font-weight: bold; +} +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} + + +div.hdlist { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +div.hdlist tr { + padding-bottom: 15px; +} +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { + vertical-align: top; + font-style: normal; + padding-right: 0.8em; + color: navy; +} +td.hdlist2 { + vertical-align: top; +} +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} + +@media print { + div#footer-badges { display: none; } +} + +div#toctitle { + color: #527bbd; + font-family: sans-serif; + font-size: 1.1em; + font-weight: bold; + margin-top: 1.0em; + margin-bottom: 0.1em; +} + +div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { + margin-top: 0; + margin-bottom: 0; +} +div.toclevel2 { + margin-left: 2em; + font-size: 0.9em; +} +div.toclevel3 { + margin-left: 4em; + font-size: 0.9em; +} +div.toclevel4 { + margin-left: 6em; + font-size: 0.9em; +} diff --git a/docs/website/faviconut.ico b/docs/website/faviconut.ico new file mode 100644 index 0000000000000000000000000000000000000000..26cf6cb015fa73307a39ae107c2fc622d8e444af GIT binary patch literal 1150 zcmZ{iYe-XJ7{^~JiXv0!f>dS^rlyHv&P{Wrq|OWFQk1#Wvb33(&9*aST1skOBPA`g z&`i=?p-CZ5ZJ1_dHl>SQ$PX4+5M~$p;0N>Hdya06rSIW?9^UtPe*for4~Gyd`q>NkI{KBJm*2uQ&Qw@@x;`QQ0K(^f}Z+ z2B;rD1EYTkM%Tl6C|b4HAA96Gty{}_7?;t{SCaHd^!~&alV4|88M)nR5Iin5myg z)DIxz!vyCOqCNwKzMs2?@_r|>w6`I@-Uw$;L7q7un9ls>#TrV+wXKV^6a@`w_#mVQ-MMTIe6Jg7V8OdCbjP<>ux&D)X;S*WZ1Ks+JLx)WzCAvW%Px zTC;|&v;2S9JtvyW&em)=DAjycmv!Q7N#n1AlA88zoz9DLtBmZD{DKdi&xU?uF^ya= nlfSVKjqG9rt62v^W^4%gv67Gpdb9sT&)FPXGrNzFxdrYoQgJs0 literal 0 HcmV?d00001 diff --git a/docs/website/faviconut.png b/docs/website/faviconut.png new file mode 100644 index 0000000000000000000000000000000000000000..d4746ad3d58042bd5f0014d99a331a6fad0d8fd1 GIT binary patch literal 814 zcmV+}1JV46P) zK~y-)ebY~96lWO6@$WmE&CF)A`KK{iX%g*jHFhP5Rt;zl#gIS|YEBkWaw@cto6!bI#JFZ>cQZSa-I;fKX|^V6UwBXN^L*g< z@IC^-^E}p`_Hej9;P>sf%IheMq^2kOx;w*fq*hqMe>1wH z_gw$Lz%*d{1l|V$*F&5=bu#)%mG!WR{d^iQeFE=2VED+< z(5@DBu5V|oQIX3yX0`%YxkWOI1+I>#ucU3|SYqaHH#I-+R=t}^%{&|H-m$0AF;Xb5 zjbi@?2-_xzgW{MYOSxh-@GEdvSt;oLv}4b{j)p$RNaJK*;xk`UqbyOQEP<2bVPb(o zsYKo8W}=anVPFA3`FG+Qqs^h?O*KBAq!y@>HUWPLPdL;CB~yBi*XtWdWlg$vZz8g- zRSo!kvH}2|wkG<`Wrw*&n9UTqlQ6g(&!G7|lAfOfU&r_}FKJpABob|lmNUn%*4A9n3~I;|LakPVo?x{wxFs3%px2* z+>NGHDkoVKd#N(Tg*!G1;`h`vY=D~%l0UhJ){IF;lbUf zQ%PNquZjS0*m7Y~VQrC;^;qd1< zqjYuOmy!OhovpZ1P%cX*Cw1cYp52d+Cl4ldJzx1?|Feyu+K@Wf)D-;Aksj$(b||Uq s#kJeW3h=Sp)AQMZuI-W7hu#4G0eF~S)4}{QiU0rr07*qoM6N<$f?yqpLI3~& literal 0 HcmV?d00001 diff --git a/docs/website/news.txt b/docs/website/news.txt new file mode 100644 index 0000000..95da757 --- /dev/null +++ b/docs/website/news.txt @@ -0,0 +1,9 @@ +- January 14, 2011: 2.6.0 released +- December 24, 2010: 2.6.0-pre1 released +- December 16, 2010: link:http://www.lestat.st/en/informatique/projets/nut-monitor[NUT-Monitor] 1.3 released +- July 22, 2010: new client link:http://www.revpol.com/xymon_nut_scripts[Hobbit (Xymon) monitor plugin] +- July 2, 2010: link:http://knut.prynych.cz[KNutClient] 1.0.3 and link update +- May 12, 2010: link:http://www.lestat.st/informatique/projets/nut-monitor-en[NUT-Monitor] 1.2 released +- March 22, 2010: link:http://knut.prynych.cz[KNutClient] 1.0 +- February 23, 2010: 2.4.3 released +- February 19, 2010: 2.4.2 released diff --git a/docs/website/projects.txt b/docs/website/projects.txt new file mode 100644 index 0000000..afba115 --- /dev/null +++ b/docs/website/projects.txt @@ -0,0 +1,187 @@ +Related projects +================ + +There are many programs and devices that integrate NUT support. + +This page tries to track them. + +Graphical desktop clients +------------------------- + +link:http://sourceforge.net/projects/gknut/[GKrellM NUT] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Simple UPS monitoring plugin for GKrellM. Uses NUT (Network UPS Tools) for UPS connection. + +link:http://knut.prynych.cz[KNutClient] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +KNutClient is a visual client for NUT. + +link:http://www.lestat.st/en/informatique/projets/nut-monitor[NUT-Monitor] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +NUT-Monitor is a graphical application to monitor and manage UPSes connected to +a NUT server. This application is written in Python and PyGTK, and uses the <> class. + +NOTE: NUT-Monitor is part of NUT since version NUT 2.4.1. +It will further evolve toward the NUT Control Center. + +link:http://download.mgeops.com/explore/eng/ptp/ptp_sol.htm?sol=PSP[Eaton - Personal Solution Pac] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +NUT configuration and monitoring software for Eaton (previously MGE Office Protection Systems) units. + +link:http://www.amautacorp.com/staff/Rudd-O/ups-monitor/[UPS Monitor] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Multi-threaded python/GTK2 graphical monitoring application. + +link:http://sourceforge.net/projects/winnutclient[Windows NUT client] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Windows NUT client is a partial port of KNutClient to Windows using +link:http://www.autoitscript.com[AUTOIT] scripting language. + +link:http://csociety.ecn.purdue.edu/~delpha/winnut/[WinNUT] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +WinNUT is a partial port of the client side of Network UPS Tools (NUT) to Windows. + +link:http://wmnut.mgeops.org/[WMNUT] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +WMNut is a program to monitor multiple UPSs statistics through the NUT (Network +UPS Tools) framework on Linux and other systems. + +Network Management Systems (NMS) integration +-------------------------------------------- + +link:http://bigsister.graeff.com/[Big Sister system and network monitor] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The "nut" module monitors uninterruptible power supplies under control of the +NUT (Network UPS Tools) free software suite. +It sends alerts on power outages, overload and battery problems. The longterm +graphing may point you to battery aging problems. + +link:http://cacti.net[Cacti monitoring tool] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are three different scripts that add NUT support to Cacti: + +- link:http://forums.cacti.net/about19250.html[PHP script] +- link:http://forums.cacti.net/about14475.html[Ruby script] +- link:http://forums.cacti.net/about9729.html[shell script] + +link:http://collectd.org[collectd] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The `collectd` system statistics collection daemon features a +link:http://collectd.org/wiki/index.php/Plugin:NUT[NUT plugin] to +collect statistics from UPSes. + +link:http://xymon.sourceforge.net/[Xymon (Hobbit) monitor] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A link:http://www.revpol.com/xymon_nut_scripts[NUT plugin] is available. + +link:http://monami.sourceforge.net[MonAMI NUT plugin] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A plugin to return UPS status to the MonAMI universal sensor framework. + +link:http://munin.projects.linpro.no[Munin NUT plugin] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A link:http://muninexchange.projects.linpro.no/?search&cid=0&pid=136&phid=279[NUT plugin] is available. + +link:http://www.nagios.org/[Nagios plugin] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The link:http://sourceforge.net/projects/nagiosplug/[check_ups] plugin returns +UPS status to the Nagios monitoring system using NUT. + +Configuration GUIs +------------------ + +link:http://www.knut.noveradsl.cz/knutsetting/index.html[KNutSetting] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +KNutSetting is a visual KDE tool for configuring NUT - Network UPS Tools. + +Other software projects +----------------------- + +link:http://www.the-mcdonalds.org/Nut-Graph/[Nut-Graph] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +PHP4 / GD / MySQL / jpgraph package to visualize logged UPS status data. + +[[PyNUT]] +link:http://www.lestat.st/informatique/projets/pynut-en[PyNUT] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +PyNUT is an abstraction class written in Python to access NUT (Network UPS +Tools) server and execute commands without needing to know the communication protocol. + +link:http://bugs.debian.org/343530[RRDtool logging support] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This patch adds link:http://oss.oetiker.ch/rrdtool[RRDtool] logging support to NUT. + +link:http://home.tele2.fr/elrik/[ups_control] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A developing Python wrapper to upsc which can generate mails and shutdown the machine. + +link:http://search.cpan.org/search?dist=ups-nut[UPS::Nut] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A Perl module to talk to an UPS via NUT (Network UPS Tools) upsd. + + +Hardware projects involving NUT +------------------------------- + +link:http://www.opengear.com/UPS.html[OpenGear] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Opengear provides an advanced NUT integration into many models. +There is also a link:http://www.opengear.com/Videos/Network-UPS-Tools/Network-UPS-Tools.html[video presentation] of the NUT integration. + +For more information on Opengear's contributions to NUT, have a look at the +link:acknowledgements.html[acknowledgements information]. + +Synology +~~~~~~~~ + +link:http://www.synology.com[Synology] has worked closely with Arnaud to integrate +link:http://www.synology.com/enu/products/features/power.php[UPS support] on all +its devices. + +Alcatel Lucent IPBX +~~~~~~~~~~~~~~~~~~~ + +Alcatel has been working for years with us (Patrick Agrain and Arnaud) to improve +NUT integration into some of their IPBX. + +link:http://www.readynas.com/?page_id=92[Netgear ReadyNAS] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The RAIDiator firmware for the ReadyNAS product line includes NUT to either +monitor a local USB UPS, or to connect as a slave to a NUT server. + +link:http://www.webbastards.com/projects/[lcd-nut] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A Project to display the status of a UPS on computer through one of the many +cheap LCD matrix displays available on the market. + +Notes +------- + +- Client authors: send updates on your releases to the NUT users mailing list. +We will also put a link to you in the news section of the top page when things change. + +- If you know of a project which should be listed, please send in the URL. diff --git a/docs/website/scripts/filter_png.js b/docs/website/scripts/filter_png.js new file mode 100644 index 0000000..eb54390 --- /dev/null +++ b/docs/website/scripts/filter_png.js @@ -0,0 +1,14 @@ +$(function() +{ + var imgs = $("img"); + for(var i = 0; i < imgs.length; i++) + { + var img = $(imgs[i]); + if(img.attr("src").match(/\.png$/i)) + { + img.replaceWith( + "
    " + ); + } + } +}); \ No newline at end of file diff --git a/docs/website/scripts/jquery.js b/docs/website/scripts/jquery.js new file mode 100644 index 0000000..b1ae21d --- /dev/null +++ b/docs/website/scripts/jquery.js @@ -0,0 +1,19 @@ +/* + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
    "]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
    ","
    "]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); +/* + * Sizzle CSS Selector Engine - v0.9.3 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

    ";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
    ";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
    ").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
    ';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); \ No newline at end of file diff --git a/docs/website/scripts/nut_jquery.js b/docs/website/scripts/nut_jquery.js new file mode 100644 index 0000000..fb4a66d --- /dev/null +++ b/docs/website/scripts/nut_jquery.js @@ -0,0 +1,422 @@ +var NUT = +{ + // UPS table DOM ids + listID: "#ups_list", + listBodyID: "#ups_list_body", + + // Field names + fields: + [ + "manufacturer", + "device-type", + "support-level", + "model", + "comment", + "driver" + ], + + // Actual HTML table columns + columns: + [ + ["manufacturer"], + ["model","comment"], + ["driver"], + ["support-level"], + ], + + // driver => connection type mappings + driverMap: function(driver) + { + if(driver.match(/bcmxcp_usb|blazer_usb|richcomm_usb|tripplite_usb|usbhid-ups/)) + return "USB"; + + if(driver.match(/snmp-ups|netxml-ups/)) + return "Network"; + + return "Serial"; + }, + + // Support level => CSS class mappings + supportLevelClasses: + { + 0: "", + 1: "red", + 2: "orange", + 3: "yellow", + 4: "blue", + 5: "green" + }, + + tableCache: false, + + // Parse GET parameters from window url and return them as a hash + // The call format is: + // stable-hcl.html?= + // Refer to docs/website/stable-hcl.txt for examples + parseGetParameters: function() + { + var url = window.location.href; + url = url.replace(/#$/, ""); + var fieldPos = url.indexOf("?"); + var get = {}; + if(fieldPos > -1) + { + var fileName = url.substring(0, fieldPos); + var getList = url.substring(fieldPos + 1).split("&"); + for(var i = 0; i