I've installed apcupsd (latest in ports) on a FreeBSD-5.2.x server.

The server has an APC BackUPS Pro 1000i ups system connected to it via the APC 
supplied 940-0020B serial signalling cable.

After installing apcupsd, the message from pkg-message appears, instructing the 

NOTE IF you install a apcupsd server:

Change to /dev and create a softlink to usv from
the serial line the USV is connected to, e.g.

  cd /dev
  ln -s cuaa1 usv

Read the MANUAL to do site specific configuration
assigenments! Especially have a detailed look into
the chapter describing the shutdown procedure.


So this is what I did. Here's what I've then figured I need to do for my apcupsd.conf 

## apcupsd.conf v1.1 ##
#  for apcupsd release 3.10.13 (16 April 2004) - freebsd
# "apcupsd" POSIX config file
# ========= General configuration parameters ============
#   Use this to give your UPS a name in log files and such. This
#   is particulary useful if you have multiple UPSes.  This does not
#   set the EEPROM.
# UPSCABLE [ simple    | smart     | ether     | usb |
#            940-0119A | 940-0127A | 940-0128A | 940-0020B |
#            940-0020C | 940-0023A | 940-0024B | 940-0024C |
#            940-1524C | 940-0024G | 940-0095A | 940-0095B |
#            940-0095C | M-04-02-2000 ]
# defines the type of cable that you have.
UPSCABLE 940-0020B
# Old types, still valid, are mapped to the new drivers
#           keyword       driver used
# UPSTYPE [ backups        dumb
#         | sharebasic     dumb
#         | netups         dumb
#         | backupspro     apcsmart
#         | smartvsups     apcsmart
#         | newbackupspro  apcsmart
#         | backupspropnp  apcsmart
#         | smartups       apcsmart
#         | matrixups      apcsmart
#         | sharesmart     apcsmart
# *** New driver names. They can be used directly
#       rather than using one of the above aliases.
# UPSTYPE [ dumb | apcsmart | net | usb | snmp | test]
# defines the type of UPS you have.
#DEVICE <string> /dev/<serial port>
# name of your UPS device
# Here a table of the possible devices related with the UPS drivers.
#   NOTE!!! for USB devices, please use a form indicated below
#      including the [0-15] as written!
# Driver   Device                    Description
# dumb     /dev/tty**                Serial character device
# apcsmart /dev/tty**                Serial character device
# usb      /dev/usb/hiddev[0-15]     On most systems
# net      hostname:port             Network link to a master apcupsd
#                                    through NIS
# snmp     hostname:port:vendor:community
#                                    SNMP Network link to an SNMP-enabled
#                                    UPS device. Vendor is the MIB used by
#                                    the UPS device: can be "APC" or "RFC"
#                                    where APC is the powernet MIB and RFC
#                                    is the IETF's rfc1628 UPS-MIB.
#                                    Port is usually 161.
DEVICE /dev/usv
#LOCKFILE <path to lockfile>
# path for serial port lock file
LOCKFILE /var/spool/lock

Note in the above, that UPSTYPE is set to "dumb", as with the type being set to 
backupspro (which is what I would have thought I should need), apcupsd complains that 
the wrong upstype has been configured, and that its decided to use backups instead.

The "DEVICE /dev/usv" is also there by default, and I didn't change this, thinking 
that this is somehow related to the message in pkg-message. However, despite my being 
able to start apcupsd fromcmdline okay enough, on reboot, apcupsd does not start. I've 
(after backing up the original), copied the sample shell startup file to apcupsd.sh 
and checked that its executable:

-r-xr-xr-x  1 root  wheel  1486 Jul 25 14:10 /usr/local/etc/rc.d/apcupsd.sh*

So, why is it not starting automatically on reboot?

The other problem I've got is that with the instruction to create a soft link for 
/dev/usv, on reboot, that soft link is of course disappears, so I have to manually 
recreate that soft link again, before (again) manually starting apcupsd from cmdline.

Is there something that I've missed out somewhere that is causing apcupsd not to start 
automatically on reboot?

Here is what I am able to see fromk apcaccess status:
$ apcaccess status localhost:3551
APC      : 001,019,0499
DATE     : Mon Jul 26 20:50:45 BST 2004
HOSTNAME : thor.vickiandstacey.com
RELEASE  : 3.10.13
VERSION  : 3.10.13 (16 April 2004) freebsd
UPSNAME  : apc
CABLE    : APC Cable 940-0020B
MODEL    : DUMB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: Mon Jul 26 20:45:10 BST 2004
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
STATFLAG : 0x02000008 Status Flag
END APC  : Mon Jul 26 20:50:45 BST 2004

If there is any more information I should post that would of use to anyone wanting to 
assist, please let me know.

Thanks for the time.



Attachment: pgpiUNSCFCKTJ.pgp
Description: PGP signature

Reply via email to