Koozali.org: home of the SME Server

APC Back-UPS with E-Smith 4.1.2?

Robert Devantier

APC Back-UPS with E-Smith 4.1.2?
« on: May 13, 2001, 05:36:59 AM »
Just picked up an APC Back-UPS, and would like to get the server to know when it is on battery power.  I saw mention of a powstatd package in the contributions area, but it seems to have been made for the earlier versions of E-Smith.

Can anybody help me out?

Charlie Brady

Re: APC Back-UPS with E-Smith 4.1.2?
« Reply #1 on: May 13, 2001, 08:20:15 AM »
Robert Devantier wrote:
>
> Just picked up an APC Back-UPS, and would like to get the
> server to know when it is on battery power.  I saw mention of
> a powstatd package in the contributions area, but it seems to
> have been made for the earlier versions of E-Smith.
>
> Can anybody help me out?

I think it will still work OK on e-smith 4.1.2. You'll find configuration instructions in /usr/doc/e-smith-powstatd-0.1/README. Let me know how you get on.

Regards

Charlie

Michael Doerner

Re: APC Back-UPS with E-Smith 4.1.2?
« Reply #2 on: May 13, 2001, 01:42:36 PM »
Robert,

I am happily using an Open Source package called "apcupsd" (now version 3.8.1) with all recent E-smith versions (now 4.1.2). I got interested when I read an article in December 2000 of the Linux Journal about it.

One feature that I like so much is that you can hook up more than one server behind the UPS, run the monitoring - via serial port - on one machine (the "server") and the others (the "slaves") can get their monitoring information via TCP/IP from the master.

Access to the monitoring information you can set up through a browser from each enabled workstation.
I did the installation as an rpm package and the setup is done by editing a .conf file, not too difficult.

I really like it very much and I would like to create an E-smith version for this tool to embed it into the E-smith manager ... But this is only a wish yet, no promise.

Have a look at it, it's worth while. (http://www.sibbald.com/apcupsd/)

Regards,
Michael Doerner

Robert Devantier

Re: APC Back-UPS with E-Smith 4.1.2?
« Reply #3 on: May 14, 2001, 08:52:40 PM »
I installed both the powstatd and e-smith-powstatd, read the README and did exactly as it said to.  As soon as I typed in the command to launch powstatd, it said I was on battery power and shut me down.  Glad I didn't put it right into the startup files!

I think I will try the other package and see how it works. I will report back my findings.

With e-smith being targeted for small businesses, I would have thought UPS support would have been included in the base install.

David Helmuth

Re: APC Back-UPS with E-Smith 4.1.2?
« Reply #4 on: May 16, 2001, 08:15:30 AM »
I ran in to EXACTLY the same thing, shutting down immediately.  I use a back up pro 650 from APC.  I have been trying to get ahold of someone from tech support at APC and have not had any luck.  I am guessing that it has to do with how the serial cable that APC ships their units is expecting to communicate over the serial port.  What I mean is this:  I bet that they (APC) wires their Unix serial connection cable different from their Windows serial connection cable.  I noticed that they had some listed on their web site (APC that is, for about $39.  I will try and post back if I find out anything.

Des Dougan

Re: APC Back-UPS with E-Smith 4.1.2?
« Reply #5 on: May 16, 2001, 08:24:14 AM »
I recently set up a Back UPS 650 for a friend of mine. The cable it ships with is for Windows only. I complained (via their site) that the box does not note this, and that perhaps they should be offering a Linux option (especially since they have a Linux management application). I asked them to ship me a replacement at no cost, which they very readily agreed to do. The cable arrived within a couple of days and works fine.

I would say APCC are very responsive to customer needs, and are one of the  companies deserving of our support.


Des Dougan

Robert Devantier

Re: APC Back-UPS with E-Smith 4.1.2?
« Reply #6 on: May 16, 2001, 08:27:29 PM »
Well, I have tried PowerChute, powstatd, and apcupsd, to no avail.  I do believe it is the cable, mine came with 940-0020C, which is the Windows simple signalling cable.  What's funny is the apcupsd has the 940-0020B cable listed in the .ini file as being supported (and I'm sure these two are similiar to each other).  But maybe that is a generic entry for their Windows's version of apcupsd.

I have sent an e-mail support question to APC, and we'll see if they respond back with good news.

Robert Devantier

Re: APC Back-UPS with E-Smith 4.1.2?
« Reply #7 on: May 17, 2001, 12:02:36 AM »
Well, APC sent me an e-mail that said the Back-UPS does not come with the Unix cable.  They are going to send me (free of charge) the 940-0023A cable.

Graeme Robinson

Re: APC Back-UPS with E-Smith 4.1.2?
« Reply #8 on: May 23, 2001, 02:33:10 PM »
I wonder how you've gone with this.  I've spent some time with powstatd today and note the following:
- if your machine was shutting down as soon as you ran it it looks like you didn't configure /etc/powstatd.conf correctly .  You should do this by running powstat -t, (test mode) which will give output on the status of the serial connection without telling the server to do anything.  First you tune it so that in full mains power mode the status report is OK.  Then you note what switch changes when mains power is removed, edit the /etc/powstatd.conf file to reflect this and test again.  Full power on should report OK, mains fail should report status FAIL and low battery state change LOW.

Once you've got that right powstatd should work correctly.  Test it first with a lamp connected to the UPS power rather than your server tho, in case you get another instant shutdown. See man powstatd for the detail on the above.  

My problem is that powstatd doesn't signal anything to init - I'd be very happy if it shutdown my pc - at least it would be communicating with init!

Also I had to create a custom-template to get the init changes to stick (which others appear not to have to have done), but it's still not working - power stat should be signalling init through a status file called /etc/powerstatus but this isn't happening on my system - at least I can find no evidence of powerstatus anywhere

Any ideas anyone?
(FYI I'm using a dumb UPS that only handles simple signalling -  an APC BackupPro 280 - with the standard cable)

Robert Devantier

Re: APC Back-UPS with E-Smith 4.1.2?
« Reply #9 on: May 31, 2001, 06:55:27 PM »
Sorry for the delay, I've been busy with other projects...

I received the Unix cable from APC, and powstatd started working just fine.  I too am using a dumb UPS (Back-UPS 650).  I went through all the powstatd -t testing, and discovered that I only get OK and FAIL, no LOW signal.  Therefore, as soon as the UPS sees even the sligtest power outage, the server shuts down immediately.

All I need to do now is figure out how to make powstatd run at startup (Charlie, can you help?)

I have been doing some other testing with the Windows cable and a Back-UPS 300 (thank you Staples for the $10 UPS!).  I get the following with powstatd:

MUST init RTS with 1, DTR with 0, otherwise UPS light goes out.
OK is the 0 0 0 0 combination.
FAIL seems to be a 1 0 0 1 combination.
LOW is being tested for right now, but I don't think I'll get a signal, just like on the BU650.