Alternative to Network UPS Tools (NUT)?

Is there an alternative to Network UPS Tools (NUT) for stand-alone systems?

Unless I read incorrectly, the minimum configuration for upsd [1] for a single system involves upsd listening on the loopback address and configuring a username/password for upsmon. I understand why these features make sense for a network with multiple machines, but I don't think it makes sense for a single system to involve network ports and authentication.

Ideally there is something like NUT but without the network component (a _UT?). Anyone know of something like that?

[1] https://networkupstools.org/docs/use...d/ar01s06.html
 
As vigole points out there is apcupsd. I've been using it with APC units for a long time, works just fine. I've had it working for serial comms and most units now are USB.
Not sure of the support for non-APC devices but if they talk the same protocol, should not be an issue.

There is a minor network component (they call it NIS in the config files) that you need to have enabled for some commands like "apcaccess status"" to work. But you can restrict it to only the loopback interface.
 
Is there an alternative to Network UPS Tools (NUT) for stand-alone systems?

Unless I read incorrectly, the minimum configuration for upsd [1] for a single system involves upsd listening on the loopback address and configuring a username/password for upsmon. I understand why these features make sense for a network with multiple machines, but I don't think it makes sense for a single system to involve network ports and authentication.

Ideally there is something like NUT but without the network component (a _UT?). Anyone know of something like that?

[1] https://networkupstools.org/docs/use...d/ar01s06.html
I am not sure whether you stayed with NUT or tried apcupsd ? I used NUT the last time without the network components for my home servers with a "Chinese" no-brand UPS. After patching/configuring it a bit, it worked fine and as expected. The very positive thing about NUT is , that it supports a lot of different devices and is up-to-date, while apcupsd or the software shipped with the UPS is outdated.

Using a dedicated user for the UPS system has some security advantages. Remember that the UPS may need to power-down/shutdown your system. You also don't want that any user could just "try" it.

I found it a bigger challange that the USB device numbering might change, when you plug in additional USB devices. Now you need to configure NUT to still find the right USB device. And also it might be a challenge to select the right time the UPS could still support the server and the devices that are on the same home UPS connected (Switch, Screen etc. )
 
Ideally there is something like NUT but without the network component (a _UT?).
Why? The software architecture uses localhost to communicate between components. When present, clients communicate on the network. That's not exactly a radical design choice... In fact, it makes a great deal of sense....

Nut is competent, and actively supported, and works perfectly well when there just one host to manage.
 
