apcupsd vs FreeBSD-5.2.x

2004-07-27 Thread Stacey Roberts
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 [ backupsdumb
# | 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   DeviceDescription
# 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 : 

Re: apcupsd vs FreeBSD-5.2.x

2004-07-27 Thread Peter Risdon
Stacey Roberts wrote:
[snip]
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.
You need to make an appropriate entry in devfs.conf for any 
customisation of /dev to persist beyond a reboot with FreeBSD 5. - 
something like:

link target name
Is there something that I've missed out somewhere that is causing apcupsd not to 
start automatically on reboot?
I imagine this is the same problem.
Peter.

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
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: apcupsd vs FreeBSD-5.2.x

2004-07-27 Thread Stacey Roberts
Hi Peter,
   Thanks for the reply.

- Original Message -
From: Peter Risdon [EMAIL PROTECTED]
To: To Stacey Roberts
Date: Tue, 27 Jul, 2004 20:12 BST
Subject: Re: apcupsd vs FreeBSD-5.2.x

 Stacey Roberts wrote:
 
 [snip]
 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.
 
 You need to make an appropriate entry in devfs.conf for any 
 customisation of /dev to persist beyond a reboot with FreeBSD 5. - 
 something like:
 
 link target name

Ah.., yes.., Do you mind checking my syntax, please? According to your suggestion, I'd 
be adding:

link /dev/cuaa1 /dev/usv

to /etc/devfs.conf, and that should be it?

Whislt I'm keen to try this out, could I then ask the obvious question, is there some 
reason why in apcupsd.conf I am not allowed to simply use /dev/cuaa1?

Thanks again for taking the time.

Regards,

Stacey

 
 
 Is there something that I've missed out somewhere that is causing apcupsd 
 not to start automatically on reboot?
 
 
 I imagine this is the same problem.
 
 Peter.
 
 
 
 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


pgpRsr12podE2.pgp
Description: PGP signature


Re: apcupsd vs FreeBSD-5.2.x

2004-07-27 Thread Peter Risdon
Stacey Roberts wrote:
Hi Peter,
   Thanks for the reply.
Stacey Roberts wrote:
[snip]
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.
You need to make an appropriate entry in devfs.conf for any 
customisation of /dev to persist beyond a reboot with FreeBSD 5. - 
something like:

link target name

Ah.., yes.., Do you mind checking my syntax, please? According to your suggestion, I'd 
be adding:
link /dev/cuaa1 /dev/usv
to /etc/devfs.conf, and that should be it?
No - look at the file, there are sample entries there:
# Commonly used by many ports
linkacd0cdrom
linkcuaa0   pilot
So you'd want:
link cuaa1  usv

Whislt I'm keen to try this out, could I then ask the obvious question, 
is there some reason why in apcupsd.conf I am not allowed to simply 
use /dev/cuaa1?

I'm afraid I'm not sufficiently familiar with this software to answer. 
But it would almost certainly be less problematic  to stick with the 
suggested link.

Thanks again for taking the time.
My pleasure, hope it helps.
Peter.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: apcupsd vs FreeBSD-5.2.x

2004-07-27 Thread Stacey Roberts
Hi Peter,
   
- Original Message -
From: Peter Risdon [EMAIL PROTECTED]
To: To Stacey Roberts
Date: Tue, 27 Jul, 2004 21:00 BST
Subject: Re: apcupsd vs FreeBSD-5.2.x

 Stacey Roberts wrote:
 Hi Peter,
Thanks for the reply.
 
 Stacey Roberts wrote:
 
 [snip]
 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.
 
 You need to make an appropriate entry in devfs.conf for any 
 customisation of /dev to persist beyond a reboot with FreeBSD 5. - 
 something like:
 
 link target name
 
 
 Ah.., yes.., Do you mind checking my syntax, please? According to your 
 suggestion, I'd be adding:
 
 link /dev/cuaa1 /dev/usv
 
 to /etc/devfs.conf, and that should be it?
 
 No - look at the file, there are sample entries there:
 
 # Commonly used by many ports
 linkacd0cdrom
 linkcuaa0   pilot
 
 So you'd want:
 
 link cuaa1  usv

Okay, I understand. And I take it that if the serial signalling cable is actually 
connected to (labeled) serial port 1, then the corresponding device tobe used here 
would be cuaa0?


 
 
 
 
 Whislt I'm keen to try this out, could I then ask the obvious question, 
 is there some reason why in apcupsd.conf I am not allowed to simply 
 use /dev/cuaa1?
 
 
 I'm afraid I'm not sufficiently familiar with this software to answer. 
 But it would almost certainly be less problematic  to stick with the 
 suggested link.

I understand., seems to be there for what I imagine to be for some good reason.

This has been really helpful, Peter. Thanks again.

Regards,

Stacey


 
 Thanks again for taking the time.
 
 My pleasure, hope it helps.
 
 Peter.
 
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]


pgp6lXncUcKKK.pgp
Description: PGP signature


Re: apcupsd vs FreeBSD-5.2.x

2004-07-27 Thread Peter Risdon
Stacey Roberts wrote:
Hi Peter,
   
- Original Message -
From: Peter Risdon [EMAIL PROTECTED]
[snip]
So you'd want:
link cuaa1  usv

Okay, I understand. And I take it that if the serial signalling cable is actually 
connected to (labeled) serial port 1, then the corresponding device tobe used here 
would be cuaa0?

The numbering of serial ports in FreeBSD starts at 0, so what would be 
called com1 in DOS/Windows is cuaa0 in FreeBSD.

If the numbering of the ports on your computer follows the same pattern, 
then serial port 1 would map to cuaa0.

Peter.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: apcupsd vs FreeBSD-5.2.x

2004-07-27 Thread Stacey Roberts
Hi,

- Original Message -
From: Peter Risdon [EMAIL PROTECTED]
To: To Stacey Roberts
Date: Tue, 27 Jul, 2004 22:56 BST
Subject: Re: apcupsd vs FreeBSD-5.2.x

 Stacey Roberts wrote:
 Hi Peter,

 - Original Message -
 From: Peter Risdon [EMAIL PROTECTED]
 [snip]
 So you'd want:
 
 link cuaa1  usv
 
 
 Okay, I understand. And I take it that if the serial signalling cable is 
 actually connected to (labeled) serial port 1, then the corresponding 
 device tobe used here would be cuaa0?
 
 
 
 The numbering of serial ports in FreeBSD starts at 0, so what would be 
 called com1 in DOS/Windows is cuaa0 in FreeBSD.

Yes, I knew this..,

 
 If the numbering of the ports on your computer follows the same pattern, 
 then serial port 1 would map to cuaa0.

Thanks for that clarification. I just thought that the pkg-message using cuaa1 was 
somewhat strange as this is in effect serial 2 and not the first serial interface. I 
would have thought that the example would have used the first (cuaa0) for the example 
by default.

Cheers for this.

Regards,

Stacey


 
 
 Peter.
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]


pgpKywdmwa90E.pgp
Description: PGP signature