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

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

Author:  snaproll [ Sat Mar 07, 2009 9:45 am ]
Post subject: 

/etc/apcupsd/ exists:

[root@mythtv6 apcupsd]# dir
apccontrol apcupsd.css commfailure hosts.conf multimon.conf onbattery upsimage.cgi
apcupsd.conf changeme commok multimon.cgi offbattery upsfstats.cgi upsstats.cgi

running your commands raises questions ??

[root@mythtv6 apcupsd]# sv status apcupsd
fail: apcupsd: unable to change to service directory: file does not exist

[root@mythtv6 apcupsd]# sv restart apcupsd
fail: apcupsd: unable to change to service directory: file does not exist

If I just type apcupsd:

[root@mythtv6 apcupsd]# apcupsd
[root@mythtv6 apcupsd]#

It doesn't error ?
The .conf file lines are correct as you listed them.

And NETSERVER on

but it has a connection problem ?

[root@mythtv6 log]# apcaccess status
Error contacting apcupsd @ localhost:3551: Connection refused

I have apcupsd running on another machine (running 5.5) and may steal that conf file, but this machine running 6 may have version differences.

This test machine ran apcupsd fine when it was running 5.5.

I may still have something obvious, but every time I look at it I see 2 + 2 =5.. . Nods OK... moves on..

Author:  mihanson [ Sat Mar 07, 2009 11:21 am ]
Post subject: 

snaproll wrote:
[root@mythtv6 apcupsd]# sv status apcupsd
fail: apcupsd: unable to change to service directory: file does not exist

[root@mythtv6 apcupsd]# sv restart apcupsd
fail: apcupsd: unable to change to service directory: file does not exist


Code:
# add_service.sh apcupsd ; sv restart apcupsd

Author:  snaproll [ Sat Mar 07, 2009 1:05 pm ]
Post subject: 

Code:
[root@mythtv6 greg]# add_service.sh apcupsd ; sv restart apcupsd
adding apcupsd
warning: apcupsd: unable to open supervise/ok: file does not exist
[root@mythtv6 greg]#


So I repeated the sv restart command by itself.. then-



Code:
[root@mythtv6 ~]# cd /var/log/
[root@mythtv6 log]# dir
Xorg.0.log      auth.log      errors.log        kernel.log.1  messages.log.1           old           user.log
Xorg.0.log.old  auth.log.1    errors.log.1      lastlog       mysqld.log               pacman.log    user.log.1
acpid.log       btmp          everything.log    lighttpd      mythtv                   sv            utmp
acpid.log.1     daemon.log    everything.log.1  lircd         mythvantage_install.log  syslog.log    wtmp
apcupsd.events  daemon.log.1  fluxbox.log       lircd.1       network.init             syslog.log.1  wtmp.1
apcupsd.status  dmesg.log     kernel.log        messages.log  network.init.error       tweaker.log
[root@mythtv6 log]#


....& a nano of apcupsd status & apcupsd.events now prints them out...and-

Code:
[root@mythtv6 log]# apcaccess status   
APC      : 001,036,0895               
DATE     : Sat Mar 07 11:55:35 CST 2009
HOSTNAME : mythtv6                     
RELEASE  : 3.14.5                     
VERSION  : 3.14.5 (10 January 2009) unknown
UPSNAME  : mythtv6
CABLE    : USB Cable
MODEL    : Back-UPS ES 550
UPSMODE  : Stand Alone
STARTTIME: Sat Mar 07 11:44:28 CST 2009
STATUS   : ONLINE
LINEV    : 124.0 Volts
LOADPCT  :  32.0 Percent Load Capacity
BCHARGE  : 100.0 Percent
TIMELEFT :  14.6 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
SENSE    : Medium
LOTRANS  : 092.0 Volts
HITRANS  : 139.0 Volts
ALARMDEL : Always
BATTV    : 13.5 Volts
LASTXFER : Low line voltage
NUMXFERS : 0
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
STATFLAG : 0x07000008 Status Flag
MANDATE  : 2008-07-03
SERIALNO : 3B1807X35264
BATTDATE : 2000-00-00
NOMINV   : 115 Volts
NOMBATTV :  12.0 Volts
FIRMWARE : 843.K1 .D USB FW:K1
APCMODEL : Back-UPS ES 550
END APC  : Sat Mar 07 11:56:21 CST 2009


