Jump to content

[SOLVED] APCUPSD + Clean Powerdown


Hypknox

Recommended Posts

So I just received my APC Back-UPS Pro 700 and want to make sure that I've set this up correctly.

 

I downloaded, installed and set the following two packages to automatically re-install upon reboot as it suggested in Pkg Manager of unmenu.

 

- apcupsd-3.14.8-i486-1_rlw.tgz

- powerdown-1.02-noarch-unRAID.tgz (labeled as Clean Powerdown)

 

I have an ethernet to usb cord that came with my unit running from my UPS to my unRAID server, is there any further configuration that I need to set up? 

 

I read somewhere that if my UPS used usb that the default configuration wouldn't work.  I'm assuming this is outdated information since the default setting for Use Serial Port?(YES/NO/network_master:port): is set to "NO" and the description states "If set to NO, a connection via USB cable is used."  Or perhaps "default configuration" was referring to something else?

 

 

Thanks

Link to comment

Will the Clean powerdown also shutdown my server when sabnzb is running? I always had trouble when stopping the array when sabnzb was running and kept files open.

yes, it should, as it attempts to kill processes that are keeping disks busy.
Link to comment

Which apcupsd offers more functionality? The unmenu package or the plugin version? Or are they the same? Will they work with a UPS that is attached with only a Cat5 cable to the network? Can I select PCNET and ether?

If your UPS uses SNMP or APC's AP9617 interface, either should work on a network only connection, otherwise, not.

See here http://www.apcupsd.com/manual/manual.html#supported-upses-and-cables

 

I use a single low capacity APC connected via serial to one of my network pc's, which runs apcupsd and broadcasts to the rest of the network that a power outage has occurred. I then do an orderly shutdown after a few minutes of no power with apcupsd in network listening mode. All the rest of the pc's in the network (including my unraid) are on big UPS's that are incompatible with apcupsd, so they just assume they'll have enough power left to shut down, and I stagger the powerdown intervals based on function. Desktop PC and media players shut down first, then the unraid box, then the home automation stuff. The router and network switch equipment is powered on a separate backup that doesn't shutdown until it's out of battery, which is a long time with that small of a load.

Link to comment

Not a problem at all dikkiedirk, these are also great questions that myself and others can benefit from.

 

I would still like to know if my current setup is complete or if there is any additional steps that I need to take to ensure that if I endure an extended loss of power that my UPS will stop the array, perform a clean shutdown and then power off itself.

 

I didn't install the software powerchute that came with it, I assumed I wouldn't need that. I literally hooked everything up, downloaded, installed, and set to re-install upon reboot both clean power and apcupsd. The cable that came with the APC unit is hooked up to the server.

 

In regards to dikkiedirks last question, the unmenu package and plugin version appeared to be the same version.  They did to me at least, perhaps I'm no looking at the right area. 

 

Regardless, I'm simply interested in achieving peace of mind.  I do not care about a fancy report that can be generated or "the bells and whistles" when it comes to this UPS.  I just want to know that if my server is running and I'm away from home that an extended loss of power will not eventually run my UPS out of juice and result in an abrupt shutdown of the server which could potentially cause issues.  Can someone confirm if I have achieved this with the steps I have take so far?

Link to comment

Not a problem at all dikkiedirk, these are also great questions that myself and others can benefit from.

 

I would still like to know if my current setup is complete or if there is any additional steps that I need to take to ensure that if I endure an extended loss of power that my UPS will stop the array, perform a clean shutdown and then power off itself.

 

I didn't install the software powerchute that came with it, I assumed I wouldn't need that. I literally hooked everything up, downloaded, installed, and set to re-install upon reboot both clean power and apcupsd. The cable that came with the APC unit is hooked up to the server.

 

In regards to dikkiedirks last question, the unmenu package and plugin version appeared to be the same version.  They did to me at least, perhaps I'm no looking at the right area. 

 

Regardless, I'm simply interested in achieving peace of mind.  I do not care about a fancy report that can be generated or "the bells and whistles" when it comes to this UPS.  I just want to know that if my server is running and I'm away from home that an extended loss of power will not eventually run my UPS out of juice and result in an abrupt shutdown of the server which could potentially cause issues.  Can someone confirm if I have achieved this with the steps I have take so far?

Nobody can confirm it all works on your server but you.

 

so...  Stop the array.  (This is just so you won;t need to perform a parity check on reboot if something does not shut down as expected)

Log in on the system console, or via telnet and type

tail -f /var/log/syslog

Then... pull the power cord to the UPS.

Finally... watch and wait and see what happens.

 

After a few minutes, it should shut down the server.

 

