Ci-dessous, les différences entre deux révisions de la page.
nut [2011/03/05 00:00] |
nut [2011/03/05 00:00] (Version actuelle) |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ====== Onduleurs : arrêt automatique des serveurs ====== | ||
+ | Le programme nut communique avec l' | ||
+ | |||
+ | aptitude install nut | ||
+ | |||
+ | ===== Pour les serveurs sous debian 5 (nut version 2.2) ===== | ||
+ | |||
+ | |||
+ | / | ||
+ | < | ||
+ | # start upsd | ||
+ | START_UPSD=yes | ||
+ | |||
+ | # set upsd specific options. use "man upsd" for more info | ||
+ | UPSD_OPTIONS="" | ||
+ | |||
+ | # start upsmon | ||
+ | START_UPSMON=yes | ||
+ | |||
+ | # set upsmon specific options. use "man upsmon" | ||
+ | UPSMON_OPTIONS="" | ||
+ | |||
+ | </ | ||
+ | |||
+ | / | ||
+ | |||
+ | MODE=standalone | ||
+ | |||
+ | / | ||
+ | < | ||
+ | [apc] | ||
+ | driver = usbhid-ups | ||
+ | port = / | ||
+ | desc = "APC ES 550" | ||
+ | </ | ||
+ | |||
+ | / | ||
+ | < | ||
+ | LISTEN | ||
+ | ACL localhost 127.0.0.1/ | ||
+ | ACCEPT localhost | ||
+ | </ | ||
+ | |||
+ | / | ||
+ | < | ||
+ | [admin] | ||
+ | password = adminpass | ||
+ | actions = SET | ||
+ | instcmds = ALL | ||
+ | |||
+ | [user] | ||
+ | password = mypass | ||
+ | allowfrom = localhost | ||
+ | upsmon master | ||
+ | </ | ||
+ | |||
+ | / | ||
+ | < | ||
+ | MONITOR apc@localhost 1 user mypass master | ||
+ | |||
+ | MINSUPPLIES 1 | ||
+ | |||
+ | FINALDELAY 5 | ||
+ | HOSTSYNC 15 | ||
+ | SHUTDOWNCMD "/ | ||
+ | POWERDOWNFLAG / | ||
+ | |||
+ | POLLFREQ 5 | ||
+ | POLLFREQALERT 5 | ||
+ | DEADTIME 15 | ||
+ | NOCOMMWARNTIME 300 | ||
+ | RBWARNTIME 43200 | ||
+ | </ | ||
+ | |||
+ | ===== Pour le serveur sous ubuntu 10.04 (nut version 2.4) ===== | ||
+ | |||
+ | Il n'y a pas de fichier / | ||
+ | |||
+ | / | ||
+ | |||
+ | MODE=standalone | ||
+ | |||
+ | / | ||
+ | < | ||
+ | MAXAGE 15 | ||
+ | LISTEN | ||
+ | MAXCONN 1024 | ||
+ | </ | ||
+ | |||
+ | / | ||
+ | < | ||
+ | [user] | ||
+ | password = mypass | ||
+ | upsmon master | ||
+ | </ | ||
+ | |||
+ | / | ||
+ | < | ||
+ | MONITOR apc@localhost 1 user mypass master | ||
+ | |||
+ | MINSUPPLIES 1 | ||
+ | |||
+ | FINALDELAY 5 | ||
+ | HOSTSYNC 15 | ||
+ | SHUTDOWNCMD "/ | ||
+ | POWERDOWNFLAG / | ||
+ | |||
+ | POLLFREQ 5 | ||
+ | POLLFREQALERT 5 | ||
+ | DEADTIME 15 | ||
+ | NOCOMMWARNTIME 300 | ||
+ | RBWARNTIME 43200 | ||
+ | </ |