We're having really bad weather here in Northern California right now (a series of storms with heavy rain and high winds), and our power has been highly unreliable; averaging over the last week, we've been on home generator power for about 70% of the time. I have a small, cheap, and highly reliable APC UPS (model ES 550), which has been doing a fine job for the last 12 or 13 years (with a new battery every few years). I monitor it with apcupsd, including automatic shutdown of my FreeBSD server if the battery gets too low (which only happens when the generator isn't running). Great.

But there are a few features missing in apcupsd (most importantly: the server can't turn the UPS off while shutting itself down), so after reading this thread, I thought about trying nut instead. That idea got stopped very quickly:
Code:
# pkg install nut
...
The following 20 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    argp-standalone: 1.5.0
    avahi-app: 0.8_1
    brotli: 1.0.9,1
    dbus: 1.14.4,1
    dbus-glib: 0.112
    fontconfig: 2.14.0,1
    freeipmi: 1.6.10
    freetype2: 2.12.1_2
    giflib: 5.2.1
    gnome_subr: 1.0
    libdaemon: 0.14_1
    libgcrypt: 1.9.4_1
    libgd: 2.3.3_1,1
    libimagequant: 2.17.0
    libmodbus: 3.1.7_1
    neon: 0.32.2
    net-snmp: 5.9.1_1,1
    nut: 2.8.0_13
    powerman: 2.3.20_2
    webp: 1.2.4

Number of packages to be installed: 20

The process will require 60 MiB more space.
11 MiB to be downloaded.

Proceed with this action? [y/N]: n
No, I'm not about to install all that stuff that I don't need. The function of monitoring a UPS is relatively simply; it requires a few drivers to talk to hardware (so I understand why modbus or ipmi are needed), it requires a daemon and a few user programs, and that's it. It does not need a mDNS/zeroconf program such as Avahi, it doesn't require image processing and font rendering, it doesn't need to control power distribution, and it has absolutely nothing to do with Gnome and Gstreamer. Not installing it.

If someone creates a slim install package for nut, I might reconsider. Usually, I don't complain about "bloatware" (since I understand that many features are needed), but this seems to be a case of bad package management (probably on the part of the people who design and created nut).
 
No, I'm not about to install all that stuff that I don't need.[...]

just build that port yourself then?
For local use you can disable almost all options; but just disabling avahi and the CGI web interface will already reduce the dependencies to 1/4 of those you've listed.
For local (and even basic network) usage you can use options "DOCS MANPAGES OPENSSL SERIAL USB", which will give you exactly *two* other package as dependency, although openssl will be already installed on most systems anyways, but if it still bothers you disable it as well.

# pkg info -d sysutils/nut
nut-2.8.0_13:
openssl-1.1.1s,1
libltdl-2.4.7

# pkg info sysutils/nut
nut-2.8.0_13
Name : nut
Version : 2.8.0_13
Installed on : Mon Jan 9 10:46:43 2023 CET
Origin : sysutils/nut
Architecture : FreeBSD:12:amd64
Prefix : /usr/local
Categories : sysutils
Licenses : GPLv3+ and GPLv2+ and GPLv1+ and ART10
Maintainer : cy@FreeBSD.org
WWW : https://www.networkupstools.org/
Comment : Network UPS Tools
Options :
AVAHI : off
BASH : off
CGI : off
DOCS : on
FREEIPMI : off
IPMIPSU : off
MANPAGES : on
MODBUS : off
NEON : off
NSS : off
OPENSSL : on
PDU : off
SERIAL : on
SNMP : off
SSL_OFF : off
USB : on
Shared Libs required:
libssl.so.11
libltdl.so.7
libcrypto.so.11
Shared Libs provided:
libupsclient.so.6
libnutscan.so.2
libnutclientstub.so.1
libnutclient.so.2
Annotations :
FreeBSD_version: 1204000
repo_type : binary
repository : local
Flat size : 8.85MiB
Description :
This is a developing project to monitor a large assortment of UPS hardware.
Network communications are used so that multiple systems can monitor a
single physical UPS and shut down together if necessary without any
special "sharing hardware" on the UPS itself. CGI scripts are provided
to monitor UPS status via a WEB browser.

WWW: https://www.networkupstools.org/
 
# pkg install nut
...
The following 20 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
argp-standalone: 1.5.0
avahi-app: 0.8_1
brotli: 1.0.9,1
dbus: 1.14.4,1
dbus-glib: 0.112
fontconfig: 2.14.0,1
freeipmi: 1.6.10
freetype2: 2.12.1_2
giflib: 5.2.1
gnome_subr: 1.0
libdaemon: 0.14_1
libgcrypt: 1.9.4_1
libgd: 2.3.3_1,1
libimagequant: 2.17.0
libmodbus: 3.1.7_1
neon: 0.32.2
net-snmp: 5.9.1_1,1
nut: 2.8.0_13
powerman: 2.3.20_2
webp: 1.2.4

Number of packages to be installed: 20

The process will require 60 MiB more space.
11 MiB to be downloaded.

Proceed with this action? [y/N]: n
[/code]
No, I'm not about to install all that stuff that I don't need. ....
I agree with you. On the other side packages are build to fit the most common things. With NUT you have a lot of different possibilities and that is the reason why they have selected a lot of options inside the NUT pkg.
I am using the ports and compile it on my maschine. I don't need Zeroconf, Bash completion, CGI, IPMI support, Modbus ( as my UPS don't use Modbus) NEON,PDU SNMP or SSL. So I install man, serial and usb - that's it . If you exactly know how your apc is communicating, you could also use either USB or serial (or modbus). Overall you will receive support for the following UPS:
Code:
===>  Installing for nut-2.8.0_13
===>  Checking if nut is already installed
===>   Registering installation for nut-2.8.0_13
Installing nut-2.8.0_13...
===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/libexec/nut/bestfortress
/usr/local/libexec/nut/apcsmart
/usr/local/libexec/nut/mge-shut
/usr/local/libexec/nut/everups
/usr/local/libexec/nut/riello_usb
/usr/local/libexec/nut/al175
/usr/local/libexec/nut/microdowell
/usr/local/libexec/nut/bcmxcp
/usr/local/libexec/nut/blazer_ser
/usr/local/libexec/nut/victronups
/usr/local/libexec/nut/upscode2
/usr/local/libexec/nut/bestfcom
/usr/local/libexec/nut/optiups
/usr/local/libexec/nut/bcmxcp_usb
/usr/local/libexec/nut/masterguard
/usr/local/libexec/nut/gamatronic
/usr/local/libexec/nut/clone-outlet
/usr/local/libexec/nut/metasys
/usr/local/libexec/nut/riello_ser
/usr/local/libexec/nut/solis
/usr/local/libexec/nut/bestups
/usr/local/libexec/nut/liebert-esp2
/usr/local/libexec/nut/skel
/usr/local/libexec/nut/dummy-ups
/usr/local/libexec/nut/tripplite
/usr/local/libexec/nut/powerpanel
/usr/local/libexec/nut/powercom
/usr/local/libexec/nut/apcsmart-old
/usr/local/libexec/nut/rhino
/usr/local/libexec/nut/nutdrv_siemens-sitop
/usr/local/libexec/nut/nutdrv_qx
/usr/local/libexec/nut/nutdrv_atcl_usb
/usr/local/libexec/nut/ivtscd
/usr/local/libexec/nut/clone
/usr/local/libexec/nut/mge-utalk
/usr/local/sbin/upsd
/usr/local/libexec/nut/microsol-apc
/usr/local/libexec/nut/tripplitesu
/usr/local/libexec/nut/richcomm_usb
/usr/local/libexec/nut/bestuferrups
/usr/local/libexec/nut/liebert
/usr/local/libexec/nut/apcupsd-ups
/usr/local/libexec/nut/usbhid-ups
/usr/local/libexec/nut/isbmex
/usr/local/libexec/nut/genericups
/usr/local/libexec/nut/belkin
/usr/local/libexec/nut/tripplite_usb
/usr/local/sbin/upssched
/usr/local/libexec/nut/etapro
/usr/local/libexec/nut/blazer_usb
/usr/local/libexec/nut/safenet
/usr/local/libexec/nut/oneac
/usr/local/libexec/nut/belkinunv

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
https://www.networkupstools.org/
NUT doesn't allow a fine selection of the ups you using during the install process. You either leave them in place or you delete all drivers you don't need ....
That's the way of life: the easier it is , the more in-case-of software will be installed :D
 
Back
Top