Thank you sir !.... :lol:

Do you suppose my install dropped a stitch, or will everybody running a UPS on 6, need to run your commands to bring it up ?

Author:  tscholl [ Tue Apr 27, 2010 4:34 pm ]
Post subject: 

I have apcupsd running but when I try to get it's status

apcaccess status

I get the following message:

Code:
Error contacting apcupsd @ localhost:3551: Operation not permitted


Does anyone know how to get around this error?

By the way it appears that I do have valid information written to the apcupsd.status and apcupsd.events files.

Thanks
Tim

Author:  knappster [ Tue Apr 27, 2010 7:44 pm ]
Post subject: 

Ironically I just tried the same thing and I am having the same problem. I'll let you know if I find anything. (I haven't tried restarting yet)

Author:  knappster [ Fri May 07, 2010 11:50 am ]
Post subject: 

Any luck tscholl? I have been unable to make any progress. I wonder if installing from source could help...

Author:  brfransen [ Fri May 07, 2010 12:10 pm ]
Post subject: 

I can't reproduce the problem here but have you checked permissions on /sbin/apcaccess and /var/log/apcupsd.status? Do you get the same if you sudo apcaccess status?

Author:  knappster [ Fri May 07, 2010 12:24 pm ]
Post subject: 

I do get the same message if I sudo and also if I am logged in as root. I didn't check permissions as I didn't suppose it would matter if it denied root access as well. I'll try to provide a lot more information about my software versions and the part # of my UPS, etc. when I have a chance.

Author:  nmcaullay [ Mon May 17, 2010 8:25 am ]
Post subject: 

Just a short note to say how bloody wonderous this forum is... took delivery of an APC Back-UPS 700 today, plugged it in... pacman installed apcupsd (as above), did the tricks above, and hey-presto... I have a UPS powered and protected LinHES system!

No configuration changes required, just that little dance about the services (sv etc).

Top stuff!

Nathan

Author:  snaproll [ Mon May 17, 2010 10:48 am ]
Post subject: 

A quick note:

I run four APC UPS's on linux machines running apcupsd in my house. I use Gapcmon (a linux apcupsd monitor program) to monitor all of them from one desktop (running Kubuntu).

:D

Author:  tscholl [ Mon May 17, 2010 3:04 pm ]
Post subject: 

No luck here, still getting the same message.

I think it is working but can't be sure. If you stop the service
Code:
sv stop apcupsd

you can run
Code:
 apctest

apctest works ok, and after you restart the service
Code:
sv start apcupsd

you do get good status information in
/var/log/apcupsd.status

It would be nice to get this resolved though.

Author:  knappster [ Mon May 17, 2010 3:16 pm ]
Post subject: 

Same here tscholl... I think I am on R6.00, how about you? I may just unplug the UPS sometime and see if my unit shuts down gracefully.

Author:  tscholl [ Mon May 17, 2010 4:36 pm ]
Post subject: 

I'm Running R6.02 and according to pacman it running
apcupsd-3.14.5-2

Author:  knappster [ Sun Oct 31, 2010 9:02 pm ]
Post subject: 

After upgrading to 6.03 it does not work at all on my machine.
I have apcupsd v3.14.8
the message in /var/log/apcupsd.events is:
Code:
2010-10-31 20:09:55 -0500  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>.
2010-10-31 20:09:55 -0500  apcupsd error shutdown completed

It appears to keep attempting to restart every minute, which just fills the log. I tried removing it and installing from source, but the same problem there, too. I am just removing it for the time being.

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