Jump to content

apcupsd not shutting down UPS [solved]


Spectrum

Recommended Posts

I picked up a UPS (APC Back-UPS ES 550) for my unRAID box while I was out tonight.  I installed apcupsd 3.14.3 from unMenu (powerdown script was already installed) and tested things out.  The system sees the UPS and performs a shutdown once the timeout trigger fires, but the UPS is not shut down even though "Power Down UPS after shutdown" is set to YES in the config.  This is not a huge deal and definitely not a show stopper, but has anyone seen this or have an idea on how to rectify?

 

Related (kind of) is there anyway to to save a log of what is going on during the shutdown other than logging to a separate syslog server?  That's something I could set up if I absolutely had to, but I'd rather not ;)

Link to comment

I picked up a UPS (APC Back-UPS ES 550) for my unRAID box while I was out tonight.  I installed apcupsd 3.14.3 from unMenu (powerdown script was already installed) and tested things out.  The system sees the UPS and performs a shutdown once the timeout trigger fires, but the UPS is not shut down even though "Power Down UPS after shutdown" is set to YES in the config.  This is not a huge deal and definitely not a show stopper, but has anyone seen this or have an idea on how to rectify?

 

Related (kind of) is there anyway to to save a log of what is going on during the shutdown other than logging to a separate syslog server?  That's something I could set up if I absolutely had to, but I'd rather not ;)

did you install the "powerdown" package through unMENU?    If not, you ran the wrong "powerdown" command.

 

If you ran the correct "powerdown" command a very complete syslog is saved to your flash drive already in a /boot/logs

directory.

 

Other than that, did you wait a bit after the server powered itself down.  (Did the server just sop? or did it power down? It should have powered down.)

 

The command to power down the UPS is sent to it just prior to powering down the server itself.  The UPS delays before shutting itself down.  It has to do that since it has to give the server time to complete its own activities.

 

Of course this assumes your APC ups will correctly react to the command to shut itself down.  Mine is the Back-UPS ES 750, and it does.

 

Joe L.

Link to comment

did you install the "powerdown" package through unMENU?    If not, you ran the wrong "powerdown" command.

 

If you ran the correct "powerdown" command a very complete syslog is saved to your flash drive already in a /boot/logs

directory.

Nice, didn't realize that the powerdown script did that.  I have those logs but the last thing shown in any of those logs is the array shutting down.  There is nothing after that for the shutdown sequence.

 

Other than that, did you wait a bit after the server powered itself down.  (Did the server just sop? or did it power down? It should have powered down.)

 

The command to power down the UPS is sent to it just prior to powering down the server itself.  The UPS delays before shutting itself down.  It has to do that since it has to give the server time to complete its own activities.

 

Of course this assumes your APC ups will correctly react to the command to shut itself down.  Mine is the Back-UPS ES 750, and it does.

The server shut down completely (ACPI power down it did not just halt) and I waited a minute or two and the UPS never went off.  I'll try again later today when the box is not in use and give it more time before I plug it back in.

Link to comment

You can look to see if the "killpower" command was added to your shutdown scripts by typing

 

tail /etc/rc.d/rc.6

 

You should see something like this:

# Now halt (poweroff with APM or ACPI enabled kernels) or reboot.

if [ "$command" = "reboot" ]; then

  echo "Rebooting."

  /sbin/reboot

else

  /etc/apcupsd/apccontrol killpower; /sbin/poweroff

fi

 

The section in RED will be there to send the command to the UPS just prior to the actual poweroff it if was installed properly.

 

If you want to experiment, stop your array by pressing "Stop", unplug the UPS from AC outlet, and then type on the command line:

/etc/apcupsd/apccontrol killpower

 

The UPS should shut itself down.  No need to wait 5 minutes.  Because the array was stopped you'll not be faced with a lengthy parity check on reboot.

 

Joe L.

Link to comment

Everything was working as intended, I just didn't wait long enough for the UPS to kick off.  I tested once by manually initiating

/etc/apcupsd/apccontrol killpower

and (after creating

/etc/apcupsd/powerfail

) it powered off the UPS.  The UPS immediatly came right back up so I tried again by pulling the plug and everything worked just fine.  System went down then UPS powered off after 90 seconds or so.  When I reapplied power it came back on and the system came right back up.

 

Thanks for the help Joe!

Link to comment

Everything was working as intended, I just didn't wait long enough for the UPS to kick off.  I tested once by manually initiating

/etc/apcupsd/apccontrol killpower

and (after creating

/etc/apcupsd/powerfail

) it powered off the UPS.  The UPS immediatly came right back up so I tried again by pulling the plug and everything worked just fine.  System went down then UPS powered off after 90 seconds or so.  When I reapplied power it came back on and the system came right back up.

 

Thanks for the help Joe!

Isn't it great when it all works as planned.  The UPS must delay before shutting itself down, since many PCs (ms-window's specifically) have no way to send the killpower exactly at the end of the shutdown sequence. 

 

If you get a chance, please add "[solved]" to the title of this thread.

 

Joe L.

Link to comment

Archived

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

×
×
  • Create New...