rss logo

Set up apcupsd for Eaton UPS on Debian Linux

Eaton logo

We will see how to set up the apcupsd service on Debian to manage a UPS connected via USB cable

Install and Configure

  • Install apcupsd package :
root@debian:~# apt install apcupsd
  • Check UPS is visible :
root@debian:~# lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 1604:10c0 Tascam Dell Integrated Hub Bus 001 Device 004: ID 1604:10c0 Tascam Dell Integrated Hub Bus 001 Device 003: ID 1604:10c0 Tascam Dell Integrated Hub Bus 001 Device 002: ID 0463:ffff MGE UPS Systems UPS Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Edit /etc/apcupsd/apcupsd.conf configuration file :
UPSCABLE usb UPSTYPE usb #remove /dev/ttyS0 when connected via USB : DEVICE LOCKFILE /var/lock SCRIPTDIR /etc/apcupsd PWRFAILDIR /etc/apcupsd NOLOGINDIR /etc ONBATTERYDELAY 6 BATTERYLEVEL 5 MINUTES 3 TIMEOUT 0 ANNOY 300 ANNOYDELAY 60 NOLOGON disable KILLDELAY 0 NETSERVER on NISIP 127.0.0.1 NISPORT 3551 EVENTSFILE /var/log/apcupsd.events EVENTSFILEMAX 10 UPSCLASS standalone UPSMODE disable STATTIME 0 STATFILE /var/log/apcupsd.status LOGSTATS off DATATIME 0
  • Restart apcupsd service :
root@debian:~# systemctl restart apcupsd.service
  • Run apcaccess command to retrieve UPS status informations :
root@debian:~# apcaccess status APC : 001,029,0694 DATE : 2023-03-19 15:59:08 +0100 HOSTNAME : debian VERSION : 3.14.14 (31 May 2016) debian UPSNAME : std CABLE : USB Cable DRIVER : USB UPS Driver UPSMODE : Stand Alone STARTTIME: 2023-02-27 16:36:50 +0100 MODEL : Eaton 5P STATUS : ONLINE LOADPCT : 15.0 Percent BCHARGE : 100.0 Percent TIMELEFT : 49.9 Minutes MBATTCHG : 5 Percent MINTIMEL : 3 Minutes MAXTIME : 0 Seconds OUTPUTV : 236.2 Volts DWAKE : -1 Seconds ALARMDEL : 30 Seconds LINEFREQ : 49.9 Hz NUMXFERS : 0 TONBATT : 0 Seconds CUMONBATT: 0 Seconds XOFFBATT : N/A SELFTEST : OK STATFLAG : 0x05000008 SERIALNO : G117N70614 NOMPOWER : 1100 Watts END APC : 2023-03-19 15:59:51 +0100
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :

contact mail address