OpenBSD Handbook

    Theme
    • Part I. Install & Configure
      • Introduction to OpenBSD
      • Installing OpenBSD
      • The X Window System
      • Networking on OpenBSD
      • System Configuration
      • OpenBSD Basics
      • Managing Software: Packages and Ports
    • Part II. Daily Operations
      • OpenBSD Desktop Environments
      • Multimedia
      • Printing
      • Linux Compatibility
      • Windows Compatibility
      • Games
    • Part III. System Administration
      • Virtualization
      • Storage and File Systems
      • Updating and Upgrading
      • Localization
      • The OpenBSD Boot Process
      • Security
    • Part IV. Networking & Daemons
      • Services
        • Database
          • MariaDB
          • PostgreSQL
          • Redis
          • memcached
        • Directory
          • YP (NIS)
          • LDAP
        • File
          • NFS
          • Samba
        • FTP Services
          • ftpd
          • ProFTPD
          • vsftpd
          • Pure-FTPd
          • TFTP
        • Mail
          • OpenSMTPD Mail Server
          • Dovecot IMAP and POP3 Server
          • Postfix
          • Exim
          • Rspamd
        • Name
          • Unbound DNS Resolver
          • NSD Authoritative DNS Server
          • BIND DNS Server
        • Networking
          • OpenBGPD
          • rad
          • DHCP on OpenBSD
          • slaacd
        • Web
          • Apache HTTP Server
          • nginx Web Server
          • OpenBSD httpd Web Server
          • relayd Reverse Proxy
        • Logging
          • syslogd
        • Monitoring
          • SNMP
        • Remote Access
          • Audit OpenSSH
          • OpenSSH Server
        • File Synchronization
          • rsync
        • Messaging
          • RabbitMQ Message Broker
        • Time
          • NTP Time Synchronization
      • PF
        • pfctl cheat sheet
        • PF Anchors
        • PF Filter Rules
        • PF Forwarding
        • PF Lists and Macros
        • PF Load Balancing
        • PF Logging
        • PF NAT
        • PF Options
        • PF Policies
        • PF Shortcuts
        • PF Tables
      • Advanced Networking
        • High Availability and State Replication
        • Multi-WAN and Policy-Based Routing
        • VPN and Cryptographic Tunneling
        • Classic and Lightweight Tunnels
        • IPv6 at Scale
        • QoS and Traffic Shaping
        • MPLS and Label Distribution
        • Network Services at Scale
        • Virtualization and Host Networking
        • Large-Scale L2 and L3 Design
        • Telemetry, Logging, and Flow Export
        • Hardening and Operational Safety
        • Reference Architectures
        • Troubleshooting Playbooks
      • Serial Communication
    • Part V. Miscellaneous
      • Virtualization Cheat Sheet
      • OpenBSD Cheatsheet
      • How-to Guides
        • Complete the First 30 Minutes After Installation
        • Check Hardware Compatibility Before Installing
        • Bootstrap Wi-Fi Firmware Without Ethernet
        • Set Up OpenBSD as a Laptop or Workstation
        • Configure Laptop Power Management
        • Run OpenBSD as a Virtual Machine Guest
        • Install OpenBSD on a VPS or Cloud Server
        • Install OpenBSD with Full-Disk Encryption
        • Troubleshoot Web Browsers on OpenBSD
        • Create an Administrator Account with doas and SSH Keys
        • Establish a Conservative Security Baseline
        • Manage OpenBSD with Ansible
        • Recover Access and Reset the Root Password
        • Collect OpenBSD Diagnostic Evidence
        • Configure Secure Remote Access with OpenSSH
        • Set Up WordPress on OpenBSD
        • Build Third-Party Software from Ports
        • Use FIDO Security Keys with OpenSSH
        • Build OpenBSD from Source
        • Configure Wi-Fi Roaming and Wired Failover
        • Dual-Boot OpenBSD on a UEFI System
        • Troubleshoot PF, NAT, and Routing
        • Automate OpenBSD Installation with Autoinstall and PXE
        • Route Multiple VLANs with PF
        • Configure a Road-Warrior WireGuard VPN
        • Troubleshoot Package Installation and Update Failures
        • Route IPv6 Networks without NAT
        • Schedule Recurring Maintenance
        • Plan a Docker Workload Migration to OpenBSD
        • Build a Mail Server with OpenSMTPD, Dovecot, and Rspamd
        • Build a Simple Router and Firewall
        • Monitor an OpenBSD System
        • Back Up and Restore an OpenBSD System
        • Configure softraid RAID1
        • Recover an OpenBSD System That Does Not Boot
        • Install Z shell (zsh)
      • OpenBSD for Linux Users
      • OpenBSD for FreeBSD Users
      • OpenBSD for macOS Users
    • OpenBSD FAQ
    • OpenBSD Architectures
      • OpenBSD Package Search

        nut-2.8.5

        Package search / Categories / OpenBSD 8.0 release
        โ† Back to search
        OpenBSD branch
        OpenBSD 8.0 releaseCurrent snapshot

        OpenBSD 8.0 release ยท amd64

        UPS monitoring program supporting many brands

        Project homepage: https://networkupstools.org/

        Description

        Network UPS Tools is a collection of programs which provide a common interface for monitoring and administering Uninterruptible Power Supply (UPS), Power Distribution Unit (PDU), and Solar Controller Device (SCD) hardware. It uses a layered approach to connect all of the parts. Drivers are provided for a wide assortment of equipment. They understand the specific language of each device and map it back to a compatibility layer. This means both an expensive high end UPS, a simple "power strip" PDU, or any other power device can be handled transparently with a uniform management interface. This information is cached by the network server upsd, which then answers queries from the clients. upsd contains a number of access control features to limit the abilities of the clients. Only authorized hosts may monitor or control your hardware if you wish. Since the notion of monitoring over the network is built into the software, you can hang many systems off one large UPS, and they will all shut down together. You can also use NUT to power on, off or cycle your data center nodes, individually or globally through PDU outlets.

        Package information

        Ports path
        sysutils/nut
        Package architecture
        amd64
        Maintainer
        The OpenBSD ports mailing-list <ports@openbsd.org>
        Categories
        sysutils, lang/python
        Available flavors
        no_snmp, no_upower, no_xml
        Only for architectures
        aarch64, amd64, arm, i386, mips64, mips64el, powerpc, powerpc64, riscv64, sparc64, alpha, hppa

        Ports list build and test dependencies as well as runtime dependencies. pkg_add selects those needed for installation.

        Direct dependencies

        Library

        • devel/libtool,-ltdl
        • devel/libusb1

        Build

        • net/avahi,-libs
        • textproc/asciidoc STEM->=8.6.8
        • textproc/docbook-xsl
        • graphics/gd STEM->=1.8.3
        • lang/python/3
        • devel/metaauto
        • devel/autoconf/2.71
        • devel/automake/1.16
        • devel/libtool
        • devel/gmake
        OpenBSD README

        This README contains unresolved ports variables; replace them before using its commands.

        +-----------------------------------------------------------------------
        | Running nut on OpenBSD
        +-----------------------------------------------------------------------
        
        NUT is split into separate components. A hardware driver interfaces
        with the device and sends information to upsd. A monitor (upsmon)
        connects to upsd and shuts down the machine when necessary.
        
        These components can reside on separate computers (i.e. UPS monitored
        by various computers may communicate with a central upsd, and a whole
        network may run upsmon to allow for shutdown).
        
        On OpenBSD, daemons from packages are usually started by adding to the
        pkg_scripts line in /etc/rc.conf.local. For NUT, machines running
        upsd or the hardware driver should include "upsd" in this line, and all
        machines should include "upsmon". Where you run both, upsd should
        be started first. For example you could use this line:
        
        	pkg_scripts=upsd upsmon [...any other daemons...]
        
        Network devices
        ---------------
        To reduce dependencies for the basic NUT package, some network devices
        are supported by optional subpackages: nut-snmp (for SNMP-based devices),
        nut-xml (for Eaton/MGE devices using an XML/HTTP protocol).
        
        Connecting to a remote server running nutd(8) requires only the basic
        NUT package which also includes the file you are reading now.
        
        Configuring NUT
        ---------------
        The following files must be edited for a typical installation.
        
        * ups.conf
        
        Details of UPS device/s are held here. These may either be directly
        connected, or network devices (this can include a NUT server running on
        another machine). Configuration sections for this file can be generated
        for network and USB devices using nut-scanner(8). This is in the main
        NUT package but picks up dependencies at runtime, so if you wish
        to scan for network devices, just make sure the relevant package
        is installed before you run the scanner.
        
        To scan for network devices, specify start and end IP addresses:
        
        	# nut-scanner -s 192.168.17.1 -e 192.168.17.20
        
        * upsd.users
        
        upsd(8) user authentication is configured here.
        
        * upsmon.conf
        
        This file informs upsmon(8) which devices (configured in ups.conf) it
        should monitor. It also contains passwords to authenticate to upsd(8).
        
        Device permissions
        ------------------
        For locally connected UPS devices, the userid running NUT (normally
        _ups) must have access to the relevant device nodes.
        
        RS232: Either add _ups to group "dialer" or change the group ownership
        of the relevant /dev/tty* device to _ups.
        
        USB: Use "usbdevs -vd" (as root) to identify the specific controller
        (/dev/usbXX) and ugen (/dev/ugenXX) device nodes, then adjust permissions
        to allow _ups to have write access (e.g. chmod g+w and chgrp _ups).
        
        Special notice for USB devices
        ------------------------------
        Some USB devices (especially APC ones) are reported to only work with
        NUT if the device is attached to ugen(4). Normally these devices attach
        to upd(4) to provide system power sensors (see "sysctl hw.sensors").
        In some cases, where a device is attached to a device driver other than
        ugen(4), for example upd or uhid, it cannot also be used with NUT.
        
        Preventing the attachment is possible but requires kernel changes.
        
        If you do not use a USB keyboard/mouse, you can simply disable the upd
        and uhidev drivers. Use the bsd.re-config(5) mechanism by adding the
        following lines to /etc/bsd.re-config
        
          disable uhidev
          disable upd
        
        and run /usr/libexec/reorder_kernel. Or, as a one-off, you can patch an
        existing kernel using config(8) with the same 'disable' commands, or
        boot into UKC ("boot -c") and enter the disable commands.
        
        With a USB keyboard/mouse, you will need to target the UPS device id.
        Fetch kernel sources if you don't already have them, add the device to
        the usbd_quirk_entry table in /sys/dev/usb/usb_quirks.c, and build a
        new kernel. Either use an existing ID from /sys/dev/usb/usbdevs (these
        are for devices which are known to have problems sharing upd and NUT):
        
          { USB_VENDOR_APC, USB_PRODUCT_APC_UPS, ANY, { UQ_BAD_HID }},
          { USB_VENDOR_APC, USB_PRODUCT_APC_UPS5G, ANY, { UQ_BAD_HID }},
        
        or add it numerically, e.g.
        
          { 0x051d, 0x0003, ANY, { UQ_BAD_HID }},
        
        Then follow the usual steps to build a kernel.
        
        Starting the daemons
        --------------------
        To start the daemons without rebooting you can use:
        
        	# ${RCDIR}/upsd start
        	# ${RCDIR}/upsmon start
        
        NUT documentation refers to a nut.conf file; this can be ignored, it is
        only used with their System V init scripts, and not OpenBSD's rc scripts.
        
        It is recommended that you test a full cycle of rebooting, checking
        that the daemons are running correctly ("upsc <upsname>" will display
        information retrieved by NUT from the UPS), allowing the machine
        to be shut down by the UPS, and returning power.
        
        Used by (5 dependency relationships)

        Includes library, runtime, build and test dependencies.

        Package guides

        • Installing and updating packages

        Package details as JSON

        Report a bug