Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: robwellesley 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"
-
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.
-
Moving this topic to the SME 7.x contribs forum, it is more appropriate there. Thanks!
-
# 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 (http://wiki.contribs.org/Dag) page about it
robwellesley, could you please create an howto in the wiki?
thank you in advance
-
robwellesley, could you please create an howto in the wiki?
Stefano - Not sure what you mean here. Can you elaborate please?
Rob
-
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 :-)
-
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
-
Hi
Edit your Howto and add this at end:
----
[[Category:Howto]]
This will inform Wiki that page belongs to Category HowTo and Wiki will show it there automagically.
-
And there it is! Cool!
Cheers, I'd have been hours more trying to figure that out..
-
robwellesley
...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.
-
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:
Local Host Not available: upsfetch: tcp_open failed for 127.0.0.1 port 3551
apctest 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?
-
What model is your UPS
-
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?
-
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.
-
yes. This is exactly what I have.
Are you also able to use upsd and upsc? For example:
upsc UPS
If you can then I can assume that it is not interfering.
Did you need to reboot?
-
We do nothing more than the 'howto' and it works.
Is the service running? /etc/init.d/apcupsd status
A reboot will start the service, but /etc/init.d/apcupsd start is simpler
-
.....
[root@hpserver ~]# [root@hpserver ~]# upsc UPS
-bash: [root@hpserver: command not found
[root@hpserver ~]# Error: Connection failure: Connection refused
-
Is the service running? /etc/init.d/apcupsd status
A reboot will start the service, but /etc/init.d/apcupsd start is simpler
Agreed. But it starts and then fails hence the status shows it as dead. when I do apctest it can't find the UPS.
/var/log/messages has:
apcupsd[9459]: apcupsd FATAL ERROR in linux-usb.c at line 609 Cannot find UPS device -- For a link to detailed USB trouble shooting information, please see <http://www.apcupsd.com/support.html>.
which I believe also means it failed because it could not find the UPS. So that seems to be the root cause.
Your upsc command failed so I am now guessing this is where the conflict lies (ie. mine works). A reboot may load the drivers differently. I can give this a shot when my system is a little more idle.
Do you get anything if you use (not that is a capital V):
/usr/sbin/upsd -V
upsc should be at:
/usr/bin/upsc
Thanks for looking into it. Further suggestions are also welcome.
-
[root@hpserver ~]# /usr/sbin/upsd -V
Network UPS Tools upsd 2.2.0-