APCUPSD 3.14.10 Plugin for unRAID 5b11+


Recommended Posts

  • Replies 443
  • Created
  • Last Reply

Top Posters In This Topic

for NON-apc UPS's you have to change the cable type from 'smart' to 'usb' i believe.

 

I'm not sure, but I think you would only use Smart if you have a APC SmartUps ups.  My Apc ups is a BackUps model and my settings is set to usb.  At the end of the day, you don't get anything extra from a SmartUps vs a BackUps from what I can tell.  The plugin does what it does if it works at all.

Link to comment

works great in 5 RC6 with an APC Back-UPS 700.. well, not the %Load but its a UPS issue.

 

Today I test powerdown and no problems. Perfect Log.

 

Also I test remote info in Mountain Lion and working in a couple minutes.  ;D

 

All this, after I return a Riello USB UPS that I could´t make it work at all, not only in apcupsd, in ML.

 

In a couple of days I´ll try kill-ups to powerdown and restart after poweron ups.

 

Where did you get the screenshot? how do you get the data via a popup window?

 

Link to comment

works great in 5 RC6 with an APC Back-UPS 700.. well, not the %Load but its a UPS issue.

 

Today I test powerdown and no problems. Perfect Log.

 

Also I test remote info in Mountain Lion and working in a couple minutes.  ;D

 

All this, after I return a Riello USB UPS that I could´t make it work at all, not only in apcupsd, in ML.

 

In a couple of days I´ll try kill-ups to powerdown and restart after poweron ups.

 

Where did you get the screenshot? how do you get the data via a popup window?

 

 

in my MB Air - Mountain Lion with APCAGENT installed with Apcupsd-3.14.10.dmg

 

No need to to nothing in the unraid side, only in your remote PC config with ip, port, etc..

Captura_de_pantalla_2012-09-01_a_las_01_08_44.png.5d024ff7fa20f74bca6ebab43f7bbcf9.png

Link to comment
  • 4 weeks later...

I'm seeing this entry in my syslog, looks like a cron.daily entry according to the time:

Sep 23 04:40:02 UNRAID apcupsd[3086]: apcupsd exiting, signal 15
Sep 23 04:40:02 UNRAID apcupsd[3086]: apcupsd shutdown succeeded
Sep 23 04:40:03 UNRAID apcupsd[8482]: apcupsd 3.14.10 (13 September 2011) slackware startup succeeded
Sep 23 04:40:03 UNRAID apcupsd[8482]: NIS server startup succeeded

 

This bothers me a bit, why is the apcupsd reset daily? What happens if in that few seconds the power goes down...?

Link to comment

btw, did some reading and there are some testools for apc, e.g. the command 'apctest' gives a testmenu:

2012-09-23 20:18:18 apctest 3.14.10 (13 September 2011) slackware
Checking configuration ...
Attached to driver: usb
sharenet.type = Network & ShareUPS Disabled
cable.type = USB Cable
mode.type = USB UPS Driver
Setting up the port ...
Doing prep_device() ...

You are using a USB cable type, so I'm entering USB test mode
Hello, this is the apcupsd Cable Test program.
This part of apctest is for testing USB UPSes.

Getting UPS capabilities...SUCCESS

Please select the function you want to perform.

1)  Test kill UPS power
2)  Perform self-test
3)  Read last self-test result
4)  View/Change battery date
5)  View manufacturing date
6)  View/Change alarm behavior
7)  View/Change sensitivity
  View/Change low transfer voltage
9)  View/Change high transfer voltage
10) Perform battery calibration
11) Test alarm
12) View/Change self-test interval
Q) Quit

Select function number:

 

Here is some more info: http://www.koelzer.us/~thomas/APC-UPS-Daemon.html

Link to comment

Ooo Errr ... just greped my syslog for apcupsd and see this:

Sep 23 11:49:22 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:22 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:22 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:22 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:23 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:23 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:24 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:24 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:25 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:25 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:26 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:26 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:27 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:27 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:28 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:28 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:29 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:29 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:30 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:30 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:31 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:31 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:32 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:32 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:34 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:34 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:35 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:35 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:36 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:36 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:37 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:37 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:38 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:38 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:39 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:39 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:40 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:40 Tower apcupsd[3055]: Power is back. UPS running on mains.
Sep 23 11:49:41 Tower apcupsd[3055]: Power failure.
Sep 23 11:49:47 Tower apcupsd[3055]: Running on UPS batteries.
Sep 23 11:52:51 Tower apcupsd[3055]: Mains returned. No longer on UPS batteries.
Sep 23 11:52:51 Tower apcupsd[3055]: Power is back. UPS running on mains.

 

I know that the power here in Philippines is unreliable, but twenty drop-outs at one second intervals, before it went out for three minutes?

 

A three minute cut doesn't sound like a fault - more like some kind of manual action .... but what were they playing at for the previous twenty seconds?

 

 

But, guess what I also find :

Sep 23 04:40:01 Tower apcupsd[3050]: apcupsd exiting, signal 15
Sep 23 04:40:01 Tower apcupsd[3050]: apcupsd shutdown succeeded
Sep 23 04:40:03 Tower apcupsd[31856]: apcupsd 3.14.10 (13 September 2011) slackware startup succeeded
Sep 23 04:40:03 Tower apcupsd[31856]: NIS server startup succeeded
Sep 23 05:59:59 Tower apcupsd[31856]: Power failure.
Sep 23 05:59:59 Tower apcupsd[31856]: Power is back. UPS running on mains.
Sep 23 05:59:59 Tower kernel: usb 1-1.2: USB disconnect, device number 4
Sep 23 05:59:59 Tower kernel: usblp0: removed
Sep 23 06:00:00 Tower apcupsd[31856]: Power failure.
Sep 23 06:00:05 Tower apcupsd[31856]: Running on UPS batteries.
Sep 23 06:05:06 Tower apcupsd[31856]: Reached run time limit on batteries.
Sep 23 06:05:06 Tower apcupsd[31856]: Initiating system shutdown!
Sep 23 06:05:06 Tower apcupsd[31856]: User logins prohibited

 

The only entry in cron.daily is logrotate - can this be tampering with apcupsd?

Link to comment

Any APC smart UPs would do - question is how long do you want it to last without power - that tells you how big it needs to be. Apart from that with the powerdown script installed when the power goes, UPS cuts in, after a set time or when a set amount of battery is left the server will shut down. Mine is only 420W but all i want is for it to last about 5 mins, if after that the power is not back then shutdown everything - we have a very reliable supply and suffer more from spikes and bad switching than failures, and on the rare occasion they happen i am happy for everything to go off till i get to it

Link to comment

Any APC smart UPs would do - question is how long do you want it to last without power - that tells you how big it needs to be. Apart from that with the powerdown script installed when the power goes, UPS cuts in, after a set time or when a set amount of battery is left the server will shut down. Mine is only 420W but all i want is for it to last about 5 mins, if after that the power is not back then shutdown everything - we have a very reliable supply and suffer more from spikes and bad switching than failures, and on the rare occasion they happen i am happy for everything to go off till i get to it

 

Thanks. I was just wondering what UPS to get that can do the auto shutdown incase of a power-loss. I am not knowledgeable regarding UPS so I don't know which one to choose. I don't care if it last for 5 or 10mins as long as I don't get a broken HD and corrupted files that should probably do it.

Link to comment

When configuring apcupsd, set sensible values for all three shutdown conditions: maximum time on battery, minimum remaining time and minimum battery charge.  Take account of the possibility (which frequently occurs here) that the power fails, then comes back for a few seconds (enough for the server to start booting) and then goes off again.

Link to comment

While noting things as well as the above advice if your sailing close to the wind with your settings what seems to be your remaining time on idle will drop quickly once all your disk are spun up. Set it so it does what it is supposed to do and support the system on battery but make sure you start the shutdown with enough time to cater for additional power draw at full everything and then add a bit !

 

