Ups

make install clean -C /usr/ports/sysutils/apcupsd Оставил выбранной только верхнюю опцию

Потом пересобрал с dumb, когда не захотело использовать тип dumb ups driver make rmconfig clean deinstall install -C /usr/ports/sysutils/apcupsd

Read the manual /usr/local/share/doc/apcupsd/apcupsd.pdf to do site specific configuration assigenments! Especially have a detailed look into the chapter describing the shutdown procedure.

Sample files are installed in /usr/local/etc/apcupsd. These files must be copied and/or configured for a proper working apcupsd. You need to modify /usr/local/etc/apcupsd/apcupsd.conf as follows:

For serial cable: DEVICE /dev/cuadX (or /dev/cuaaX for [45.]x) For USB cable: DEVICE (yes, leave it blank after DEVICE)

NOTE that for USB cable you must comment out the line device        uhid            # "Human Interface Devices" in your kernel configuration file and recompile the kernel. Your keyboard and mouse will still work.

/usr/local/sbin/apcaccess /usr/local/sbin/apcupsd /usr/local/sbin/apctest

vi /usr/local/etc/apcupsd/apcupsd.conf UPSCABLE simple DEVICE /dev/ttyu0 /usr/local/etc/rc.d/apcupsd onestart
 * 1) UPSCABLE smart

Без запущенного apcupsd запустить apctest и проделать, что он предлагает

Для USB конфиг чуть ли не такой UPSTYPE usb DEVICE

psearch apcupsd sysutils/apcupsd         Set of programs for controlling APC UPS sysutils/gapcmon         Monitor apcupsd with GTK+2 GUI

psearch upsd sysutils/apcupsd         Set of programs for controlling APC UPS sysutils/bkpupsd         A simple UPS daemon for APC BK Pro(TM) sysutils/gapcmon         Monitor apcupsd with GTK+2 GUI sysutils/mgeupsd         monitor a state of MGE Pulsar UPS connected to RS-232 port sysutils/openupsd        A UPS daemon for some Belkin UPS's sysutils/upsd            APC Smart UPS Monitoring Daemon sysutils/upsdaemon       Simple APC UPS Daemon

sysutils/knutclient      A visual client for UPS system NUT sysutils/knutclient-kde4 A visual client for UPS system NUT sysutils/nut             Network UPS Tools sysutils/nut22           Network UPS Tools


 * http://forums.freebsd.org/showthread.php?t=10400
 * http://lists.freebsd.org/pipermail/freebsd-usb/2009-June/006912.html
 * http://www.apcupsd.com/manual/manual.html

При попытке подключения FreeBSD 8.0 к apc back-ups pro 650 cu -l /dev/cuad0 -s 9600 машина через 15 секунд умирает без падения в панику и вывода каких-либо сообщений
 * Проблемы

8.1 при подключении упс APC Smart-UPS SC 620VA 1 пикает разово и все, но, похоже, он уже неисправен cu -l /dev/cuau0 -s 9600 Connected

USB
Собран по умолчанию

В конфигурационный файл добавлено UPSTYPE usb DEVICE

apcaccess status <PRE> APC     : 001,042,1062 DATE    : Fri Dec 24 19:30:13 MSK 2010 HOSTNAME : learn1.agava.net RELEASE : 3.14.5 VERSION : 3.14.5 (10 January 2009) freebsd UPSNAME : learn1.agava.net CABLE   : Custom Cable Smart MODEL   : Smart-UPS 1000 RM UPSMODE  : Stand Alone STARTTIME: Fri Dec 24 19:30:10 MSK 2010 STATUS  : ONLINE LINEV   : 226.0 Volts LOADPCT :   4.5 Percent Load Capacity BCHARGE : 100.0 Percent TIMELEFT : 138.0 Minutes MBATTCHG : 5 Percent MINTIMEL : 3 Minutes MAXTIME : 0 Seconds OUTPUTV : 226.0 Volts SENSE   : High DWAKE   : -01 Seconds DSHUTD  : 090 Seconds LOTRANS : 208.0 Volts HITRANS : 253.0 Volts RETPCT  : 000.0 Percent ITEMP   : 21.1 C Internal ALARMDEL : Always BATTV   : 27.5 Volts LINEFREQ : 50.0 Hz LASTXFER : No transfers since turnon NUMXFERS : 0 TONBATT : 0 seconds CUMONBATT: 0 seconds XOFFBATT : N/A SELFTEST : NO STATFLAG : 0x07000008 Status Flag SERIALNO : AS0735311141 BATTDATE : 2007-09-02 NOMOUTV : 230 Volts NOMBATTV : 24.0 Volts FIRMWARE : 616.3.I USB FW:8.1 APCMODEL : Smart-UPS 1000 RM END APC : Fri Dec 24 19:30:30 MSK 2010 </PRE>
 * Опрос

Отключение питание и переход на батареи <PRE> <krualexgen@agava.com> END APC : Fri Dec 24 19:36:05 MSK 2010 Broadcast Message from krualexgen@learn1.agava.net (no tty) at 19:36 MSK...                                              Power failure. Running on UPS batteries. <PRE> Опрос в состоянии на батареях apcaccess status <PRE> APC     : 001,043,1097 DATE    : Fri Dec 24 19:51:48 MSK 2010 HOSTNAME : learn1.agava.net RELEASE : 3.14.5 VERSION : 3.14.5 (10 January 2009) freebsd UPSNAME : learn1.agava.net CABLE   : Custom Cable Smart MODEL   : Smart-UPS 1000 RM UPSMODE  : Stand Alone STARTTIME: Fri Dec 24 19:30:10 MSK 2010 STATUS  : ONBATT LINEV   : 000.0 Volts LOADPCT :   4.5 Percent Load Capacity BCHARGE : 088.0 Percent TIMELEFT : 122.0 Minutes MBATTCHG : 5 Percent MINTIMEL : 3 Minutes MAXTIME : 0 Seconds OUTPUTV : 229.3 Volts SENSE   : High DWAKE   : -01 Seconds DSHUTD  : 090 Seconds LOTRANS : 208.0 Volts HITRANS : 253.0 Volts RETPCT  : 000.0 Percent ITEMP   : 21.6 C Internal ALARMDEL : Always BATTV   : 25.7 Volts LINEFREQ : 50.0 Hz LASTXFER : Low line voltage NUMXFERS : 1 XONBATT : Fri Dec 24 19:36:08 MSK 2010 TONBATT : 945 seconds CUMONBATT: 945 seconds XOFFBATT : N/A SELFTEST : NO STATFLAG : 0x07060010 Status Flag SERIALNO : AS0735311141 BATTDATE : 2007-09-02 NOMOUTV : 230 Volts NOMBATTV : 24.0 Volts FIRMWARE : 616.3.I USB FW:8.1 APCMODEL : Smart-UPS 1000 RM END APC : Fri Dec 24 19:51:53 MSK 2010 </PRE>