Koozali.org: home of the SME Server

Apcupsd setup on 7.4

Offline robwellesley

  • *
  • 92
  • +0/-0
Apcupsd setup on 7.4
« on: May 03, 2010, 09:59:34 AM »
Hi - usual disclaimers apply

We like to use APC UPS's and the cgi files bundled with the Apcupsd daemon are nice to use.
Post install and service startup...

http://host.domain/cgi-bin/multimon.cgi

....will access the cgi


Currently we use BK500EI - Backups CS 500

The conf file has good detail on setup options.

We always set the TIMEOUT to 600 seconds; You shouldn't let UPS batteries run down to 5% (default) as this massively shortens their life.
Set TIMEOUT to 10 for testing.

#!/bin/sh

# Setup DAG repository
/sbin/e-smith/db yum_repositories set dag \
repository Name 'Dag - EL4' \
BaseURL 'http://apt.sw.be/redhat/el4/en/$basearch/dag' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
Visible no \
Exclude freetype,htop,iptraf,rsync,syslinux \
status disabled \
signal-event yum-modify

# INSTALL APCUPSD
yum install --enablerepo=dag --enablerepo=base apcupsd

# COPY ORIGINAL CONF
cp apcupsd.conf apcupsd.conf.orig

# COPY CGI FILES
cp /var/www/apcupsd/* /home/e-smith/files/ibays/Primary/cgi-bin/

# LINK STARTUP SCRIPT
ln -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S99apcupsd

# SET SERVICE IN SME
config set apcupsd service status enabled

echo "edit /etc/apcupsd/apcupsd.conf then start the service"


Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Apcupsd setup on 7.4
« Reply #1 on: May 03, 2010, 03:02:53 PM »
We like to use APC UPS's and the cgi files bundled with the Apcupsd daemon are nice to use.

Fine - however that is not relevant for this forum, which concerns only software included with the SME server CD.

Offline byte

  • *
  • 2,183
  • +2/-0
Re: Apcupsd setup on 7.4
« Reply #2 on: May 03, 2010, 03:45:12 PM »
Moving this topic to the SME 7.x contribs forum, it is more appropriate there. Thanks!
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Apcupsd setup on 7.4
« Reply #3 on: May 03, 2010, 04:18:46 PM »

# Setup DAG repository
/sbin/e-smith/db yum_repositories set dag \
repository Name 'Dag - EL4' \
BaseURL 'http://apt.sw.be/redhat/el4/en/$basearch/dag' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
Visible no \
Exclude freetype,htop,iptraf,rsync,syslinux \
status disabled \
signal-event yum-modify

there's already a Wiki  page about it

robwellesley, could you please create an howto in the wiki?
thank you in advance

Offline robwellesley

  • *
  • 92
  • +0/-0
Re: Apcupsd setup on 7.4
« Reply #4 on: May 03, 2010, 11:10:43 PM »
robwellesley, could you please create an howto in the wiki?

Stefano - Not sure what you mean here.  Can you elaborate please?
Rob

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Apcupsd setup on 7.4
« Reply #5 on: May 03, 2010, 11:23:41 PM »
Stefano - Not sure what you mean here.  Can you elaborate please?
Rob

create an account (if you haven't one) to access wiki to create a page in the howto section :-)

Offline robwellesley

  • *
  • 92
  • +0/-0
Re: Apcupsd setup on 7.4
« Reply #6 on: May 05, 2010, 11:36:52 PM »
Hi Stefano (Sorry for the post here but there's no 'Wiki help forum" that I can see)

created this http://wiki.contribs.org/Apcupsd

but edit on http://wiki.contribs.org/Category:Howto doesn't let me add a link to it

Can you point me in the right direction?

Rob

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: Apcupsd setup on 7.4
« Reply #7 on: May 06, 2010, 12:03:24 AM »
Hi

Edit your Howto and add this at end:
Code: [Select]
----
[[Category:Howto]]

This will inform Wiki that page belongs to Category HowTo and Wiki will show it there automagically.
...

Offline robwellesley

  • *
  • 92
  • +0/-0
Re: Apcupsd setup on 7.4
« Reply #8 on: May 06, 2010, 12:10:51 AM »
And there it is!  Cool!

Cheers, I'd have been hours more trying to figure that out..

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Apcupsd setup on 7.4
« Reply #9 on: May 06, 2010, 01:56:08 AM »
robwellesley

Quote
...I'd have been hours more trying to figure that out..

You can always look at existing howtos to see how they are done ie choose to edit but do not save.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline christian

  • *
  • 369
  • +0/-0
    • http://www.szpilfogel.com
Re: Apcupsd setup on 7.4
« Reply #10 on: May 06, 2010, 03:02:45 AM »
We like to use APC UPS's and the cgi files bundled with the Apcupsd daemon are nice to use.
Post install and service startup...

http://host.domain/cgi-bin/multimon.cgi

....will access the cgi
I just gave this a shot and had issues with:
Code: [Select]
Local Host Not available: upsfetch: tcp_open failed for 127.0.0.1 port 3551apctest couldn't find the ups either.
I think this is because my ups is attaching through the usb with driver "usbfs" instead of "hid" and I think this tool requires "hid". On this front my SME is stock so usbfs is likely the default.

I'll look into it later but wondering if anyone else has seen this?
SME since 2003

Offline robwellesley

  • *
  • 92
  • +0/-0
Re: Apcupsd setup on 7.4
« Reply #11 on: May 06, 2010, 03:14:45 AM »
What model is your UPS

Offline christian

  • *
  • 369
  • +0/-0
    • http://www.szpilfogel.com
Re: Apcupsd setup on 7.4
« Reply #12 on: May 06, 2010, 03:43:21 AM »
What model is your UPS
Back-UPS XS-1000 on the box but upsc reports "Back-UPS RS 1000"

I also note upsd is still seeing it so perhaps I have to unload the current driver?
SME since 2003

Offline robwellesley

  • *
  • 92
  • +0/-0
Re: Apcupsd setup on 7.4
« Reply #13 on: May 06, 2010, 03:54:12 AM »
Default SME - standalone with UPS attached
Default apcupsd install

These settings should be....

UPSCABLE usb
UPSTYPE usb
DEVICE                # i.e left blank

... for a USB cable

All other settings can be left at default in the first instance.

Offline christian

  • *
  • 369
  • +0/-0
    • http://www.szpilfogel.com
Re: Apcupsd setup on 7.4
« Reply #14 on: May 06, 2010, 03:57:26 AM »
yes. This is exactly what I have.

Are you also able to use upsd and upsc? For example:
Code: [Select]
upsc UPSIf you can then I can assume that it is not interfering.

Did you need to reboot?
SME since 2003