UPS i NUT - automatyczne wy

Tematy związane z oprogramowaniem, instalacją, konfiguracją
poldas
Beginner
Posty: 105
Rejestracja: 12 grudnia 2006, 08:51

UPS i NUT - automatyczne wyłączanie komputera

Post autor: poldas »

Chciałbym skonfigurować w taki sposób program NUT aby po określonym czasie, po zaniku zasilania zamykał system. Plik upsmon.conf wygląda obecnie następująco:

Kod: Zaznacz cały

MONITOR PowerMust@localhost 1 login pass master

SHUTDOWNCMD "/sbin/shutdown -h now"
System w tym momencie nie reaguje na zaniki zasilania, zamyka się jednak po wydaniu polecenia:

Kod: Zaznacz cały

upsmon -c fsd
Będę wdzięczny za wskazówki
fnmirk
Senior Member
Posty: 8324
Rejestracja: 03 grudnia 2007, 06:37

Post autor: fnmirk »

Ja na Twoim miejscu sprawdziłbym to:
&quot pisze:Ups Definitions

In the upsmon.conf(5), you must specify at least one UPS that will be monitored. Use the MONITOR directive.

MONITOR system powervalue username
password type

The system refers to a upsd(8) server, in the form upsname[@hostname[ :p ort]]. The default hostname is "localhost". Some examples follow:

- "su700@mybox" means a UPS called "su700" on a system called "mybox".
This is the normal form.

- "fenton@bigbox:5678" is a UPS called "fenton" on a system called
"bigbox" which runs upsd(8) on port "5678".

The powervalue refers to how many power supplies on this system are being driven this UPS. This is typically set to 1, but see the section on power values below.

The username is a section in your upsd.users(5) file. Whatever password you set in that section must match the password set in this file.

The type set in that section must also match the type here - master or slave. In general, a master process is one running on the system with the UPS actually plugged into a serial port, and a slave is drawing power from the UPS but can't talk to it directly. See the section on UPS types for more.
poldas
Beginner
Posty: 105
Rejestracja: 12 grudnia 2006, 08:51

Post autor: poldas »

Wpis w upsmon.conf

Kod: Zaznacz cały

MONITOR PowerMust@localhost 1 login pass master
jest na pewno poprawny.
ODPOWIEDZ