Главная страница


ru.unix.bsd

 
 - RU.UNIX.BSD ------------------------------------------------------------------
 From : Dmitry A. Petuhov                    2:5020/400     21 Jul 2001  04:12:03
 To : All
 Subject : Re: Q: upsd
 -------------------------------------------------------------------------------- 
 
 
 > Подскажите чайнику, что нужно еще сказать демону upsd чтобы заработал?
 
 Вот мой конфиг - забыл уже, сколько он у меня работает:
 --------------------------
 # $FreeBSD: ports/sysutils/upsd/files/upsd.conf,v 1.2 1999/08/31 02:00:16 peter 
 Exp $
 #
 # UPS Daemon
 # The Wild Wind Communications, 1995, 1996
 #
 # See file LICENSE for the distribution terms of this software.
 #
 
 ups "smart-ups" (230) proto "apc-smart" {
   device      "/dev/cuaa0"
   speed       2400
   read-timeout    2
   write-block-size 1
   write-block-delay   50
   queue-size   64
 }
 
 every 5 { # check events every 5 seconds
   nop
 }
 
 on "initialize" != "SM" {
   poll "initialize"
   after 60 every 60 {
    log emerg "Cannot put the UPS into smart mode!"
   }
 }
 
 #every 86400 {
 #  tune "high-transfer-point"     264
 #  tune "low-transfer-point"   196
 #  tune "line-alarm"      "0"
 #  tune "line-sensitivity"     "L"
 #  tune "low-batteries-duration"   2
 #  tune "nominal-voltage"      220
 #  tune "shutdown-delay"      20
 #  tune "wakeup-batteries-capacity"   25
 #  tune "wakeup-delay"     0
 #  tune "batteries-replaced"   "01/01/77"
 #  tune "label"        "WildWind"
 #}
 
 every 60 {     # poll the UPS
 #  poll "last-test"
 #  poll "light-test"
   poll "line-frequency"
   poll "line-maxvac"
   poll "line-minvac"
   poll "line-voltage"
   poll "load"
   poll "recharge"
   poll "temperature"
   poll "vdc"
   poll "voltage"
 
 #  log notice "last test: %last-test%, light test: %light-test%"
 #  log notice "frequency: %line-frequency%, maxvac: %line-maxvac%, minvac:
 %line-minvac%, voltage: %line-voltage%, load: %load%, recharge: %recharge%,
 temp: %temperature%, vdc: %vdc%, output voltage: %voltage%"
 #  log notice "load: %load%, recharge: %recharge%, temp: %temperature%, vdc:
 %vdc%, output voltage: %voltage%"
 #  log notice "INSERT INTO upsd_data (maxvac, minvac, voltage) VALUES
 ('%line-maxvac%', '%line-minvac%', '%line-voltage%')"
   log notice "upsd_data: %line-frequency% %line-maxvac% %line-minvac%
 %line-voltage% %load% %recharge% %temperature% %vdc% %voltage%"
 
 #  on "load" > 95 {
 #     log alert "UPS load is too high: %load%"
 #  }
 }
 
 on "line-fail" {
   log emerg "*** ALERT! Source power line failed, save your work! ***"
 }
 
 #on "line-fail" after 60 {
 #  log emerg "*** ALERT! System shutdown in 240 seconds, LOGOUT NOW! ***"
 #}
 
 on "line-restore" {
   log emerg "Source power line restored, you may continue your work."
 }
 
 on "line-fail" after 300 {
   log emerg "*** ALERT! THE SYSTEM IS SHUTTING DOWN! ***"
 
   poll "shutdown"
   poll "shutdown"
   poll "power-test"
   poll "power-test"
   poll "shutdown"
   poll "shutdown"
 
   sleep 2
 
   exec "/sbin/halt &"
 
   poll "power-test"
   poll "shutdown"
   poll "power-test"
   poll "shutdown"
   poll "power-test"
   poll "shutdown"
   poll "power-test"
 
   sleep 1000  # let us wait peacefully
 }
 ------------------------------
 Лог от него ложится в MySQL'ную базу. 
 
   bYE.         Mitya.
 --- ifmail v.2.15dev5
  * Origin: OAO Kirovelectrosviaz (2:5020/400)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 Q: upsd   Andrew Khlebutin   19 Jul 2001 18:49:50 
 Re: upsd   Dmitry Dolzenko   19 Jul 2001 19:21:17 
 Re: upsd   Gleb Smirnoff   20 Jul 2001 15:30:27 
 Re: upsd   Andrey V. Pevnev   20 Jul 2001 12:12:50 
 upsd   Alexandr V. Shutko   20 Jul 2001 20:33:55 
 Re: Q: upsd   Dmitry A. Petuhov   21 Jul 2001 04:12:03 
Архивное /ru.unix.bsd/61995e1d22f.html, оценка 3 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional