hn.today

Configure a UPS on Linux with NUT

linuxjunkies.org20 points0 comments
Screenshot of Configure a UPS on Linux with NUT

Network UPS Tools (NUT) lets a Linux computer monitor a connected UPS and shut down cleanly before its battery is exhausted. The guide focuses on a single-machine setup, where the UPS connects by USB or serial cable and the driver, data server (upsd), and shutdown monitor (upsmon) all run on the same host. It explains installation on Debian/Ubuntu, Fedora/RHEL/Rocky, and Arch, then uses nut-scanner to identify the UPS and suggest a driver. The detected settings go into ups.conf; common USB choices include usbhid-ups, blazer_usb, and nutdrv_qx. Setting MODE=standalone keeps the setup local, while networked monitoring requires a different mode.

The remaining configuration makes the monitoring and shutdown chain work: upsd listens only on localhost, an authenticated upsmon user is defined with protected file permissions, and upsmon.conf specifies the UPS, credentials, required power supply, shutdown command, event notifications, and timing parameters. After enabling the appropriate driver and services, upsc should report status such as OL for mains power, OB for battery, and LB for low battery; briefly disconnecting mains power can test driver communication. Troubleshooting covers USB permissions, failed drivers, communication errors, and unexpected shutdowns, emphasizing correct driver names, matching credentials, and confirming the UPS reports OL before starting services. The guide also notes how to extend monitoring to other machines and configure email notifications.

Read on linuxjunkies.org0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Shaun Thomas: Burnt Toast

Shaun Thomas: Burnt Toast

PostgreSQL’s TOAST storage made the table much smaller, and counting or scanning rows was faster than with the larger uncompressed table. But reading a field inside every toasted value required far more buffer reads, showing that TOAST can trade space savings for slower access to large values. (pgedge.com)

Jepsen: ParticleDB 1.1.4

Jepsen: ParticleDB 1.1.4

Jepsen found 96 bugs in ParticleDB versions 1.1.4 through 1.1.18.11.rc-22, including crashes, data loss, and serious transaction anomalies. Most issues were fixed, but committed writes could still disappear and serializable transactions still had anomalies; Orkes says a later release resolves the remaining problems. (jepsen.io)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.