Good thing is once its in place its kind of set and forget - my UPS is out os sight and to be honest i rarely think about it until i see a mail to tell me it cut in for some reason - only been twice in half a year and then for dips not outages as like i said we have a good supply

Link to comment

While noting things as well as the above advice if your sailing close to the wind with your settings what seems to be your remaining time on idle will drop quickly once all your disk are spun up. Set it so it does what it is supposed to do and support the system on battery but make sure you start the shutdown with enough time to cater for additional power draw at full everything and then add a bit !

 

Good thing is once its in place its kind of set and forget - my UPS is out os sight and to be honest i rarely think about it until i see a mail to tell me it cut in for some reason - only been twice in half a year and then for dips not outages as like i said we have a good supply

Mine works much the same way, you can almost forget it once configured... just be aware the batteries only last about 3 years or so.  (last month my UPS was unable to last through a shutdown sequence, it died after only 30 seconds. )  I had to replace the battery which apparently was over 4 years old.
Link to comment

I would like to adapt the scripts in /etc/apcupsd so the device can send me emails when something is going on as by this site: http://www.asylumnation.com/asylum/_r/showthread/threadid_44315/index.html (scroll down) but it uses 'sendmail'. Now when i give the sendmail command on unraid's prompt, it does seem to work, but i have no clue where the .cf config files are? Anyone can point me in the right direction?

 

Or should i install the ssmtp unmenu package, would that work?

Link to comment

Or should i install the ssmtp unmenu package, would that work?

apcupsd simply uses "mail"  mail sends through "sendmail"

 

Yes, the ssmtp package in unMENU works fine. HOWEVER..... (important in this case) You will almost NEVER get an e-mail message you've lost power because typically your internet connection and therefore the ability to send mail is also lost when you lose power.

 

If your cable modem is powered by the UPS it might still not work, as the cable amplifiers in the street would probably also lose power in an outage.    Only possibility is if you have a DSL line, and your DSL modem is powered by a UPS.

 

Joe L.

 

 

Link to comment

FWIW FiOS stays up on battery backup (I mean on the house and on the street) when I lose power.  And I suspect cable with telephone access is getting there too since they need to manitain 911 access.  So you SHOULD maintain internet access through a reasonably non-national emergency level storm.  That said, a recent DC area storm showed they are not there yet, especially Maryland, because they didn't really design or test it well. [shrug]

 

When my lights go out I can still surf the web till my UPS's (using laptop or phone for best life) and my DVR will record for about 2 hours because I am on Dish with a pretty good signal even in a storm.

 

No triple-play here ... it takes a LOT to knock me off the grid >;-)

Link to comment

I'm not insensative, i just wasnt thinking ;) You're absolutely right, my internetmodem + router are also powered by the ups, so with a bit of luck it should be possible to send an email on powerloss, in case i'm not home. Nice :) now i still have to find out HOW to get sendmail working with apcupsd...

Link to comment

In my case, I use time-warner-cable as my ISP...  Trust me, a power loss in the neighborhood typically leaves us without cable-tv, and without internet.  The pole-mounted amplifiers are not powered by backup batteries.  (I don't even bother to put the cable-modem on a UPS because of this.)

 

Email is far more useful to know when a disk is disabled, especially if you do not always look at the server's main pages.  Therefore, do take the time to install and configure it.

 

Joe L.

 

 

Link to comment

I'm not sure what happens here if there's a power loss, i guess internet will be gone as well. Luckily it doesnt happen that much, just once every 4 or 5 years or so, for about 30 minutes or an hour. I also can't get the sendmail stuff working from the apcupsd scripts, but i've been sending emails from python scripts i've written (for sabnzbd post processing etc) so i just call my python email script from the apcupsd scripts ;) so at least the ups will warn me by email if there is something wrong with the battery or communication.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.