LinHES Forums
http://forum.linhes.org/

UPS monitoring set up?
http://forum.linhes.org/viewtopic.php?f=2&t=1301
Page 1 of 2

Author:  tjc [ Sat Apr 24, 2004 11:11 pm ]
Post subject:  UPS monitoring set up?

I just picked up a new UPS for the MythTV box (APC Back-UPS ES 500) but a quick search of the installed packages didn't show anything obvious as far as a monitoring daemon.

Mostly my UPSes pay their way by smoothing over those obnoxious little power blips that my local grid seems prone to, but it's really nice to have the system do an orderly shutdown when there's a real outage. This seems especially apropos to a Myth distro given how MySQL needs to be repaired when it's not shutdown cleanly.

I'm using Apcupsd on my other boxes which run Mandrake, but was wondering if there was a prefered package for a Myth box...

BTW - This is here because I figured it qualifies as a hardware driver question... ;-)

Author:  Xsecrets [ Sat Apr 24, 2004 11:35 pm ]
Post subject: 

as far as I know apcupsd is the only ups monitoring software for linux. It should be apt-getable for knoppmyth.

Author:  turkish [ Sun Apr 25, 2004 12:20 am ]
Post subject: 

you can do apt-cache search ups
that should show any packages that has UPS in the description, you may get stuff that doesn't have to do w/ UPS's

Author:  tjc [ Mon Apr 26, 2004 9:13 pm ]
Post subject: 

Not having heard another answer I did an
Code:
apt-get install apcupsd

which seems to have gone OK. Now All I've got to do is figure out how to get it talking to the USB device... /var/log/messages says:
Code:
Apr 24 20:56:02 black kernel: hub.c: new USB device 00:02.0-2, assigned address 2
Apr 24 20:56:02 black kernel: usb.c: USB device 2 (vend/prod 0x51d/0x2) is not claimed by any active driver.
Apr 24 20:56:02 black kernel: usb.c: registered new driver hiddev
Apr 24 20:56:02 black kernel: usb.c: registered new driver hid
Apr 24 20:56:02 black kernel: hiddev0: USB HID v1.10 Joystick [APC Back-UPS ES 500 FW:801.e5.D USB FW:e5] on usb1:2.0
Apr 24 20:56:02 black kernel: hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <vojtech@suse.cz>
Apr 24 20:56:02 black kernel: hid-core.c: USB HID support drivers

But there doesn't seem to be a device/entry under "/dev/usb" or "/proc/bus/usb". I know I'm missing something obvious but my brain is fried... Clues? :?

Author:  tjc [ Mon Apr 26, 2004 9:46 pm ]
Post subject: 

Guess I found a real reason to upgrade to R4V3... From the apcupsd manual section on USB config:
Quote:
Note, if on the last line, Driver is listed as Driver=none then you do not have the HID driver loaded or the driver did not attach to the UPS. One common cause is having a Linux kernel older than 2.4.22 (such as a stock RedHat 9 kernel). If this is the case for your system, please upgrade to at least kernel version 2.4.22 and try again. Otherwise, please read further for instructions for other possible courses of action.

Looks like I may need the newer kernel for better USB support before this will work. Can someone please contradict me?

Author:  tjc [ Fri Apr 30, 2004 1:01 am ]
Post subject: 

Looks like I'm talking to myself... Maybe it'll help some other poor smuck.

After upgrading to R4V3, redoing the apt-get, and editing /etc/apcupsd/apcupsd.conf this still wasn't working. Much head scratching and looking at the set up on my Mandrakes boxes led me to solve the problem by brute force (as root):
Code:
mknod /dev/usb/hiddev0 c 180 96
Sigh...

Author:  kb9mwo [ Tue Feb 15, 2005 10:50 pm ]
Post subject:  THANK YOU!!!

I had the exact same problem... your brute force method is the only way I could get it to work. THANK YOU!!!

Author:  tjc [ Wed Feb 16, 2005 1:08 am ]
Post subject: 

My pleasure. It's always gratifying to see someone else spared the same pain. It's especially nice to see it be someone clueful enough to find the info by searching. :-)

Author:  mihanson [ Mon Jul 24, 2006 6:18 pm ]
Post subject:  Will ApcUps work on non-APC UPS'?

Does anyone know if this daemon will work on an UPS that is not made by APC? I have a UPS I got from Best Buy, made by Dynex (Model DX800U). It was $40, marked down from $90 when I got it. Anyway... It has the USB port and a CD-ROM for a monitoring program under Windoze. I'm wondering if anyone has tried a non-APC branded UPS with ApcUps and what was the result?

Author:  jbman [ Mon Jul 24, 2006 8:39 pm ]
Post subject: 

yep you want to use nut instead.

http://www.networkupstools.org/

Author:  tjc [ Mon Jul 24, 2006 9:39 pm ]
Post subject: 

I agree with what jbman said. As far as I'm aware apcupsd is specific to the APC models .

I''m a bit surprised I never cam eback and added a link to the APCUPSD howto I wrote on the wiki - http://www.knoppmythwiki.org/index.php?page=ApcUpsdHowTo

Author:  snaproll [ Fri Mar 06, 2009 10:56 am ]
Post subject: 

is the setup script:

setup_apcupsd.sh

gone from 6 ?

It's not recognized now.

Author:  mihanson [ Fri Mar 06, 2009 4:11 pm ]
Post subject: 

snaproll wrote:
is the setup script:

setup_apcupsd.sh

gone from 6 ?

It's not recognized now.


Just do a
Code:
# pacman -Sy apcupsd
and it should set it up automagicly for you assuming you have a USB connected APC UPS.

Author:  snaproll [ Fri Mar 06, 2009 4:57 pm ]
Post subject: 

Thanks, Mike !

I haven't got the hang of this 'what's pacman' ? stuff yet.... :lol:

Edit..
Ran, seemed to install the files, but no 'events' or 'status' in /var/log/ ??

Author:  mihanson [ Fri Mar 06, 2009 8:11 pm ]
Post subject: 

snaproll wrote:
Ran, seemed to install the files, but no 'events' or 'status' in /var/log/ ??


Try
Code:
# sv status apcupsd
If it's not running, then
Code:
# sv restart apcupsd
If it is running and you still have no love, check your /etc/apcupsd/apcupsd.conf. Ensure the following:
Line 29:
Code:
UPSCABLE usb

Line 75-76:
Code:
UPSTYPE usb
DEVICE /dev/usb/hid/hiddev[0-9]

Line 202:
Code:
EVENTSFILE /var/log/apcupsd.events

Line 234:
Code:
STATTIME 300


All of the above should exist and not be commented (#).

Page 1 of 2 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/