A field note for Thu, Dec 3, 2026. The commands and output below come from a throwaway debian:trixie-slim containerA lightweight, portable package that bundles an application with its dependencies and runs in an isolated process on the host OS, sharing the kernel. Read more → on bn-dev, our build server, between 5:30 and 5:32 AM ET. This is a rehearsal with NUT’s dummy-ups driver, not a run against real UPS hardware.
The short version
If you have a home server, a NAS, or even a desktop on a battery backupA copy of data stored separately from the original, used to restore systems and files after data loss from hardware failure, deletion, ransomware, or disaster. Read more →, the battery is only half the job. The other half is the computer knowing the power is out and shutting itself down before the battery dies.
A battery buys minutes, not a clean shutdown. If nothing tells the machine to halt, it can still die mid-write when the cells run flat, and the battery has only delayed the crash. Most people never check this path because pulling the plug feels risky.
You don’t have to pull the plug. Network UPS Tools, or NUT, ships a dummy-ups device driver that pretends to be a UPS. Point it at a small definition file, flip the status from OL (on line power) to OB (on battery), then to OB LBA device or service that distributes incoming network traffic across multiple servers to prevent any single server from becoming overwhelmed. Read more → (on battery, low battery), and watch whether the shutdown command actually runs. Point that command at a script that only writes a timestamp, so nothing powers off.
Think of it as a fire drill. The alarm is the UPS, the PA system is the NUT server, and upsmon is the person who walks out. You don’t wait for a real fire to find out the PA is unplugged.
Why the battery is only half the job
When wall power drops, a UPS switches to its battery and keeps the outlets live for a while. The part people skip is the signal. Something has to notice the switch, decide the battery is running out, and tell each machine to shut down cleanly. If that chain breaks, a NAS can still lose power in the middle of a write and leave the filesystem inconsistent.
NUT splits the chain into layers. A driver talks to the UPS, or in this rehearsal, to a file that acts like one. upsd shares the status on the network. upsmon watches that status and runs SHUTDOWNCMD when it is time. The dummy-ups man page describes the driver as a way to change any value for testing. The upsmon man page even suggests a dummy SHUTDOWNCMD that only reports a shutdown, without disrupting the machine. That is the habit this note is about.
Test the signal path in this order

