My assumption is a bare installed OpenSolaris 2008/11. The aim is to install the apcupsd daemon. First you need to install some development-stuff: gcc(SUNWgcc), gnu make (SUNWgmake) and SUNWsfwhea (lots of headers including needed usb.h) using the packagemanager. Then download the tar ball and go on:
tar zxvf apcupsd-3.14.4.tar.gz cd apcupsd-3.14.4 sh configure --enable-usb make sudo make install sudo reboot -- -r
If you compiled it successfully, make a reboot and tell solaris that you want to rebuild the services (reboot -r). Now you see some exceptions at startup which mention something about /dev/tty, which is the serial port (commonly usb is used today), so locate your config-file
find / -name apcupsd.conf # in my case /etc/opt/apcupsd/apcupsd.conf
Now you have to clear the DEVICE-entry to be empty, so apcupsd will search automatically for it. Also change UPSCABLE and UPSTYPE both to usb.
If there are no exceptions on startup (check dmesg) you can grab the infos by executing
/etc/opt/apcupsd/sbin/apcaccess APC : 001,035,0836 DATE : Fri Apr 03 13:29:46 CEST 2009 HOSTNAME : zelos RELEASE : 3.14.5 VERSION : 3.14.5 (10 January 2009) sun UPSNAME : zelos CABLE : USB Cable MODEL : USB UPS Driver UPSMODE : Stand Alone STARTTIME: Fri Apr 03 12:39:29 CEST 2009 STATUS : ONLINE LINEV : 236.0 Volts LOADPCT : 1.0 Percent Load Capacity BCHARGE : 100.0 Percent TIMELEFT : 41.9 Minutes MBATTCHG : 5 Percent MINTIMEL : 3 Minutes MAXTIME : 0 Seconds SENSE : Medium LOTRANS : 180.0 Volts HITRANS : 266.0 Volts ALARMDEL : Always BATTV : 13.5 Volts LASTXFER : No transfers since turnon NUMXFERS : 0 TONBATT : 0 seconds CUMONBATT: 0 seconds XOFFBATT : N/A STATFLAG : 0x07000008 Status Flag MANDATE : 2008-05-19 SERIALNO : BATTDATE : 2000-00-00 NOMINV : 230 Volts NOMBATTV : 12.0 Volts APCMODEL : END APC : Fri Apr 03 13:30:17 CEST 2009
Comments
2 comments postedHi!
Thanks for your tutorial!
You have only a small typing error on line 3 at the shell commands.
It should be: "sh configure --enable-usb"
Best wishes,
Rene
thx for the hint