Apcupsd: Unterschied zwischen den Versionen

Aus Vosp.info
Wechseln zu:Navigation, Suche
(Die Seite wurde neu angelegt: „ == Grundbefehle == === Installieren === ==== Basis ==== <source lang=shell> apt-get install apcupsd </source> ==== Webzugang (Optional) ==== <source lang=sh…“)
 
Zeile 108: Zeile 108:
  
 
== Second HOST 192.168.0.2 (Über Ethernet mit main verbunden ==
 
== Second HOST 192.168.0.2 (Über Ethernet mit main verbunden ==
/etc/apcupsd/apcupsd.conf
+
 
 +
=== /etc/apcupsd/apcupsd.conf ===
 
<source lang=shell>
 
<source lang=shell>
 
UPSNAME USVSecondHost
 
UPSNAME USVSecondHost

Version vom 1. Februar 2022, 15:24 Uhr


Grundbefehle

Installieren

Basis

apt-get install apcupsd

Webzugang (Optional)

apt-get install apcupsd-cgi apache2
a2enmod cgi

Aufzurufen unter: http://192.168.0.1/cgi-bin/apcupsd/multimon.cgi

Starten

# systemctl restart apcupsd.service

Status

MAINHOST# apcaccess status
...
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
MODEL    : Smart-UPS_1000
STATUS   : ONLINE
BCHARGE  : 100.0 Percent
TIMELEFT : 27.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
ALARMDEL : No alarm
BATTV    : 26.4 Volts
...
SECONDHOST# apcaccess status
...
CABLE    : Ethernet Link
DRIVER   : NETWORK UPS Driver
UPSMODE  : Stand Alone
MASTER   : 192.168.0.1:3551
MODEL    : Smart-UPS_1000
STATUS   : ONLINE SLAVE
BCHARGE  : 100.0 Percent
TIMELEFT : 23.3 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
BATTV    : 26.4 Volts
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
NOMBATTV : 24.0 Volts
...

Main Host 192.168.0.1 (über USB an USV)

/etc/apcupsd/apcupsd.conf

UPSNAME USVMainHost
UPSCABLE usb
UPSTYPE usb
DEVICE
POLLTIME 60
LOCKFILE /var/lock
SCRIPTDIR /etc/apcupsd
PWRFAILDIR /etc/apcupsd
NOLOGINDIR /etc
ONBATTERYDELAY 30
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

/etc/apcupsd/hosts.conf

MONITOR 127.0.0.1 "Local Host"
MONITOR 192.168.0.2 "Second HOST"

/etc/default/apcupsd

ISCONFIGURED=yes


Second HOST 192.168.0.2 (Über Ethernet mit main verbunden

/etc/apcupsd/apcupsd.conf

UPSNAME USVSecondHost
UPSCABLE ether
UPSTYPE net
DEVICE 192.168.0.1:3551
POLLTIME 10
LOCKFILE /var/lock
SCRIPTDIR /etc/apcupsd
PWRFAILDIR /etc/apcupsd
NOLOGINDIR /etc
ONBATTERYDELAY 30
BATTERYLEVEL 5
MINUTES 3
TIMEOUT 0
ANNOY 300
ANNOYDELAY 60
NOLOGON disable
KILLDELAY 0
NETSERVER on
NISIP 0.0.0.0
NISPORT 3551
EVENTSFILE /var/log/apcupsd.events
EVENTSFILEMAX 10
UPSCLASS standalone
UPSMODE disable
STATTIME 0
STATFILE /var/log/apcupsd.status
LOGSTATS off
DATATIME 0