Click to See Complete Forum and Search --> : APC Back-UPS XS 1300 questions...


MkIII_Supra
09-21-2007, 04:10 PM
I just got a new APC Back-UPS XS 1300 and have it setup but I have some questions and one issue.

Issue is when I run the apctest command I get the following:

Master -: apctest


2007-09-21 13:06:39 apctest 3.12.3 (26 April 2006) mandrake
Checking configuration ...
Attached to driver: usb
sharenet.type = DISABLE
cable.type = USB_CABLE

You are using a USB cable type, so I'm entering USB test mode
mode.type = USB_UPS
Setting up the port ...
apctest FATAL ERROR in device.c at line 68
Unable to create UPS lock file.
apctest FATAL ERROR in device.c at line 68
Unable to create UPS lock file.
apctest error termination completed

Why is this happening and can I correct it?

When I run apcaccess I get this:

Master -: apcaccess
APC : 001,035,0883
DATE : Fri Sep 21 13:10:47 PDT 2007
HOSTNAME : localhost
RELEASE : 3.12.3
VERSION : 3.12.3 (26 April 2006) mandrake
UPSNAME : localhost
CABLE : USB Cable
MODEL : Back-UPS XS 1300 LCD
UPSMODE : Stand Alone
STARTTIME: Fri Sep 21 12:59:36 PDT 2007
STATUS : ONLINE
LINEV : 122.0 Volts
LOADPCT : 26.0 Percent Load Capacity
BCHARGE : 100.0 Percent
TIMELEFT : 22.6 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 0 Seconds
LOTRANS : 088.0 Volts
HITRANS : 139.0 Volts
ALARMDEL : Always
BATTV : 26.9 Volts
LASTXFER : No transfers since turnon
NUMXFERS : 0
TONBATT : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
SELFTEST : NO
STATFLAG : 0x07000008 Status Flag
MANDATE : 2007-04-27
SERIALNO : JB0717018015
BATTDATE : 2101-00-36
NOMBATTV : 24.0
FIRMWARE : 36.H5 .D USB FW:H5
APCMODEL : Back-UPS XS 1300 LC
END APC : Fri Sep 21 13:10:50 PDT 2007
Master -:

So I know that the APC UPS is being recognized correctly. So my next question is there a GUI display or a way to monitor this with Gkrellm?

Also is there a GUI that allows me to set shutdowns and such if the battery reaches a specified level? I do have apcupsd running, I just checked my active processes using KSysGuard.

I already talked to APC and they say the USB cable won't work with their software and Linux. Plus I can't even download their software. Something is up with their servers. SO I am looking at the open source solutions to see if there is something that will meet my needs.

As always thank you for your time!

bwkaz
09-21-2007, 06:53 PM
You are using a USB cable type, so I'm entering USB test mode
mode.type = USB_UPS
Setting up the port ...
apctest FATAL ERROR in device.c at line 68
Unable to create UPS lock file. I'm not sure what the "UPS lock file" is, but I suspect it's something in /var/lock. Does it make any difference to run apctest as root? (You could also try to strace the program to see what's failing before it spits out that error, then ensure the permissions are set correctly to be able to write to the lock file.)

So my next question is there a GUI display or a way to monitor this with Gkrellm? Possibly, but not on a standard gkrellm install. If it exists, it's probably a plugin. (Standard gkrellm monitors batteries, I think. UPSes don't show up as batteries to most of the system; you have to go through apcupsd to talk to them. That's what apcaccess does.)

There's also apcupsd-cgi, if you have Apache installed; it'll give you a set of web pages with the UPS's status on them.

Also is there a GUI that allows me to set shutdowns and such if the battery reaches a specified level? /etc/apcupsd/apcupsd.conf -- no, there's no GUI, at least not as part of apcupsd. But the file's syntax really isn't hard, since it's all explained in the comments. (I'm not sure why you require a GUI, in other words... ;))

I already talked to APC and they say the USB cable won't work with their software and Linux. Good -- their software is absolute CRAP, even in Windows... between the Java requirement, the hardcoding of the java.exe path into the service's parameters key (so you can't remove old -- buggy! -- versions of the JVM when patches are released), and the general lack of useful features, I'd stay as far away from it as possible...

MkIII_Supra
09-21-2007, 07:02 PM
I will look into the file you mentioned. I ran the test as root. The command isn't available as a user.

As for why I want a GUI, I want it to monitor and to set things up. Sure I can edit .conf files, but this is one of those times where I would rather not and just point and click my way to a solution.

bwkaz
09-23-2007, 01:35 PM
As for why I want a GUI, I want it to monitor and to set things up. To monitor things, I can see it being useful.

But settings up apcupsd couldn't possibly be made any simpler (especially with a USB cable, which you've already told it to use one way or another). Just open the file, select how much runtime you want left (or how much battery charge % you want left) before a shutdown, and save the file. (And possibly restart the daemon.)

(It'll shut your machine down when either the battery % gets lower than your setting, or when the time remaining gets lower, so you can set both of them.)

Sure I can edit .conf files, but this is one of those times where I would rather not and just point and click my way to a solution. But there is no way to do that (without some other package, anyway), and seriously -- you only need to edit 2 or 3 lines in the file. It's not at all difficult.

Modorf
09-24-2007, 02:58 PM
MkIII_Supra: you can monitor the status via webpage. depending on your distro and web server installation is different.

to see if the CGI scripts are installed try:
http://localhost/cgi-bin/apcupsd/multimon.cgi

Otherwise look into installing it. I know that Gnome has a battery monitor applet that reports ups/battery state.