Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jul 2004 19:15:57 +0100
From:      Stacey Roberts <stacey@vickiandstacey.com>
To:        Lars.Koeller@Uni-Bielefeld.de
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   apcupsd vs FreeBSD-5.2.x
Message-ID:  <20040727181557.GE495@crom.vickiandstacey.com>

next in thread | raw e-mail | index | archive | help

--6lCXDTVICvIQMz0h
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hello,
     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 following:

**************************************************
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 file:

## apcupsd.conf v1.1 ##
#
#  for apcupsd release 3.10.13 (16 April 2004) - freebsd
#
# "apcupsd" POSIX config file
#
# ========= General configuration parameters ============
#
# UPSNAME xxx
#   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.
UPSNAME apc
#
# 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.
UPSTYPE dumb
#
#
#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
STATUS   : ONLINE
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
NUMXFERS : 0
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
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.

Regards,

Stacey

--6lCXDTVICvIQMz0h
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQEVAwUBQQab2edvY+8mWFvRAQGbmggAqQ47T3AcJnAGlxUX2WXfOrg+nId50rSW
4E0bAaATpLpuaEgD2Np14FWW59vFsNktEVJsDzj5govzEpVs5TqE5Oe1Rj4gitgV
5F+LoWhDJwuIhNGN8eSzkaERGv5/Tz/1zzXwdHPs2QAf8ZEiRUOh0P7XgyKMZNw8
l2g+qufirgiF7vNMbF3k+QEdcw8fghWN/FSrGwCMVflZIV7d5CJ7SQbR7Nm779CM
gjH/IzIbJmex/W8g8V600BsMkMNvIT99+m9D5CXzxZZ0ifhPqL6N1Vo+UsS3gT8x
P+dOP0+xglGRGgENdCSYE2AwjlmWQhycg+JC1oogu5EntrAeF9M9xQ==
=pvUM
-----END PGP SIGNATURE-----

--6lCXDTVICvIQMz0h--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040727181557.GE495>