[gelöst] APC UPS schaltet PC nicht ab

Alle weiteren Dienste, die nicht in die drei oberen Foren gehören.
Antworten
letzter3
Beiträge: 477
Registriert: 16.07.2011 22:07:31

[gelöst] APC UPS schaltet PC nicht ab

Beitrag von letzter3 » 16.07.2011 23:32:11

Hallo,

ich habe einen HP ProLiant N36L, den ich hinter eine APC UPS CS350 gehängt habe.

meine apcupsd.conf

Code: Alles auswählen

## apcupsd.conf v1.1 ##
# 
UPSNAME Meine-Server-APC
UPSCABLE usb
UPSTYPE usb
DEVICE
LOCKFILE /var/lock
ONBATTERYDELAY 6
BATTERYLEVEL 8
MINUTES 3
TIMEOUT 0
ANNOY 300
ANNOYDELAY 60
NOLOGON disable
KILLDELAY 0
NETSERVER on
NISIP localhost
NISPORT 3551
EVENTSFILE /var/log/apcupsd.events
EVENTSFILEMAX 10
UPSCLASS standalone
UPSMODE disable
STATTIME 0
STATFILE /var/log/apcupsd.status
LOGSTATS off
DATATIME 0

Code: Alles auswählen

root@PTLWL:/home/letzter# apcaccess
Error contacting apcupsd @ localhost:3551: Connection refused
root@PTLWL:/home/letzter# 
tail -f /var/log/syslog

Code: Alles auswählen

....
Jul 16 23:10:45 PTLWL AptDaemon: INFO: Initializing daemon
Jul 16 23:15:46 PTLWL AptDaemon: INFO: Quiting due to inactivity
Jul 16 23:15:46 PTLWL AptDaemon: INFO: Shutdown was requested
Jul 16 23:17:01 PTLWL /USR/SBIN/CRON[2385]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)

Code: Alles auswählen

root@PTLWL:/home/letzter# apctest
2011-07-16 23:28:26 apctest 3.14.8 (16 January 2010) debian
Checking configuration ...
Attached to driver: usb
sharenet.type = DISABLE
cable.type = USB_CABLE

You are using a USB cable type, so I'm entering USB test mode
mode.type = USB_UPS
Setting up the port ...
Hello, this is the apcupsd Cable Test program.
This part of apctest is for testing USB UPSes.
Getting UPS capabilities...SUCCESS
.....

Code: Alles auswählen

root@PTLWL:/home/letzter# uname -a
Linux PTLWL 2.6.32-5-amd64 #1 SMP Tue Jun 14 09:42:28 UTC 2011 x86_64 GNU/Linux
root@PTLWL:/home/letzter# 
Wenn ich der UPS den Stecker ziehe, piept diese, gnome zeigt an, dass alles kritisch wird, aber die UPS fährt den Rechner nicht runter.

Wo liegt mein Fehler?

Michael
Zuletzt geändert von letzter3 am 17.07.2011 17:10:07, insgesamt 1-mal geändert.

wilfried
Beiträge: 153
Registriert: 04.12.2009 12:32:16

Re: APC UPS schaltet PC nicht ab

Beitrag von wilfried » 17.07.2011 10:20:17

versuch mal TIMEOUT zu setzen.

Code: Alles auswählen

TIMEOUT time in seconds
After a power failure, apcupsd will halt the system when TIMEOUT seconds have expired. A value of
zero disables this timer.
so wie du es momentan konfiguriert hast, wird bei 8% Ladung der Batterie,
bzw. wenn noch Ladung für 3 Minuten vorhanden ist, heruntergefahren.

Code: Alles auswählen