Work through the path from the bottom up. Each layer fails in its own way, so read the exact error before you change anything else.
- Driver first. Does
upscshow a status? - Then upsd. Can a client log in?
- Then upsmon. Does it see OB, then LB?
- Only then the action. Did SHUTDOWNCMD run?
The rehearsal on bn-dev broke the middle steps on purpose, then continued into the full drill.
| What was wrong | What upsmon said |
|---|---|
UPS name typo, fakeupz instead of fakeups | Login on UPS [fakeupz@localhost] failed - got [ERR UNKNOWN-UPS]. Then Poll UPS [fakeupz@localhost] failed - [fakeupz] does not exist on server localhost. |
| Wrong password | Login on UPS [fakeups@localhost] failed - got [ERR ACCESS-DENIED] |
MINSUPPLIES 2 with one UPS, power value 1 | Fatal error: insufficient power configured! Sum of power values 1, minimum 2 |
If you see UNKNOWN-UPS, the name in upsmon.conf does not match ups.conf. If you see ACCESS-DENIED, the user or password does not match upsd.users. If you see insufficient power configured, MINSUPPLIES is higher than the power values you assigned. None of those is a dead battery. Each one is a config typo that would have left you unprotected in a real outage.
The rehearsal on bn-dev
The container installed nut-server and nut-client 2.8.1-5+deb13u1 from Debian 13, then started dummy-ups 0.18 in dummy-once mode, the default for a .dev file since NUT 2.8.0, per the man page. upsd listened on 127.0.0.1 portA numbered endpoint on a device that identifies a specific application or service, allowing multiple network services to run on the same IP address. Read more → 3493. The first upsc fakeups@localhost ups.status returned OL.
Here is the ups.conf stanza, then the upsmon.conf lines that matter.
[fakeups]
driver = dummy-ups
port = fakeups.dev
MONITOR fakeups@localhost 1 monuser rehearsal primary
MINSUPPLIES 1
SHUTDOWNCMD "/usr/local/bin/fake-shutdown"
POWERDOWNFLAG /tmp/killpowerSHUTDOWNCMD pointed at /usr/local/bin/fake-shutdown, a short script that only appends a timestamp to /tmp/shutdown-ran.txt. POLLFREQ, POLLFREQALERT, and FINALDELAY were set to 2 seconds so the drill would finish quickly, tighter than you would use on a real box. The upsmon.conf man page documents those knobs.
Then the status in fakeups.dev was set to OB, then to OB LB.
$ set ups.status: OB in fakeups.dev
$ upsc fakeups@localhost ups.status
Init SSL without certificate database
OB
$ set ups.status: OB LB in fakeups.dev
$ upsc fakeups@localhost ups.status
Init SSL without certificate database
FSD OB LB
$ grep -iE 'on battery|battery is low|forced shutdown|FSD|SHUTDOWNCMD|Executing|shutdown' /tmp/upsmon.log
8.004935 UPS fakeups@localhost on battery
16.006740 UPS fakeups@localhost battery is low
16.007407 Executing automatic power-fail shutdown
16.009880 Auto logout and shutdown proceeding
18.010261 [D1] Exiting upsmon immediately after initiating shutdown, by default
$ cat /tmp/shutdown-ran.txt
fake-shutdown ran at 10:31:32Z
$ ls -l /tmp/killpower
-rw-r--r-- 1 root root 20 Dec 3 10:31 /tmp/killpowerCaptured on bn-dev, Dec 3, 2026, 5:30 to 5:32 AM ET, debian:trixie-slim in a throwaway —rm container. nut-server and nut-client 2.8.1-5+deb13u1, dummy-ups 0.18, host kernel 7.0.0-44-generic.
Read it in order. After the first flip, upsc reported OB. After the second, it reported FSD OB LB. FSD is the forced shutdown flag. upsd raised it once the primary upsmon saw a low battery on battery power. The upsmon log then printed UPS fakeups@localhost on battery at 8.0 seconds, battery is low at 16.0 seconds, and Executing automatic power-fail shutdown in the same second. The harmless script wrote fake-shutdown ran at 10:31:32Z, which is 5:31:32 AM ET, and /tmp/killpower appeared. That file is the POWERDOWNFLAG from the config. The upsmon man page says upsmon creates it so a later stage of shutdown can tell the UPS to cut its own power, which helps the box restart cleanly when mains returns. In this rehearsal the flag was only created. Nothing told a UPS to power off.
The line Init SSL without certificate database is upsc noticing that no SSL is configured. The talk here is plain localhost with no TLSThe encryption protocols that secure data in transit between a client and server, powering HTTPS and most encrypted internet communication. Read more →. It is harmless noise, and it showed up on every upsc call in the capture.
What this did not cover
This rehearsal never touched real UPS hardware, USB drivers such as usbhid-ups, secondary machines over the network, systemd units, or an actual power-off. A dummy driver will not tell you whether your USB cable is seated or whether your battery still holds a charge. After you confirm the signal path, hook up the real unit and measure how long it lasts. Batteries age, and the label is not a measurement.
Your first step
On a spare machine or a test VM, run sudo apt install nut, then set up dummy-ups from the dummy-ups man page before you connect the real UPS. Put a MONITOR line in upsmon.conf, point SHUTDOWNCMD at a script that only writes a timestamp, and flip ups.status from OL to OB to OB LB. Watch for the timestamp and the POWERDOWNFLAG file. When that works, point SHUTDOWNCMD at a real shutdown, still on the dummy driver, and only then move the same config onto the live device.
The restic restore drill on Nov 24 made the same point about backups. A UPS you never rehearsed is the same kind of guess. The idle watts note from Nov 23 is the neighboring habit, measured at the outlet.
Go deeper: primary and secondary roles, shutdown order, and the three config breaks
How the pieces fit. A driver talks to the device, or to a definition file. upsd listens for clients, on TCP 3493 in this rehearsal. upsmon clients watch the status. The upsmon man page describes two roles. The primary is the machine tied to the UPS. When that upsmon sees a low battery it sets FSD, the forced shutdown flag. Secondaries see FSD and shut down first, then the primary follows. That way a file server can wait for the machines that depend on it. This rehearsal used a single primary. It did not include a secondary over the network. If you add secondaries later, the network gear that carries the status has to ride the same UPS, or those machines never hear FSD.
Shutdown order is your script’s job. upsmon runs SHUTDOWNCMD. It does not, by itself, stop virtual machines or containers in a particular order. Plan that inside the command you give it: guests first, then storage, then the host. Time that sequence on a quiet day and compare it to a measured battery runtime, with margin. Batteries age, so measure, don’t trust the label. The dummy definition file in this rehearsal contained battery.runtime: 1800, which is 30 minutes written into the file, not a figure anyone measured. On real hardware, check the UPS thresholds as well, often battery.charge.low and battery.runtime.low.
FINALDELAY and the power-off flag. The rehearsal set FINALDELAY to 2 seconds. The upsmon.conf man page says the default is 5 seconds, and warns against setting it so high that the battery runs out before the primary finishes shutting down. POWERDOWNFLAG is how upsmon tells a later shutdown stage to command the UPS off. The upsmon man page also warns that after a dummy experiment you may need to restart upsd to clear the FSD flag, and to remove any POWERDOWNFLAG file so the next normal shutdown does not cut UPS power.
The three breaks, in full. The lines below are verbatim from the same bn-dev capture, with the script’s section labels dropped. The upsnotify line about “no notification tech defined” is upsmon looking for a notification backend such as systemd. The container had none. It is harmless here. In the wrong-password block, [D1] Just failed to send signal, no daemon was running appeared first because the previous upsmon process from the name typo had already exited.
Wrong UPS name:
0.000083 UPS: fakeupz@localhost (primary) (power value 1)
0.002102 upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it
0.002109 [D1] Trying to connect to UPS [fakeupz@localhost]
0.002888 Login on UPS [fakeupz@localhost] failed - got [ERR UNKNOWN-UPS]
5.003238 Poll UPS [fakeupz@localhost] failed - [fakeupz] does not exist on server localhostWrong password:
0.000000 [D1] Just failed to send signal, no daemon was running
0.002505 upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it
0.003188 Login on UPS [fakeups@localhost] failed - got [ERR ACCESS-DENIED]MINSUPPLIES set higher than the monitored power:
0.000063 UPS: fakeups@localhost (primary) (power value 1)
Fatal error: insufficient power configured!
Sum of power values........: 1
Minimum value (MINSUPPLIES): 2The definition file and the shutdown script, as used on bn-dev. MODE was standalone. upsd was told to listen on 127.0.0.1 port 3493. The monitor user in upsd.users was monuser with password rehearsal, marked upsmon primary. The .dev file started like this:
device.type: ups
ups.mfr: Rehearsal
ups.model: Dummy
ups.status: OL
battery.charge: 100
battery.runtime: 1800The shutdown script appended one line, fake-shutdown ran at plus a UTC timestamp, to /tmp/shutdown-ran.txt.
What this rehearsal did not cover. Real UPS hardware, USB drivers such as usbhid-ups, secondary machines over the network, systemd units, and an actual power-off or killpower to a real battery box.
Sources: dummy-ups(8), upsmon(8), upsmon.conf(5), upsd(8), upsc(8). Package versions are from the capture: nut-server and nut-client 2.8.1-5+deb13u1, dummy-ups 0.18.
