├── .circleci └── config.yml ├── .editorconfig ├── .gitattributes ├── .github ├── FUNDING.yml ├── codeql │ └── codeql-config.yml ├── pull_request_template.md └── workflows │ ├── PyNUTClient.yml │ └── codeql.yml ├── .gitignore ├── .lgtm.yml ├── .travis.yml ├── AUTHORS ├── COPYING ├── INSTALL.nut.adoc ├── Jenkinsfile-dynamatrix ├── LICENSE-DCO ├── LICENSE-GPL2 ├── LICENSE-GPL3 ├── MAINTAINERS ├── Makefile.am ├── NEWS.adoc ├── README.adoc ├── TODO.adoc ├── UPGRADING.adoc ├── appveyor.yml ├── autogen.sh ├── builds └── nut-driver-enumerator-test │ └── ci_build.sh ├── ci_build.adoc ├── ci_build.sh ├── clients ├── .gitignore ├── Makefile.am ├── cgilib.c ├── cgilib.h ├── message.c ├── nutclient.cpp ├── nutclient.h ├── nutclientmem.cpp ├── nutclientmem.h ├── status.h ├── upsc.c ├── upsclient.c ├── upsclient.h ├── upscmd.c ├── upsimage.c ├── upsimagearg.h ├── upslog.c ├── upslog.h ├── upsmon.c ├── upsmon.h ├── upsrw.c ├── upssched-cmd ├── upssched.c ├── upssched.h ├── upsset.c ├── upsstats.c └── upsstats.h ├── common ├── Makefile.am ├── atexit.c ├── common-nut_version.c ├── common.c ├── nutconf.cpp ├── nutipc.cpp ├── nutstream.cpp ├── nutwriter.cpp ├── parseconf.c ├── setenv.c ├── snprintf.c ├── state.c ├── str.c ├── strerror.c ├── strnlen.c ├── strptime.c ├── strsep.c ├── timegm_fallback.c ├── unsetenv.c ├── upsconf.c └── wincompat.c ├── compile ├── conf ├── .gitignore ├── Makefile.am ├── hosts.conf.sample ├── nut.conf.sample ├── ups.conf.sample ├── upsd.conf.sample ├── upsd.users.sample ├── upsmon.conf.sample.in ├── upssched.conf.sample.in ├── upsset.conf.sample ├── upsstats-single.html.sample └── upsstats.html.sample ├── configure.ac ├── data ├── .gitignore ├── Makefile.am ├── cmdvartab ├── driver.list.in ├── epdu-managed.dev ├── evolution500.seq └── html │ ├── .gitignore │ ├── Makefile.am │ ├── README.adoc │ ├── bottom.html │ ├── header.html.in │ ├── index.html │ └── nut-banner.png ├── docs ├── .editorconfig ├── .gitignore ├── ChangeLog.txt ├── FAQ.txt ├── Makefile.am ├── acknowledgements.txt ├── asciidoc-vars.conf ├── asciidoc.conf ├── asciidoc.txt ├── cables.txt ├── cables │ ├── Makefile.am │ ├── apc-rs500-serial.txt │ ├── apc.txt │ ├── ge-imv-victron.txt │ ├── imv.txt │ ├── mgeups.txt │ ├── powerware.txt │ ├── repotec.txt │ └── sms.txt ├── chunked.xsl ├── ci-farm-do-setup.adoc ├── ci-farm-lxc-setup.txt ├── common.xsl ├── config-notes.txt ├── config-prereqs.txt ├── configure.txt ├── contact-closure.txt ├── daisychain.txt ├── design.txt ├── developer-guide.txt ├── developers.txt ├── docinfo.xml.in ├── docinfo.xml.sh ├── documentation.txt ├── download.txt ├── features.txt ├── hid-subdrivers.txt ├── history.txt ├── images │ ├── advanced.png │ ├── asciidoc.png │ ├── bigbox.png │ ├── bizarre.png │ ├── blue-arrow.png │ ├── cables │ │ ├── 73-0724.png │ │ ├── 940-0024C.jpg │ │ ├── Lansafecable.jpg │ │ ├── SOLA-330.png │ │ ├── belkin-f6cx-rkm-xu-cable.jpg │ │ ├── mac-940-0024C.png │ │ ├── mge-66049.png │ │ ├── mge-db9-rj12.jpg │ │ ├── mge-db9-rj45.jpg │ │ └── mge-usb-rj45.jpg │ ├── ci │ │ ├── AppVeyor_logo-2x.png │ │ ├── AppVeyor_logo-ar21.png │ │ ├── CircleCI_vertical_black_logo.png │ │ ├── DO_Powered_by_Badge_blue.png │ │ ├── DO_Powered_by_Badge_blue_140pxW.png │ │ ├── GitHub-Mark-140pxW.png │ │ ├── GitHub-Mark-ea2971cee799.png │ │ ├── OC_logo-watercolor-256.png │ │ ├── OC_logo_merged_140x26.png │ │ ├── OC_logo_merged_171x32.png │ │ ├── OC_logotype.png │ │ ├── ci-root.css │ │ ├── fosshost_org_Host_Dark_56px.png │ │ ├── fosshost_org_Host_Light_309px.png │ │ ├── fosshost_org_Host_Light_38px.png │ │ ├── gandi-ar21.png │ │ ├── gandi-ar21.svg │ │ ├── jenkins-nut-large-256px.png │ │ ├── jenkins-nut-large-squared.png │ │ ├── jenkins-nut-large-with-plateborder.pdn │ │ ├── jenkins-nut-large.pdn │ │ ├── jenkins-nut-large.png │ │ ├── jenkins-nut-small-256px.png │ │ ├── jenkins-nut-small.pdn │ │ ├── jenkins-nut-small.png │ │ ├── jenkins-nut-squared.png │ │ ├── jenkins-nut-transparent-bg-140pxW.png │ │ ├── jenkins-nut-transparent-bg-40px.png │ │ ├── jenkins-nut-transparent-bg.png │ │ ├── jenkins-nut-vector.svg │ │ ├── jenkins-nut.css │ │ ├── jenkins-nut.png │ │ └── jenkins-nut.txt │ ├── hostedby.png │ ├── note.png │ ├── nut-banner.png │ ├── nut-logo.png │ ├── nut.svg │ ├── nut_layering.png │ ├── nut_layering.svg │ ├── old-cgi.png │ ├── simple.png │ └── warning.png ├── macros.txt ├── maintainer-guide.txt ├── man │ ├── .editorconfig │ ├── .gitignore │ ├── Makefile.am │ ├── NUT-Monitor.txt │ ├── adelsystem_cbi.txt │ ├── al175.txt │ ├── apc_modbus.txt │ ├── apcsmart-old.txt │ ├── apcsmart.txt │ ├── apcupsd-ups.txt │ ├── asciidoc.conf │ ├── asem.txt │ ├── bcmxcp.txt │ ├── bcmxcp_usb.txt │ ├── belkin.txt │ ├── belkinunv.txt │ ├── bestfcom.txt │ ├── bestfortress.txt │ ├── bestuferrups.txt │ ├── bestups.txt │ ├── bicker_ser.txt │ ├── blazer-common.txt │ ├── blazer_ser.txt │ ├── blazer_usb.txt │ ├── clone-outlet.txt │ ├── clone.txt │ ├── dummy-ups.txt │ ├── etapro.txt │ ├── everups.txt │ ├── failover.txt │ ├── gamatronic.txt │ ├── generic_gpio.txt │ ├── generic_modbus.txt │ ├── genericups.txt │ ├── hosts.conf.txt │ ├── huawei-ups2000.txt │ ├── hwmon_ina219.txt │ ├── index.txt │ ├── isbmex.txt │ ├── ivtscd.txt │ ├── libnutclient.txt │ ├── libnutclient_commands.txt │ ├── libnutclient_devices.txt │ ├── libnutclient_general.txt │ ├── libnutclient_misc.txt │ ├── libnutclient_tcp.txt │ ├── libnutclient_variables.txt │ ├── libupsclient-config.txt │ ├── liebert-esp2.txt │ ├── liebert-gxe.txt │ ├── liebert.txt │ ├── macosx-ups.txt │ ├── masterguard.txt │ ├── metasys.txt │ ├── mge-shut.txt │ ├── mge-utalk.txt │ ├── microdowell.txt │ ├── microsol-apc.txt │ ├── networked_hostnames.txt │ ├── netxml-ups.txt │ ├── nhs_ser.txt │ ├── nut-driver-enumerator.txt │ ├── nut-ipmipsu.txt │ ├── nut-recorder.txt │ ├── nut-scanner.txt │ ├── nut.conf.txt │ ├── nut.exe.txt │ ├── nut.txt │ ├── nut_usb_addvars.txt │ ├── nutconf.txt │ ├── nutdrv_atcl_usb.txt │ ├── nutdrv_hashx.txt │ ├── nutdrv_qx.txt │ ├── nutdrv_siemens_sitop.txt │ ├── nutscan.txt │ ├── nutscan_add_device_to_device.txt │ ├── nutscan_add_ip_range.txt │ ├── nutscan_add_option_to_device.txt │ ├── nutscan_cidr_to_ip.txt │ ├── nutscan_display_parsable.txt │ ├── nutscan_display_sanity_check.txt │ ├── nutscan_display_sanity_check_serial.txt │ ├── nutscan_display_ups_conf.txt │ ├── nutscan_display_ups_conf_with_sanity_check.txt │ ├── nutscan_free_device.txt │ ├── nutscan_free_ip_ranges.txt │ ├── nutscan_get_serial_ports_list.txt │ ├── nutscan_init.txt │ ├── nutscan_init_ip_ranges.txt │ ├── nutscan_ip_ranges_iter_inc.txt │ ├── nutscan_ip_ranges_iter_init.txt │ ├── nutscan_new_device.txt │ ├── nutscan_scan_avahi.txt │ ├── nutscan_scan_eaton_serial.txt │ ├── nutscan_scan_ipmi.txt │ ├── nutscan_scan_nut.txt │ ├── nutscan_scan_nut_simulation.txt │ ├── nutscan_scan_snmp.txt │ ├── nutscan_scan_usb.txt │ ├── nutscan_scan_xml_http_range.txt │ ├── nutscan_stringify_ip_ranges.txt │ ├── nutupsdrv.txt │ ├── oneac.txt │ ├── optiups.txt │ ├── phoenixcontact_modbus.txt │ ├── pijuice.txt │ ├── powercom.txt │ ├── powerman-pdu.txt │ ├── powerpanel.txt │ ├── powervar_cx_ser.txt │ ├── powervar_cx_usb.txt │ ├── rhino.txt │ ├── richcomm_usb.txt │ ├── riello_ser.txt │ ├── riello_usb.txt │ ├── safenet.txt │ ├── skel.txt │ ├── sms_ser.txt │ ├── snmp-ups.txt │ ├── sockdebug.txt │ ├── socomec_jbus.txt │ ├── solis.txt │ ├── tripplite.txt │ ├── tripplite_usb.txt │ ├── tripplitesu.txt │ ├── ups.conf.txt │ ├── upsc.txt │ ├── upscli_add_host_cert.txt │ ├── upscli_cleanup.txt │ ├── upscli_connect.txt │ ├── upscli_disconnect.txt │ ├── upscli_fd.txt │ ├── upscli_get.txt │ ├── upscli_get_default_connect_timeout.txt │ ├── upscli_init.txt │ ├── upscli_init_default_connect_timeout.txt │ ├── upscli_list_next.txt │ ├── upscli_list_start.txt │ ├── upscli_readline.txt │ ├── upscli_sendline.txt │ ├── upscli_set_default_connect_timeout.txt │ ├── upscli_splitaddr.txt │ ├── upscli_splitname.txt │ ├── upscli_ssl.txt │ ├── upscli_str_add_unique_token.txt │ ├── upscli_str_contains_token.txt │ ├── upscli_strerror.txt │ ├── upscli_upserror.txt │ ├── upsclient.txt │ ├── upscmd.txt │ ├── upscode2.txt │ ├── upsd.conf.txt │ ├── upsd.txt │ ├── upsd.users.txt │ ├── upsdrvctl.txt │ ├── upsdrvsvcctl.txt │ ├── upsimage.cgi.txt │ ├── upslog.txt │ ├── upsmon.conf.txt │ ├── upsmon.txt │ ├── upsrw.txt │ ├── upssched.conf.txt │ ├── upssched.txt │ ├── upsset.cgi.txt │ ├── upsset.conf.txt │ ├── upsstats.cgi.txt │ ├── upsstats.html.txt │ ├── usbhid-ups.txt │ ├── ve-direct.txt │ └── victronups.txt ├── net-protocol.txt ├── new-clients.txt ├── new-drivers.txt ├── nut-names.txt ├── nut-qa.txt ├── nut-versioning.adoc ├── nut.dict ├── nutdrv_qx-subdrivers.txt ├── outlets.txt ├── packager-guide.txt ├── qa-guide.adoc ├── release-notes.txt ├── scheduling.txt ├── security.txt ├── sms-brazil-protocol.txt ├── snmp-subdrivers.txt ├── snmp.txt ├── sock-protocol.txt ├── solaris-usb.txt ├── support.txt ├── user-manual.txt └── xhtml.xsl ├── drivers ├── .gitignore ├── Makefile.am ├── adelsystem_cbi.c ├── adelsystem_cbi.h ├── al175.c ├── apc-ats-mib.c ├── apc-ats-mib.h ├── apc-epdu-mib.c ├── apc-epdu-mib.h ├── apc-hid.c ├── apc-hid.h ├── apc-iem-mib.h ├── apc-mib.c ├── apc-mib.h ├── apc-pdu-mib.c ├── apc-pdu-mib.h ├── apc_modbus.c ├── apc_modbus.h ├── apcsmart-old.c ├── apcsmart-old.h ├── apcsmart.c ├── apcsmart.h ├── apcsmart_tabs.c ├── apcsmart_tabs.h ├── apcupsd-ups.c ├── apcupsd-ups.h ├── arduino-hid.c ├── arduino-hid.h ├── asem.c ├── baytech-mib.c ├── baytech-mib.h ├── baytech-rpc3nc-mib.c ├── baytech-rpc3nc-mib.h ├── bcmxcp.c ├── bcmxcp.h ├── bcmxcp_io.h ├── bcmxcp_ser.c ├── bcmxcp_ser.h ├── bcmxcp_usb.c ├── belkin-hid.c ├── belkin-hid.h ├── belkin.c ├── belkin.h ├── belkinunv.c ├── bestfcom.c ├── bestfortress.c ├── bestpower-mib.c ├── bestpower-mib.h ├── bestuferrups.c ├── bestups.c ├── bicker_ser.c ├── blazer.c ├── blazer.h ├── blazer_ser.c ├── blazer_usb.c ├── clone-outlet.c ├── clone.c ├── compaq-mib.c ├── compaq-mib.h ├── cps-hid.c ├── cps-hid.h ├── cyberpower-mib.c ├── cyberpower-mib.h ├── delta_ups-hid.c ├── delta_ups-hid.h ├── delta_ups-mib.c ├── delta_ups-mib.h ├── dstate.c ├── dstate.h ├── dummy-ups.c ├── dummy-ups.h ├── eaton-ats16-nm2-mib.c ├── eaton-ats16-nm2-mib.h ├── eaton-ats16-nmc-mib.c ├── eaton-ats16-nmc-mib.h ├── eaton-ats30-mib.c ├── eaton-ats30-mib.h ├── eaton-pdu-genesis2-mib.c ├── eaton-pdu-genesis2-mib.h ├── eaton-pdu-marlin-helpers.c ├── eaton-pdu-marlin-helpers.h ├── eaton-pdu-marlin-mib.c ├── eaton-pdu-marlin-mib.h ├── eaton-pdu-nlogic-mib.c ├── eaton-pdu-nlogic-mib.h ├── eaton-pdu-pulizzi-mib.c ├── eaton-pdu-pulizzi-mib.h ├── eaton-pdu-revelation-mib.c ├── eaton-pdu-revelation-mib.h ├── eaton-ups-pwnm2-mib.c ├── eaton-ups-pwnm2-mib.h ├── eaton-ups-pxg-mib.c ├── eaton-ups-pxg-mib.h ├── ecoflow-hid.c ├── ecoflow-hid.h ├── emerson-avocent-pdu-mib.c ├── emerson-avocent-pdu-mib.h ├── etapro.c ├── ever-hid.c ├── ever-hid.h ├── everups.c ├── explore-hid.c ├── explore-hid.h ├── failover.c ├── failover.h ├── gamatronic.c ├── gamatronic.h ├── generic_gpio_common.c ├── generic_gpio_common.h ├── generic_gpio_libgpiod.c ├── generic_gpio_libgpiod.h ├── generic_modbus.c ├── generic_modbus.h ├── genericups.c ├── genericups.h ├── hidparser.c ├── hidparser.h ├── hidtypes.h ├── hpe-pdu-mib.c ├── hpe-pdu-mib.h ├── hpe-pdu3-cis-mib.c ├── hpe-pdu3-cis-mib.h ├── huawei-mib.c ├── huawei-mib.h ├── huawei-ups2000.c ├── hwmon_ina219.c ├── idowell-hid.c ├── idowell-hid.h ├── ietf-mib.c ├── ietf-mib.h ├── isbmex.c ├── ivtscd.c ├── legrand-hid.c ├── legrand-hid.h ├── libhid.c ├── libhid.h ├── libshut.c ├── libshut.h ├── libusb0.c ├── libusb1.c ├── liebert-esp2.c ├── liebert-gxe.c ├── liebert-hid.c ├── liebert-hid.h ├── liebert.c ├── macosx-ups.c ├── main.c ├── main.h ├── masterguard.c ├── metasys.c ├── mge-hid.c ├── mge-hid.h ├── mge-mib.c ├── mge-mib.h ├── mge-utalk.c ├── mge-utalk.h ├── mge-xml.c ├── mge-xml.h ├── microdowell.c ├── microdowell.h ├── microsol-apc.c ├── microsol-apc.h ├── microsol-common.c ├── microsol-common.h ├── netvision-mib.c ├── netvision-mib.h ├── netxml-ups.c ├── netxml-ups.h ├── nhs_ser.c ├── nut-ipmi.h ├── nut-ipmipsu.c ├── nut-libfreeipmi.c ├── nut_libusb.h ├── nutdrv_atcl_usb.c ├── nutdrv_hashx.c ├── nutdrv_qx.c ├── nutdrv_qx.h ├── nutdrv_qx_ablerex.c ├── nutdrv_qx_ablerex.h ├── nutdrv_qx_bestups.c ├── nutdrv_qx_bestups.h ├── nutdrv_qx_blazer-common.c ├── nutdrv_qx_blazer-common.h ├── nutdrv_qx_gtec.c ├── nutdrv_qx_gtec.h ├── nutdrv_qx_hunnox.c ├── nutdrv_qx_hunnox.h ├── nutdrv_qx_innovart31.c ├── nutdrv_qx_innovart31.h ├── nutdrv_qx_innovart33.c ├── nutdrv_qx_innovart33.h ├── nutdrv_qx_masterguard.c ├── nutdrv_qx_masterguard.h ├── nutdrv_qx_mecer.c ├── nutdrv_qx_mecer.h ├── nutdrv_qx_megatec-old.c ├── nutdrv_qx_megatec-old.h ├── nutdrv_qx_megatec.c ├── nutdrv_qx_megatec.h ├── nutdrv_qx_mustek.c ├── nutdrv_qx_mustek.h ├── nutdrv_qx_q1.c ├── nutdrv_qx_q1.h ├── nutdrv_qx_q2.c ├── nutdrv_qx_q2.h ├── nutdrv_qx_q6.c ├── nutdrv_qx_q6.h ├── nutdrv_qx_voltronic-qs-hex.c ├── nutdrv_qx_voltronic-qs-hex.h ├── nutdrv_qx_voltronic-qs.c ├── nutdrv_qx_voltronic-qs.h ├── nutdrv_qx_voltronic.c ├── nutdrv_qx_voltronic.h ├── nutdrv_qx_zinto.c ├── nutdrv_qx_zinto.h ├── nutdrv_siemens_sitop.c ├── oneac.c ├── oneac.h ├── openups-hid.c ├── openups-hid.h ├── optiups.c ├── phoenixcontact_modbus.c ├── pijuice.c ├── powercom-hid.c ├── powercom-hid.h ├── powercom.c ├── powercom.h ├── powerman-pdu.c ├── powerp-bin.c ├── powerp-bin.h ├── powerp-txt.c ├── powerp-txt.h ├── powerpanel.c ├── powerpanel.h ├── powervar-hid.c ├── powervar-hid.h ├── powervar_cx.c ├── powervar_cx.h ├── powervar_cx_ser.c ├── powervar_cx_usb.c ├── raritan-pdu-mib.c ├── raritan-pdu-mib.h ├── raritan-px2-mib.c ├── raritan-px2-mib.h ├── rhino.c ├── richcomm_usb.c ├── riello.c ├── riello.h ├── riello_ser.c ├── riello_usb.c ├── safenet.c ├── safenet.h ├── salicru-hid.c ├── salicru-hid.h ├── serial.c ├── serial.h ├── skel.c ├── sms_ser.c ├── sms_ser.h ├── snmp-ups-helpers.c ├── snmp-ups.c ├── snmp-ups.h ├── socomec_jbus.c ├── solis.c ├── solis.h ├── tripplite-hid.c ├── tripplite-hid.h ├── tripplite.c ├── tripplite.h ├── tripplite_usb.c ├── tripplitesu.c ├── upscode2.c ├── upsdrvctl.c ├── upsdrvquery.c ├── upsdrvquery.h ├── upshandler.h ├── usb-common.c ├── usb-common.h ├── usbhid-ups.c ├── usbhid-ups.h ├── ve-direct.c ├── victronups.c ├── xppc-mib.c ├── xppc-mib.h └── ydn23.h ├── include ├── .gitignore ├── Makefile.am ├── attribute.h ├── common.h ├── extstate.h ├── nut_bool.h ├── nut_float.h ├── nut_platform.h ├── nut_stdint.h ├── nutconf.hpp ├── nutipc.hpp ├── nutstream.hpp ├── nutwriter.hpp ├── parseconf.h ├── proto.h ├── state.h ├── str.h ├── timehead.h ├── upsconf.h └── wincompat.h ├── indent.sh ├── lib ├── .gitignore ├── Makefile.am ├── README.adoc ├── libnutclient.pc.in ├── libnutclientstub.pc.in ├── libnutconf.pc.in ├── libnutscan.pc.in ├── libupsclient-config.in └── libupsclient.pc.in ├── m4 ├── .gitignore ├── ax_c___attribute__.m4 ├── ax_c_pragmas.m4 ├── ax_check_compile_flag.m4 ├── ax_compare_version.m4 ├── ax_realpath.m4 ├── ax_realpath_lib.m4 ├── ax_run_or_link_ifelse.m4 ├── nut_arg_with.m4 ├── nut_check_asciidoc.m4 ├── nut_check_aspell.m4 ├── nut_check_bool.m4 ├── nut_check_cppcheck.m4 ├── nut_check_headers_windows.m4 ├── nut_check_libavahi.m4 ├── nut_check_libfreeipmi.m4 ├── nut_check_libgd.m4 ├── nut_check_libgpiod.m4 ├── nut_check_libltdl.m4 ├── nut_check_libmodbus.m4 ├── nut_check_libneon.m4 ├── nut_check_libnetsnmp.m4 ├── nut_check_libnss.m4 ├── nut_check_libopenssl.m4 ├── nut_check_libpowerman.m4 ├── nut_check_libregex.m4 ├── nut_check_libsystemd.m4 ├── nut_check_libusb.m4 ├── nut_check_libwrap.m4 ├── nut_check_os.m4 ├── nut_check_pkgconfig.m4 ├── nut_check_python.m4 ├── nut_check_socketlib.m4 ├── nut_compiler_family.m4 ├── nut_func_getnameinfo_argtypes.m4 ├── nut_report_feature.m4 ├── nut_stash_warnings.m4 └── nut_type_socklen_t.m4 ├── scripts ├── Aix │ ├── .gitignore │ ├── nut-aix.spec.in │ └── nut.init.in ├── HP-UX │ ├── .gitignore │ ├── Makefile │ ├── makedepot.sh │ ├── nut-drvctl │ ├── nut-drvctl.sh │ ├── nut-upsd │ ├── nut-upsd.sh │ ├── nut-upsmon │ ├── nut-upsmon.sh │ ├── nut.psf.in │ └── postinstall.in ├── Makefile.am ├── README.adoc ├── RedHat │ ├── .gitignore │ ├── README.adoc │ ├── halt.patch │ ├── ups.in │ ├── upsd.in │ └── upsmon.in ├── Solaris │ ├── .gitignore │ ├── Makefile.am │ ├── README.adoc │ ├── makelocal.sh │ ├── nut-driver-enumerator.xml.in │ ├── nut-driver.xml.in │ ├── nut-logger.xml.in │ ├── nut-monitor.xml.in │ ├── nut-server.xml.in │ ├── nut.in │ ├── nut.xml.in │ ├── pkginfo.in │ ├── postinstall.in │ ├── postremove.in │ ├── precheck.py.in │ ├── preinstall.in │ ├── preproto.pl.in │ ├── preremove.in │ ├── reset-ups-usb-solaris.sh.sample │ ├── svc-nut-logger.in │ ├── svc-nut-monitor.in │ └── svc-nut-server.in ├── Solaris8 │ └── S99upsmon ├── Windows │ ├── .gitignore │ ├── DriverInstaller │ │ ├── README.adoc │ │ └── wdi-simple.c │ ├── Installer │ │ ├── .gitignore │ │ ├── BuildInstaller.bat │ │ ├── ImageFiles │ │ │ ├── Images │ │ │ │ ├── NUT_wix_horizontal.bmp │ │ │ │ └── NUT_wix_vertical.bmp │ │ │ ├── Others │ │ │ │ ├── .gitignore │ │ │ │ ├── StartService.bat │ │ │ │ └── StopService.bat │ │ │ ├── emptyDir │ │ │ │ ├── cgi-bin │ │ │ │ │ └── temp.txt │ │ │ │ ├── html │ │ │ │ │ └── temp.txt │ │ │ │ ├── include │ │ │ │ │ └── temp.txt │ │ │ │ ├── man1 │ │ │ │ │ └── temp.txt │ │ │ │ ├── man3 │ │ │ │ │ └── temp.txt │ │ │ │ ├── pkgconfig │ │ │ │ │ └── temp.txt │ │ │ │ └── run │ │ │ │ │ └── temp.txt │ │ │ └── icons │ │ │ │ ├── New.ico │ │ │ │ ├── Up.ico │ │ │ │ ├── completi.ico │ │ │ │ ├── custicon.ico │ │ │ │ ├── exclamic.ico │ │ │ │ ├── info.ico │ │ │ │ ├── insticon.ico │ │ │ │ ├── powernut_Stop.ico │ │ │ │ ├── powernut_logo.ico │ │ │ │ ├── removico.ico │ │ │ │ └── repairic.ico │ │ ├── NUT-Installer.xml.in │ │ └── README.adoc │ ├── Makefile.am │ ├── README.adoc │ ├── build-mingw-nut.sh │ ├── build-mingw-prereqs.sh │ ├── dllldd.sh │ ├── halt.c │ ├── winevent.mc │ └── wininit.c ├── augeas │ ├── .gitignore │ ├── Makefile.am │ ├── README.adoc │ ├── gen-nutupsconf-aug.py.in │ ├── nuthostsconf.aug.in │ ├── nutnutconf.aug.in │ ├── nutupsconf.aug.tpl │ ├── nutupsdconf.aug.in │ ├── nutupsdusers.aug.in │ ├── nutupsmonconf.aug.in │ ├── nutupsschedconf.aug.in │ ├── nutupssetconf.aug.in │ └── tests │ │ ├── test_nut.aug │ │ ├── test_nut_fixme.aug │ │ └── test_nut_flaky.aug ├── avahi │ ├── .gitignore │ └── nut.service.in ├── devd │ ├── .gitignore │ ├── Makefile.am │ └── README.adoc ├── external_apis │ ├── Makefile.am │ ├── README.adoc │ └── enphase │ │ ├── .gitignore │ │ ├── README.adoc │ │ ├── enphase-monitor.in │ │ └── enphase-monitor@.service.in ├── fuse │ ├── README.adoc │ └── execfuse-nut │ │ ├── getattr │ │ ├── init │ │ ├── read_file │ │ └── readdir ├── hotplug │ ├── .gitignore │ ├── Makefile.am │ ├── README.adoc │ └── libhidups.in ├── installer │ ├── .gitignore │ ├── Makefile.am │ ├── README.adoc │ ├── aix │ │ ├── aix_init │ │ └── ipp-os-shutdown.conf.sample │ ├── common │ │ ├── README_ipp-os-shutdown.adoc │ │ ├── aix_init │ │ ├── init │ │ ├── ipp-event.sh │ │ ├── ipp-host-shutdown.sample │ │ ├── ipp-notifier.sh │ │ ├── ipp-os-shutdown │ │ ├── ipp-shutdown-daemon.sh │ │ ├── ipp-status │ │ ├── ipp-wrapper │ │ ├── ipp.conf │ │ ├── shutdown │ │ ├── solaris_init │ │ └── string.sh │ ├── common_EN │ │ └── install.res │ ├── hpux │ │ └── ipp-os-shutdown.conf.sample │ ├── install.sh │ ├── make_package.sh │ ├── nutconf-dummy │ ├── solcmn │ │ ├── ipp-os-shutdown.conf.sample │ │ └── solaris_init │ ├── uninstall-ipp │ ├── uninstall-lsnw.sh │ └── version.sh ├── logrotate │ └── nutlogd ├── misc │ ├── notifyme-debug │ ├── nut.bash_completion │ └── osd-notify ├── perl │ └── Nut.pm ├── python │ ├── .gitignore │ ├── Makefile.am │ ├── README.adoc │ ├── app │ │ ├── .gitignore │ │ ├── NUT-Monitor │ │ ├── NUT-Monitor-py2gtk2.in │ │ ├── NUT-Monitor-py3qt5.in │ │ ├── NUT-Monitor-py3qt6.in │ │ ├── README.adoc │ │ ├── icons │ │ │ ├── 256x256 │ │ │ │ └── nut-monitor.png │ │ │ ├── 48x48 │ │ │ │ └── nut-monitor.png │ │ │ ├── 64x64 │ │ │ │ └── nut-monitor.png │ │ │ └── scalable │ │ │ │ └── nut-monitor.svg │ │ ├── locale │ │ │ ├── NUT-Monitor.pot │ │ │ ├── fr │ │ │ │ ├── LC_MESSAGES │ │ │ │ │ └── NUT-Monitor.mo │ │ │ │ ├── fr.po │ │ │ │ └── fr_FR.UTF-8.po │ │ │ ├── fr_FR.UTF-8 │ │ │ ├── it │ │ │ │ ├── LC_MESSAGES │ │ │ │ │ └── NUT-Monitor.mo │ │ │ │ ├── it.po │ │ │ │ └── it_IT.UTF-8.po │ │ │ ├── it_IT.UTF-8 │ │ │ ├── ru │ │ │ │ ├── LC_MESSAGES │ │ │ │ │ └── NUT-Monitor.mo │ │ │ │ ├── ru.po │ │ │ │ └── ru_RU.UTF-8.po │ │ │ └── ru_RU.UTF-8 │ │ ├── nut-monitor-py2gtk2.desktop │ │ ├── nut-monitor-py3qt5.desktop │ │ ├── nut-monitor-py3qt6.desktop │ │ ├── nut-monitor.appdata.xml │ │ ├── nut-monitor.desktop │ │ ├── pixmaps │ │ │ ├── on_battery.png │ │ │ ├── on_line.png │ │ │ ├── var-ro.png │ │ │ ├── var-rw.png │ │ │ └── warning.png │ │ ├── screenshots │ │ │ ├── nut-monitor-1.png │ │ │ ├── nut-monitor-2.png │ │ │ └── nut-monitor-3.png │ │ └── ui │ │ │ ├── aboutdialog1.ui │ │ │ ├── dialog1.ui │ │ │ ├── dialog2.ui │ │ │ ├── gui-1.3.glade │ │ │ ├── gui-1.3.glade.h │ │ │ └── window1.ui │ └── module │ │ ├── .gitignore │ │ ├── MANIFEST.in │ │ ├── Makefile.am │ │ ├── PyNUT.py.in │ │ ├── README.adoc │ │ ├── setup.py.in │ │ ├── test_nutclient.py.in │ │ └── tox.ini ├── subdriver │ ├── gen-snmp-subdriver.sh │ └── gen-usbhid-subdriver.sh ├── systemd │ ├── .gitignore │ ├── Makefile.am │ ├── README.adoc │ ├── nut-driver-enumerator-daemon-activator.path.in │ ├── nut-driver-enumerator-daemon-activator.service.in │ ├── nut-driver-enumerator-daemon.service.in │ ├── nut-driver-enumerator.path.in │ ├── nut-driver-enumerator.service.in │ ├── nut-driver.target.in │ ├── nut-driver@.service.in │ ├── nut-logger.service.in │ ├── nut-monitor.service.in │ ├── nut-server.service.in │ ├── nut-sleep.service │ ├── nut-systemd.preset │ ├── nut-udev-settle.service │ ├── nut.target.in │ └── nutshutdown.in ├── udev │ ├── .gitignore │ ├── Makefile.am │ ├── README.adoc │ └── nut-ipmipsu.rules.in ├── ufw │ ├── .gitignore │ ├── Makefile.am │ ├── README.adoc │ └── nut.ufw.profile.in ├── upower │ ├── 95-upower-hid.hwdb │ └── 95-upower-hid.rules ├── upsdrvsvcctl │ ├── .gitignore │ ├── Makefile.am │ ├── README.adoc │ ├── nut-driver-enumerator.sh.in │ └── upsdrvsvcctl.in ├── usb_resetter │ ├── README.adoc │ └── nut-driver.service └── valgrind │ ├── .gitignore │ ├── .valgrind.supp.in │ ├── README.adoc │ └── valgrind.sh.in ├── server ├── .gitignore ├── Makefile.am ├── conf.c ├── conf.h ├── desc.c ├── desc.h ├── netcmds.h ├── neterr.h ├── netget.c ├── netget.h ├── netinstcmd.c ├── netinstcmd.h ├── netlist.c ├── netlist.h ├── netmisc.c ├── netmisc.h ├── netset.c ├── netset.h ├── netssl.c ├── netssl.h ├── netuser.c ├── netuser.h ├── nut_ctype.h ├── pipedebug.c ├── sockdebug.c ├── sstate.c ├── sstate.h ├── stype.h ├── upsd.c ├── upsd.h ├── upstype.h ├── user-data.h ├── user.c └── user.h ├── tests ├── .gitignore ├── Makefile.am ├── NIT │ ├── .gitignore │ ├── Makefile.am │ ├── README.adoc │ ├── nit.sh │ └── upssched.conf.in ├── cpputest-client.cpp ├── cpputest.cpp ├── driver-stub-usb.c ├── driver_methods_utest.c ├── example.cpp ├── generic_gpio_liblocal.c ├── generic_gpio_test.txt ├── generic_gpio_utest.c ├── generic_gpio_utest.h ├── getexponenttest-belkin-hid.c ├── getvaluetest.c ├── nut-driver-enumerator-test--ups.conf ├── nut-driver-enumerator-test.sh ├── nutbooltest.c ├── nutclienttest.cpp ├── nutconf_parser_ut.cpp ├── nutconf_ut.cpp ├── nutipc_ut.cpp ├── nutlogtest.c ├── nutstream_ut.cpp └── nuttimetest.c └── tools ├── .gitignore ├── Makefile.am ├── driver-list-format.sh ├── gitlog2changelog.py.in ├── gitlog2version.sh ├── nut-ddl-dump.sh ├── nut-dumpdiff.sh ├── nut-recorder.sh ├── nut-scanner ├── .gitignore ├── Makefile.am ├── README.adoc ├── nut-scan.h ├── nut-scanner.c ├── nutscan-device.c ├── nutscan-device.h ├── nutscan-display.c ├── nutscan-init.c ├── nutscan-init.h ├── nutscan-ip.c ├── nutscan-ip.h ├── nutscan-serial.c ├── nutscan-serial.h ├── scan_avahi.c ├── scan_eaton_serial.c ├── scan_ipmi.c ├── scan_nut.c ├── scan_nut_simulation.c ├── scan_snmp.c ├── scan_usb.c └── scan_xml_http.c ├── nut-snmpinfo.py.in ├── nut-usbinfo.pl └── nutconf ├── .gitignore ├── Makefile.am └── nutconf-cli.cpp /.gitattributes: -------------------------------------------------------------------------------- 1 | # Windows script files should be CR+LF always: 2 | *.bat text eol=crlf 3 | 4 | # Unix/Linux script files should be LF always: 5 | *.sh text eol=lf 6 | *.m4 text eol=lf 7 | *.ac text eol=lf 8 | *.am text eol=lf 9 | *.hwdb text eol=lf 10 | 11 | # Aspell claims issues finding `utf-8\r` sometimes (from heading line of 12 | # the dictionary file), with messages like this: 13 | # .cset" could not be opened for reading or does not exist.lib/aspell/utf-8 14 | # which tends to happen in mixed-OS development environments. Tracer shows it: 15 | # read(3, "personal_ws-1.1 en 3225 utf-8\r\nA"..., 4096) = 4096 16 | # access("/usr/lib/aspell/utf-8\r.cset", F_OK) = -1 ENOENT (No such file or directory) 17 | /docs/nut.dict text eol=lf 18 | 19 | # Some files are binary always: 20 | *.png bin 21 | *.ico bin 22 | 23 | # The rest are assumed text sources with platform-dependent EOL being okay, 24 | # or we let Git guess otherwise: 25 | * text=auto 26 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: networkupstools 2 | open_collective: networkupstools 3 | -------------------------------------------------------------------------------- /.github/codeql/codeql-config.yml: -------------------------------------------------------------------------------- 1 | # For interpreted languages: 2 | paths: 3 | - scripts/python/module 4 | - scripts/python/app 5 | -------------------------------------------------------------------------------- /.lgtm.yml: -------------------------------------------------------------------------------- 1 | # NUT uses python scripts generated from templates saved mostly into *.py.in 2 | path_classifiers: 3 | template: 4 | - exclude: "**/*.py.in" 5 | - exclude: "**/NUT-Monitor*.in" 6 | 7 | queries: 8 | - exclude: cpp/fixme-comment 9 | - exclude: python/fixme-comment 10 | 11 | extraction: 12 | python: 13 | python_setup: 14 | # Is there a way to LGTM both 2 and 3?.. 15 | version: 2 16 | setup_py: false 17 | index: 18 | filters: 19 | - include: "**/*.py.in" 20 | - include: "**/NUT-Monitor*.in" 21 | -------------------------------------------------------------------------------- /builds/nut-driver-enumerator-test/ci_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This is a CI test for nut-driver-enumerator-test.sh 4 | # using chosen SHELL_PROGS (passed from caller envvars) 5 | 6 | cd "${REPO_DIR}/tests" || exit 7 | BUILDDIR="`pwd`" 8 | SRCDIR="`pwd`" 9 | export BUILDDIR SRCDIR 10 | 11 | # Travis uses Ubuntu 14.04 which does not yet have systemd (16.04 should) 12 | # The self-tests do not (yet) use the actual OS framework, so just let them run 13 | if [ ! -x /bin/systemctl ] ; then 14 | SERVICE_FRAMEWORK="selftest" 15 | export SERVICE_FRAMEWORK 16 | fi 17 | 18 | printf "\n=== `date -u` : Will test nut-driver-enumerator interpreted by: " 19 | if [ -n "${SHELL_PROGS}" ] ; then 20 | echo "$SHELL_PROGS" 21 | else 22 | echo "default system '/bin/sh'" 23 | fi 24 | 25 | # Set this to enable verbose tracing 26 | case "${CI_TRACE-}" in 27 | [Yy][Ee][Ss]|[Oo][Nn]|[Tt][Rr][Uu][Ee]) 28 | ls -la 29 | DEBUG=trace ; export DEBUG 30 | ;; 31 | esac 32 | 33 | $CI_TIME ./nut-driver-enumerator-test.sh 34 | -------------------------------------------------------------------------------- /clients/.gitignore: -------------------------------------------------------------------------------- 1 | /libupsclient-version.h 2 | /libupsclient-version.h.tmp* 3 | /upsimage.cgi 4 | /upsset.cgi 5 | /upsstats.cgi 6 | /upsc 7 | /upscmd 8 | /upslog 9 | /upsmon 10 | /upsrw 11 | /upssched 12 | -------------------------------------------------------------------------------- /clients/message.c: -------------------------------------------------------------------------------- 1 | #ifdef WIN32 2 | #include 3 | 4 | int main(int argc, char ** argv) 5 | { 6 | if (argc < 2) 7 | return 1; 8 | 9 | MessageBox(NULL, argv[1], "Network UPS Tools", 10 | MB_OK|MB_ICONEXCLAMATION|MB_SERVICE_NOTIFICATION); 11 | 12 | return 0; 13 | } 14 | #endif /* WIN32 */ 15 | -------------------------------------------------------------------------------- /clients/upssched.h: -------------------------------------------------------------------------------- 1 | /* upssched.h - supporting structures */ 2 | 3 | #ifndef NUT_UPSSCHED_H_SEEN 4 | #define NUT_UPSSCHED_H_SEEN 1 5 | 6 | #include 7 | #include "common.h" 8 | 9 | #define SERIALIZE_INIT 1 10 | #define SERIALIZE_SET 2 11 | #define SERIALIZE_WAIT 3 12 | 13 | #ifdef __cplusplus 14 | /* *INDENT-OFF* */ 15 | extern "C" { 16 | /* *INDENT-ON* */ 17 | #endif 18 | 19 | /* track client connections */ 20 | typedef struct conn_s { 21 | TYPE_FD fd; 22 | #ifdef WIN32 23 | char buf[LARGEBUF]; 24 | OVERLAPPED read_overlapped; 25 | #endif /* WIN32 */ 26 | PCONF_CTX_t ctx; 27 | struct conn_s *next; 28 | } conn_t; 29 | 30 | #ifdef __cplusplus 31 | /* *INDENT-OFF* */ 32 | } 33 | /* *INDENT-ON* */ 34 | #endif 35 | 36 | #endif /* NUT_UPSSCHED_H_SEEN */ 37 | -------------------------------------------------------------------------------- /clients/upsstats.h: -------------------------------------------------------------------------------- 1 | /* upsstats.h - structures for upsstats 2 | 3 | Copyright (C) 2002 Russell Kroll 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #ifndef NUT_UPSSTATS_H_SEEN 21 | #define NUT_UPSSTATS_H_SEEN 1 22 | 23 | #ifdef __cplusplus 24 | /* *INDENT-OFF* */ 25 | extern "C" { 26 | /* *INDENT-ON* */ 27 | #endif 28 | 29 | typedef struct { 30 | char *sys; 31 | char *desc; 32 | void *next; 33 | } ulist_t; 34 | 35 | #ifdef __cplusplus 36 | /* *INDENT-OFF* */ 37 | } 38 | /* *INDENT-ON* */ 39 | #endif 40 | 41 | #endif /* NUT_UPSSTATS_H_SEEN */ 42 | -------------------------------------------------------------------------------- /common/atexit.c: -------------------------------------------------------------------------------- 1 | /* atexit() Mark Powell */ 2 | /* Implemented in terms of on_exit() for old BSD-style systems, like SunOS4 */ 3 | 4 | #include "config.h" 5 | 6 | #ifndef HAVE_ATEXIT 7 | 8 | #include 9 | #include "common.h" 10 | 11 | int atexit(fn) 12 | void (*fn)(); 13 | { 14 | #ifdef HAVE_ON_EXIT 15 | return on_exit(fn, 0); 16 | #else 17 | NUT_UNUSED_VARIABLE(fn); 18 | /* Choose some errno thats likely to exist on lots of systems */ 19 | errno = EPERM; 20 | return (-1); 21 | #endif /* HAVE_ON_EXIT */ 22 | } 23 | 24 | #endif /* HAVE_ATEXIT */ 25 | -------------------------------------------------------------------------------- /common/setenv.c: -------------------------------------------------------------------------------- 1 | /* setenv.c Ben Collver */ 2 | #include "config.h" /* must be first */ 3 | 4 | #ifndef HAVE_SETENV 5 | #include 6 | #include 7 | #include "common.h" 8 | 9 | int nut_setenv(const char *name, const char *value, int overwrite) 10 | { 11 | char *val; 12 | char *buffer; 13 | int rv; 14 | 15 | if (overwrite == 0) { 16 | val = getenv(name); 17 | if (val != NULL) { 18 | return 0; 19 | } 20 | } 21 | 22 | buffer = xmalloc(strlen(value) + strlen(name) + 2); 23 | strcpy(buffer, name); 24 | strcat(buffer, "="); 25 | strcat(buffer, value); 26 | rv = putenv(buffer); /* man putenv, do not free(buffer) */ 27 | return (rv); 28 | } 29 | #endif /* !HAVE_SETENV */ 30 | -------------------------------------------------------------------------------- /common/strsep.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* Simple implem courtesy of https://stackoverflow.com/a/58244503 4 | * Note: like the (BSD) standard implem, this changes the original stringp! 5 | * Result is undefined (segfault here) if stringp==NULL 6 | * (it is supposed to be address of string after all) 7 | */ 8 | char *strsep(char **stringp, const char *delim) { 9 | char *rv = *stringp; 10 | if (rv) { 11 | *stringp += strcspn(*stringp, delim); 12 | if (**stringp) 13 | *(*stringp)++ = '\0'; 14 | else 15 | *stringp = NULL; 16 | } 17 | return rv; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /common/unsetenv.c: -------------------------------------------------------------------------------- 1 | /* unsetenv.c Jim Klimov */ 2 | #include "config.h" /* must be first */ 3 | 4 | #ifndef HAVE_UNSETENV 5 | #include 6 | #include 7 | #include "common.h" 8 | #include "proto.h" 9 | 10 | int nut_unsetenv(const char *name) 11 | { 12 | return setenv(name, "", 1); 13 | } 14 | #endif /* !HAVE_UNSETENV */ 15 | -------------------------------------------------------------------------------- /conf/.gitignore: -------------------------------------------------------------------------------- 1 | /upsmon.conf.sample 2 | /upssched.conf.sample 3 | -------------------------------------------------------------------------------- /conf/hosts.conf.sample: -------------------------------------------------------------------------------- 1 | # Network UPS Tools: example hosts.conf 2 | # 3 | # This file is used to control the CGI programs. If you have not 4 | # installed them, you may safely ignore or delete this file. 5 | # 6 | # NOTE: Contents of this file should be pure ASCII (character codes 7 | # not in range would be ignored with a warning message). 8 | # 9 | # ----------------------------------------------------------------------- 10 | # 11 | # upsstats will use the list of MONITOR entries when displaying the 12 | # default template (upsstats.html). The "FOREACHUPS" directive in the 13 | # template will use this file to find systems running upsd. 14 | # 15 | # upsstats and upsimage also use this file to determine if a host may be 16 | # monitored. This keeps evil people from using your system to annoy 17 | # others with unintended queries. 18 | # 19 | # upsset presents a list of systems that may be viewed and controlled 20 | # using this file. 21 | # 22 | # ----------------------------------------------------------------------- 23 | # 24 | # Usage: list systems running upsd that you want to monitor 25 | # 26 | # MONITOR "" 27 | # 28 | # Examples: 29 | # 30 | # MONITOR myups@localhost "Local UPS" 31 | # MONITOR su2200@10.64.1.1 "Finance department" 32 | # MONITOR matrix@shs-server.example.edu "Sierra High School data room #1" 33 | -------------------------------------------------------------------------------- /data/.gitignore: -------------------------------------------------------------------------------- 1 | /driver.list 2 | /*.tabbed 3 | -------------------------------------------------------------------------------- /data/html/.gitignore: -------------------------------------------------------------------------------- 1 | /header.html 2 | 3 | -------------------------------------------------------------------------------- /data/html/bottom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /data/html/header.html.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Network UPS Tools 5 | 6 | 7 | 8 | 9 | 10 | 39 |
11 | 12 | 13 | 14 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 32 | 33 | 34 | 35 | 36 |
15 | 16 | 17 | 18 |
19 | 20 |
26 | Statistics 27 | 30 | Settings 31 |
37 | 38 |
40 | -------------------------------------------------------------------------------- /data/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Network UPS Tools -- https://www.networkupstools.org 6 | 7 | 8 | 9 | 10 | 11 | 12 | <body> 13 | </body> 14 | 15 | -------------------------------------------------------------------------------- /data/html/nut-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/data/html/nut-banner.png -------------------------------------------------------------------------------- /docs/.editorconfig: -------------------------------------------------------------------------------- 1 | # Nested configuration file 2 | 3 | # The following documents with code samples have 4 | # intentional trailing whitespace and should be 5 | # only reformatted manually and attentively: 6 | [{ci-farm-lxc-setup,solaris-usb}.txt] 7 | trim_trailing_whitespace = false 8 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | # Intended build products 2 | /*.chunked/ 3 | /*.html 4 | /*.pdf 5 | 6 | # Temporary build resources (can come from OS) 7 | /docbook-xsl.css 8 | 9 | # Intermediate files from docs-building 10 | /ups-html.txt 11 | /user-manual.xml 12 | /developer-guide.xml 13 | /packager-guide.xml 14 | /qa-guide.xml 15 | /solaris-usb.xml 16 | /cables.xml 17 | /docinfo.xml 18 | /docinfo-since-v*.xml* 19 | /*-docinfo.xml* 20 | /FAQ.xml 21 | /nut-dmf.xml 22 | /nut-names.xml 23 | 24 | # Temporary stuff 25 | nut.dict.sorted 26 | /*.bak 27 | /*.bak-* 28 | /tmp/ 29 | docinfo.xml.in.tmp 30 | /asciidoc-vars.conf.lastrev.tmp 31 | .prep-src-docs* 32 | /.check-pdf 33 | /.check-html-single 34 | /.check-html-chunked 35 | -------------------------------------------------------------------------------- /docs/ChangeLog.txt: -------------------------------------------------------------------------------- 1 | :titles.underlines: "__","==","--","~~","^^" 2 | 3 | Network UPS Tools Change Log 4 | ____________________________ 5 | :Author: NUT_project_community_contributors 6 | 7 | Introduction 8 | ============ 9 | 10 | The primary goal of the Network UPS Tools (NUT) project is to provide support 11 | for Power Devices, such as Uninterruptible Power Supplies, Power Distribution 12 | Units and Solar Controllers. 13 | 14 | [[Change_Log]] 15 | Very detailed Change Log 16 | ======================== 17 | 18 | This document intends to detail the change log for relatively recent work 19 | (roughly since the source code was tracked in Git). 20 | 21 | include::{builddir}../ChangeLog.adoc-parsed[] 22 | -------------------------------------------------------------------------------- /docs/asciidoc.txt: -------------------------------------------------------------------------------- 1 | Using AsciiDoc in NUT 2 | ===================== 3 | Charles Lepple 4 | :Author Initials: CFL 5 | 6 | Intro 7 | ----- 8 | 9 | See the https://asciidoc-py.github.io/userguide.html[AsciiDoc User Guide] 10 | for more information. 11 | 12 | Works in Progress 13 | ----------------- 14 | 15 | - link:website/index.html[The NUT Website] 16 | - link:user-manual.html[The NUT User Manual] 17 | - link:developer-guide.html[The NUT Developer Guide] 18 | - link:packager-guide.html[The NUT Packager Guide] 19 | - link:man/index.html[Man pages] 20 | -------------------------------------------------------------------------------- /docs/cables/Makefile.am: -------------------------------------------------------------------------------- 1 | # Network UPS Tools: cable docs 2 | 3 | CLEANFILES = *-spellchecked 4 | MAINTAINERCLEANFILES = Makefile.in .dirstamp 5 | -------------------------------------------------------------------------------- /docs/cables/apc-rs500-serial.txt: -------------------------------------------------------------------------------- 1 | Desc: APC UPS cable - for Back-UPS RS 500 2 | File: apc-rs500-serial.txt 3 | Date: 14 July 2004 4 | Auth: Russell Kroll , Martin Edlman 5 | 6 | This document was constructed from a mail from Martin. He figured out 7 | the pinouts to make the Back-UPS RS 500 work with a normal serial port. 8 | Here are the details: 9 | 10 | --- 11 | 12 | UPS side PC side 13 | RJ45 (8 pins) DB9F 14 | 15 | 1 orange/white 2,8,9 16 | 2 orange 1 17 | 3 green/white chassis/ground 18 | 4 blue - 19 | 5 blue/white - 20 | 6 green 5 21 | 7 brown/white 4,6 22 | 8 brown - 23 | 24 | +---+ 25 | +-----+ +-----+ 26 | | | 27 | +---------------+ 28 | 8 7 6 5 4 3 2 1 29 | 30 | view from back (cable entry) 31 | --- 32 | 33 | Note this results in OL=-CTS, LB=DCD, SD=ST, CP=RTS, so it should work 34 | with the existing genericups type 20. 35 | -------------------------------------------------------------------------------- /docs/cables/imv.txt: -------------------------------------------------------------------------------- 1 | Desc: IMV Match19 700 - 1500 2 | File: imv.txt 3 | Date: 06 April 2002 4 | Auth: Niels S. Richthof 5 | 6 | 7 | "UPS-VIC23-2" PC 9 pin connector 8 | 9 | 1 ---------------- 3 10 | 2 ---------------- 2 11 | 4 ---------------- 7 12 | 5 ---------------- 5 13 | -------------------------------------------------------------------------------- /docs/cables/powerware.txt: -------------------------------------------------------------------------------- 1 | Desc: Powerware 3115 factory cable 2 | File: powerware.txt 3 | Date: 22 July 2005 4 | Auth: various 5 | 6 | 1) Powerware 3115 factory cable 7 | From Peter Åstrand 8 | 9 | UPS PC 9 pin connector 10 | 5 --------- 1 11 | 2 --------- 2 12 | 1 --------- 3 13 | 4 --------- 5 14 | 6 --------- 8 15 | 16 | 2) Powerware 5119 RM Cable Layout 17 | From Daniel Thompson 18 | 19 | UPS <-----------> PC 20 | DB9-M <--------> DB9-F 21 | Pin 1 <-----------> Pin 3 22 | Pin 2 <-----------> Pin 8 23 | Pin 4 <-----------> Pin 4 24 | Pin 5 <-----------> Pin 1 25 | Shells Grounded Both Ends 26 | -------------------------------------------------------------------------------- /docs/cables/repotec.txt: -------------------------------------------------------------------------------- 1 | Desc: Repotec 800A (800VA) & 162A (1600VA) cable 2 | File: repotec.txt 3 | Date: 11 April 2001 4 | Auth: Theodor Milkov 5 | 6 | 7 | PC UPS 8 | 9 | 1 (DCD) <----+---------- 2 10 | | 11 | R 5.6k 12 | | 13 | 7 (RTS) >----+ 14 | 15 | 3 (Tx) >--------------- 6 16 | 17 | 4 (DTR) <----+---------- 5 18 | | 19 | R 5.6k 20 | | 21 | 8 (CTS) >----+ 22 | 23 | 5 (GND) -------------+-- 4 24 | | 25 | +-- 7 26 | -------------------------------------------------------------------------------- /docs/cables/sms.txt: -------------------------------------------------------------------------------- 1 | Desc: SMS UPS cables, for Upsilon compatible SMS UPS 2 | File: sms.txt 3 | Date: 9 October 2001 4 | Auth: Marcio Gomes 5 | 6 | 7 | COMPUTER UPS 8 | FEMEA DB9 MACHO DB9 9 | 2 ---------- 6 10 | 3 ---------- 9 11 | 4/8 ---------- 5 12 | 5 ---------- 8 13 | 14 | - This cable is working with Manager III 1300 VA and 650 VA, SMS UPS's 15 | - Jump in computer side pins 4/8 and connect to pin 1 in UPS side 16 | - Use NUT blazer_ser driver 17 | -------------------------------------------------------------------------------- /docs/chunked.xsl: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | images/icons/ 15 | images/icons/ 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/images/advanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/advanced.png -------------------------------------------------------------------------------- /docs/images/asciidoc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/asciidoc.png -------------------------------------------------------------------------------- /docs/images/bigbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/bigbox.png -------------------------------------------------------------------------------- /docs/images/bizarre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/bizarre.png -------------------------------------------------------------------------------- /docs/images/blue-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/blue-arrow.png -------------------------------------------------------------------------------- /docs/images/cables/73-0724.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/cables/73-0724.png -------------------------------------------------------------------------------- /docs/images/cables/940-0024C.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/cables/940-0024C.jpg -------------------------------------------------------------------------------- /docs/images/cables/Lansafecable.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/cables/Lansafecable.jpg -------------------------------------------------------------------------------- /docs/images/cables/SOLA-330.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/cables/SOLA-330.png -------------------------------------------------------------------------------- /docs/images/cables/belkin-f6cx-rkm-xu-cable.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/cables/belkin-f6cx-rkm-xu-cable.jpg -------------------------------------------------------------------------------- /docs/images/cables/mac-940-0024C.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/cables/mac-940-0024C.png -------------------------------------------------------------------------------- /docs/images/cables/mge-66049.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/cables/mge-66049.png -------------------------------------------------------------------------------- /docs/images/cables/mge-db9-rj12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/cables/mge-db9-rj12.jpg -------------------------------------------------------------------------------- /docs/images/cables/mge-db9-rj45.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/cables/mge-db9-rj45.jpg -------------------------------------------------------------------------------- /docs/images/cables/mge-usb-rj45.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/cables/mge-usb-rj45.jpg -------------------------------------------------------------------------------- /docs/images/ci/AppVeyor_logo-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/AppVeyor_logo-2x.png -------------------------------------------------------------------------------- /docs/images/ci/AppVeyor_logo-ar21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/AppVeyor_logo-ar21.png -------------------------------------------------------------------------------- /docs/images/ci/CircleCI_vertical_black_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/CircleCI_vertical_black_logo.png -------------------------------------------------------------------------------- /docs/images/ci/DO_Powered_by_Badge_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/DO_Powered_by_Badge_blue.png -------------------------------------------------------------------------------- /docs/images/ci/DO_Powered_by_Badge_blue_140pxW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/DO_Powered_by_Badge_blue_140pxW.png -------------------------------------------------------------------------------- /docs/images/ci/GitHub-Mark-140pxW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/GitHub-Mark-140pxW.png -------------------------------------------------------------------------------- /docs/images/ci/GitHub-Mark-ea2971cee799.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/GitHub-Mark-ea2971cee799.png -------------------------------------------------------------------------------- /docs/images/ci/OC_logo-watercolor-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/OC_logo-watercolor-256.png -------------------------------------------------------------------------------- /docs/images/ci/OC_logo_merged_140x26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/OC_logo_merged_140x26.png -------------------------------------------------------------------------------- /docs/images/ci/OC_logo_merged_171x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/OC_logo_merged_171x32.png -------------------------------------------------------------------------------- /docs/images/ci/OC_logotype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/OC_logotype.png -------------------------------------------------------------------------------- /docs/images/ci/ci-root.css: -------------------------------------------------------------------------------- 1 | /* CSS files sourced below originated in different Git repositories. 2 | * 3 | * Place this file and those included below into $JENKINS_HOME/userContent 4 | * and refer to this one as "/userContent/ci-root.css" from your Jenkins 5 | * controller theme configuration - see $JENKINS_URL/manage/appearance/ 6 | * section "Customizable theme" (or "Customizable Header", not both). 7 | */ 8 | 9 | /* https://raw.githubusercontent.com/networkupstools/nut/refs/heads/master/docs/images/ci/jenkins-nut.css */ 10 | @import "jenkins-nut.css"; 11 | 12 | /* https://raw.githubusercontent.com/networkupstools/jenkins-dynamatrix/refs/heads/master/jenkins-dynamatrix-badges.css */ 13 | @import "jenkins-dynamatrix-badges.css"; 14 | 15 | -------------------------------------------------------------------------------- /docs/images/ci/fosshost_org_Host_Dark_56px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/fosshost_org_Host_Dark_56px.png -------------------------------------------------------------------------------- /docs/images/ci/fosshost_org_Host_Light_309px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/fosshost_org_Host_Light_309px.png -------------------------------------------------------------------------------- /docs/images/ci/fosshost_org_Host_Light_38px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/fosshost_org_Host_Light_38px.png -------------------------------------------------------------------------------- /docs/images/ci/gandi-ar21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/gandi-ar21.png -------------------------------------------------------------------------------- /docs/images/ci/jenkins-nut-large-256px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/jenkins-nut-large-256px.png -------------------------------------------------------------------------------- /docs/images/ci/jenkins-nut-large-squared.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/jenkins-nut-large-squared.png -------------------------------------------------------------------------------- /docs/images/ci/jenkins-nut-large-with-plateborder.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/jenkins-nut-large-with-plateborder.pdn -------------------------------------------------------------------------------- /docs/images/ci/jenkins-nut-large.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/jenkins-nut-large.pdn -------------------------------------------------------------------------------- /docs/images/ci/jenkins-nut-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/jenkins-nut-large.png -------------------------------------------------------------------------------- /docs/images/ci/jenkins-nut-small-256px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/jenkins-nut-small-256px.png -------------------------------------------------------------------------------- /docs/images/ci/jenkins-nut-small.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/jenkins-nut-small.pdn -------------------------------------------------------------------------------- /docs/images/ci/jenkins-nut-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/jenkins-nut-small.png -------------------------------------------------------------------------------- /docs/images/ci/jenkins-nut-squared.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/jenkins-nut-squared.png -------------------------------------------------------------------------------- /docs/images/ci/jenkins-nut-transparent-bg-140pxW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/jenkins-nut-transparent-bg-140pxW.png -------------------------------------------------------------------------------- /docs/images/ci/jenkins-nut-transparent-bg-40px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/jenkins-nut-transparent-bg-40px.png -------------------------------------------------------------------------------- /docs/images/ci/jenkins-nut-transparent-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/jenkins-nut-transparent-bg.png -------------------------------------------------------------------------------- /docs/images/ci/jenkins-nut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/ci/jenkins-nut.png -------------------------------------------------------------------------------- /docs/images/hostedby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/hostedby.png -------------------------------------------------------------------------------- /docs/images/note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/note.png -------------------------------------------------------------------------------- /docs/images/nut-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/nut-banner.png -------------------------------------------------------------------------------- /docs/images/nut-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/nut-logo.png -------------------------------------------------------------------------------- /docs/images/nut_layering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/nut_layering.png -------------------------------------------------------------------------------- /docs/images/old-cgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/old-cgi.png -------------------------------------------------------------------------------- /docs/images/simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/simple.png -------------------------------------------------------------------------------- /docs/images/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/docs/images/warning.png -------------------------------------------------------------------------------- /docs/man/.editorconfig: -------------------------------------------------------------------------------- 1 | # Nested configuration file 2 | 3 | # The following documents with code samples have 4 | # intentional trailing whitespace and should be 5 | # only reformatted manually and attentively: 6 | [{nut.conf,upsmon.conf}.txt] 7 | trim_trailing_whitespace = false 8 | -------------------------------------------------------------------------------- /docs/man/.gitignore: -------------------------------------------------------------------------------- 1 | /*.1* 2 | /*.2* 3 | /*.3* 4 | /*.4* 5 | /*.5* 6 | /*.6* 7 | /*.7* 8 | /*.8* 9 | /*.9* 10 | /*.html 11 | /tmp/ 12 | /linkman-driver-names.txt 13 | /linkman-drivertool-names.txt 14 | /linkman-docbuildmode-note.txt 15 | /linkman-*.txt.tmp 16 | /.check-html-man 17 | /.check-man-pages 18 | /.check-man-txt 19 | -------------------------------------------------------------------------------- /docs/man/bestfcom.txt: -------------------------------------------------------------------------------- 1 | BESTFCOM(8) 2 | =========== 3 | 4 | NAME 5 | ---- 6 | 7 | bestfcom - Driver for Best Power Fortress/Ferrups 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | *bestfcom* -h 13 | 14 | *bestfcom* -a 'UPS_NAME' ['OPTIONS'] 15 | 16 | NOTE: This man page only documents the hardware-specific features of the 17 | bestfcom driver. For information about the core driver, see 18 | linkman:nutupsdrv[8]. 19 | 20 | SUPPORTED HARDWARE 21 | ------------------ 22 | 23 | Best Power Fortress/Ferrups implementing the Fortress UPS Protocol 24 | (f-command set). (For older Fortress units, see 25 | linkman:bestfortress[8].) 26 | 27 | EXTRA ARGUMENTS 28 | --------------- 29 | 30 | This driver does not support any extra settings in the 31 | linkman:ups.conf[5]. 32 | 33 | AUTHORS 34 | ------- 35 | 36 | * Kent Polk (bestfcom) 37 | * Andreas Wrede, John Stone (bestuferrups) 38 | * Grant Taylor (bestfort) 39 | * Russell Kroll (bestups) 40 | 41 | SEE ALSO 42 | -------- 43 | 44 | The core driver: 45 | ~~~~~~~~~~~~~~~~ 46 | 47 | linkman:nutupsdrv[8] 48 | 49 | Internet resources: 50 | ~~~~~~~~~~~~~~~~~~~ 51 | 52 | The NUT (Network UPS Tools) home page: https://www.networkupstools.org/ 53 | -------------------------------------------------------------------------------- /docs/man/bestuferrups.txt: -------------------------------------------------------------------------------- 1 | BESTUFERRUPS(8) 2 | =============== 3 | 4 | NAME 5 | ---- 6 | 7 | bestuferrups - Driver for Best Power Micro-Ferrups 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | *bestuferrups* -h 13 | 14 | *bestuferrups* -a 'UPS_NAME' ['OPTIONS'] 15 | 16 | NOTE: This man page only documents the hardware-specific features of the 17 | bestuferrups driver. For information about the core driver, see 18 | linkman:nutupsdrv[8]. 19 | 20 | SUPPORTED HARDWARE 21 | ------------------ 22 | 23 | Best Power Micro-Ferrups ME3100, probably other similar models too. 24 | 25 | EXTRA ARGUMENTS 26 | --------------- 27 | 28 | This driver does not support any extra settings in the 29 | linkman:ups.conf[5]. 30 | 31 | AUTHORS 32 | ------- 33 | 34 | * Andreas Wrede, John Stone (bestuferrups) 35 | * Grant Taylor (bestfort) 36 | * Russell Kroll (bestups) 37 | 38 | SEE ALSO 39 | -------- 40 | 41 | The core driver: 42 | ~~~~~~~~~~~~~~~~ 43 | 44 | linkman:nutupsdrv[8] 45 | 46 | Internet resources: 47 | ~~~~~~~~~~~~~~~~~~~ 48 | 49 | The NUT (Network UPS Tools) home page: https://www.networkupstools.org/ 50 | -------------------------------------------------------------------------------- /docs/man/blazer_ser.txt: -------------------------------------------------------------------------------- 1 | BLAZER_SER(8) 2 | ============= 3 | :blazer_usb!: 4 | 5 | NAME 6 | ---- 7 | 8 | blazer_ser - Driver for Megatec/Q1 protocol serial based UPS equipment 9 | 10 | SYNOPSIS 11 | -------- 12 | 13 | *blazer_ser* -h 14 | 15 | *blazer_ser* -a 'UPS_NAME' ['OPTIONS'] 16 | 17 | include::blazer-common.txt[] 18 | 19 | //// 20 | // dummy linkman for .txt-prepped rewrite 21 | //// 22 | -------------------------------------------------------------------------------- /docs/man/blazer_usb.txt: -------------------------------------------------------------------------------- 1 | BLAZER_USB(8) 2 | ============= 3 | :blazer_usb: 4 | 5 | NAME 6 | ---- 7 | 8 | blazer_usb - Driver for Megatec/Q1 protocol USB based UPS equipment 9 | 10 | SYNOPSIS 11 | -------- 12 | 13 | *blazer_usb* -h 14 | 15 | *blazer_usb* -a 'UPS_NAME' ['OPTIONS'] 16 | 17 | include::blazer-common.txt[] 18 | 19 | //// 20 | // dummy linkman for .txt-prepped rewrite 21 | //// 22 | -------------------------------------------------------------------------------- /docs/man/etapro.txt: -------------------------------------------------------------------------------- 1 | ETAPRO(8) 2 | ========= 3 | 4 | NAME 5 | ---- 6 | 7 | etapro - Driver for ETA UPS equipment 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | *etapro* -h 13 | 14 | *etapro* -a 'UPS_NAME' ['OPTIONS'] 15 | 16 | NOTE: This man page only documents the hardware-specific features of the 17 | etapro driver. For information about the core driver, see 18 | linkman:nutupsdrv[8]. 19 | 20 | SUPPORTED HARDWARE 21 | ------------------ 22 | 23 | This driver supports ETA UPS equipment with the "PRO" option for smart mode. 24 | 25 | EXTRA ARGUMENTS 26 | --------------- 27 | 28 | This driver does not support any extra settings in the 29 | linkman:ups.conf[5]. 30 | 31 | AUTHOR 32 | ------ 33 | 34 | Marek Michalkiewicz 35 | 36 | SEE ALSO 37 | -------- 38 | 39 | The core driver: 40 | ~~~~~~~~~~~~~~~~ 41 | 42 | linkman:nutupsdrv[8] 43 | 44 | Internet resources: 45 | ~~~~~~~~~~~~~~~~~~~ 46 | 47 | The NUT (Network UPS Tools) home page: https://www.networkupstools.org/ 48 | -------------------------------------------------------------------------------- /docs/man/everups.txt: -------------------------------------------------------------------------------- 1 | EVERUPS(8) 2 | ========== 3 | 4 | NAME 5 | ---- 6 | 7 | everups - Driver for Ever UPS models 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | *everups* -h 13 | 14 | *everups* -a 'UPS_NAME' ['OPTIONS'] 15 | 16 | NOTE: This man page only documents the hardware-specific features of the 17 | everups driver. For information about the core driver, see 18 | linkman:nutupsdrv[8]. 19 | 20 | SUPPORTED HARDWARE 21 | ------------------ 22 | 23 | This driver should recognize the NET *-DPC and AP *-PRO models. 24 | 25 | EXTRA ARGUMENTS 26 | --------------- 27 | 28 | This driver does not support any extra settings in the 29 | linkman:ups.conf[5]. 30 | 31 | BUGS 32 | ---- 33 | 34 | This UPS can only switch off the load if it's running on battery. This 35 | means you may be vulnerable to power races if your shutdown scripts 36 | don't sleep and force a reboot. 37 | 38 | AUTHOR 39 | ------ 40 | 41 | Bartek Szady 42 | 43 | SEE ALSO 44 | -------- 45 | 46 | The core driver: 47 | ~~~~~~~~~~~~~~~~ 48 | 49 | linkman:nutupsdrv[8] 50 | 51 | Internet resources: 52 | ~~~~~~~~~~~~~~~~~~~ 53 | 54 | The NUT (Network UPS Tools) home page: https://www.networkupstools.org/ 55 | -------------------------------------------------------------------------------- /docs/man/gamatronic.txt: -------------------------------------------------------------------------------- 1 | GAMATRONIC(8) 2 | ============= 3 | 4 | NAME 5 | ---- 6 | 7 | gamatronic - Driver for Gamatronic UPS equipment 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | *gamatronic* -h 13 | 14 | *gamatronic* -a 'UPS_NAME' ['OPTIONS'] 15 | 16 | NOTE: This man page only documents the hardware-specific features of the 17 | gamatronic driver. For information about the core driver, see 18 | linkman:nutupsdrv[8]. 19 | 20 | SUPPORTED HARDWARE 21 | ------------------ 22 | 23 | Various -- Rebuilt to work with Gamatronic UPS Units, but should recognize any 24 | UPS that speaks the SEC protocol at 1200-19200 bps. 25 | 26 | EXTRA ARGUMENTS 27 | --------------- 28 | 29 | This driver does not support any extra settings in the 30 | linkman:ups.conf[5]. 31 | 32 | AUTHOR 33 | ------ 34 | 35 | Nadav Moskovitch 36 | 37 | SEE ALSO 38 | -------- 39 | 40 | The core driver 41 | ~~~~~~~~~~~~~~~ 42 | 43 | linkman:nutupsdrv[8] 44 | 45 | Internet resources 46 | ~~~~~~~~~~~~~~~~~~ 47 | 48 | The NUT (Network UPS Tools) home page: https://www.networkupstools.org/ 49 | -------------------------------------------------------------------------------- /docs/man/isbmex.txt: -------------------------------------------------------------------------------- 1 | ISBMEX(8) 2 | ========= 3 | 4 | NAME 5 | ---- 6 | 7 | isbmex - Driver for ISBMEX UPS equipment 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | *isbmex* -h 13 | 14 | *isbmex* -a 'UPS_NAME' ['OPTIONS'] 15 | 16 | NOTE: This man page only documents the hardware-specific features of the 17 | isbmex driver. For information about the core driver, see 18 | linkman:nutupsdrv[8]. 19 | 20 | SUPPORTED HARDWARE 21 | ------------------ 22 | 23 | This driver supports SOLA/BASIC Mexico ISBMEX protocol UPS equipment. 24 | 25 | EXTRA ARGUMENTS 26 | --------------- 27 | 28 | This driver does not support any extra settings in the 29 | linkman:ups.conf[5]. 30 | 31 | AUTHOR 32 | ------ 33 | 34 | Edscott Wilson Garcia 35 | 36 | SEE ALSO 37 | -------- 38 | 39 | The core driver: 40 | ~~~~~~~~~~~~~~~~ 41 | 42 | linkman:nutupsdrv[8] 43 | 44 | Internet resources: 45 | ~~~~~~~~~~~~~~~~~~~ 46 | 47 | The NUT (Network UPS Tools) home page: https://www.networkupstools.org/ 48 | -------------------------------------------------------------------------------- /docs/man/ivtscd.txt: -------------------------------------------------------------------------------- 1 | IVTSCD(8) 2 | ========= 3 | 4 | NAME 5 | ---- 6 | 7 | ivtscd - Driver for the IVT Solar Controller Device 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | *ivtscd* -h 13 | 14 | *ivtscd* -a 'UPS_NAME' ['OPTIONS'] 15 | 16 | NOTE: This man page only documents the hardware-specific features of the 17 | *ivtscd* driver. For information about the core driver, see 18 | linkman:nutupsdrv[8]. 19 | 20 | DESCRIPTION 21 | ----------- 22 | 23 | This driver allows to access the IVT SCD-series devices. 24 | 25 | EXTRA ARGUMENTS 26 | --------------- 27 | 28 | This driver does not support any extra argument. 29 | 30 | AUTHOR 31 | ------ 32 | 33 | Arjen de Korte 34 | 35 | SEE ALSO 36 | -------- 37 | 38 | The core driver: 39 | ~~~~~~~~~~~~~~~~ 40 | 41 | linkman:nutupsdrv[8] 42 | 43 | Internet resources: 44 | ~~~~~~~~~~~~~~~~~~~ 45 | 46 | The NUT (Network UPS Tools) home page: https://www.networkupstools.org/ 47 | -------------------------------------------------------------------------------- /docs/man/microdowell.txt: -------------------------------------------------------------------------------- 1 | MICRODOWELL(8) 2 | ============== 3 | 4 | NAME 5 | ---- 6 | 7 | microdowell - Driver for Microdowell Enterprise UPS series 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | *microdowell* -h 13 | 14 | *microdowell* -a 'UPS_NAME' ['OPTIONS'] 15 | 16 | NOTE: This man page only documents the hardware-specific features of the 17 | Microdowell driver. For information about the core driver, see 18 | linkman:nutupsdrv[8]. 19 | 20 | SUPPORTED HARDWARE 21 | ------------------ 22 | 23 | This driver was developed for the Enterprise Nxx and Bxx models. 24 | Other Microdowell models may work, too. 25 | 26 | EXTRA ARGUMENTS 27 | --------------- 28 | 29 | This driver does not support any extra settings in the 30 | linkman:ups.conf[5]. 31 | 32 | AUTHOR 33 | ------ 34 | 35 | Elio Corbolante 36 | 37 | SEE ALSO 38 | -------- 39 | 40 | The core driver: 41 | ~~~~~~~~~~~~~~~~ 42 | 43 | linkman:nutupsdrv[8] 44 | 45 | Internet resources: 46 | ~~~~~~~~~~~~~~~~~~~ 47 | 48 | The NUT (Network UPS Tools) home page: https://www.networkupstools.org/ 49 | -------------------------------------------------------------------------------- /docs/man/networked_hostnames.txt: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////// 2 | // This snippet is included into networked driver documentation // 3 | // typically under KNOWN ISSUES/BUGS (the "-----" section type) // 4 | ////////////////////////////////////////////////////////////////// 5 | 6 | Using host names for UPS NMC 7 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 8 | 9 | An UPS network management card may be assigned a fixed/static IP address or 10 | a dynamic one (e.g. by DHCP) in your network. Due to this, you may want or 11 | have to use a dynamic naming service to access the UPS. Note that this may 12 | become a problem specifically during large outages and shutdowns, when your 13 | DHCP/DNS server might already go down while the driver needs to resolve the 14 | name involved (especially during late-shutdown hooks, when a new instance 15 | of the driver program might start just to tell the UPS to power off or to 16 | power-cycle). 17 | 18 | It may be wise to ensure your OS name service client can cache the UPS name 19 | sufficiently long, or to use fixed IP addressing (and an entry in `/etc/hosts` 20 | for good measure, so you only have one spot to eventually re-configure this). 21 | -------------------------------------------------------------------------------- /docs/man/nutscan_cidr_to_ip.txt: -------------------------------------------------------------------------------- 1 | NUTSCAN_CIDR_TO_IP(3) 2 | ===================== 3 | 4 | NAME 5 | ---- 6 | 7 | nutscan_cidr_to_ip - Convert a CIDR IP to a range of IP address. 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | ------ 13 | #include 14 | 15 | int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip); 16 | ------ 17 | 18 | DESCRIPTION 19 | ----------- 20 | 21 | The *nutscan_cidr_to_ip()* function converts a range of IP address in 22 | the CIDR format given as a string in 'cidr', to two IPs in strings 23 | pointed by 'start_ip' and 'stop_ip' which can be used as input 24 | parameters in the scanning functions of the libnutscan API. 25 | 26 | It is the caller's responsibility to linkmanext:free[3] the 'start_ip' 27 | and 'stop_ip' strings. 28 | 29 | RETURN VALUE 30 | ------------ 31 | 32 | The *nutscan_cidr_to_ip()* function returns '0' if an error occurred 33 | (invalid 'cidr' address) or '1' if successful. 34 | 35 | NOTES 36 | ----- 37 | 38 | Technically, the function is currently defined in 'nutscan-ip.h' file. 39 | 40 | SEE ALSO 41 | -------- 42 | 43 | linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], 44 | linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], 45 | linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], 46 | linkman:nutscan_display_ups_conf_with_sanity_check[3], 47 | linkman:nutscan_display_parsable[3], linkman:nutscan_display_ups_conf[3] 48 | -------------------------------------------------------------------------------- /docs/man/nutscan_display_ups_conf.txt: -------------------------------------------------------------------------------- 1 | NUTSCAN_DISPLAY_UPS_CONF(3) 2 | =========================== 3 | 4 | NAME 5 | ---- 6 | 7 | nutscan_display_ups_conf - Display the specified `nutscan_device_t` 8 | structure on stdout. 9 | 10 | SYNOPSIS 11 | -------- 12 | 13 | ------ 14 | #include 15 | 16 | void nutscan_display_ups_conf(nutscan_device_t * device); 17 | ------ 18 | 19 | DESCRIPTION 20 | ----------- 21 | 22 | The *nutscan_display_ups_conf()* function displays all NUT devices in 23 | 'device' to `stdout`. It displays them in a way that it can be directly 24 | copied into the `ups.conf` file. 25 | 26 | It is called from *nutscan_display_ups_conf_with_sanity_check()* to 27 | provide an aggregate content for `ups.conf` file in one shot. 28 | 29 | SEE ALSO 30 | -------- 31 | 32 | linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], 33 | linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], 34 | linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], 35 | linkman:nutscan_display_ups_conf_with_sanity_check[3], 36 | linkman:nutscan_display_sanity_check[3], 37 | linkman:nutscan_display_sanity_check_serial[3], 38 | linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], 39 | linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], 40 | linkman:nutscan_add_device_to_device[3], linkman:nutscan_cidr_to_ip[3] 41 | -------------------------------------------------------------------------------- /docs/man/nutscan_display_ups_conf_with_sanity_check.txt: -------------------------------------------------------------------------------- 1 | NUTSCAN_DISPLAY_UPS_CONF_WITH_SANITY_CHECK(3) 2 | ============================================= 3 | 4 | NAME 5 | ---- 6 | 7 | nutscan_display_ups_conf_with_sanity_check - Display the specified 8 | `nutscan_device_t` structure and sanity-check warnings on stdout. 9 | 10 | SYNOPSIS 11 | -------- 12 | 13 | ------ 14 | #include 15 | 16 | void nutscan_display_ups_conf_with_sanity_check(nutscan_device_t * device); 17 | ------ 18 | 19 | DESCRIPTION 20 | ----------- 21 | 22 | The *nutscan_display_ups_conf_with_sanity_check()* function displays 23 | all NUT devices in 'device' to `stdout`, and follows up with comments 24 | about sanity-check violations (if any). It displays them in a way that 25 | it can be directly copied into the `ups.conf` file. 26 | 27 | SEE ALSO 28 | -------- 29 | 30 | linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], 31 | linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], 32 | linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], 33 | linkman:nutscan_display_sanity_check[3], 34 | linkman:nutscan_display_sanity_check_serial[3], 35 | linkman:nutscan_display_ups_conf[3], 36 | linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], 37 | linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], 38 | linkman:nutscan_add_device_to_device[3], linkman:nutscan_cidr_to_ip[3] 39 | -------------------------------------------------------------------------------- /docs/man/nutscan_free_device.txt: -------------------------------------------------------------------------------- 1 | NUTSCAN_FREE_DEVICE(3) 2 | ====================== 3 | 4 | NAME 5 | ---- 6 | 7 | nutscan_free_device - Free a `nutscan_device_t` structure created by 8 | `nutscan_new_device`. 9 | 10 | SYNOPSIS 11 | -------- 12 | 13 | ------ 14 | #include 15 | 16 | void nutscan_free_device(nutscan_device_t * device); 17 | ------ 18 | 19 | DESCRIPTION 20 | ----------- 21 | 22 | The *nutscan_free_device()* function can free a `nutscan_device_type_t` 23 | structure. Doing so, it frees the whole linked list, not only the given 24 | device. 25 | 26 | NOTES 27 | ----- 28 | 29 | Technically, the function is currently defined in 'nutscan-device.h' file. 30 | 31 | SEE ALSO 32 | -------- 33 | 34 | linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], 35 | linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], 36 | linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], 37 | linkman:nutscan_display_ups_conf_with_sanity_check[3], 38 | linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], 39 | linkman:nutscan_new_device[3], linkman:nutscan_add_option_to_device[3], 40 | linkman:nutscan_add_device_to_device[3] 41 | -------------------------------------------------------------------------------- /docs/man/nutscan_new_device.txt: -------------------------------------------------------------------------------- 1 | NUTSCAN_NEW_DEVICE(3) 2 | ====================== 3 | 4 | NAME 5 | ---- 6 | 7 | nutscan_new_device - Create a new nutscan_device_t structure. 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | ------ 13 | #include 14 | 15 | nutscan_device_t * nutscan_new_device(void); 16 | ------ 17 | 18 | DESCRIPTION 19 | ----------- 20 | 21 | The *nutscan_new_device()* function allocates a new `nutscan_device_type_t` 22 | structure. 23 | 24 | RETURN VALUE 25 | ------------ 26 | 27 | The *nutscan_new_device()* function returns the newly allocated 28 | `nutscan_device_type_t` structure. 29 | 30 | NOTES 31 | ----- 32 | 33 | Technically, the function is currently defined in 'nutscan-device.h' file. 34 | 35 | SEE ALSO 36 | -------- 37 | 38 | linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], 39 | linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], 40 | linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3] 41 | linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3] 42 | linkman:nutscan_display_sanity_check[3], 43 | linkman:nutscan_display_sanity_check_serial[3], 44 | linkman:nutscan_display_ups_conf_with_sanity_check[3], 45 | linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3] 46 | linkman:nutscan_add_device_to_device[3] 47 | -------------------------------------------------------------------------------- /docs/man/nutscan_stringify_ip_ranges.txt: -------------------------------------------------------------------------------- 1 | NUTSCAN_STRINGIFY_IP_RANGES(3) 2 | ============================== 3 | 4 | NAME 5 | ---- 6 | 7 | nutscan_stringify_ip_ranges - Collect contents of a `nutscan_ip_range_list_t` 8 | structure into a string buffer that can be further printed into logs. 9 | 10 | SYNOPSIS 11 | -------- 12 | 13 | ------ 14 | #include 15 | 16 | const char * nutscan_stringify_ip_ranges(nutscan_ip_range_list_t *irl); 17 | ------ 18 | 19 | DESCRIPTION 20 | ----------- 21 | 22 | The *nutscan_stringify_ip_ranges()* function can walk a `nutscan_ip_range_list_t` 23 | structure to report its contents: count of list items, and a comma-separated 24 | listing with each item as a single token (if `start_ip==end_ip` in that range) 25 | or a range as `start_ip .. end_ip`. 26 | 27 | Returns a pointer to internal statically allocated buffer which would be 28 | overwritten by subsequent calls, but does not have to be freed by caller. 29 | 30 | WARNING: Callers should use semaphores if accessing this function in multi-thread context! 31 | 32 | NOTES 33 | ----- 34 | 35 | Technically, the function is currently defined in 'nutscan-ip.h' file. 36 | 37 | SEE ALSO 38 | -------- 39 | 40 | linkman:nutscan_free_ip_ranges[3], linkman:nutscan_add_ip_range[3], 41 | linkman:nutscan_cidr_to_ip[3], 42 | linkman:nutscan_ip_ranges_iter_init[3], 43 | linkman:nutscan_ip_ranges_iter_inc[3] 44 | -------------------------------------------------------------------------------- /docs/man/sms_ser.txt: -------------------------------------------------------------------------------- 1 | SMS_SER(8) 2 | ========== 3 | 4 | NAME 5 | ---- 6 | 7 | sms_ser - Driver for SMS UPS Protocol 1Phase. 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | *sms_ser* -h 13 | 14 | *sms_ser* -a 'UPS_NAME' ['OPTIONS'] 15 | 16 | NOTE: This man page only documents the hardware-specific features 17 | of the sms_ser driver. For information about the core driver, see 18 | linkman:nutupsdrv[8], and for the technical background check the 19 | `docs/sms-brazil-protocol.txt` file in NUT sources. 20 | 21 | NOTE: Given the proximity of this protocol to Megatec Qx family, 22 | this driver may later become part of `nutdrv_qx` collection. 23 | 24 | 25 | SUPPORTED HARDWARE 26 | ------------------ 27 | 28 | sms_ser supports only the "sms 1phase" SMS Product, as described in 29 | the `monofasico.xml` file delivered with the device. 30 | 31 | Other SMS protocols (for their other products) are not supported by 32 | this driver. 33 | 34 | 35 | AUTHOR 36 | ------ 37 | 38 | Alex W. Baulé 39 | 40 | SEE ALSO 41 | -------- 42 | 43 | The core driver 44 | ~~~~~~~~~~~~~~~~ 45 | 46 | linkman:nutupsdrv[8] 47 | 48 | Internet resources 49 | ~~~~~~~~~~~~~~~~~~ 50 | 51 | The NUT (Network UPS Tools) home page: https://www.networkupstools.org/ 52 | -------------------------------------------------------------------------------- /docs/man/upscli_add_host_cert.txt: -------------------------------------------------------------------------------- 1 | UPSCLI_ADD_HOST_CERT(3) 2 | ======================= 3 | 4 | NAME 5 | ---- 6 | 7 | upscli_add_host_cert - Register a security rule for an host. 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | ------ 13 | #include 14 | 15 | void upscli_add_host_cert( 16 | const char* hostname, 17 | const char* certname, 18 | int certverify, 19 | int forcessl); 20 | ------ 21 | 22 | DESCRIPTION 23 | ----------- 24 | 25 | The *upscli_add_host_cert()* function registers a security rule associated 26 | to the 'hostname'. All connections to this host use this rule. 27 | 28 | The rule is composed of the certificate name 'certname' expected for 29 | the host, 'certverify' if the certificate must be validated for the host 30 | and 'forcessl' if a secured connection must be used to connect to the host. 31 | 32 | Note: This call only functions if upsclient has been compiled with NSS 33 | support. If instead it was compiled with OpenSSL support, this function 34 | contains an empty definition and will take no action when called. 35 | 36 | RETURN VALUE 37 | ------------ 38 | 39 | *upscli_add_host_cert()* returns no value. 40 | 41 | SEE ALSO 42 | -------- 43 | 44 | linkman:upscli_init[3], linkman:upscli_connect[3], linkman:upscli_ssl[3], 45 | linkman:upscli_strerror[3], linkman:upscli_upserror[3] 46 | -------------------------------------------------------------------------------- /docs/man/upscli_cleanup.txt: -------------------------------------------------------------------------------- 1 | UPSCLI_CLEANUP(3) 2 | ================= 3 | 4 | NAME 5 | ---- 6 | 7 | upscli_cleanup - Clean-up upsclient module after usage. 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | ------ 13 | #include 14 | 15 | int upscli_cleanup(void); 16 | ------ 17 | 18 | DESCRIPTION 19 | ----------- 20 | 21 | The *upscli_cleanup()* function flushes SSL caches and frees memory 22 | used internally in upsclient module. 23 | 24 | RETURN VALUE 25 | ------------ 26 | 27 | The *upscli_cleanup()* function returns '1' on success, or '-1' if an error 28 | occurs. 29 | 30 | SEE ALSO 31 | -------- 32 | 33 | linkman:upscli_init[3], 34 | linkman:upscli_strerror[3], linkman:upscli_upserror[3] 35 | -------------------------------------------------------------------------------- /docs/man/upscli_disconnect.txt: -------------------------------------------------------------------------------- 1 | UPSCLI_DISCONNECT(3) 2 | ==================== 3 | 4 | NAME 5 | ---- 6 | 7 | upscli_disconnect - Disconnect from a UPS server 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | ------ 13 | #include 14 | 15 | int upscli_disconnect(UPSCONN_t *ups); 16 | ------ 17 | 18 | DESCRIPTION 19 | ----------- 20 | 21 | The *upscli_disconnect()* function takes the pointer 'ups' to a 22 | `UPSCONN_t` state structure, shuts down the connection to the server, 23 | and frees dynamic memory used by the state structure. 24 | 25 | The `UPSCONN_t` structure is no longer valid after this function is called. 26 | 27 | This function must be called, or your program will leak memory and 28 | file descriptors. 29 | 30 | RETURN VALUE 31 | ------------ 32 | 33 | The *upscli_disconnect()* function returns '0' on success, or '-1' if an 34 | error occurs. 35 | 36 | SEE ALSO 37 | -------- 38 | 39 | linkman:upscli_connect[3], linkman:upscli_fd[3], 40 | linkman:upscli_strerror[3], linkman:upscli_upserror[3] 41 | -------------------------------------------------------------------------------- /docs/man/upscli_fd.txt: -------------------------------------------------------------------------------- 1 | UPSCLI_FD(3) 2 | ============ 3 | 4 | NAME 5 | ---- 6 | 7 | upscli_fd - Get file descriptor for connection 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | ------ 13 | #include 14 | 15 | int upscli_fd(UPSCONN_t *ups); 16 | ------ 17 | 18 | DESCRIPTION 19 | ----------- 20 | 21 | The *upscli_fd()* function takes the pointer 'ups' to a `UPSCONN_t` 22 | state structure and returns the value of the file descriptor for 23 | that connection, if any. 24 | 25 | This may be useful for determining if the connection to linkman:upsd[8] 26 | has been lost. 27 | 28 | RETURN VALUE 29 | ------------ 30 | 31 | The *upscli_fd()* function returns the file descriptor, which 32 | may be any non-negative number. 33 | 34 | It returns '-1' if an error occurs. 35 | 36 | SEE ALSO 37 | -------- 38 | 39 | linkman:upscli_connect[3], linkman:upscli_strerror[3], linkman:upscli_upserror[3] 40 | -------------------------------------------------------------------------------- /docs/man/upscli_get_default_connect_timeout.txt: -------------------------------------------------------------------------------- 1 | UPSCLI_GET_DEFAULT_CONNECT_TIMEOUT(3) 2 | ===================================== 3 | 4 | NAME 5 | ---- 6 | 7 | upscli_get_default_connect_timeout - Return the upsclient module default timeout for initial connections. 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | ------ 13 | #include 14 | 15 | int upscli_get_default_connect_timeout(struct timeval *ptv); 16 | ------ 17 | 18 | DESCRIPTION 19 | ----------- 20 | 21 | The *upscli_get_default_connect_timeout()* function takes the pointer 'ptv' 22 | to a 'struct timeval' and returns the default network timeout for initial 23 | connections last assigned with linkman:upscli_set_default_connect_timeout[3]. 24 | 25 | SEE ALSO 26 | -------- 27 | 28 | linkman:upscli_connect[3], linkman:upscli_tryconnect[3], 29 | linkman:upscli_init_default_connect_timeout[3], 30 | linkman:upscli_set_default_connect_timeout[3] 31 | -------------------------------------------------------------------------------- /docs/man/upscli_splitaddr.txt: -------------------------------------------------------------------------------- 1 | UPSCLI_SPLITADDR(3) 2 | =================== 3 | 4 | NAME 5 | ---- 6 | 7 | upscli_splitaddr - Split a listening address into its components 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | ------ 13 | #include 14 | 15 | int upscli_splitaddr(const char *buf, char **hostname, 16 | int *port) 17 | ------ 18 | 19 | DESCRIPTION 20 | ----------- 21 | 22 | The *upscli_splitaddr()* function takes a pointer to the listening address 23 | definition 'buf' and returns the pointer to dynamically allocated 24 | memory in 'hostname'. It also copies the port number into 'port'. 25 | 26 | FORMATTING 27 | ---------- 28 | 29 | A listening address definition is specified according to this format: 30 | 31 | [:] 32 | 33 | Definitions without an explicit port value receive the default value of 34 | '3493'. 35 | 36 | MEMORY USAGE 37 | ------------ 38 | 39 | You must linkmanext:free[3] the pointer 'hostname' when you are done 40 | with it to avoid memory leaks. 41 | 42 | RETURN VALUE 43 | ------------ 44 | 45 | The *upscli_splitaddr()* function returns '0' on success, or '-1' if an 46 | error occurs. 47 | 48 | SEE ALSO 49 | -------- 50 | 51 | linkman:upscli_fd[3], linkman:upscli_get[3], 52 | linkman:upscli_readline[3], linkman:upscli_sendline[3], 53 | linkman:upscli_splitname[3], linkman:upscli_ssl[3], 54 | linkman:upscli_strerror[3], linkman:upscli_upserror[3] 55 | -------------------------------------------------------------------------------- /docs/man/upscli_ssl.txt: -------------------------------------------------------------------------------- 1 | UPSCLI_SSL(3) 2 | ============= 3 | 4 | NAME 5 | ---- 6 | 7 | upscli_ssl - Check SSL mode for current connection 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | ------ 13 | #include 14 | 15 | int upscli_ssl(UPSCONN_t *ups); 16 | ------ 17 | 18 | DESCRIPTION 19 | ----------- 20 | 21 | The *upscli_ssl*() function takes the pointer 'ups' to a 22 | `UPSCONN_t` state structure. It only returns '1' if SSL support has been 23 | compiled into the linkman:upsclient[3] library, and if it was successfully 24 | enabled for this connection. 25 | 26 | RETURN VALUE 27 | ------------ 28 | 29 | The *upscli_ssl*() function returns '1' if SSL is running, and '0' if 30 | not. It returns '-1' in the event of an error. 31 | 32 | SEE ALSO 33 | -------- 34 | 35 | linkman:upscli_fd[3], linkman:upscli_get[3], 36 | linkman:upscli_readline[3], linkman:upscli_sendline[3], 37 | linkman:upscli_strerror[3], linkman:upscli_upserror[3] 38 | -------------------------------------------------------------------------------- /docs/man/upscli_str_contains_token.txt: -------------------------------------------------------------------------------- 1 | UPSCLI_STR_CONTAINS_TOKEN(3) 2 | ============================ 3 | 4 | NAME 5 | ---- 6 | 7 | upscli_str_contains_token - Verify that an unique token is present in the string 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | ------ 13 | #include 14 | 15 | int upscli_str_contains_token(const char *string, const char *token); 16 | ------ 17 | 18 | DESCRIPTION 19 | ----------- 20 | 21 | The *upscli_str_contains_token*() function takes the pointer 'tgt' to a 22 | caller-provided `const char *` buffer, comprised of unique tokens separated 23 | by single space characters (ASCII '0x20'), and the pointer 'token' to a 24 | presumed-contiguous token value that should be found in the 'tgt' buffer. 25 | 26 | RETURN VALUE 27 | ------------ 28 | 29 | The *upscli_str_contains_token*() function returns a numeric code: 30 | 31 | * 'non-zero' if the 'token' value was found in 'tgt' buffer (possibly 32 | surrounded by space characters, or being at start/end of the string); 33 | * '0' if 'token' was not found, or if either 'token' or 'tgt' string 34 | was `NULL` or empty. 35 | 36 | SEE ALSO 37 | -------- 38 | 39 | linkman:upscli_str_add_unique_token[3] 40 | -------------------------------------------------------------------------------- /docs/man/upscli_strerror.txt: -------------------------------------------------------------------------------- 1 | UPSCLI_STRERROR(3) 2 | ================== 3 | 4 | NAME 5 | ---- 6 | 7 | upscli_strerror - Return a string describing error condition 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | ------ 13 | #include 14 | 15 | const char *upscli_strerror(UPSCONN_t *ups); 16 | ------ 17 | 18 | DESCRIPTION 19 | ----------- 20 | 21 | The *upscli_strerror*() function takes the pointer 'ups' to a 22 | `UPSCONN_t` state structure and returns a string describing the last error 23 | which occurred on this connection. The string is valid until the next 24 | call to *upscli_strerror*(). 25 | 26 | RETURN VALUE 27 | ------------ 28 | 29 | The *upscli_strerror*() function returns a description of the error, 30 | or an "unknown error" message if the error code is not recognized. 31 | 32 | SEE ALSO 33 | -------- 34 | 35 | linkman:upscli_fd[3], linkman:upscli_get[3], 36 | linkman:upscli_readline[3], linkman:upscli_sendline[3], 37 | linkman:upscli_ssl[3], 38 | linkman:upscli_upserror[3] 39 | -------------------------------------------------------------------------------- /docs/man/upscli_upserror.txt: -------------------------------------------------------------------------------- 1 | UPSCLI_UPSERROR(3) 2 | ================== 3 | 4 | NAME 5 | ---- 6 | 7 | upscli_upserror - Get current error number for connection 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | ------ 13 | #include 14 | 15 | int upscli_upserror(UPSCONN_t *ups); 16 | ------ 17 | 18 | DESCRIPTION 19 | ----------- 20 | 21 | The *upscli_upserror*() function takes the pointer 'ups' to a 22 | `UPSCONN_t` state structure and returns the value of the internal error 23 | number, if any. 24 | 25 | This is typically used to check for certain error values like 26 | `UPSCLI_ERR_UNKCOMMAND`. That specific error can be used for detecting 27 | older versions of linkman:upsd[8] which might not support a given command. 28 | 29 | Some error messages have additional meanings, so you should use 30 | linkman:upscli_strerror[3] to obtain readable error messages. 31 | 32 | RETURN VALUE 33 | ------------ 34 | 35 | The *upscli_upserror*() function returns one of the `UPSCLI_ERR_*` 36 | values from `upsclient.h`, or '0' if no error has occurred. 37 | 38 | SEE ALSO 39 | -------- 40 | 41 | linkman:upscli_readline[3], linkman:upscli_sendline[3], 42 | linkman:upscli_strerror[3] 43 | -------------------------------------------------------------------------------- /docs/man/upsimage.cgi.txt: -------------------------------------------------------------------------------- 1 | UPSIMAGE.CGI(8) 2 | =============== 3 | 4 | NAME 5 | ---- 6 | 7 | upsimage.cgi - Image-generating helper for upsstats.cgi 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | *upsimage.cgi* 13 | 14 | NOTE: As a CGI program, this should be invoked through your web server. 15 | If you run it from the command line, it will either complain about 16 | unauthorized access or spew a PNG at you. 17 | 18 | DESCRIPTION 19 | ----------- 20 | 21 | *upsimage.cgi* generates the graphical bars that make up the right side 22 | of the page generated by linkman:upsstats.cgi[8]. These represent the 23 | current battery charge, utility voltage, and UPS load where available. 24 | 25 | The images are in PNG format, and are created by linking to Boutell's 26 | excellent 'gd' library. 27 | 28 | ACCESS CONTROL 29 | -------------- 30 | 31 | upsstats will only talk to linkman:upsd[8] servers that have been defined 32 | in your linkman:hosts.conf[5]. If it complains about "Access to that host 33 | is not authorized", check that file first. 34 | 35 | FILES 36 | ----- 37 | 38 | linkman:hosts.conf[5] 39 | 40 | SEE ALSO 41 | -------- 42 | 43 | linkman:upsd[8], linkman:upsstats.cgi[8] 44 | 45 | Internet resources: 46 | ~~~~~~~~~~~~~~~~~~~ 47 | 48 | * The NUT (Network UPS Tools) home page: https://www.networkupstools.org/ 49 | * The gd home page: http://libgd.bitbucket.org 50 | -------------------------------------------------------------------------------- /docs/man/ve-direct.txt: -------------------------------------------------------------------------------- 1 | VE-DIRECT(8) 2 | ============ 3 | 4 | NAME 5 | ---- 6 | 7 | ve-direct - Driver for Victron UPS unit running on VE.Direct serial protocol 8 | 9 | SYNOPSIS 10 | -------- 11 | 12 | *ve-direct* -h 13 | 14 | *ve-direct* -a 'UPS_NAME' ['OPTIONS'] 15 | 16 | NOTE: This man page only documents the hardware-specific features of the 17 | *ve-direct* driver. For information about the core driver, see 18 | linkman:nutupsdrv[8]. 19 | 20 | SUPPORTED HARDWARE 21 | ------------------ 22 | 23 | The ve-direct driver should recognize all Victron models that use a serial 24 | VE.Direct protocol at 19200 bps. 25 | 26 | CABLING 27 | ------- 28 | 29 | Use Victron provided USB or serial cable to connect your Victron UPS. 30 | 31 | EXTRA ARGUMENTS 32 | --------------- 33 | 34 | This driver supports the following optional setting in the 35 | linkman:ups.conf[5]: 36 | 37 | *modelname*='name':: 38 | Set model name 39 | 40 | BUGS 41 | ---- 42 | 43 | The HEX protocol is not supported at the moment. 44 | 45 | AUTHOR 46 | ------ 47 | 48 | Petr Kubanek 49 | 50 | SEE ALSO 51 | -------- 52 | 53 | The core driver: 54 | ~~~~~~~~~~~~~~~~ 55 | 56 | linkman:nutupsdrv[8] 57 | 58 | Internet resources: 59 | ~~~~~~~~~~~~~~~~~~~ 60 | 61 | The NUT (Network UPS Tools) home page: https://www.networkupstools.org/ 62 | -------------------------------------------------------------------------------- /docs/xhtml.xsl: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /drivers/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !/*.[ch] 3 | !/Makefile.am 4 | -------------------------------------------------------------------------------- /drivers/apc-ats-mib.h: -------------------------------------------------------------------------------- 1 | /* apcats-mib.h - subdriver to monitor apcats SNMP devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2011 - 2012 Arnaud Quette 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef APCATS_MIB_H 22 | #define APCATS_MIB_H 23 | 24 | #include "main.h" 25 | #include "snmp-ups.h" 26 | 27 | extern mib2nut_info_t apc_ats; 28 | 29 | #endif /* APCATS_MIB_H */ 30 | -------------------------------------------------------------------------------- /drivers/apc-epdu-mib.h: -------------------------------------------------------------------------------- 1 | /* apc-epdu-mib.h - subdriver to monitor apc SNMP easy pdu with NUT 2 | * 3 | * Copyright (C) 4 | * 2011 - 2022 Eric Clappier 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef APC_EPDU_MIB_H 22 | #define APC_EPDU_MIB_H 23 | 24 | #include "main.h" 25 | #include "snmp-ups.h" 26 | 27 | extern mib2nut_info_t apc_pdu_epdu; 28 | 29 | #endif /* APC_EPDU_MIB_H */ 30 | -------------------------------------------------------------------------------- /drivers/apc-hid.h: -------------------------------------------------------------------------------- 1 | /* apc-hid.h - data to monitor APC USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2005 Arnaud Quette 5 | * 2005 John Stamp 6 | * 2005 Peter Selinger 7 | * 8 | * Sponsored by MGE UPS SYSTEMS 9 | * 10 | * This program is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation; either version 2 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program; if not, write to the Free Software 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | * 25 | */ 26 | 27 | #ifndef APC_HID_H 28 | #define APC_HID_H 29 | 30 | #include "usbhid-ups.h" 31 | 32 | extern subdriver_t apc_subdriver; 33 | 34 | #endif /* APC_HID_H */ 35 | -------------------------------------------------------------------------------- /drivers/apc-iem-mib.h: -------------------------------------------------------------------------------- 1 | #ifndef APC_IEM_MIB_H 2 | #define APC_IEM_MIB_H 3 | 4 | /* 5 | * FIXME: The below is needed because the main driver body uses this to determine 6 | * whether a conversion from Fahrenheit to Celsius is needed (which really should 7 | * be solved in subdriver specific formatting functions, like we do in usbhid-ups 8 | * This is used in both snmp-ups.c and apc.c logics. 9 | */ 10 | 11 | /* IEM ambient variables */ 12 | /* IEM: integrated environment monitor probe */ 13 | 14 | #define APCC_OID_IEM_TEMP ".1.3.6.1.4.1.318.1.1.10.2.3.2.1.4.1" 15 | #define APCC_OID_IEM_TEMP_UNIT ".1.3.6.1.4.1.318.1.1.10.2.3.2.1.5.1" 16 | #define APCC_IEM_FAHRENHEIT 2 17 | #define APCC_OID_IEM_HUMID ".1.3.6.1.4.1.318.1.1.10.2.3.2.1.6.1" 18 | 19 | #endif /* APC_IEM_MIB_H */ 20 | -------------------------------------------------------------------------------- /drivers/apc-mib.h: -------------------------------------------------------------------------------- 1 | #ifndef APC_MIB_H 2 | #define APC_MIB_H 3 | 4 | #include "main.h" 5 | #include "snmp-ups.h" 6 | #include "apc-iem-mib.h" 7 | 8 | extern mib2nut_info_t apc; 9 | 10 | #endif /* APC_MIB_H */ 11 | -------------------------------------------------------------------------------- /drivers/apc-pdu-mib.h: -------------------------------------------------------------------------------- 1 | /* powernet-mib-mib.h - subdriver to monitor PowerNet-MIB SNMP devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2011 - 2012 Arnaud Quette 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef APC_PDU_MIB_H 22 | #define APC_PDU_MIB_H 23 | 24 | #include "main.h" 25 | #include "snmp-ups.h" 26 | 27 | extern mib2nut_info_t apc_pdu_rpdu; 28 | extern mib2nut_info_t apc_pdu_rpdu2; 29 | extern mib2nut_info_t apc_pdu_msp; 30 | 31 | #endif /* APC_PDU_MIB_H */ 32 | -------------------------------------------------------------------------------- /drivers/arduino-hid.h: -------------------------------------------------------------------------------- 1 | /* arduino-hid.h - subdriver to monitor Arduino USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2009 Arnaud Quette 5 | * 2005 - 2006 Peter Selinger 6 | * 2008 - 2009 Arjen de Korte 7 | * 2021 Alex Bratchik 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef ARDUINO_HID_H 25 | #define ARDUINO_HID_H 26 | 27 | #include "usbhid-ups.h" 28 | 29 | extern subdriver_t arduino_subdriver; 30 | 31 | #endif /* ARDUINO_HID_H */ 32 | -------------------------------------------------------------------------------- /drivers/baytech-mib.h: -------------------------------------------------------------------------------- 1 | #ifndef BAYTECH_MIB_H 2 | #define BAYTECH_MIB_H 3 | 4 | #include "main.h" 5 | #include "snmp-ups.h" 6 | 7 | extern mib2nut_info_t baytech; 8 | 9 | #endif /* BAYTECH_MIB_H */ 10 | -------------------------------------------------------------------------------- /drivers/baytech-rpc3nc-mib.h: -------------------------------------------------------------------------------- 1 | #ifndef BAYTECH_RPC3NC_MIB_H 2 | #define BAYTECH_RPC3NC_MIB_H 3 | 4 | #include "main.h" 5 | #include "snmp-ups.h" 6 | 7 | extern mib2nut_info_t baytech_rpc3nc; 8 | 9 | #endif /* BAYTECH_RPC3NC_MIB_H */ 10 | -------------------------------------------------------------------------------- /drivers/bcmxcp_io.h: -------------------------------------------------------------------------------- 1 | /* 2 | * bcmxcp_io.h -- header for BCM/XCP IO module 3 | */ 4 | 5 | #ifndef BCMXCP_IO__ 6 | #define BCMXCP_IO__ 7 | 8 | #include "main.h" /* for usbdrv_info_t */ 9 | 10 | void send_read_command(unsigned char command); 11 | void send_write_command(unsigned char *command, size_t command_length); 12 | ssize_t get_answer(unsigned char *data, unsigned char command); 13 | ssize_t command_read_sequence(unsigned char command, unsigned char *data); 14 | ssize_t command_write_sequence(unsigned char *command, size_t command_length, unsigned char *answer); 15 | void upsdrv_initups(void); 16 | void upsdrv_cleanup(void); 17 | void upsdrv_reconnect(void); 18 | void upsdrv_comm_good(void); 19 | 20 | extern upsdrv_info_t comm_upsdrv_info; 21 | 22 | #endif /* BCMXCP_IO__ */ 23 | -------------------------------------------------------------------------------- /drivers/bcmxcp_ser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * bcmxcp_ser.h -- header for BCM/XCP RS-232 module 3 | */ 4 | 5 | #ifndef BCMXCP_SER__ 6 | #define BCMXCP_SER__ 7 | 8 | #include "serial.h" /* pulls termios.h to define speed_t */ 9 | 10 | /* This header is needed for this line, to avoid warnings about it not 11 | * being static in C file (can't hide, is also needed by nut-scanner) 12 | */ 13 | extern unsigned char BCMXCP_AUTHCMD[4]; 14 | 15 | typedef struct { 16 | speed_t rate; /* Value like B19200 defined in termios.h; note: NOT the bitrate numerically */ 17 | size_t name; /* Actual rate... WHY is this "name" - number to print interactively? */ 18 | } pw_baud_rate_t; 19 | 20 | extern pw_baud_rate_t pw_baud_rates[]; 21 | 22 | #endif /* BCMXCP_SER__ */ 23 | -------------------------------------------------------------------------------- /drivers/belkin-hid.h: -------------------------------------------------------------------------------- 1 | /* belkin-hid.h - data to monitor Belkin UPS Systems USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2005 Arnaud Quette 5 | * 2005 Peter Selinger 6 | * 7 | * Sponsored by MGE UPS SYSTEMS 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 | * 24 | */ 25 | 26 | #ifndef BELKIN_HID_H 27 | #define BELKIN_HID_H 28 | 29 | #include "usbhid-ups.h" 30 | 31 | extern subdriver_t belkin_subdriver; 32 | 33 | #endif /* BELKIN_HID_H */ 34 | -------------------------------------------------------------------------------- /drivers/bestpower-mib.h: -------------------------------------------------------------------------------- 1 | #ifndef BESTPOWER_MIB_H 2 | #define BESTPOWER_MIB_H 3 | 4 | #include "main.h" 5 | #include "snmp-ups.h" 6 | 7 | extern mib2nut_info_t bestpower; 8 | 9 | #endif /* BESTPOWER_MIB_H */ 10 | -------------------------------------------------------------------------------- /drivers/compaq-mib.h: -------------------------------------------------------------------------------- 1 | #ifndef COMPAQ_MIB_H 2 | #define COMPAQ_MIB_H 3 | 4 | #include "main.h" 5 | #include "snmp-ups.h" 6 | 7 | extern mib2nut_info_t compaq; 8 | 9 | #endif /* COMPAQ_MIB_H */ 10 | -------------------------------------------------------------------------------- /drivers/cps-hid.h: -------------------------------------------------------------------------------- 1 | /* cps-hid.h - subdriver to monitor CPS USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2005 Arnaud Quette 5 | * 2005 - 2006 Peter Selinger 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | * 21 | */ 22 | 23 | #ifndef CPS_HID_H 24 | #define CPS_HID_H 25 | 26 | #include "usbhid-ups.h" 27 | 28 | extern subdriver_t cps_subdriver; 29 | 30 | #endif /* CPS_HID_H */ 31 | -------------------------------------------------------------------------------- /drivers/cyberpower-mib.h: -------------------------------------------------------------------------------- 1 | #ifndef CYBERPOWER_MIB_H 2 | #define CYBERPOWER_MIB_H 3 | 4 | #include "main.h" 5 | #include "snmp-ups.h" 6 | 7 | extern mib2nut_info_t cyberpower; 8 | extern mib2nut_info_t cyberpower2; 9 | 10 | #endif /* CYBERPOWER_MIB_H */ 11 | -------------------------------------------------------------------------------- /drivers/delta_ups-hid.h: -------------------------------------------------------------------------------- 1 | /* delta_ups-hid.h - data mapping subdriver to monitor Delta UPS USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2009 Arnaud Quette 5 | * 2005 - 2006 Peter Selinger 6 | * 2008 - 2009 Arjen de Korte 7 | * 2021 Jungeon Kim 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef DELTA_UPS_HID_H 25 | #define DELTA_UPS_HID_H 26 | 27 | #include "usbhid-ups.h" 28 | 29 | extern subdriver_t delta_ups_subdriver; 30 | 31 | #endif /* DELTA_UPS_HID_H */ 32 | -------------------------------------------------------------------------------- /drivers/delta_ups-mib.h: -------------------------------------------------------------------------------- 1 | /* delta_ups-mib.h - subdriver to monitor delta_ups SNMP devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2011 - 2012 Arnaud Quette 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef DELTA_UPS_MIB_H 22 | #define DELTA_UPS_MIB_H 23 | 24 | #include "main.h" 25 | #include "snmp-ups.h" 26 | 27 | extern mib2nut_info_t delta_ups; 28 | 29 | #endif /* DELTA_UPS_MIB_H */ 30 | -------------------------------------------------------------------------------- /drivers/eaton-ats16-nm2-mib.h: -------------------------------------------------------------------------------- 1 | /* eaton_ats16-nm2-mib.h - subdriver to monitor Eaton ATS16 NM2 SNMP devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2011-2012 Arnaud Quette 5 | * 2016-2017 Eaton (author: Arnaud Quette ) 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef EATON_ATS16_NM2_MIB_H 23 | #define EATON_ATS16_NM2_MIB_H 24 | 25 | #include "main.h" 26 | #include "snmp-ups.h" 27 | 28 | extern mib2nut_info_t eaton_ats16_nm2; 29 | 30 | #endif /* EATON_ATS16_NM2_MIB_H */ 31 | -------------------------------------------------------------------------------- /drivers/eaton-ats16-nmc-mib.h: -------------------------------------------------------------------------------- 1 | /* eaton_ats16-nmc-mib.h - subdriver to monitor Eaton ATS16 NMC SNMP devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2011-2012 Arnaud Quette 5 | * 2016-2017 Eaton (author: Arnaud Quette ) 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef EATON_ATS16_NMC_MIB_H 23 | #define EATON_ATS16_NMC_MIB_H 24 | 25 | #include "main.h" 26 | #include "snmp-ups.h" 27 | 28 | extern mib2nut_info_t eaton_ats16_nmc; 29 | 30 | #endif /* EATON_ATS16_NMC_MIB_H */ 31 | -------------------------------------------------------------------------------- /drivers/eaton-ats30-mib.h: -------------------------------------------------------------------------------- 1 | /* eaton_ats30-mib.h - subdriver to monitor eaton_ats30 SNMP devices with NUT 2 | * 3 | * Copyright (C) 2017 Eaton 4 | * Author: Tomas Halman 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef EATON_ATS30_MIB_H 22 | #define EATON_ATS30_MIB_H 23 | 24 | #include "main.h" 25 | #include "snmp-ups.h" 26 | 27 | extern mib2nut_info_t eaton_ats30; 28 | 29 | #endif /* EATON_ATS30_MIB_H */ 30 | -------------------------------------------------------------------------------- /drivers/eaton-pdu-genesis2-mib.h: -------------------------------------------------------------------------------- 1 | /* eaton-pdu-genesis2-mib.h - subdriver to monitor Eaton ePDU SNMP devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2010 Arjen de Korte 5 | * 2011 - 2012 Arnaud Quette 6 | * 2017 Arnaud Quette 7 | * 2017 Jim Klimov 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef EATON_EPDU_GENESIS_MIB_H 25 | #define EATON_EPDU_GENESIS_MIB_H 26 | 27 | #include "main.h" 28 | #include "snmp-ups.h" 29 | 30 | extern mib2nut_info_t aphel_genesisII; 31 | 32 | #endif /* EATON_EPDU_GENESIS_MIB_H */ 33 | -------------------------------------------------------------------------------- /drivers/eaton-pdu-marlin-helpers.h: -------------------------------------------------------------------------------- 1 | /* eaton-pdu-marlin-helpers.h - helper for subdriver to monitor certain 2 | * Eaton ePDU SNMP devices with NUT 3 | * 4 | * Copyright (C) 5 | * 2017-2019 Arnaud Quette 6 | * 2017 Jim Klimov 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef EATON_EPDU_MARLIN_HELPERS_H 24 | #define EATON_EPDU_MARLIN_HELPERS_H 25 | 26 | long marlin_device_count_fun(const char *daisy_dev_list); 27 | const char *eaton_sensor_temperature_unit_fun(void *raw_snmp_value); 28 | 29 | #endif /* EATON_EPDU_MARLIN_HELPERS_H */ 30 | -------------------------------------------------------------------------------- /drivers/eaton-pdu-marlin-mib.h: -------------------------------------------------------------------------------- 1 | /* eaton-pdu-marlin-mib.h - subdriver to monitor Eaton ePDU SNMP devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2010 Arjen de Korte 5 | * 2011 - 2012 Arnaud Quette 6 | * 2017 Arnaud Quette 7 | * 2017 Jim Klimov 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef EATON_EPDU_MARLIN_MIB_H 25 | #define EATON_EPDU_MARLIN_MIB_H 26 | 27 | #include "main.h" 28 | #include "snmp-ups.h" 29 | 30 | extern mib2nut_info_t eaton_marlin; 31 | 32 | #endif /* EATON_EPDU_MARLIN_MIB_H */ 33 | -------------------------------------------------------------------------------- /drivers/eaton-pdu-nlogic-mib.h: -------------------------------------------------------------------------------- 1 | /* eaton-pdu-nlogic-mib.h - subdriver to monitor eaton-pdu-nlogic SNMP devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2011 - 2016 Arnaud Quette 5 | * 2022 Eaton (author: Arnaud Quette ) 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef EATON_PDU_NLOGIC_MIB_H 23 | #define EATON_PDU_NLOGIC_MIB_H 24 | 25 | #include "main.h" 26 | #include "snmp-ups.h" 27 | 28 | extern mib2nut_info_t eaton_pdu_nlogic; 29 | 30 | #endif /* EATON_PDU_NLOGIC_MIB_H */ 31 | -------------------------------------------------------------------------------- /drivers/eaton-pdu-pulizzi-mib.h: -------------------------------------------------------------------------------- 1 | /* eaton-pdu-pulizzi-mib.h - subdriver to monitor Eaton ePDU SNMP devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2010 Arjen de Korte 5 | * 2011 - 2012 Arnaud Quette 6 | * 2017 Arnaud Quette 7 | * 2017 Jim Klimov 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef EATON_EPDU_PULIZZI_MIB_H 25 | #define EATON_EPDU_PULIZZI_MIB_H 26 | 27 | #include "main.h" 28 | #include "snmp-ups.h" 29 | 30 | extern mib2nut_info_t pulizzi_switched1; 31 | extern mib2nut_info_t pulizzi_switched2; 32 | 33 | #endif /* EATON_EPDU_PULIZZI_MIB_H */ 34 | -------------------------------------------------------------------------------- /drivers/eaton-pdu-revelation-mib.h: -------------------------------------------------------------------------------- 1 | /* eaton-pdu-revelation-mib.h - subdriver to monitor Eaton ePDU SNMP devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2010 Arjen de Korte 5 | * 2011 - 2012 Arnaud Quette 6 | * 2017 Arnaud Quette 7 | * 2017 Jim Klimov 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef EATON_EPDU_REVELATION_MIB_H 25 | #define EATON_EPDU_REVELATION_MIB_H 26 | 27 | #include "main.h" 28 | #include "snmp-ups.h" 29 | 30 | extern mib2nut_info_t aphel_revelation; 31 | 32 | #endif /* EATON_EPDU_REVELATION_MIB_H */ 33 | -------------------------------------------------------------------------------- /drivers/eaton-ups-pwnm2-mib.h: -------------------------------------------------------------------------------- 1 | #ifndef EATON_UPS_PWNM2_MIB_H 2 | #define EATON_UPS_PWNM2_MIB_H 3 | 4 | #include "main.h" 5 | #include "snmp-ups.h" 6 | 7 | extern mib2nut_info_t eaton_pw_nm2; 8 | 9 | #endif /* EATON_UPS_PWNM2_MIB_H */ 10 | -------------------------------------------------------------------------------- /drivers/eaton-ups-pxg-mib.h: -------------------------------------------------------------------------------- 1 | #ifndef POWERWARE_MIB_H 2 | #define POWERWARE_MIB_H 3 | 4 | #include "main.h" 5 | #include "snmp-ups.h" 6 | 7 | extern mib2nut_info_t eaton_pxg_ups; 8 | 9 | #endif /* POWERWARE_MIB_H */ 10 | -------------------------------------------------------------------------------- /drivers/ecoflow-hid.h: -------------------------------------------------------------------------------- 1 | /* ecoflow-hid.h - subdriver to monitor EcoFlow USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2009 Arnaud Quette 5 | * 2005 - 2006 Peter Selinger 6 | * 2008 - 2009 Arjen de Korte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef ECOFLOW_HID_H 24 | #define ECOFLOW_HID_H 25 | 26 | #include "usbhid-ups.h" 27 | 28 | extern subdriver_t ecoflow_subdriver; 29 | 30 | #endif /* ECOFLOW_HID_H */ 31 | -------------------------------------------------------------------------------- /drivers/emerson-avocent-pdu-mib.h: -------------------------------------------------------------------------------- 1 | /* emerson-avocent-pdu-mib.h - subdriver to monitor Emerson Avocent PDUs with NUT 2 | * 3 | * Copyright (C) 4 | * 2008-2018 Arnaud Quette 5 | * 2009 Opengear 6 | * 2018 Eaton (Arnaud Quette ) 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef EMERSON_AVOCENT_PDU_MIB_H 24 | #define EMERSON_AVOCENT_PDU_MIB_H 25 | 26 | #include "main.h" 27 | #include "snmp-ups.h" 28 | 29 | extern mib2nut_info_t emerson_avocent_pdu; 30 | 31 | #endif /* EMERSON_AVOCENT_PDU_MIB_H */ 32 | -------------------------------------------------------------------------------- /drivers/ever-hid.h: -------------------------------------------------------------------------------- 1 | /* everhid-hid.h - subdriver to monitor Everhid USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2009 Arnaud Quette 5 | * 2005 - 2006 Peter Selinger 6 | * 2008 - 2009 Arjen de Korte 7 | * 2017 EVER Power Systems [https://ever.eu/] 8 | * 2020 - 2022 Jim Klimov 9 | * 10 | * This program is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation; either version 2 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 | */ 24 | 25 | #ifndef EVER_HID_H 26 | #define EVER_HID_H 27 | 28 | #include "usbhid-ups.h" 29 | 30 | extern subdriver_t ever_subdriver; 31 | 32 | #endif /* EVER_HID_H */ 33 | -------------------------------------------------------------------------------- /drivers/explore-hid.h: -------------------------------------------------------------------------------- 1 | /* explore-hid.h - this is a "stub" subdriver used to collect data 2 | * about HID UPS systems that are not yet supported. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | */ 20 | 21 | #ifndef EXPLORE_HID_H 22 | #define EXPLORE_HID_H 23 | 24 | #include "usbhid-ups.h" 25 | 26 | extern subdriver_t explore_subdriver; 27 | 28 | #endif /* EXPLORE_HID_H */ 29 | -------------------------------------------------------------------------------- /drivers/hpe-pdu-mib.h: -------------------------------------------------------------------------------- 1 | /* hpe-pdu-mib.h - subdriver to monitor HPE ePDU SNMP devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2011 - 2016 Arnaud Quette 5 | * 2019 Arnaud Quette 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef HPE_EPDU_MIB_H 23 | #define HPE_EPDU_MIB_H 24 | 25 | #include "main.h" 26 | #include "snmp-ups.h" 27 | 28 | extern mib2nut_info_t hpe_pdu; 29 | 30 | #endif /* HPE_EPDU_MIB_H */ 31 | -------------------------------------------------------------------------------- /drivers/hpe-pdu3-cis-mib.h: -------------------------------------------------------------------------------- 1 | /* hpe_pdu_cis-mib.h - subdriver to monitor HPE_PDU_CIS SNMP devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2011 - 2016 Arnaud Quette 5 | * 2022 Eaton (author: Arnaud Quette ) 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef HPE_PDU3_CIS_MIB_H 23 | #define HPE_PDU3_CIS_MIB_H 24 | 25 | #include "main.h" 26 | #include "snmp-ups.h" 27 | 28 | extern mib2nut_info_t hpe_pdu3_cis; 29 | 30 | #endif /* HPE_PDU3_CIS_MIB_H */ 31 | -------------------------------------------------------------------------------- /drivers/huawei-mib.h: -------------------------------------------------------------------------------- 1 | #ifndef HUAWEI_MIB_H 2 | #define HUAWEI_MIB_H 3 | 4 | #include "main.h" 5 | #include "snmp-ups.h" 6 | 7 | extern mib2nut_info_t huawei; 8 | 9 | #endif /* HUAWEI_MIB_H */ 10 | -------------------------------------------------------------------------------- /drivers/idowell-hid.h: -------------------------------------------------------------------------------- 1 | /* idowell-hid.h - subdriver to monitor iDowell USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2009 Arnaud Quette 5 | * 2005 - 2006 Peter Selinger 6 | * 2008 - 2009 Arjen de Korte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef IDOWELL_HID_H 24 | #define IDOWELL_HID_H 25 | 26 | #include "usbhid-ups.h" 27 | 28 | extern subdriver_t idowell_subdriver; 29 | 30 | #endif /* IDOWELL_HID_H */ 31 | -------------------------------------------------------------------------------- /drivers/ietf-mib.h: -------------------------------------------------------------------------------- 1 | #ifndef IETF_MIB_H 2 | #define IETF_MIB_H 3 | 4 | #include "main.h" 5 | #include "snmp-ups.h" 6 | 7 | extern mib2nut_info_t ietf; 8 | extern mib2nut_info_t tripplite_ietf; 9 | 10 | #endif /* IETF_MIB_H */ 11 | -------------------------------------------------------------------------------- /drivers/legrand-hid.h: -------------------------------------------------------------------------------- 1 | /* legrand-hid.h - subdriver to monitor Legrand USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2009 Arnaud Quette 5 | * 2005 - 2006 Peter Selinger 6 | * 2008 - 2009 Arjen de Korte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef LEGRAND_HID_H 24 | #define LEGRAND_HID_H 25 | 26 | #include "usbhid-ups.h" 27 | 28 | extern subdriver_t legrand_subdriver; 29 | 30 | #endif /* LEGRAND_HID_H */ 31 | -------------------------------------------------------------------------------- /drivers/liebert-hid.h: -------------------------------------------------------------------------------- 1 | /* liebert-hid.h - subdriver to monitor Liebert USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2005 Arnaud Quette 5 | * 2005 - 2006 Peter Selinger 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | * 21 | */ 22 | 23 | #ifndef LIEBERT_HID_H 24 | #define LIEBERT_HID_H 25 | 26 | #include "usbhid-ups.h" 27 | 28 | extern subdriver_t liebert_subdriver; 29 | 30 | #endif /* LIEBERT_HID_H */ 31 | -------------------------------------------------------------------------------- /drivers/mge-hid.h: -------------------------------------------------------------------------------- 1 | /* mge-hid.h - data to monitor MGE UPS SYSTEMS HID (USB and serial) devices 2 | * 3 | * Copyright (C) 2003 - 2005 4 | * Arnaud Quette 5 | * 6 | * Sponsored by MGE UPS SYSTEMS 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | * 23 | */ 24 | 25 | #ifndef MGE_HID_H 26 | #define MGE_HID_H 27 | 28 | #include "usbhid-ups.h" 29 | 30 | extern subdriver_t mge_subdriver; 31 | 32 | #endif /* MGE_HID_H */ 33 | -------------------------------------------------------------------------------- /drivers/mge-mib.h: -------------------------------------------------------------------------------- 1 | #ifndef MGE_MIB_H 2 | #define MGE_MIB_H 3 | 4 | #include "main.h" 5 | #include "snmp-ups.h" 6 | 7 | extern mib2nut_info_t mge; 8 | 9 | #endif /* MGE_MIB_H */ 10 | -------------------------------------------------------------------------------- /drivers/netvision-mib.h: -------------------------------------------------------------------------------- 1 | #ifndef NETVISION_MIB_H 2 | #define NETVISION_MIB_H 3 | 4 | #include "main.h" 5 | #include "snmp-ups.h" 6 | 7 | extern mib2nut_info_t netvision; 8 | 9 | #endif /* NETVISION_MIB_H */ 10 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_ablerex.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_ablerex.h - Subdriver for Ablerex Qx protocol based UPSes 2 | * 3 | * Copyright (C) 4 | * 2013 Daniele Pezzini 5 | * 2021 Ablerex Software 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | * 21 | */ 22 | 23 | #ifndef NUTDRV_QX_ABLEREX_H 24 | #define NUTDRV_QX_ABLEREX_H 25 | 26 | #include "nutdrv_qx.h" 27 | 28 | extern subdriver_t ablerex_subdriver; 29 | 30 | #endif /* NUTDRV_QX_ABLEREX_H */ 31 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_bestups.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_bestups.h - Subdriver for Best Power/Sola Australia UPSes 2 | * 3 | * Copyright (C) 4 | * 2014 Daniele Pezzini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_BESTUPS_H 23 | #define NUTDRV_QX_BESTUPS_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t bestups_subdriver; 28 | 29 | #endif /* NUTDRV_QX_BESTUPS_H */ 30 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_gtec.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_gtec.h - Subdriver for Gtec UPSes 2 | * 3 | * Copyright (C) 4 | * 2025 Lukas Turek 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_GTEC_H 23 | #define NUTDRV_QX_GTEC_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t gtec_subdriver; 28 | 29 | #endif /* NUTDRV_QX_GTEC_H */ 30 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_hunnox.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_hunnox.h - Subdriver for Hunnox protocol based UPSes 2 | * 3 | * Copyright (C) 4 | * 2013 Daniele Pezzini 5 | * 2020 Mariano Jan https://marianojan.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | * 21 | */ 22 | 23 | #ifndef NUTDRV_QX_HUNNOX_H 24 | #define NUTDRV_QX_HUNNOX_H 25 | 26 | #include "nutdrv_qx.h" 27 | 28 | extern subdriver_t hunnox_subdriver; 29 | 30 | #endif /* NUTDRV_QX_HUNNOX_H */ 31 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_innovart31.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_innovart31.h - Subdriver for INNOVA RT 3/1 UPSes 2 | * 3 | * Copyright (C) 4 | * 2024 Viktor Drobot 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_INNOVART31_H 23 | #define NUTDRV_QX_INNOVART31_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t innovart31_subdriver; 28 | 29 | #endif /* NUTDRV_QX_INNOVART31_H */ 30 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_innovart33.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_innovart33.h - Subdriver for INNOVA RT 3/3 UPSes 2 | * 3 | * Copyright (C) 4 | * 2025 Viktor Drobot 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_INNOVART33_H 23 | #define NUTDRV_QX_INNOVART33_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t innovart33_subdriver; 28 | 29 | #endif /* NUTDRV_QX_INNOVART33_H */ 30 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_masterguard.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_masterguard.h - Subdriver for Masterguard A/E Series 2 | * 3 | * Copyright (C) 4 | * 2020-2021 Edgar Fuß 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version, or a 2-clause BSD License. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_MASTERGUARD_H 23 | #define NUTDRV_QX_MASTERGUARD_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t masterguard_subdriver; 28 | 29 | #endif /* NUTDRV_QX_MASTERGUARD_H */ 30 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_mecer.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_mecer.h - Subdriver for Mecer/Voltronic Power P98 UPSes 2 | * 3 | * Copyright (C) 4 | * 2013 Daniele Pezzini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_MECER_H 23 | #define NUTDRV_QX_MECER_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t mecer_subdriver; 28 | 29 | #endif /* NUTDRV_QX_MECER_H */ 30 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_megatec-old.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_megatec-old.h - Subdriver for Megatec/old protocol based UPSes 2 | * 3 | * Copyright (C) 4 | * 2013 Daniele Pezzini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_MEGATEC_OLD_H 23 | #define NUTDRV_QX_MEGATEC_OLD_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t megatec_old_subdriver; 28 | 29 | #endif /* NUTDRV_QX_MEGATECH_OLD_H */ 30 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_megatec.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_megatec.h - Subdriver for Megatec protocol based UPSes 2 | * 3 | * Copyright (C) 4 | * 2013 Daniele Pezzini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_MEGATEC_H 23 | #define NUTDRV_QX_MEGATEC_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t megatec_subdriver; 28 | 29 | #endif /* NUTDRV_QX_MEGATECH_H */ 30 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_mustek.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_mustek.h - Subdriver for Mustek protocol based UPSes 2 | * 3 | * Copyright (C) 4 | * 2013 Daniele Pezzini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_MUSTEK_H 23 | #define NUTDRV_QX_MUSTEK_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t mustek_subdriver; 28 | 29 | #endif /* NUTDRV_QX_MUSTEK_H */ 30 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_q2.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_q2.h - Subdriver for Q2 Megatec protocol variant 2 | * 3 | * Copyright (C) 4 | * 2024 Viktor Drobot 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_Q2_H 23 | #define NUTDRV_QX_Q2_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t q2_subdriver; 28 | 29 | #endif /* NUTDRV_QX_Q2_H */ 30 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_q6.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_q6.h - Subdriver for Q6 Megatec protocol variant 2 | * 3 | * Copyright (C) 4 | * 2024 Viktor Drobot 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_Q6_H 23 | #define NUTDRV_QX_Q6_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t q6_subdriver; 28 | 29 | #endif /* NUTDRV_QX_Q6_H */ 30 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_voltronic-qs-hex.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_voltronic-qs-hex.h - Subdriver for Voltronic Power UPSes with QS-Hex protocol 2 | * 3 | * Copyright (C) 4 | * 2014 Daniele Pezzini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_VOLTRONIC_QS_HEX_H 23 | #define NUTDRV_QX_VOLTRONIC_QS_HEX_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t voltronic_qs_hex_subdriver; 28 | 29 | #endif /* NUTDRV_QX_VOLTRONIC_QS_HEX_H */ 30 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_voltronic-qs.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_voltronic-qs.h - Subdriver for Voltronic Power UPSes with QS protocol 2 | * 3 | * Copyright (C) 4 | * 2013 Daniele Pezzini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_VOLTRONIC_QS_H 23 | #define NUTDRV_QX_VOLTRONIC_QS_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t voltronic_qs_subdriver; 28 | 29 | #endif /* NUTDRV_QX_VOLTRONIC_QS_H */ 30 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_voltronic.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_voltronic.h - Subdriver for Voltronic Power UPSes 2 | * 3 | * Copyright (C) 4 | * 2013 Daniele Pezzini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_VOLTRONIC_H 23 | #define NUTDRV_QX_VOLTRONIC_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t voltronic_subdriver; 28 | 29 | #endif /* NUTDRV_QX_VOLTRONIC_H */ 30 | -------------------------------------------------------------------------------- /drivers/nutdrv_qx_zinto.h: -------------------------------------------------------------------------------- 1 | /* nutdrv_qx_zinto.h - Subdriver for Zinto protocol based UPSes 2 | * 3 | * Copyright (C) 4 | * 2013 Daniele Pezzini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | * 20 | */ 21 | 22 | #ifndef NUTDRV_QX_ZINTO_H 23 | #define NUTDRV_QX_ZINTO_H 24 | 25 | #include "nutdrv_qx.h" 26 | 27 | extern subdriver_t zinto_subdriver; 28 | 29 | #endif /* NUTDRV_QX_ZINTO_H */ 30 | -------------------------------------------------------------------------------- /drivers/openups-hid.h: -------------------------------------------------------------------------------- 1 | /* openups-hid.h - subdriver to monitor Minibox openUPS USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2009 Arnaud Quette 5 | * 2005 - 2006 Peter Selinger 6 | * 2008 - 2009 Arjen de Korte 7 | * 2012 Nicu Pavel 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef OPENUPS_HID_H 25 | #define OPENUPS_HID_H 26 | 27 | #include "usbhid-ups.h" 28 | 29 | /* Don't put non-extern definitions here - this file gets included by usbhid-ups.c */ 30 | 31 | extern subdriver_t openups_subdriver; 32 | 33 | #endif /* OPENUPS_HID_H */ 34 | -------------------------------------------------------------------------------- /drivers/powercom-hid.h: -------------------------------------------------------------------------------- 1 | /* powercom-hid.h - subdriver to monitor PowerCOM USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2009 Arnaud Quette 5 | * 2005 - 2006 Peter Selinger 6 | * 2008 - 2009 Arjen de Korte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef POWERCOM_HID_H 24 | #define POWERCOM_HID_H 25 | 26 | #include "usbhid-ups.h" 27 | 28 | extern subdriver_t powercom_subdriver; 29 | 30 | #endif /* POWERCOM_HID_H */ 31 | -------------------------------------------------------------------------------- /drivers/powerp-bin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * powerp-bin.h - Model specific data/definitions for CyberPower text/binary 3 | * protocol UPSes 4 | * 5 | * Copyright (C) 6 | * 2007 Doug Reynolds 7 | * 2007-2008 Arjen de Korte 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef POWERP_BIN_H 25 | #define POWERP_BIN_H 26 | 27 | #include "powerpanel.h" 28 | 29 | extern subdriver_t powpan_binary; 30 | 31 | #endif /* POWERP_BIN_H */ 32 | -------------------------------------------------------------------------------- /drivers/powerp-txt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * powerp-txt.h - Model specific data/definitions for CyberPower text 3 | * protocol UPSes 4 | * 5 | * Copyright (C) 6 | * 2007 Doug Reynolds 7 | * 2007-2008 Arjen de Korte 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef POWERP_TXT_H 25 | #define POWERP_TXT_H 26 | 27 | #include "powerpanel.h" 28 | 29 | extern subdriver_t powpan_text; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /drivers/powervar-hid.h: -------------------------------------------------------------------------------- 1 | /* powervar-hid.h - subdriver to monitor Powervar USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2009 Arnaud Quette 5 | * 2005 - 2006 Peter Selinger 6 | * 2008 - 2009 Arjen de Korte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef POWERVAR_HID_H 24 | #define POWERVAR_HID_H 25 | 26 | #include "usbhid-ups.h" 27 | 28 | extern subdriver_t powervar_subdriver; 29 | 30 | #endif /* POWERVAR_HID_H */ 31 | -------------------------------------------------------------------------------- /drivers/raritan-pdu-mib.h: -------------------------------------------------------------------------------- 1 | #ifndef RARITAN_PDU_MIB_H 2 | #define RARITAN_PDU_MIB_H 3 | 4 | #include "main.h" 5 | #include "snmp-ups.h" 6 | 7 | extern mib2nut_info_t raritan; 8 | 9 | #endif /* RARITAN_PDU_MIB_H */ 10 | -------------------------------------------------------------------------------- /drivers/raritan-px2-mib.h: -------------------------------------------------------------------------------- 1 | /* raritan-px2-mib.h - subdriver to monitor RARITAN PX2 SNMP devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2011 - 2012 Arnaud Quette 5 | * 2016 Arnaud Quette 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef RARITAN_PX2_MIB_H 23 | #define RARITAN_PX2_MIB_H 24 | 25 | #include "main.h" 26 | #include "snmp-ups.h" 27 | 28 | extern mib2nut_info_t raritan_px2; 29 | 30 | #endif /* RARITAN_PX2_MIB_H */ 31 | -------------------------------------------------------------------------------- /drivers/salicru-hid.h: -------------------------------------------------------------------------------- 1 | /* salicru-hid.h - subdriver to monitor Salicru USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2009 Arnaud Quette 5 | * 2005 - 2006 Peter Selinger 6 | * 2008 - 2009 Arjen de Korte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef SALICRU_HID_H 24 | #define SALICRU_HID_H 25 | 26 | #include "usbhid-ups.h" 27 | 28 | extern subdriver_t salicru_subdriver; 29 | 30 | #endif /* SALICRU_HID_H */ 31 | -------------------------------------------------------------------------------- /drivers/tripplite-hid.h: -------------------------------------------------------------------------------- 1 | /* tripplite-hid.h - data to monitor Tripp Lite USB/HID devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2003 - 2005 Arnaud Quette 5 | * 2005 Peter Selinger 6 | * 7 | * Sponsored by MGE UPS SYSTEMS 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 | * 24 | */ 25 | 26 | #ifndef TRIPPLITE_HID_H 27 | #define TRIPPLITE_HID_H 28 | 29 | #include "usbhid-ups.h" 30 | 31 | extern subdriver_t tripplite_subdriver; 32 | 33 | #endif /* TRIPPLITE_HID_H */ 34 | -------------------------------------------------------------------------------- /drivers/xppc-mib.h: -------------------------------------------------------------------------------- 1 | /* xppc-mib.h - subdriver to monitor XPPC SNMP devices with NUT 2 | * 3 | * Copyright (C) 4 | * 2011 - 2012 Arnaud Quette 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef XPPC_MIB_H 22 | #define XPPC_MIB_H 23 | 24 | #include "main.h" 25 | #include "snmp-ups.h" 26 | 27 | extern mib2nut_info_t xppc; 28 | 29 | #endif /* XPPC_MIB_H */ 30 | -------------------------------------------------------------------------------- /include/.gitignore: -------------------------------------------------------------------------------- 1 | /config.h 2 | /config.h.in 3 | /nut_version.h 4 | /nut_version.h.tmp* 5 | /stamp-h1 6 | /stamp-h.in 7 | -------------------------------------------------------------------------------- /lib/.gitignore: -------------------------------------------------------------------------------- 1 | /libnutclient.pc 2 | /libnutclientstub.pc 3 | /libnutconf.pc 4 | /libnutscan.pc 5 | /libupsclient-config 6 | /libupsclient.pc 7 | /README 8 | -------------------------------------------------------------------------------- /lib/libnutclient.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | sysconfdir=@CONFPATH@ 6 | statepath=@STATEPATH@ 7 | nutuser=@RUN_AS_USER@ 8 | 9 | Name: libnutclient 10 | Description: UPS monitoring with Network UPS Tools 11 | Version: @PACKAGE_VERSION@ 12 | Libs: -L${libdir} @LDFLAGS_NUT_RPATH_CXX@ -lnutclient 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /lib/libnutclientstub.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | sysconfdir=@CONFPATH@ 6 | statepath=@STATEPATH@ 7 | nutuser=@RUN_AS_USER@ 8 | 9 | Name: libnutclientstub 10 | Description: Stub for UPS monitoring with Network UPS Tools (primarily for C++ tests) 11 | Version: @PACKAGE_VERSION@ 12 | Libs: -L${libdir} @LDFLAGS_NUT_RPATH@ -lnutclientstub 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /lib/libnutconf.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | sysconfdir=@CONFPATH@ 6 | statepath=@STATEPATH@ 7 | nutuser=@RUN_AS_USER@ 8 | 9 | Name: libnutconf 10 | Description: Network UPS Tools configuration management 11 | Version: @PACKAGE_VERSION@ 12 | Libs: -L${libdir} @LDFLAGS_NUT_RPATH_CXX@ -lnutconf 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /lib/libnutscan.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | sysconfdir=@CONFPATH@ 6 | statepath=@STATEPATH@ 7 | nutuser=@RUN_AS_USER@ 8 | 9 | Name: libnutscan 10 | Description: Power devices discovery with Network UPS Tools 11 | Version: @PACKAGE_VERSION@ 12 | Libs: -L${libdir} @LDFLAGS_NUT_RPATH@ -lnutscan 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /lib/libupsclient.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | sysconfdir=@CONFPATH@ 6 | statepath=@STATEPATH@ 7 | nutuser=@RUN_AS_USER@ 8 | 9 | Name: libupsclient 10 | Description: UPS monitoring with Network UPS Tools 11 | Version: @PACKAGE_VERSION@ 12 | Libs: -L${libdir} @LDFLAGS_NUT_RPATH@ -lupsclient 13 | Cflags: -I${includedir} 14 | Requires: @LIBSSL_REQUIRES@ 15 | -------------------------------------------------------------------------------- /m4/.gitignore: -------------------------------------------------------------------------------- 1 | /libtool.m4 2 | /ltoptions.m4 3 | /ltsugar.m4 4 | /ltversion.m4 5 | /lt~obsolete.m4 6 | -------------------------------------------------------------------------------- /m4/nut_arg_with.m4: -------------------------------------------------------------------------------- 1 | dnl simplified declaration of some feature options 2 | 3 | dnl Working With External Software (might name a variant or other contextual arg) 4 | dnl https://www.gnu.org/software/autoconf/manual/autoconf-2.66/html_node/External-Software.html#External-Software 5 | AC_DEFUN([NUT_ARG_WITH], 6 | [ AC_ARG_WITH($1, 7 | AS_HELP_STRING([--with-$1], [$2 ($3)]), 8 | [[nut_with_]m4_translit($1, [-], [_])="${withval}"], 9 | [[nut_with_]m4_translit($1, [-], [_])="$3"] 10 | ) 11 | ]) 12 | 13 | dnl Enable a feature (might name a variant), or yes/no 14 | dnl https://www.gnu.org/software/autoconf/manual/autoconf-2.66/html_node/Package-Options.html 15 | AC_DEFUN([NUT_ARG_ENABLE], 16 | [ AC_ARG_ENABLE($1, 17 | AS_HELP_STRING([--enable-$1], [$2 ($3)]), 18 | [[nut_enable_]m4_translit($1, [-], [_])="${enableval}"], 19 | [[nut_enable_]m4_translit($1, [-], [_])="$3"] 20 | ) 21 | ]) 22 | -------------------------------------------------------------------------------- /m4/nut_check_cppcheck.m4: -------------------------------------------------------------------------------- 1 | dnl Check for "cppcheck" analysis tools 2 | 3 | AC_DEFUN([NUT_CHECK_CPPCHECK], 4 | [ 5 | if test -z "${nut_have_cppcheck_seen}"; then 6 | dnl NOTE: Did not really investigate suitable CPPCHECK_MIN_VERSION 7 | dnl values, just using current available as the baseline; maybe 8 | dnl older releases are also okay (if someone proves so). 9 | dnl The oldest available on the NUT CI build farm was 1.6 that worked. 10 | nut_have_cppcheck_seen=yes 11 | CPPCHECK_MIN_VERSION="1.0" 12 | 13 | AC_PATH_PROGS([CPPCHECK], [cppcheck]) 14 | if test -n "${CPPCHECK}"; then 15 | AC_MSG_CHECKING([for cppcheck version]) 16 | CPPCHECK_VERSION="`${CPPCHECK} --version 2>/dev/null`" 17 | dnl strip 'cppcheck ' from version string 18 | CPPCHECK_VERSION="${CPPCHECK_VERSION##* }" 19 | AC_MSG_RESULT(${CPPCHECK_VERSION} found) 20 | fi 21 | 22 | AC_MSG_CHECKING([if cppcheck version is okay (minimum required ${CPPCHECK_MIN_VERSION})]) 23 | AX_COMPARE_VERSION([${CPPCHECK_VERSION}], [ge], [${CPPCHECK_MIN_VERSION}], [ 24 | AC_MSG_RESULT(yes) 25 | nut_have_cppcheck="yes" 26 | ], [ 27 | AC_MSG_RESULT(no) 28 | nut_have_cppcheck="no" 29 | ]) 30 | 31 | dnl Notes: we also keep HAVE_CPPCHECK for implicit targets 32 | AM_CONDITIONAL([HAVE_CPPCHECK], [test "${nut_have_cppcheck}" = "yes"]) 33 | fi 34 | ]) 35 | -------------------------------------------------------------------------------- /scripts/Aix/.gitignore: -------------------------------------------------------------------------------- 1 | nut-aix.spec 2 | nut.init 3 | -------------------------------------------------------------------------------- /scripts/HP-UX/.gitignore: -------------------------------------------------------------------------------- 1 | /nut.psf 2 | /postinstall 3 | -------------------------------------------------------------------------------- /scripts/HP-UX/makedepot.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | 5 | CUR_DIR=$(pwd) 6 | TOP_DIR=$CUR_DIR/../.. 7 | INSTALL_DIR=/usr/local/ups 8 | DEST_DIR=$CUR_DIR/nut_install 9 | 10 | rm -rf $DEST_DIR 11 | rm -rf $CUR_DIR/nut.depot 12 | rm -rf $CUR_DIR/nut.depot.tar.gz 13 | 14 | cd $TOP_DIR 15 | ./configure --prefix=$INSTALL_DIR --with-dev 16 | make 1>/dev/null 17 | 18 | #We need to install this or libtool won't be able to relink some binaries (upsc 19 | #for instance) and will install the shell wrapper instaead of the binary. 20 | #libtool needs libupsclient.la to relink those binaries so we install it first. 21 | make install 22 | DESTDIR=$DEST_DIR make install 23 | make uninstall 24 | 25 | cd $CUR_DIR 26 | swpackage -s nut.psf -d $CUR_DIR/nut.depot; \ 27 | #tar cvf nut.depot.tar nut.depot 28 | #gzip nut.depot.tar 29 | echo "Execution completed" 30 | -------------------------------------------------------------------------------- /scripts/HP-UX/nut-drvctl: -------------------------------------------------------------------------------- 1 | # NUT_START: Set to 1 to start NUT 2 | # NUT_ARGS: Command line arguments to pass to NUT 3 | # 4 | # To configure the NUT environment: 5 | 6 | NUT_START=1 7 | UPSNAME= # Blank == all configured UPSs 8 | RUNAS= # Blank == run as root 9 | -------------------------------------------------------------------------------- /scripts/HP-UX/nut-upsd: -------------------------------------------------------------------------------- 1 | # NUT_START: Set to 1 to start NUT 2 | # NUT_ARGS: Command line arguments to pass to NUT 3 | # 4 | # To configure the NUT environment: 5 | 6 | NUT_START=1 7 | UPSNAME= # Blank == all configured UPSs 8 | RUNAS= # Blank == run as root 9 | -------------------------------------------------------------------------------- /scripts/HP-UX/nut-upsmon: -------------------------------------------------------------------------------- 1 | # NUT_START: Set to 1 to start NUT 2 | # NUT_ARGS: Command line arguments to pass to NUT 3 | # 4 | # To configure the NUT environment: 5 | 6 | NUT_START=1 7 | UPSMON_ARGS= 8 | -------------------------------------------------------------------------------- /scripts/README.adoc: -------------------------------------------------------------------------------- 1 | NUT contributed and integration scripts 2 | ======================================= 3 | 4 | These directories hold various scripts and resources needed for systems 5 | integration, and other non-core functionality, which were contributed 6 | over time by the NUT Team, side projects and/or general community members 7 | (users of the software), including: 8 | 9 | - example startup and shutdown scripts for various operating systems and 10 | distributions, 11 | - `hotplug` and `udev` integration for on the fly privileges settings 12 | (Linux only), 13 | - `UPower` (previously `DeviceKit-power`) rules file, 14 | - Python Client module and application, 15 | - Perl client module, 16 | - Augeas support lenses and modules for NUT, 17 | - support to run NUT components as service unit instances: 18 | * shared `nut-driver-enumerator` and `upsdrvsvcctl` logic, 19 | * `systemd` support files, 20 | * SMF (Solaris/illumos Service Management Framework) support files, 21 | - init-scripts and/or packaging elements for several Unix operating systems, 22 | - Windows build helpers and information, 23 | - software-driven USB reset suggestions and helpers (for stuck devices), 24 | - `logrotate` integration, 25 | - and many others. 26 | -------------------------------------------------------------------------------- /scripts/RedHat/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated from .in templates: 2 | /ups 3 | /upsd 4 | /upsmon 5 | 6 | -------------------------------------------------------------------------------- /scripts/RedHat/README.adoc: -------------------------------------------------------------------------------- 1 | NUT integration files for older RedHat based Linux distributions 2 | ================================================================ 3 | 4 | Install `ups` in `/etc/rc.d/init.d` 5 | 6 | The `/etc/sysconfig/ups` is used only to store the `POWERDOWNFLAG` variable 7 | -------------------------------------------------------------------------------- /scripts/RedHat/ups.in: -------------------------------------------------------------------------------- 1 | # POWERDOWNFLAG *must* match that in upsmon.conf 2 | POWERDOWNFLAG="@POWERDOWNFLAG@" 3 | NUTUSER="@RUN_AS_USER@" 4 | -------------------------------------------------------------------------------- /scripts/Solaris/.gitignore: -------------------------------------------------------------------------------- 1 | /nut 2 | /pkginfo 3 | /preinstall 4 | /postinstall 5 | /preremove 6 | /postremove 7 | /precheck.py 8 | /preproto.pl 9 | /svc-nut-server 10 | /svc-nut-logger 11 | /svc-nut-monitor 12 | /nut-driver.xml 13 | /nut-driver-enumerator.xml 14 | /nut-logger.xml 15 | /nut-monitor.xml 16 | /nut-server.xml 17 | /nut.xml 18 | /NUT*.local.gz 19 | -------------------------------------------------------------------------------- /scripts/Solaris/makelocal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Creates the package file from current-directory contents 4 | # Called by Makefile starting from installed prototype directory 5 | 6 | echo "Making Solaris SVR4 package metadata..." && \ 7 | pkgmk -o -d "`pwd`" && \ 8 | echo "Making Solaris SVR4 package archive file..." && \ 9 | ( yes "" | pkgtrans "`pwd`" "`pwd`/NUT_solaris_package.local" ) && \ 10 | echo "Compressing Solaris SVR4 package archive file..." && \ 11 | gzip "`pwd`/NUT_solaris_package.local" 12 | -------------------------------------------------------------------------------- /scripts/Solaris/pkginfo.in: -------------------------------------------------------------------------------- 1 | PKG="NUT" 2 | NAME="Network UPS Tools" 3 | ARCH="@target_cpu@" 4 | VERSION="@PACKAGE_VERSION@" 5 | CATEGORY="application" 6 | VENDOR="@NUT_WEBSITE_BASE@" 7 | EMAIL=" " 8 | PSTAMP=" " 9 | DESCRIPTION="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." 10 | BASEDIR="@prefix@" 11 | CLASSES="none" 12 | -------------------------------------------------------------------------------- /scripts/Solaris/postremove.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Postremove script for Network UPS Tools package 4 | 5 | # Remove init script from /etc/init.d - created by scripts not packaging 6 | 7 | rm -f /etc/init.d/nut 8 | rm -f /etc/rc3.d/S90nut 9 | rm -f /etc/rc3.d/K10nut 10 | 11 | # Remove nut group and user 12 | 13 | /usr/sbin/userdel "@RUN_AS_USER@" 14 | 15 | /usr/sbin/groupdel "@RUN_AS_GROUP@" 16 | 17 | # Remove /var/run/nut 18 | 19 | rm -rf "@ALTPIDPATH@" 20 | 21 | # Remove /var/state/ups 22 | 23 | rm -rf "@STATEPATH@" 24 | -------------------------------------------------------------------------------- /scripts/Solaris/preinstall.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Preinstall script for Network UPS Tools package 4 | NUT_DIR="@prefix@" 5 | 6 | # Create group nut 7 | 8 | grep -w "@RUN_AS_GROUP@" /etc/group 9 | if [ "$?" != 0 ]; then 10 | /usr/sbin/groupadd "@RUN_AS_GROUP@" 11 | fi 12 | 13 | # Create user for installing "Network UPS Tools" 14 | 15 | grep -w "@RUN_AS_USER@" /etc/passwd 16 | if [ "$?" != 0 ]; then 17 | /usr/sbin/useradd -c "Network UPS Tools" -g "@RUN_AS_GROUP@" -G root -d "@STATEPATH@" -s /bin/false "@RUN_AS_USER@" 18 | fi 19 | 20 | res="`groups "@RUN_AS_GROUP@" | grep -w "@RUN_AS_USER@"`" || res="" 21 | if [ -z "$res" ]; then 22 | /usr/sbin/usermod -g "@RUN_AS_GROUP@" -G root "@RUN_AS_USER@" 23 | fi 24 | -------------------------------------------------------------------------------- /scripts/Solaris8/S99upsmon: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (c) 1995-2000 ??? 3 | # 4 | # Author: Sandro Wefel 5 | # 6 | # Put it in /etc/rc2.d/ or /etc/rc3.d depending on runlevel 7 | # 8 | 9 | PATH=/sbin:/bin:/usr/sbin:/usr/bin 10 | export PATH 11 | 12 | UPSDPATH=/usr/local/ups/sbin 13 | 14 | NUT_QUIET_INIT_UPSNOTIFY=true 15 | export NUT_QUIET_INIT_UPSNOTIFY 16 | 17 | # See how we are called. 18 | case "$1" in 19 | 'start') 20 | if [ -x $UPSDPATH/upsmon ]; then 21 | echo "NUT Starting UPS monitor " 22 | $UPSDPATH/upsmon >/dev/console 2>&1 23 | touch /var/lock/subsys/upsmon 24 | fi 25 | ;; 26 | 'stop') 27 | echo "NUT Stopping UPS monitor " 28 | /usr/bin/pkill -x upsmon 29 | rm -f /var/lock/subsys/upsmon 30 | ;; 31 | 'restart') 32 | $0 stop 33 | $0 start 34 | ;; 35 | *) 36 | echo "Usage: upsmon {start|stop|restart}" 37 | exit 1 38 | ;; 39 | esac 40 | exit 0 41 | -------------------------------------------------------------------------------- /scripts/Windows/.gitignore: -------------------------------------------------------------------------------- 1 | .wininit.c.swp 2 | *.exe 3 | winevent.h 4 | winevent.rc 5 | MSG00409.bin 6 | /nut_build_*/ 7 | /nut_install_*/ 8 | /nut_build 9 | /nut_install 10 | -------------------------------------------------------------------------------- /scripts/Windows/DriverInstaller/README.adoc: -------------------------------------------------------------------------------- 1 | To easily compile `wdi-simple.exe`, unzip a copy of `libwdi` on your disk. 2 | 3 | Then set it up to be able to build following 4 | http://sourceforge.net/apps/mediawiki/libwdi/index.php?title=Install 5 | 6 | NOTE: Modern development may be at https://github.com/pbatard/libwdi 7 | 8 | Then copy `wdi-simple.c` and `nutscan-usb.h` into the "examples" 9 | subdirectory of libwdi directory. 10 | 11 | Finally run `ddk_build.cmd` from the root of the `libwdi` directory. 12 | -------------------------------------------------------------------------------- /scripts/Windows/Installer/.gitignore: -------------------------------------------------------------------------------- 1 | NUT-Installer.msi 2 | NUT-Installer.wixobj 3 | NUT-Installer.wixpdb 4 | NUT-Installer.xml 5 | log.txt 6 | -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/Images/NUT_wix_horizontal.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/Images/NUT_wix_horizontal.bmp -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/Images/NUT_wix_vertical.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/Images/NUT_wix_vertical.bmp -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/Others/.gitignore: -------------------------------------------------------------------------------- 1 | libexpat-1.dll 2 | libgcc_s_dw2-1.dll 3 | libiconv-2.dll 4 | libintl-8.dll 5 | libltdl-7.dll 6 | libneon-27.dll 7 | libnetsnmp-30.dll 8 | libregex-1.dll 9 | libz-1.dll 10 | msys-1.0.dll 11 | msys-crypto-1.0.0.dll 12 | msys-regex-1.dll 13 | msys-ssl-1.0.0.dll 14 | pthreadgc2.dll 15 | -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/Others/StartService.bat: -------------------------------------------------------------------------------- 1 | net start "Network UPS Tools" -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/Others/StopService.bat: -------------------------------------------------------------------------------- 1 | net stop "Network UPS Tools" -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/emptyDir/cgi-bin/temp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/emptyDir/cgi-bin/temp.txt -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/emptyDir/html/temp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/emptyDir/html/temp.txt -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/emptyDir/include/temp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/emptyDir/include/temp.txt -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/emptyDir/man1/temp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/emptyDir/man1/temp.txt -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/emptyDir/man3/temp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/emptyDir/man3/temp.txt -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/emptyDir/pkgconfig/temp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/emptyDir/pkgconfig/temp.txt -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/emptyDir/run/temp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/emptyDir/run/temp.txt -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/icons/New.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/icons/New.ico -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/icons/Up.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/icons/Up.ico -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/icons/completi.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/icons/completi.ico -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/icons/custicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/icons/custicon.ico -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/icons/exclamic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/icons/exclamic.ico -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/icons/info.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/icons/info.ico -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/icons/insticon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/icons/insticon.ico -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/icons/powernut_Stop.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/icons/powernut_Stop.ico -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/icons/powernut_logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/icons/powernut_logo.ico -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/icons/removico.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/icons/removico.ico -------------------------------------------------------------------------------- /scripts/Windows/Installer/ImageFiles/icons/repairic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/Windows/Installer/ImageFiles/icons/repairic.ico -------------------------------------------------------------------------------- /scripts/Windows/winevent.mc: -------------------------------------------------------------------------------- 1 | MessageIdTypedef=DWORD 2 | 3 | SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS 4 | Informational=0x1:STATUS_SEVERITY_INFORMATIONAL 5 | Warning=0x2:STATUS_SEVERITY_WARNING 6 | Error=0x3:STATUS_SEVERITY_ERROR 7 | ) 8 | 9 | 10 | FacilityNames=(System=0x0:FACILITY_SYSTEM 11 | Runtime=0x2:FACILITY_RUNTIME 12 | Stubs=0x3:FACILITY_STUBS 13 | Io=0x4:FACILITY_IO_ERROR_CODE 14 | ) 15 | 16 | LanguageNames=(English=0x409:MSG00409) 17 | 18 | ; // The following are message definitions. 19 | 20 | MessageId=0x1 21 | Severity=Error 22 | Facility=Runtime 23 | SymbolicName=SVC_EVENT 24 | Language=English 25 | %1. 26 | . 27 | 28 | 29 | -------------------------------------------------------------------------------- /scripts/augeas/.gitignore: -------------------------------------------------------------------------------- 1 | /*.aug 2 | /nutupsconf.aug.in 3 | /nutupsconf.aug.in.AUTOGEN_WITHOUT 4 | /gen-nutupsconf-aug.py 5 | /README 6 | -------------------------------------------------------------------------------- /scripts/augeas/nutupssetconf.aug.in: -------------------------------------------------------------------------------- 1 | (* 2 | Module: NutUpssetConf 3 | Parses @CONFPATH@/upsset.conf 4 | 5 | Author: Raphael Pinson 6 | Frederic Bohe 7 | 8 | About: License 9 | This file is licensed under the GPL. 10 | 11 | About: Lens Usage 12 | Sample usage of this lens in augtool 13 | 14 | * Print the string declaring secured cgi directory: 15 | > print /files@CONFPATH@/upsset.conf/auth 16 | 17 | About: Configuration files 18 | This lens applies to @CONFPATH@/upsset.conf. See . 19 | *) 20 | 21 | module NutUpssetConf = 22 | autoload upsset_xfm 23 | 24 | 25 | (************************************************************************ 26 | * Group: UPSSET.CONF 27 | *************************************************************************) 28 | 29 | (* general *) 30 | let sep_spc = Util.del_opt_ws "" 31 | let eol = Util.eol 32 | let comment = Util.comment 33 | let empty = Util.empty 34 | 35 | 36 | let upsset_key_word = "I_HAVE_SECURED_MY_CGI_DIRECTORY" 37 | 38 | let upsset_key = [ label "auth" . sep_spc . store upsset_key_word . eol ] 39 | 40 | let upsset_lns = (upsset_key|comment|empty)* 41 | 42 | let upsset_filter = ( incl "@CONFPATH@/upsset.conf" ) 43 | . Util.stdexcl 44 | 45 | let upsset_xfm = transform upsset_lns upsset_filter 46 | 47 | -------------------------------------------------------------------------------- /scripts/augeas/tests/test_nut_flaky.aug: -------------------------------------------------------------------------------- 1 | (* Tests below pass on some systems and/or augeas versions and fail on others. 2 | * Sometimes it involves same formal release with different packaging. 3 | * For peace of mind, these are not currently added to common "test_nut" 4 | * which is expected to pass everywhere. 5 | *) 6 | 7 | module Test_nut_flaky = 8 | 9 | (* desc is a single token made of two words below 10 | * encountering the "default..." line seems troublesome 11 | * for some versions of augtools regardless of line position 12 | *) 13 | let ups_conf1 = " 14 | [testups] 15 | driver = dummy-ups 16 | port = auto 17 | desc = \"Dummy UPS Driver\" 18 | default.battery.voltage.high = 28.8 19 | " 20 | 21 | test NutUpsConf.ups_lns get ups_conf1 = 22 | { } 23 | { "testups" 24 | { "driver" = "dummy-ups" } 25 | { "port" = "auto" } 26 | { "desc" = "Dummy UPS Driver" } 27 | { "default.battery.voltage.high" = "28.8" } } 28 | -------------------------------------------------------------------------------- /scripts/avahi/.gitignore: -------------------------------------------------------------------------------- 1 | /nut.service 2 | -------------------------------------------------------------------------------- /scripts/avahi/nut.service.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | 24 | 25 | 26 | 27 | %h 28 | 29 | 30 | _nut._tcp 31 | @PORT@ 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /scripts/devd/.gitignore: -------------------------------------------------------------------------------- 1 | nut-usb.conf* 2 | nut-usb.quirks 3 | -------------------------------------------------------------------------------- /scripts/devd/README.adoc: -------------------------------------------------------------------------------- 1 | NUT USB integration resources for FreeBSD devd 2 | ============================================== 3 | 4 | On FreeBSD, the `devd` subsystem has a similar role to `udev` on Linux. 5 | 6 | NOTE: Some FreeBSD based systems rely on "quirks" instead. 7 | 8 | The `devd.conf` file defines actions to perform when devices are plugged in. 9 | 10 | The `tools/nut-usbinfo.pl` script (under NUT source tree root) generates 11 | the `nut-usb.conf.in` here by processing USB macros in all of the drivers. 12 | In this case, the defined action for each matching UPS is to change the 13 | permissions such that the NUT drivers can access the USB device nodes 14 | without requiring root privileges. 15 | 16 | You may need to restart `devd` and re-plug in the UPS (or reboot) after 17 | installation of the file in order to trigger the actions. 18 | 19 | The format of this configuration file should work with `devd` on FreeBSD 9.0 20 | and 9.1, at the very least. 21 | -------------------------------------------------------------------------------- /scripts/external_apis/README.adoc: -------------------------------------------------------------------------------- 1 | NUT external API integration scripts 2 | ==================================== 3 | 4 | These directories hold scripts that help integrate NUT with external APIs 5 | not yet natively supported. These may include REST API, Web-based JSON, 6 | or any other protocol that doesn't have a supported NUT driver but a 7 | prototype to interact with the device can be easily scripted. They 8 | are useful both for adding the integration to an existing install, or 9 | as a starting point for creating new integrations. 10 | 11 | - `enphase`: web-API based integration with Enphase's locally hosted 12 | IQ Gateway. 13 | + 14 | Supports web-based login and token management, and maps JSON data 15 | to files consumed by the linkman:dummy-ups[8] driver. 16 | -------------------------------------------------------------------------------- /scripts/external_apis/enphase/.gitignore: -------------------------------------------------------------------------------- 1 | enphase-monitor@.service 2 | enphase-monitor 3 | -------------------------------------------------------------------------------- /scripts/fuse/execfuse-nut/init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | -------------------------------------------------------------------------------- /scripts/fuse/execfuse-nut/read_file: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Simple PoC of NUT client as a FUSE mountable filesystem 4 | # Requires https://github.com/vi/execfuse 5 | # Copyright (C) 2024 by Jim Klimov 6 | # Licensed GPLv2+ as NUT codebase 7 | 8 | if [ x"$NUT_DEBUG_FUSE" = xtrue ] ; then 9 | exec 2>"/tmp/nut-debug-fuse-`basename $0`.log" 10 | echo "ARGS($#, $0): 1='$1' 2='$2' @='$@'" >&2 11 | fi 12 | 13 | #PATH="~/nut/clients:$PATH" 14 | #export PATH 15 | 16 | case "$1" in 17 | /by-server/*/*/*/*) # Don't want subdirs here 18 | ;; 19 | /by-server/*/*/*) 20 | VARNAME="`basename "$1"`" 21 | UPS="`echo "$1" | sed 's,^/by-server/\([^/]*\)/\([^/]*\)/'"$VARNAME"'$,\2@\1,'`" 22 | if [ x"$NUT_DEBUG_FUSE" = xtrue ] ; then 23 | #echo "+upsc '$UPS' '$VARNAME'" >&2 24 | set -x 25 | fi 26 | upsc "$UPS" "$VARNAME" 27 | exit $? 28 | ;; 29 | /client-location) 30 | command -v upsc 31 | exit $? 32 | ;; 33 | /client-version) 34 | if [ x"$NUT_DEBUG_FUSE" = xtrue ] ; then 35 | #echo "+upsc '$UPS' '$VARNAME'" >&2 36 | set -x 37 | fi 38 | NUT_DEBUG_LEVEL=6 upsc -V 39 | exit $? 40 | ;; 41 | esac 42 | 43 | exit 1 44 | -------------------------------------------------------------------------------- /scripts/hotplug/.gitignore: -------------------------------------------------------------------------------- 1 | /libhid.usermap 2 | /libhidups 3 | -------------------------------------------------------------------------------- /scripts/hotplug/README.adoc: -------------------------------------------------------------------------------- 1 | Hotplug script for NUT USB drivers 2 | ================================== 3 | Arnaud Quette 4 | v1.0, 8 January 2007 (start date) 5 | 6 | This document introduces Linux Hotplug script for NUT USB 7 | drivers (`usbhid-ups`, `bcmxcp_usb` and `tripplite_usb`). 8 | 9 | These are needed, on older Linux systems, to ensure the right 10 | privileges are set on the USB device node files (i.e. allowing 11 | `nut` user to read AND write to the UPS device). 12 | 13 | 14 | Alternative 15 | ----------- 16 | 17 | For newer 2.6 kernels with the `udev` mechanism, you should use 18 | the scripts in `scripts/udev` instead of this one. 19 | 20 | 21 | Installation 22 | ------------ 23 | 24 | For most users, these files will be automatically installed in 25 | `/etc/hotplug` upon `make install`, if that directory exists. 26 | 27 | You can specify an alternate directory by running: 28 | ---- 29 | :; ./configure --with-hotplug-dir=DIR 30 | ---- 31 | 32 | 33 | Manual installation 34 | ------------------- 35 | 36 | These scripts can be used with Linux 2.4 to 2.6.13. 37 | 38 | - possibly change `libhidups` to match NUT user 39 | - copy `libhidups` and `libhid.usermap` to `/etc/hotplug/usb/` 40 | - make `libhidups` executable with: 41 | + 42 | ---- 43 | :; chmod a+x /etc/hotplug/usb/libhidups 44 | ---- 45 | - call `update-usb.usermap` or equivalent if needed 46 | 47 | You can then plug your UPS, and start NUT. 48 | -------------------------------------------------------------------------------- /scripts/hotplug/libhidups.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This script changes the permissions and ownership of a USB device under 4 | # /proc/bus/usb to grant access to this device to users in the nut group. 5 | # 6 | # Ownership is set to root.@RUN_AS_GROUP@, permissions are set to 0664. 7 | # 8 | # Arguments : 9 | # ----------- 10 | # ACTION=[add|remove] 11 | # DEVICE=/proc/bus/usb/BBB/DDD 12 | # TYPE=usb 13 | 14 | if [ "$ACTION" = "add" -a "$TYPE" = "usb" ]; then 15 | chown root:@RUN_AS_GROUP@ "$DEVICE" 16 | chmod 0664 "$DEVICE" 17 | fi 18 | -------------------------------------------------------------------------------- /scripts/installer/.gitignore: -------------------------------------------------------------------------------- 1 | /common_EN/license.txt 2 | -------------------------------------------------------------------------------- /scripts/installer/aix/ipp-os-shutdown.conf.sample: -------------------------------------------------------------------------------- 1 | # 2 | # ipp-os-shutdown.conf 3 | # 4 | # Settings that specify typical shutdown commands for various supported OSes 5 | # Version for AIX 6 | # 7 | 8 | # The program which executes an OS shutdown, maybe including flags that 9 | # disable its interactive mode 10 | CMD_SHUTDOWN="/usr/sbin/shutdown" 11 | 12 | # Depending on OS and hardware support, "poweroff" option may tell the 13 | # host's power source units to cut off their power to the motherboard, 14 | # and "halt" may sit forever at the "OS is stopped" prompt or equivalent. 15 | # NOTE: Yes, according to AIX man pages, the letters are not matched 16 | # with the tag-words: "-p" leaves the machine halted and powered-on, 17 | # and "-h" tries to kill power in the end. 18 | SDFLAG_POWEROFF="-h" 19 | SDFLAG_REBOOT="-r" 20 | SDFLAG_HALT="-p" 21 | 22 | # The flag for quick stop (shorter service stop timeouts and fewer/no 23 | # logs, or outright go to kill remaining processes) 24 | SDFLAG_UNGRACEFUL="-F" 25 | 26 | # Trigger a shutdown without delay 27 | SDFLAG_INSTANT="+0" 28 | 29 | ## Filename to store the PID of a pending shutdown 30 | ## If this file is absent, the shutdown can not be canceled (killed) 31 | ## If the "${SHUTDOWN_PIDFILE}.irreversible" exists and points to running PID 32 | ## then the new shutdown can not be queued (caller must cancel old one first) 33 | SHUTDOWN_PIDFILE="/var/run/nut/shutdown.pid" 34 | -------------------------------------------------------------------------------- /scripts/installer/common/ipp-shutdown-daemon.sh: -------------------------------------------------------------------------------- 1 | #THIS IS WORK IN PROGRESS, THIS IS NOT FUNCTIONAL. 2 | exit 3 | 4 | #!/bin/sh 5 | # ipp-shutdown-daemon 6 | # 7 | # Copyright (c) 2013-2017, by Eaton (R) Corporation. All rights reserved. 8 | # 9 | # A shell script to detect shutdown from NMC cards IPP - Unix (NUT) 10 | # It needs ipp.conf file. 11 | # 12 | 13 | NUT_DIR="/usr/local/ups" 14 | NUT_CFG_DIR="" 15 | for D in "$NUT_DIR/etc" "/etc/nut" "/etc/ups" ; do 16 | if [ -d "$D" ] && [ -f "$D/ups.conf" ] && [ -f "$D/ipp.conf" ] ; then 17 | NUT_CFG_DIR="$D" 18 | break 19 | fi 20 | done 21 | unset D 22 | CONFIG_IPP="$NUT_CFG_DIR/ipp.conf" 23 | 24 | # Note: $NUT_DIR/xbin holds the wrappers to run NUT binaries with co-bundled 25 | # third party libs and hopefully without conflicts induced for the OS binaries 26 | PATH="$NUT_DIR/xbin:$NUT_DIR/sbin:$NUT_DIR/bin:$PATH" 27 | export PATH 28 | 29 | # Search for binaries under current PATH normally, no hardcoding 30 | NUT_UPSC="upsc" 31 | #NUT_UPSC="$NUT_DIR/xbin/upsc" 32 | 33 | if [ -f "$CONFIG_IPP" ] ; then 34 | . "$CONFIG_IPP" 35 | fi 36 | 37 | # Convert to parsing of "ipp-status -p" which reports all needed details 38 | for dev in `$NUT_UPSC -l 2>/dev/null`; do 39 | shutdown="`$NUT_UPSC "$dev"@localhost ups.timer.shutdown 2>/dev/null`" 40 | reboot="`$NUT_UPSC "$dev"@localhost ups.timer.reboot 2>/dev/null`" 41 | done 42 | -------------------------------------------------------------------------------- /scripts/installer/common/ipp-wrapper: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ipp-wrapper 3 | # 4 | # Copyright (c) 2017, by Eaton (R) Corporation. All rights reserved. 5 | # 6 | # A shell script to manipulate the environment variables needed for 7 | # IPP-Unix programs to dynamically link with their bundled libraries. 8 | 9 | # 10 | # Global variables 11 | # 12 | NUT_DIR="/usr/local/ups" 13 | NUT_BIN_DIR="$NUT_DIR/bin" 14 | NUT_SBIN_DIR="$NUT_DIR/sbin" 15 | NUT_LIB_DIR="$NUT_DIR/lib" 16 | 17 | PROGNAME="`basename $0`" 18 | 19 | if [ "$PROGNAME" = "ipp-wrapper" ]; then 20 | echo "This is a wrapper to call other programs; do not call it directly!" >&2 21 | exit 0 22 | fi 23 | 24 | # Use potentially external /bin/test (/bin/[) for the last time... 25 | PROGTYPE="" 26 | if [ -x "$NUT_BIN_DIR/$PROGNAME" ]; then 27 | PROGTYPE="bin" 28 | else 29 | if [ -x "$NUT_SBIN_DIR/$PROGNAME" ]; then 30 | PROGTYPE="sbin" 31 | fi 32 | fi 33 | 34 | # Do not run any other external program after this point, as it may 35 | # fail expecting different shared libraries. 36 | LD_LIBRARY_PATH="$NUT_LIB_DIR:/usr/lib:/lib:$LD_LIBRARY_PATH" 37 | export LD_LIBRARY_PATH 38 | 39 | case "$PROGTYPE" in 40 | bin) 41 | exec "$NUT_BIN_DIR/$PROGNAME" "$@" 42 | ;; 43 | sbin) 44 | exec "$NUT_SBIN_DIR/$PROGNAME" "$@" 45 | ;; 46 | esac 47 | 48 | echo "FATAL: Program named '$PROGNAME' not found among IPP-Unix binaries" >&2 49 | exit 1 50 | -------------------------------------------------------------------------------- /scripts/installer/solcmn/ipp-os-shutdown.conf.sample: -------------------------------------------------------------------------------- 1 | # 2 | # ipp-os-shutdown.conf 3 | # 4 | # Settings that specify typical shutdown commands for various supported OSes 5 | # Version for Solaris (x86, SPARC) 6 | # 7 | 8 | # The program which executes an OS shutdown, maybe including flags that 9 | # disable its interactive mode 10 | CMD_SHUTDOWN="/usr/sbin/shutdown -y" 11 | 12 | # Depending on OS and hardware support, "poweroff" option may tell the 13 | # host's power source units to cut off their power to the motherboard, 14 | # and "halt" may sit forever at the "OS is stopped" prompt or equivalent. 15 | SDFLAG_POWEROFF="-i 5" 16 | SDFLAG_REBOOT="-i 6" 17 | SDFLAG_HALT="-i 0" 18 | 19 | # The flag for quick stop (shorter service stop timeouts and fewer/no 20 | # logs, or outright go to kill remaining processes) 21 | # NOTE: In Solaris, there are very ungraceful options for `poweroff`, 22 | # `halt` and `reboot` programs - but they are not exposed in `shutdown`. 23 | SDFLAG_UNGRACEFUL="-g 0" 24 | 25 | # Trigger a shutdown without delay 26 | SDFLAG_INSTANT="-g 0" 27 | 28 | ## Filename to store the PID of a pending shutdown 29 | ## If this file is absent, the shutdown can not be canceled (killed) 30 | ## If the "${SHUTDOWN_PIDFILE}.irreversible" exists and points to running PID 31 | ## then the new shutdown can not be queued (caller must cancel old one first) 32 | SHUTDOWN_PIDFILE="/var/state/ups/shutdown.pid" 33 | 34 | -------------------------------------------------------------------------------- /scripts/installer/version.sh: -------------------------------------------------------------------------------- 1 | IPP_VERSION="1.40-5" 2 | -------------------------------------------------------------------------------- /scripts/logrotate/nutlogd: -------------------------------------------------------------------------------- 1 | # Log rotation configuration for NUT: 2 | # Rotate NUT log file(s) either monthly or when exceeding 5 Mb 3 | # 4 | # For more information, refer to logrotate(8) manual page: 5 | # http://linuxcommand.org/man_pages/logrotate8.html 6 | # 7 | # To install this file, use: 8 | # $ cp nutlogd /etc/logrotate.d/ 9 | # $ chmod 644 /etc/logrotate.d/nutlogd 10 | # $ chown root.root /etc/logrotate.d/nutlogd 11 | # 12 | # Log files must have "nut-" prefix and ".log" suffix 13 | 14 | /var/log/nut-*.log { 15 | missingok 16 | notifempty 17 | size=5M 18 | rotate 12 19 | monthly 20 | postrotate 21 | /usr/bin/killall -HUP upslog 22 | endscript 23 | } 24 | 25 | -------------------------------------------------------------------------------- /scripts/misc/osd-notify: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # **********************************************************# 3 | # osd-notify: script to make On Screen Display notification # 4 | # **********************************************************# 5 | # Copyright 2003 - Arnaud Quette # 6 | # Distributed under the GNU GPL v2 # 7 | # See attached file (osd-notify.txt) for usage information # 8 | # **********************************************************# 9 | 10 | # select your font with xfontsel 11 | # ****************************** 12 | FONT="-adobe-courier-bold-*-*-*-34-*-100-*-*-*-*-*" 13 | 14 | # Position 15 | # ******** 16 | POSITION="-p middle -A center" 17 | 18 | # Delay in seconds 19 | # **************** 20 | DELAY="10" 21 | 22 | # Color 23 | # ***** 24 | COLOR="red" 25 | 26 | # You can use a combination of valid message values: 27 | # $* => for full text 28 | # $UPSNAME => for ups name 29 | # $NOTIFYTYPE => depending on event (ONLINE, ONBATT, ...) 30 | # ********************************************************************* 31 | MESSAGE="$*" 32 | 33 | # Processing part 34 | # *************** 35 | echo $MESSAGE | osd_cat - -c $COLOR -f $FONT -d $DELAY $POSITION 36 | -------------------------------------------------------------------------------- /scripts/python/.gitignore: -------------------------------------------------------------------------------- 1 | # A script may be generated here which would be installed into system PATH 2 | # to re-exec the real client with its full path name (so that it knows its 3 | # resource directory location): 4 | /NUT-Monitor 5 | -------------------------------------------------------------------------------- /scripts/python/app/.gitignore: -------------------------------------------------------------------------------- 1 | # Final scripts generated from .in templates: 2 | /NUT-Monitor-py2gtk2 3 | /NUT-Monitor-py3qt5 4 | /NUT-Monitor-py3qt6 5 | -------------------------------------------------------------------------------- /scripts/python/app/icons/256x256/nut-monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/python/app/icons/256x256/nut-monitor.png -------------------------------------------------------------------------------- /scripts/python/app/icons/48x48/nut-monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/python/app/icons/48x48/nut-monitor.png -------------------------------------------------------------------------------- /scripts/python/app/icons/64x64/nut-monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/python/app/icons/64x64/nut-monitor.png -------------------------------------------------------------------------------- /scripts/python/app/locale/fr/LC_MESSAGES/NUT-Monitor.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/python/app/locale/fr/LC_MESSAGES/NUT-Monitor.mo -------------------------------------------------------------------------------- /scripts/python/app/locale/fr/fr_FR.UTF-8.po: -------------------------------------------------------------------------------- 1 | fr.po -------------------------------------------------------------------------------- /scripts/python/app/locale/fr_FR.UTF-8: -------------------------------------------------------------------------------- 1 | fr -------------------------------------------------------------------------------- /scripts/python/app/locale/it/LC_MESSAGES/NUT-Monitor.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/python/app/locale/it/LC_MESSAGES/NUT-Monitor.mo -------------------------------------------------------------------------------- /scripts/python/app/locale/it/it_IT.UTF-8.po: -------------------------------------------------------------------------------- 1 | it.po -------------------------------------------------------------------------------- /scripts/python/app/locale/it_IT.UTF-8: -------------------------------------------------------------------------------- 1 | it -------------------------------------------------------------------------------- /scripts/python/app/locale/ru/LC_MESSAGES/NUT-Monitor.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/python/app/locale/ru/LC_MESSAGES/NUT-Monitor.mo -------------------------------------------------------------------------------- /scripts/python/app/locale/ru/ru_RU.UTF-8.po: -------------------------------------------------------------------------------- 1 | ru.po -------------------------------------------------------------------------------- /scripts/python/app/locale/ru_RU.UTF-8: -------------------------------------------------------------------------------- 1 | ru -------------------------------------------------------------------------------- /scripts/python/app/nut-monitor-py2gtk2.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=NUT Monitor 3 | Name[fr]=Moniteur NUT 4 | Comment=Network UPS Tools GUI client (Py2Gtk2) 5 | Comment[fr]=Client graphique pour NUT (Network UPS Tools, Py2Gtk2) 6 | Comment[it]=Client grafico per NUT (Network UPS Tools, Py2Gtk2) 7 | Categories=System;Monitor;HardwareSettings;Settings;GTK 8 | Exec=NUT-Monitor-py2gtk2 9 | Icon=nut-monitor 10 | Terminal=false 11 | Type=Application 12 | -------------------------------------------------------------------------------- /scripts/python/app/nut-monitor-py3qt5.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=NUT Monitor 3 | Name[fr]=Moniteur NUT 4 | Comment=Network UPS Tools GUI client (Py3Qt5) 5 | Comment[fr]=Client graphique pour NUT (Network UPS Tools, Py3Qt5) 6 | Comment[it]=Client grafico per NUT (Network UPS Tools, Py3Qt5) 7 | Categories=System;Monitor;HardwareSettings;Settings;Qt 8 | Exec=NUT-Monitor-py3qt5 9 | Icon=nut-monitor 10 | Terminal=false 11 | Type=Application 12 | -------------------------------------------------------------------------------- /scripts/python/app/nut-monitor-py3qt6.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=NUT Monitor 3 | Name[fr]=Moniteur NUT 4 | Comment=Network UPS Tools GUI client (Py3Qt6) 5 | Comment[fr]=Client graphique pour NUT (Network UPS Tools, Py3Qt6) 6 | Comment[it]=Client grafico per NUT (Network UPS Tools, Py3Qt6) 7 | Categories=System;Monitor;HardwareSettings;Settings;Qt 8 | Exec=NUT-Monitor-py3qt6 9 | Icon=nut-monitor 10 | Terminal=false 11 | Type=Application 12 | -------------------------------------------------------------------------------- /scripts/python/app/nut-monitor.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=NUT Monitor 3 | Name[fr]=Moniteur NUT 4 | Comment=Network UPS Tools GUI client 5 | Comment[fr]=Client graphique pour NUT (Network UPS Tools) 6 | Comment[it]=Client grafico per NUT (Network UPS Tools) 7 | Categories=System;Monitor;HardwareSettings;Settings 8 | Exec=NUT-Monitor 9 | Icon=nut-monitor 10 | Terminal=false 11 | Type=Application 12 | -------------------------------------------------------------------------------- /scripts/python/app/pixmaps/on_battery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/python/app/pixmaps/on_battery.png -------------------------------------------------------------------------------- /scripts/python/app/pixmaps/on_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/python/app/pixmaps/on_line.png -------------------------------------------------------------------------------- /scripts/python/app/pixmaps/var-ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/python/app/pixmaps/var-ro.png -------------------------------------------------------------------------------- /scripts/python/app/pixmaps/var-rw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/python/app/pixmaps/var-rw.png -------------------------------------------------------------------------------- /scripts/python/app/pixmaps/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/python/app/pixmaps/warning.png -------------------------------------------------------------------------------- /scripts/python/app/screenshots/nut-monitor-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/python/app/screenshots/nut-monitor-1.png -------------------------------------------------------------------------------- /scripts/python/app/screenshots/nut-monitor-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/python/app/screenshots/nut-monitor-2.png -------------------------------------------------------------------------------- /scripts/python/app/screenshots/nut-monitor-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkupstools/nut/8916ac8d13891d6b11e72b50a5d323ca31ba12ff/scripts/python/app/screenshots/nut-monitor-3.png -------------------------------------------------------------------------------- /scripts/python/module/.gitignore: -------------------------------------------------------------------------------- 1 | /PyNUT.py 2 | /test_nutclient.py 3 | /setup.py 4 | /PyNUTClient 5 | /PyNUTClient.egg-info 6 | /build 7 | /dist 8 | /src 9 | /.tox 10 | /README.txt 11 | /.pypi-* 12 | /LICENSE-GPL3 13 | -------------------------------------------------------------------------------- /scripts/python/module/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include tox.ini 2 | -------------------------------------------------------------------------------- /scripts/python/module/tox.ini: -------------------------------------------------------------------------------- 1 | # Configuration for Python test environment manager 2 | # https://tox.wiki/en/latest/user_guide.html 3 | # 4 | # Note that to run `test_nutclient.py` you must prepare a running NUT data 5 | # server (upsd) with a connected driver. You can use a dummy-ups driver for 6 | # that, see e.g. NUT tests/NIT/nit.sh for how the test beds are prepared. 7 | # Further you may need to export `NUT_HOST` and `NUT_PORT` (if not default), 8 | # and a `NUT_USER` and `NUT_PASS` for tests with logged-in session behaviors. 9 | # Then just run `tox` (may have to `pip install tox` first though). 10 | 11 | [tox] 12 | envlist = 13 | py2{6,7} 14 | py3{5,5,6,7,8,9,10,11,12,13} 15 | 16 | [testenv] 17 | setenv = 18 | PYTHONPATH = {toxinidir}:{toxinidir}/PyNUTClient 19 | 20 | # On my system, some but not all Python versions complained about lack of 21 | # "distutils.cmd" etc. in the prepared virtual environments. Can this help? 22 | commands_pre = 23 | python -m pip install -U pip 24 | 25 | commands = 26 | python PyNUTClient/test_nutclient.py 27 | #py.test --basetemp={envtmpdir} 28 | -------------------------------------------------------------------------------- /scripts/systemd/.gitignore: -------------------------------------------------------------------------------- 1 | # Note: nut-common-tmpfiles.conf.in is also generated, by configure script 2 | /nut-common-tmpfiles.conf.in 3 | /nut-common-tmpfiles.conf 4 | /nut.target 5 | # Singular nut-driver.service is obsolete, help with old build workspaces: 6 | /nut-driver.service 7 | /nut-driver.target 8 | /nut-driver@.service 9 | /nut-logger.service 10 | /nut-monitor.service 11 | /nut-server.service 12 | /nutshutdown 13 | /nut-driver-enumerator.service 14 | /nut-driver-enumerator.path 15 | /nut-driver-enumerator-daemon-activator.path 16 | /nut-driver-enumerator-daemon-activator.service 17 | /nut-driver-enumerator-daemon.service 18 | -------------------------------------------------------------------------------- /scripts/systemd/nut-driver-enumerator-daemon-activator.path.in: -------------------------------------------------------------------------------- 1 | # Network UPS Tools (NUT) systemd integration 2 | # Copyright (C) 2011-2025 by NUT contributors 3 | # Distributed under the terms of GPLv2+ 4 | # See https://networkupstools.org/ 5 | # and https://github.com/networkupstools/nut/ 6 | 7 | [Unit] 8 | # Trigger restart of nut-driver-enumerator-daemon-activator.service 9 | # whenever ups.conf is edited, which would cause reload-or-restart 10 | # of the nut-driver-enumerator-daemon.service for actual reconfig. 11 | Description=Network UPS Tools - Trigger reload-or-restart of nut-driver-enumerator-daemon.service whenever ups.conf is edited 12 | Conflicts=nut-driver-enumerator.service nut-driver-enumerator.path 13 | After=local-fs.target 14 | Before=nut-driver.target 15 | PartOf=nut.target 16 | 17 | Documentation=man:nut-driver-enumerator(@MAN_SECTION_CMD_SYS@) 18 | Documentation=@NUT_WEBSITE_BASE@/docs/man/nut-driver-enumerator.html 19 | Documentation=man:ups.conf(@MAN_SECTION_CFG@) 20 | Documentation=@NUT_WEBSITE_BASE@/docs/man/ups.conf.html 21 | Documentation=man:upsdrvsvcctl(@MAN_SECTION_CMD_SYS@) 22 | Documentation=@NUT_WEBSITE_BASE@/docs/man/upsdrvsvcctl.html 23 | Documentation=man:nut.conf(@MAN_SECTION_CFG@) 24 | Documentation=@NUT_WEBSITE_BASE@/docs/man/nut.conf.html 25 | 26 | [Path] 27 | PathModified=@CONFPATH@/ups.conf 28 | 29 | [Install] 30 | WantedBy=nut.target 31 | -------------------------------------------------------------------------------- /scripts/systemd/nut-driver-enumerator.path.in: -------------------------------------------------------------------------------- 1 | # Network UPS Tools (NUT) systemd integration 2 | # Copyright (C) 2011-2025 by NUT contributors 3 | # Distributed under the terms of GPLv2+ 4 | # See https://networkupstools.org/ 5 | # and https://github.com/networkupstools/nut/ 6 | 7 | [Unit] 8 | # Trigger restart of nut-driver-enumerator.service whenever ups.conf is edited 9 | Description=Network UPS Tools - Trigger restart of nut-driver-enumerator.service whenever ups.conf is edited 10 | Conflicts=nut-driver-enumerator-daemon.service nut-driver-enumerator-daemon-activator.path nut-driver-enumerator-daemon-activator.service 11 | After=local-fs.target 12 | Before=nut-driver.target 13 | PartOf=nut.target 14 | 15 | Documentation=man:nut-driver-enumerator(@MAN_SECTION_CMD_SYS@) 16 | Documentation=@NUT_WEBSITE_BASE@/docs/man/nut-driver-enumerator.html 17 | Documentation=man:ups.conf(@MAN_SECTION_CFG@) 18 | Documentation=@NUT_WEBSITE_BASE@/docs/man/ups.conf.html 19 | Documentation=man:upsdrvsvcctl(@MAN_SECTION_CMD_SYS@) 20 | Documentation=@NUT_WEBSITE_BASE@/docs/man/upsdrvsvcctl.html 21 | Documentation=man:nut.conf(@MAN_SECTION_CFG@) 22 | Documentation=@NUT_WEBSITE_BASE@/docs/man/nut.conf.html 23 | 24 | [Path] 25 | PathModified=@CONFPATH@/ups.conf 26 | 27 | [Install] 28 | WantedBy=nut.target 29 | -------------------------------------------------------------------------------- /scripts/systemd/nut-driver.target.in: -------------------------------------------------------------------------------- 1 | # Network UPS Tools (NUT) systemd integration 2 | # Copyright (C) 2011-2025 by NUT contributors 3 | # Distributed under the terms of GPLv2+ 4 | # See https://networkupstools.org/ 5 | # and https://github.com/networkupstools/nut/ 6 | 7 | [Unit] 8 | Description=Network UPS Tools - target for power device drivers on this system 9 | After=local-fs.target 10 | # network.target 11 | PartOf=nut.target 12 | 13 | # TODO: Dedicated man pages? 14 | Documentation=man:ups.conf(5) 15 | Documentation=@NUT_WEBSITE_BASE@/docs/man/ups.conf.html 16 | 17 | Documentation=man:nut.conf(5) 18 | Documentation=@NUT_WEBSITE_BASE@/docs/man/nut.conf.html 19 | 20 | [Install] 21 | WantedBy=nut.target 22 | -------------------------------------------------------------------------------- /scripts/systemd/nut-sleep.service: -------------------------------------------------------------------------------- 1 | # Network UPS Tools (NUT) systemd integration 2 | # Copyright (C) 2011-2025 by NUT contributors 3 | # Distributed under the terms of GPLv2+ 4 | # See https://networkupstools.org/ 5 | # and https://github.com/networkupstools/nut/ 6 | 7 | # A rather blunt solution for system sleeping support, for cases where 8 | # we can not use a native libsystemd "inhibitor interface". This helps 9 | # avoid NUT shutting down a woken-up system just because its power state 10 | # was critical before the sleep, and a next-read timestamp was not seen 11 | # (deemed to be a stale UPS, meaning lost comms during critical state, 12 | # so must go down ASAP). 13 | 14 | [Unit] 15 | Description=Network UPS Tools - sleep hook 16 | Before=sleep.target 17 | StopWhenUnneeded=yes 18 | 19 | [Service] 20 | Type=oneshot 21 | RemainAfterExit=yes 22 | ExecStart=/usr/bin/systemctl stop nut.target 23 | ExecStop=/usr/bin/systemctl start --no-block nut.target 24 | 25 | [Install] 26 | WantedBy=sleep.target 27 | -------------------------------------------------------------------------------- /scripts/systemd/nut.target.in: -------------------------------------------------------------------------------- 1 | # Network UPS Tools (NUT) systemd integration 2 | # Copyright (C) 2011-2025 by NUT contributors 3 | # Distributed under the terms of GPLv2+ 4 | # See https://networkupstools.org/ 5 | # and https://github.com/networkupstools/nut/ 6 | 7 | [Unit] 8 | Description=Network UPS Tools - target for power device drivers, data server and monitoring client (if enabled) on this system 9 | After=local-fs.target nut-driver.target nut-server.service nut-monitor.service nut-logger.service 10 | Wants=local-fs.target nut-driver.target nut-server.service nut-monitor.service 11 | # network.target 12 | # nut-logger.service ### not enabled by default 13 | 14 | # TODO: Dedicated man pages? 15 | Documentation=man:ups.conf(@MAN_SECTION_CFG@) 16 | Documentation=@NUT_WEBSITE_BASE@/docs/man/ups.conf.html 17 | 18 | Documentation=man:nut.conf(@MAN_SECTION_CFG@) 19 | Documentation=@NUT_WEBSITE_BASE@/docs/man/nut.conf.html 20 | 21 | [Install] 22 | WantedBy=multi-user.target 23 | -------------------------------------------------------------------------------- /scripts/udev/.gitignore: -------------------------------------------------------------------------------- 1 | /52-nut-ipmipsu.rules 2 | /62-nut-usbups.rules 3 | /nut-ipmipsu.rules 4 | /nut-usbups.rules 5 | /nut-usbups.rules.in 6 | /nut-usbups.rules.in.AUTOGEN_WITHOUT 7 | -------------------------------------------------------------------------------- /scripts/udev/nut-ipmipsu.rules.in: -------------------------------------------------------------------------------- 1 | # This file is generated and installed by the Network UPS Tools package. 2 | # It sets the correct device permissions for nut-ipmipsu driver. 3 | 4 | KERNEL=="ipmi*", MODE="664", GROUP="@RUN_AS_GROUP@" 5 | -------------------------------------------------------------------------------- /scripts/ufw/.gitignore: -------------------------------------------------------------------------------- 1 | /nut.ufw.profile 2 | /README 3 | -------------------------------------------------------------------------------- /scripts/ufw/Makefile.am: -------------------------------------------------------------------------------- 1 | # Network UPS Tools: scripts/ufw 2 | 3 | EXTRA_DIST = README.adoc nut.ufw.profile.in 4 | 5 | # Note: spellchecking is currently ensured by docs/Makefile.am 6 | # due to inclusion into docs/security.txt, and the heading level 7 | # is also dictated by that. 8 | 9 | MAINTAINERCLEANFILES = Makefile.in .dirstamp 10 | CLEANFILES = *-spellchecked README 11 | -------------------------------------------------------------------------------- /scripts/ufw/README.adoc: -------------------------------------------------------------------------------- 1 | Uncomplicated Firewall (UFW) support 2 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 | 4 | NUT can tightly integrate with 5 | link:http://en.wikipedia.org/wiki/Uncomplicated_Firewall[Uncomplicated Firewall] 6 | using the provided profile (nut.ufw.profile). 7 | 8 | You must first install the profile on your system: 9 | 10 | $ cp nut.ufw.profile /etc/ufw/applications.d/ 11 | 12 | To enable outside access to your local upsd, use: 13 | 14 | $ ufw allow NUT 15 | 16 | To restrict access to the network '192.168.X.Y', use: 17 | 18 | $ ufw allow from 192.168.0.0/16 to any app NUT 19 | 20 | You can also use graphical frontends, such as gui-ufw (gufw), ufw-kde 21 | or ufw-frontends. 22 | 23 | For more information, refer to: 24 | 25 | - link:http://gufw.tuxfamily.org/[UFW homepage], 26 | - link:https://launchpad.net/ufw[UFW project page], 27 | - link:https://wiki.ubuntu.com/UncomplicatedFirewall[UFW wiki], 28 | - UFW manual page, section APPLICATION INTEGRATION 29 | -------------------------------------------------------------------------------- /scripts/ufw/nut.ufw.profile.in: -------------------------------------------------------------------------------- 1 | [NUT] 2 | title=NUT - Network UPS Tools server 3 | description=NUT is a client - server system with support for UPS, PDU and PSU. 4 | ports=@PORT@/tcp 5 | -------------------------------------------------------------------------------- /scripts/upower/95-upower-hid.rules: -------------------------------------------------------------------------------- 1 | # Copy some attributes from the USB device to the hiddev device 2 | SUBSYSTEM=="usbmisc", SUBSYSTEMS=="usb", KERNEL=="hiddev*", IMPORT{parent}="UPOWER_*", IMPORT{parent}="ID_VENDOR", IMPORT{parent}="ID_PRODUCT" 3 | -------------------------------------------------------------------------------- /scripts/upsdrvsvcctl/.gitignore: -------------------------------------------------------------------------------- 1 | /nut-driver-enumerator.sh 2 | /upsdrvsvcctl 3 | -------------------------------------------------------------------------------- /scripts/upsdrvsvcctl/README.adoc: -------------------------------------------------------------------------------- 1 | Shared resources for NUT service unit integrations 2 | ================================================== 3 | 4 | This directory contains the shared NUT support files for Linux systemd (the 5 | System and Service Manager) and Solaris SMF (Service Management Framework). 6 | It includes the `nut-driver-enumerator.sh` (service and implementation method) 7 | and `upsdrvsvcctl` (tool) to manage NUT drivers as service instances. 8 | 9 | These files are automatically installed into `SBINDIR/upsdrvsvcctl` and 10 | `LIBEXECDIR/nut-driver-enumerator.sh`, upon detection (at `configure` time) 11 | of a systemd or SMF enabled system, with Makefiles of the `../systemd/` and 12 | `../Solaris/` source directories respectively. 13 | 14 | Contributed 2016-2018 by Jim Klimov 15 | 16 | Maintained since 2020 by Jim Klimov 17 | -------------------------------------------------------------------------------- /scripts/usb_resetter/nut-driver.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Network UPS Tools - power device driver controller 3 | After=local-fs.target network.target 4 | StopWhenUnneeded=no 5 | 6 | 7 | [Service] 8 | ExecStartPre=-/usr/bin/systemd-tmpfiles --create /usr/lib/tmpfiles.d/nut-client.conf 9 | ExecStartPre=/usr/local/bin/usb_resetter --reset-hub --device 0665:5161 10 | ExecStart=/usr/sbin/upsdrvctl start 11 | ExecStop=/usr/sbin/upsdrvctl stop 12 | Type=forking 13 | Restart=on-failure 14 | RestartSec=5s 15 | -------------------------------------------------------------------------------- /scripts/valgrind/.gitignore: -------------------------------------------------------------------------------- 1 | /valgrind.sh 2 | /.valgrind.supp 3 | -------------------------------------------------------------------------------- /scripts/valgrind/README.adoc: -------------------------------------------------------------------------------- 1 | VALGRIND resources 2 | ================== 3 | 4 | Helper script and suppression file to analyze NUT binaries. 5 | 6 | Example use-case: 7 | ---- 8 | :; make -ks -j && LD_LIBRARY_PATH=`pwd`/clients/.libs \ 9 | ./scripts/valgrind/valgrind.sh ./tools/nut-scanner/nut-scanner -DDDDDD -m auto 10 | ---- 11 | 12 | Note that the script is generated under `${top_builddir}` by `configure` from 13 | a template file located in `${top_srcdir}/scripts/valgrind/valgrind.sh.in`. 14 | You might be able to run it directly, falling back to a `valgrind` program in 15 | your `PATH`, if any. 16 | 17 | See also: 18 | 19 | * link:https://wiki.wxwidgets.org/Valgrind_Suppression_File_Howto[Valgrind Suppression File How-to] 20 | - Notably, add `--gen-suppressions=all --error-limit=no` to `valgrind` 21 | program options to generate suppression snippets 22 | -------------------------------------------------------------------------------- /scripts/valgrind/valgrind.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright (C) 2024-2025 by Jim Klimov 4 | # NOTE: If there are system problems to suppress, re-run the test with 5 | # --gen-suppressions=all option, and update the .valgrind.supp file. 6 | 7 | SCRIPTDIR="`dirname "$0"`" 8 | SCRIPTDIR="`cd "$SCRIPTDIR" && pwd`" 9 | 10 | LTEXEC="" 11 | [ -n "${LIBTOOL-}" ] || LIBTOOL="`command -v glibtool`" 2>/dev/null 12 | [ -n "${LIBTOOL-}" ] || LIBTOOL="`command -v libtool`" 2>/dev/null 13 | [ -z "${LIBTOOL}" ] || LTEXEC="${LIBTOOL} --mode=execute " 14 | 15 | # Allow to run un-parsed "sh ${top_srcdir}/scripts/valgrind/valgrind.sh.in" 16 | # with reasonable success: 17 | [ -n "${VALGRIND-}" ] || case '@VALGRIND@' in [@]*|none) ;; *) VALGRIND='@VALGRIND@' ;; esac 18 | [ -n "${VALGRIND-}" ] || VALGRIND="valgrind" 19 | 20 | # TODO: Also wrap tool=callgrind e.g. via $0 symlink name? 21 | 22 | exec ${LTEXEC} \ 23 | ${VALGRIND} \ 24 | --tool=memcheck --verbose \ 25 | --leak-check=full --show-reachable=yes --error-exitcode=1 --show-error-list=yes \ 26 | --trace-children=yes --track-fds=yes --show-leak-kinds=all --track-origins=yes \ 27 | --suppressions="${SCRIPTDIR}/.valgrind.supp" \ 28 | ${VALGRIND_OPTIONS-} \ 29 | "$@" 30 | -------------------------------------------------------------------------------- /server/.gitignore: -------------------------------------------------------------------------------- 1 | /upsd 2 | /sockdebug 3 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | /cppunittest 2 | /cppunittest.log 3 | /cppunittest.trs 4 | /cppnit 5 | /cppnit.log 6 | /cppnit.trs 7 | /driver_methods_utest 8 | /driver_methods_utest.log 9 | /driver_methods_utest.trs 10 | /gpiotest 11 | /gpiotest.log 12 | /gpiotest.trs 13 | /test-suite.log 14 | /selftest-rw/* 15 | /nutlogtest-nofail.sh 16 | /nutlogtest 17 | /nutlogtest.log 18 | /nutlogtest.trs 19 | /nuttimetest 20 | /nuttimetest.log 21 | /nuttimetest.trs 22 | /nutbooltest 23 | /nutbooltest.log 24 | /nutbooltest.trs 25 | /getexponenttest-belkin-hid 26 | /getexponenttest-belkin-hid.log 27 | /getexponenttest-belkin-hid.trs 28 | /getvaluetest 29 | /getvaluetest.log 30 | /getvaluetest.trs 31 | /hidparser.c 32 | /generic_gpio_libgpiod.c 33 | /generic_gpio_common.c 34 | -------------------------------------------------------------------------------- /tests/NIT/.gitignore: -------------------------------------------------------------------------------- 1 | /tmp 2 | /Makefile.in 3 | -------------------------------------------------------------------------------- /tools/.gitignore: -------------------------------------------------------------------------------- 1 | /gitlog2changelog.py 2 | /nut-snmpinfo.py 3 | -------------------------------------------------------------------------------- /tools/nut-dumpdiff.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script is intended to simplify comparison of NUT data dumps, 4 | # such as those collected by drivers with `-d 1` argument, or by 5 | # the `upsc` client, ignoring irrelevant variations (e.g. numbers). 6 | # 7 | # TODO: Make more portable than bash and GNU toolkits 8 | # 9 | # Subject to same license as the NUT Project. 10 | # 11 | # Copyright (C) 12 | # 2022 Jim Klimov 13 | # 14 | 15 | if [ $# = 2 ] && [ -s "$1" ] && [ -s "$2" ]; then 16 | echo "=== $0: comparing '$1' (-) vs. '$2' (+)" >&2 17 | else 18 | echo "=== $0: aborting: requires two filenames to compare as arguments" >&2 19 | exit 1 20 | fi 21 | 22 | # Pre-sort just in case: 23 | DATA1="`sort -n < "$1"`" 24 | DATA2="`sort -n < "$2"`" 25 | 26 | # Strip away same-context lines, 27 | # and lines with measurements that are either decimal numbers 28 | # or multi-digit numbers without a decimal point (assuming 29 | # differences in shorter numbers or counters may be important) 30 | diff -bu <(echo "$DATA1") <(echo "$DATA2") \ 31 | | grep -E '^[+-][^+-]' \ 32 | | grep -vE '^[^:]*(power|load|voltage|current|frequency|temperature|humidity): ([0-9][0-9]*|[0-9][0-9]*\.[0-9][0-9]*)$' 33 | 34 | # Note: up to user to post-filter, "^driver.version.*:" 35 | # may be deemed irrelevant as well 36 | -------------------------------------------------------------------------------- /tools/nut-scanner/.gitignore: -------------------------------------------------------------------------------- 1 | /nut-scanner 2 | /nutscan-snmp.h 3 | /nutscan-usb.h 4 | /serial.c 5 | /bcmxcp_ser.c 6 | /README 7 | -------------------------------------------------------------------------------- /tools/nut-scanner/nutscan-serial.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 - EATON 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | /*! \file nutscan-serial.h 20 | \brief helper functions to get serial devices name 21 | \author Frederic Bohe 22 | */ 23 | 24 | #ifndef SCAN_SERIAL 25 | #define SCAN_SERIAL 26 | 27 | char ** nutscan_get_serial_ports_list(const char *ports_range); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /tools/nutconf/.gitignore: -------------------------------------------------------------------------------- 1 | nutconf 2 | 3 | --------------------------------------------------------------------------------