Configuration Directives used during Power Failures
In general, none of these directives are required. However, if you have a voltage-signalling (dumb) UPS
with a cable that does not support the Low Battery signal, you must set the TIMEOUT directive to force a
shutdown.
BATTERYLEVEL percent of battery
If BATTERYLEVEL is specified, during a power failure, apcupsd will halt the system when the remaining
battery charge falls below the specified percentage. The default is 5 percent. This directive is ignored
for dumb (voltage-signalling) UPSes. To totally disable this counter, set BATTERYLEVEL -1 in your
apcupsd.conf file.
MINUTES battery runtime in minutes
If MINUTES is specified, during a power failure, apcupsd will shutdown the system when the remaining
runtime on batteries as internally calculated by the UPS falls below the time specified. The default is 3.
This directive is ignored for dumb (voltage-signalling) UPSes. It should be noted that some UPSes
report an incorrect value for remaining runtime when the battery is fully charged. This can be checked
by examining the TIMELEFT value as printed in the output of an 'apcaccess status' command. If
the value is zero or otherwise unreasonable, your UPS is probably broken. In this case, we recommend
that you disable this timer by setting MINUTES -1 in your apcupsd.conf file.
TIMEOUT time in seconds
After a power failure, apcupsd will halt the system when TIMEOUT seconds have expired. A value of
zero disables this timer. Normally for all Smart UPS models and dumb UPSes with cables that support
low battery detection, this should be zero so that the shutdown time will be determined by the battery
level and/or remaining runtime (see above) or in the case of a voltage-signalling UPS, when the battery
is exhausted. This command is required for dumb UPSes that do not provide a battery exhausted signal
(only testing can determine this point). For more information, see the Testing Apcupsd section of this
manual. This timer can also be useful if you want some slave machines to shutdown before other
machines to conserve battery power. It is also useful for testing apcupsd because you can force a rapid
shutdown by setting a small value (e.g. 60) and pulling the plug to the UPS.
TIMEOUT, BATTERYLEVEL, and MINUTES can be set together without problems. apcupsd will react to the
first case or test that is valid. Normally SmartUPS users will set TIMEOUT to zero so that the system is
shutdown depending on the percentage battery charge remaining (BATTERYLEVEL) or the remaining
battery runtime (MINUTES).
Debian testing (wheezy)
Kernel Linux 3.2.0-3-686-pae
Mainboard: Fujitsu D3041-A1
CPU: Intel Pentium Dual-Core E5800 @ 3.20GHz, 4 GB RAM
Grafik: ATI RV710 [Radeon HD 4350]
eth0: RTL8111/8168B PCI Express Gigabit Ethernet

letzter3
Beiträge: 477
Registriert: 16.07.2011 22:07:31

Re: APC UPS schaltet PC nicht ab

Beitrag von letzter3 » 17.07.2011 15:23:24

wilfried hat geschrieben:versuch mal TIMEOUT zu setzen.

Code: Alles auswählen

TIMEOUT time in seconds
After a power failure, apcupsd will halt the system when TIMEOUT seconds have expired. A value of
zero disables this timer.
so wie du es momentan konfiguriert hast, wird bei 8% Ladung der Batterie,
bzw. wenn noch Ladung für 3 Minuten vorhanden ist, heruntergefahren.
Das wäre ein Versuch zum Fehler eingrenzen, aber nichts für den praktischen Einsatz. Ich probiere das mal aus.
Die 8% bzw. 3 Minuten Restlaufzeit wären schon okay, lt. Doku soll ja das zuerst eintretende Ereignis den shutdown auslösen.

Es wird ja auch ein request gesendet (so interpretiere ich jedenfalls den oben geposteten syslog-Auszug) , aber der bleibt erfolglos.

Code: Alles auswählen

Jul 16 23:15:46 PTLWL AptDaemon: INFO: Shutdown was requested
Michael

letzter3
Beiträge: 477
Registriert: 16.07.2011 22:07:31

Re: APC UPS schaltet PC nicht ab

Beitrag von letzter3 » 17.07.2011 15:48:32

So, ein Timeout von 60 bringt....nix.
Ich zieh den Stecker der UPS, aber der PC läuft weiter.

Wenn ich apcupsd neustarte, kommt folgende Meldung:

Code: Alles auswählen

root@PTLWL:/home/letzter# /etc/init.d/apcupsd restart
Please check your configuration ISCONFIGURED in /etc/default/apcupsd
root@PTLWL:/home/letzter# 
Ist der demon nun neu gestartet?
Hmmm, mittels pstree ist der Prozess überhaupt nicht zu sehen. :?:
Scheint also gar nicht zu laufen

Die /etc/default/apcupsd sieht so aus:

Code: Alles auswählen

# Defaults for apcupsd initscript

# Apcupsd-devel internal configuration
APCACCESS=/sbin/apcaccess
ISCONFIGURED=no
Muss ich den Schalter auf "yes" setzen?

Michael

letzter3
Beiträge: 477
Registriert: 16.07.2011 22:07:31

Re: APC UPS schaltet PC nicht ab

Beitrag von letzter3 » 17.07.2011 17:10:54

letzter3 hat geschrieben: Die /etc/default/apcupsd sieht so aus:

Code: Alles auswählen

# Defaults for apcupsd initscript

# Apcupsd-devel internal configuration
APCACCESS=/sbin/apcaccess
ISCONFIGURED=no
Muss ich den Schalter auf "yes" setzen?

Michael
Ja, dass war's.

Antworten