Joe L.

Link to comment

Go to system info in unmenu, and press the UPS Status button. Paste the output text back here if you don't understand what it's telling you.

 

If you really want to check your install, here's what you do.

1. Shutdown server, unplug server power from UPS, temporarily plug it back into a surge strip.

2. Unplug UPS from wall, temporarily plug it into a switched outlet. (another DIFFERENT power strip)

3. Turn on the outlet powering the UPS, turn on UPS.

4. Boot up server, go to unmenu UPS Status and confirm status.

5. Turn off UPS power outlet, confirm UPS Status changes to battery, and starts countdown.

6. Turn UPS power outlet back on, confirm UPS Status changes back to normal.

 

If you want to load test your UPS and confirm a full shutdown, add or change these steps.

 

2b. Plug lamps equaling max server load into UPS (do not exceed VA rating of UPS)

5b. Wait until loaded UPS signals shutdown, and confirm orderly shutdown of server.

 

DO NOT test your UPS by just pulling the UPS power plug. It's designed to have the ground wire connected during a power outage, and some UPS's don't handle plug pulling as well as others. You may get away with it, you may not. Don't risk it.

 

500W Halogen work lights make good test loads. Floor and desk lamps work too, just lower power.

Link to comment

Which apcupsd offers more functionality? The unmenu package or the plugin version? Or are they the same? Will they work with a UPS that is attached with only a Cat5 cable to the network? Can I select PCNET and ether?

If your UPS uses SNMP or APC's AP9617 interface, either should work on a network only connection, otherwise, not.

See here http://www.apcupsd.com/manual/manual.html#supported-upses-and-cables

 

I use a single low capacity APC connected via serial to one of my network pc's, which runs apcupsd and broadcasts to the rest of the network that a power outage has occurred. I then do an orderly shutdown after a few minutes of no power with apcupsd in network listening mode. All the rest of the pc's in the network (including my unraid) are on big UPS's that are incompatible with apcupsd, so they just assume they'll have enough power left to shut down, and I stagger the powerdown intervals based on function. Desktop PC and media players shut down first, then the unraid box, then the home automation stuff. The router and network switch equipment is powered on a separate backup that doesn't shutdown until it's out of battery, which is a long time with that small of a load.

 

My UPS is a IBM UPS1500THV, which is a rebranded APC Smart-UPS. It came with a AP9617 card.

Link to comment

Thanks for the replies all.  I suppose I haven't worded my question clearly.  I realize that no one can tell me with absolute certainty that my specific UPS will properly power down my specific server. 

 

What I was really going for is this - Based on the steps that I have taken, are there any other configuration steps that I need to perform that I may have missed? Any additional set up required from me or should what I have done so far be sufficient? Just confirmation that the setup process route I took is valid and complete.  Not asking - "HAY MAN, MY UPS WERKZ OR WUT??!1"  ;)

Link to comment
DO NOT test your UPS by just pulling the UPS power plug.

 

I can comment on this...

 

When I tested mine by pulling the plug, the USB port would aways reset and stating so in the log. Using the switch on a powerstrip or a "real" power outage, never produced the glitch that reset the USB port.

 

PB

Link to comment
Any additional set up required from me or should what I have done so far be sufficient? Just confirmation that the setup process route I took is valid and complete.

 

Go to system info in unmenu, and press the UPS Status button. Paste the output text back here if you don't understand what it's telling you.

Link to comment

Disregard the "Starttime", I hadn't yet correctly set the date/time in unRAID.

*Edit - And apparently have the current date set incorrectly as well  ::)

 

UPS Status

 

(from /sbin/apcaccess status)

 

APC      : 001,038,0953

DATE    : Thu Apr 05 06:31:09 EDT 2012

HOSTNAME : unRAID

RELEASE  : 3.14.3

VERSION  : 3.14.3 (20 January 2008) slackware

UPSNAME  : unRAID

CABLE    : Custom Cable Smart

MODEL    : Back-UPS RS 700G

UPSMODE  : Stand Alone

STARTTIME: Sat Jun 12 18:12:09 EDT 2010

STATUS  : ONLINE

LINEV    : 122.0 Volts

LOADPCT  :  15.0 Percent Load Capacity

BCHARGE  : 100.0 Percent

TIMELEFT :  37.5 Minutes

MBATTCHG : 10 Percent

MINTIMEL : 5 Minutes

MAXTIME  : 300 Seconds

SENSE    : Medium

LOTRANS  : 088.0 Volts

HITRANS  : 141.0 Volts

ALARMDEL : Always

BATTV    : 13.7 Volts

LASTXFER : No transfers since turnon

NUMXFERS : 0

