rss logo

Configurer apcupsd pour gérer les onduleurs Eaton sur Debian Linux

Eaton logo

Nous allons voir comment configurer le service apcupsd sur Debian afin de gérer un onduleur branché via un câble USB.

Installation et Configuration

  • Installer le paquet apcupsd :
root@debian:~# apt update && install apcupsd
  • Vérrifier que l'UPS est 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
  • Éditer le fichier de configuration /etc/apcupsd/apcupsd.conf :
UPSCABLE usb UPSTYPE usb #supprimer /dev/ttyS0 lorsque connecté 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
  • Redémarrer le service apcupsd :
root@debian:~# systemctl restart apcupsd.service
  • Exécuter la commande apcaccess afin de récupérer les informations d'état de l'UPS :
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