TONBATT  : 0 seconds

CUMONBATT: 0 seconds

XOFFBATT : N/A

SELFTEST : NO

STATFLAG : 0x07000008 Status Flag

MANDATE  : 2012-01-21

SERIALNO : 3B1203X77771 

BATTDATE : 2001-09-25

NOMINV  : 120 Volts

NOMBATTV :  12.0 Volts

NOMPOWER : 420 Watts

FIRMWARE : 856.L3 .D USB FW:L3

APCMODEL : Back-UPS RS 700G

END APC  : Thu Apr 05 06:32:01 EDT 2012

Link to comment

Based on that status, you have done everything correctly. The only thing left to do is a function test, which I've outlined previously. If you don't do a function test, you'll never know if it works until a real outage. Your choice, it SHOULD work fine as it is, but you'll never know until you test it.

Link to comment

any advice for me?  i see a line that says unacceptable line voltage changes... i did have a power outage a few days ago... could that be what its referring to?

 

(from /sbin/apcaccess status)

 

APC      : 001,038,0959

DATE    : Wed Apr 04 18:21:16 CDT 2012

HOSTNAME : Tower

RELEASE  : 3.14.3

VERSION  : 3.14.3 (20 January 2008) slackware

UPSNAME  : Tower

CABLE    : Custom Cable Smart

MODEL    : Back-UPS BX1300G

UPSMODE  : Stand Alone

STARTTIME: Wed Apr 04 05:32:31 CDT 2012

STATUS  : ONLINE

LINEV    : 118.0 Volts

LOADPCT  :  25.0 Percent Load Capacity

BCHARGE  : 100.0 Percent

TIMELEFT :  20.1 Minutes

MBATTCHG : 10 Percent

MINTIMEL : 5 Minutes

MAXTIME  : 300 Seconds

SENSE    : Medium

LOTRANS  : 088.0 Volts

HITRANS  : 139.0 Volts

ALARMDEL : Always

BATTV    : 27.0 Volts

LASTXFER : Unacceptable line voltage changes

NUMXFERS : 0

TONBATT  : 0 seconds

CUMONBATT: 0 seconds

XOFFBATT : N/A

SELFTEST : NO

STATFLAG : 0x07000008 Status Flag

MANDATE  : 2011-04-10

SERIALNO : 4B1115P42907 

BATTDATE : 2001-09-25

NOMINV  : 120 Volts

NOMBATTV :  24.0 Volts

NOMPOWER : 780 Watts

FIRMWARE : 864.L5 .D USB FW:L5

APCMODEL : Back-UPS BX1300G

END APC  : Wed Apr 04 18:21:18 CDT 2012

 

Link to comment

i see a line that says unacceptable line voltage changes... i did have a power outage a few days ago... could that be what its referring to?

LASTXFER : Unacceptable line voltage changes

Looks like that's a reasonable explanation.

That was the reason it last started itself.

 

Joe L.

Link to comment

i see a line that says unacceptable line voltage changes... i did have a power outage a few days ago... could that be what its referring to?

LASTXFER : Unacceptable line voltage changes

Looks like that's a reasonable explanation.

That was the reason it last started itself.

 

Joe L.

 

ok guys thanks... i will run the tests, but does it appear to you that it is configured to properly shutdown?

 

Link to comment

i see a line that says unacceptable line voltage changes... i did have a power outage a few days ago... could that be what its referring to?

LASTXFER : Unacceptable line voltage changes

Looks like that's a reasonable explanation.

That was the reason it last started itself.

 

Joe L.

 

ok guys thanks... i will run the tests, but does it appear to you that it is configured to properly shutdown?

We cannot tell from here.      It is installed and running. 

 

The issue is what does it do when it detects a power outage.

 

If you used unMENU to install it and have also installed the powerdown script, it will shut down in 99% of the normal cases.

 

The install script in unMENU modifies several scripts on the server to properly invoke a clean powerdown.  Without those changes, apcupsd would shut down the server, but not cleanly stop the array.

Link to comment
  • 2 weeks later...

hello all, i have my server connected to an apc with the proper clean shutdown script installed...

 

never got around to properly testing it.  now i see i've had a power outage today... (its raining out and i've lost contact with various programs i use to connect to the server, istat, airvideo, filebrowser etc)

 

so i'm sure when i get home the server will be off.  is there a way to tell if it shutdown cleanly or not?  ie i have seen the apc kick over to battery, but once battery runs out, i assume to the server it will just seem like the power got pulled, unless of course it shut down cleanly.

 

any log i can look at to tell?

 

thanks for the advice... wish i had properly tested before being in a real world situation

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...