View previous topic :: View next topic |
Author |
Message |
whiskeypriest Tux's lil' helper
Joined: 05 Feb 2004 Posts: 91
|
Posted: Fri Aug 27, 2004 10:19 pm Post subject: |
|
|
I have the same USB configuration (built in, not modular) for my 2.6 kernels; updating the HOWTO for 2.6-specific options is on my list, it simply hasn't been implemented yet.
Meanwhile, exactly what problems are you encountering with the UPS Network Monitor? I'll need more information to assist you, but here's the short list of possible difficulties:- Do you have Apache installed on the machine that will be monitoring your UPS unit(s)?
- If so, did you restart both apcupsd and Apache after you completed the installation?
- If not, you'll need to emerge Apache and remerge apcupsd. Remember to back up your apcupsd configuration files!
- Did you modify /etc/apcupsd/hosts.conf to reflect your particular network configuration and restart apcupsd afterwards?
- Are you directing your browser to the correct address?
I realize some of these fall under the “stupid question” category, but it never hurts to establish a baseline, especially (say) if you're running a customized Apache configuration (e.g. documents stored somewhere besides /var/www/).
Last edited by whiskeypriest on Sat Aug 28, 2004 4:09 am; edited 1 time in total |
|
Back to top |
|
|
elpierco n00b
Joined: 28 Sep 2003 Posts: 59 Location: Lawrence Kansas
|
Posted: Sat Aug 28, 2004 2:16 am Post subject: I figured it out |
|
|
So I found the cgi scripts and go them setup...I just asked before searching around
Thanks for that quick response...I did a little test with my Back-UPS 500 ie 500VA(volt amps)
I unplugged it from the wall and is started beeping...it said I had about 11 minutes of run time and the load was about 47%. So I multiplied that load by 500VA and that gave me 235VA. I then divided that by what my line voltage was being reported as 124V and the amperage that my box is drawing...1.89A. Of course this is a system totally idle. P4 2.8GHz@800MHz FSB with 6 SATA disks and an ide disk(the root disk) . I am in kansas and we have had some crazy storms the past week. It is actually storming out right now and thus why I decided to get the APC. For some reason I have the horrible image of all the read heads on my disks crashing to a sudden halt when we lost power the other night (before the APC). Anyway thanks again...El |
|
Back to top |
|
|
suhlhorn Tux's lil' helper
Joined: 22 Jun 2003 Posts: 76 Location: Miami, FL
|
Posted: Fri Sep 10, 2004 1:11 pm Post subject: UPS killpower |
|
|
Excellent HOW-TO!
Most everything went smoothly on the setup; just a couple of comments:
1) I had problems building usb support as a module with my 2.6 kernel. After making usb built-in, everything went smoothly.
2) The UPS unit does not appear to shut off via the 'killpower' option to apccontrol after the shutdown sequence has completed. Is this a limitation of my UPS (APC Back-Ups RS 1000) or a problem with the shutdown/halt scripts?
I waited a good 6 mins after the host shutdown for the UPS to 'killpower', but I had to turn it off by pressing the UPS power button. I'm assuming this has to happen for the UPS to correctly bring the computers back up when AC power returns.
UPDATE: I just noticed that the halt script looks for /etc/apcupsd/powerfail in order to killpower to the UPS. I just did a quick test and the file is not created when there is a loss of power. Looking through the apcupsd manual, it looks this should be taken care of by the /etc/apcupsd/poweroff or onbattery script:
http://www2.apcupsd.com/3.10.x-manual/shutdown.html
Any thoughts?
-stephen |
|
Back to top |
|
|
whiskeypriest Tux's lil' helper
Joined: 05 Feb 2004 Posts: 91
|
Posted: Sat Sep 11, 2004 1:58 am Post subject: CHANGELOG: 09.10.04 |
|
|
CHANGELOG:
suhlhorn:
Thanks for the feedback...you're the second person to comment on the 2.6 USB configuration, which finally motivated me to enter those into the main document.
As for your second concern, that's an excellent question: see the new Troubleshooting apcupsd with USB thread for my musings (though not answers, unfortunately) on the subject, and please accept my apologies for the sudden change in venue...
DOCUMENT EDITED TO REFLECT NEW SUGGESTED 2.4 AND 2.6 KERNEL CONFIGURATION PARAMETERS, LINKS INCLUDED TO THE NEW TROUBLESHOOTING THREAD. |
|
Back to top |
|
|
LodBot Apprentice
Joined: 06 Sep 2003 Posts: 155
|
Posted: Fri Sep 17, 2004 3:53 pm Post subject: |
|
|
Awesome guide! I do have one questions, though. How can I get my APC unit to turn my machine back on when power is restored? Right now, when the APC shuts down my system, gentoo hangs on the "Power Down" step of the shut down process. It doesn't actually power down. I guess what I'm asking is how can I get gentoo to shutdown without having to push the power button? I changed my BIOS last state setting so my system should turn back on when power is restored.
Thanks in advance. |
|
Back to top |
|
|
whiskeypriest Tux's lil' helper
Joined: 05 Feb 2004 Posts: 91
|
Posted: Fri Sep 17, 2004 4:25 pm Post subject: |
|
|
Thanks for the feedback, and Im glad you found the guide useful. Ive posted a reply to your questions in the Troubleshooting apcupsd with USB thread
please have a look there. |
|
Back to top |
|
|
signal11 n00b
Joined: 16 Mar 2003 Posts: 46
|
Posted: Wed Oct 06, 2004 9:15 pm Post subject: thanks !!! it works like a charm |
|
|
Thanks for a beautifully written guide. Everything "just works" (TM). I am using the latest and greatest kernel 2.6.8.1, without any problems. The only minor issue is that for some reason, my LINEV is forever set at 000.0 . Googling / looking at the apcupsd mailing lists/manuals etc. didn't provide with much info.
Any ideas ? |
|
Back to top |
|
|
whiskeypriest Tux's lil' helper
Joined: 05 Feb 2004 Posts: 91
|
Posted: Thu Oct 07, 2004 4:29 am Post subject: |
|
|
Thanks for the kind words.
I have the same issue, but only on some units: my Back-UPS XS 800's do not report line voltage, while my Back-UPS RS 1000 does. So far as I'm aware, this is simply a limitation of the individual models and not a problem with apcupsd itself.
If you have any other questions or find information to the contrary, please post in the Troubleshooting apcupsd with USB thread. I'll add any new findings to the main document.
Meanwhile, enjoy! |
|
Back to top |
|
|
ectospasm l33t
Joined: 19 Feb 2003 Posts: 711 Location: Mobile, AL, USA
|
Posted: Thu Oct 07, 2004 11:53 am Post subject: |
|
|
I also found the guide tremendously useful. You can mark that this guide also works for AMD64 machines (I have a dual-Opteron setup), and I haven't had any problems. I have model Back-UPS RS 1500, with optional Back-UPS RS/XS 1500 battery pack. I'm running kernel 2.6.7-gentoo-r11 (2.8.x has issues with VFAT support), and I always compile everything into the kernel (no modules except NVidia). I'm running it in the standalone configuration.
All I need to do now is tweak the configuration, because during the final test, the battery was >5% and the time left was >3min, and it still shutdown. I had maybe 10-20min before it shutdown (I believe it was ~80% and ~75min left). Not a huge problem, just a minor annoyance. The other annoyance is related to the ANNOY settings: whenever the power glitches or I lose power totally, every terminal window receives the broadcast messages from root saying that power has failed and I'm running on battery, and also for when power is restored. I don't want to totally disable the messages, but they are what they're labeled, an annoyance.
A great HOWTO, thanks so much for writing it. _________________ Join the adopt an unanswered post initiative today
Join the EFF!
Join the Drug Policy Alliance! |
|
Back to top |
|
|
whiskeypriest Tux's lil' helper
Joined: 05 Feb 2004 Posts: 91
|
Posted: Thu Oct 07, 2004 4:14 pm Post subject: CHANGELOG: 10.07.04 |
|
|
CHANGELOG:
ectospasm:
Thanks for the information (especially regarding the AMD64 functionality). Ive posted a (slightly) more detailed reply in the Troubleshooting apcupsd with USB thread regarding your shutdown issue; as for the annoying ANNOY messages, yeah, theyre either annoying or not there
its ultimately up to the users discretion.
DOCUMENT EDITED TO INCLUDE THE FIRST (REPORTED) INSTANCE OF THIS HOWTO BEING SUCCESSFULLY UTILIZED ON AMD64 HARDWARE; ADDED CAVEAT REGARDING POWER MANAGEMENT; ADDED NOTES ON MISCELLANEOUS FUNCTIONALITY SECTION. |
|
Back to top |
|
|
whiskeypriest Tux's lil' helper
Joined: 05 Feb 2004 Posts: 91
|
Posted: Mon Oct 25, 2004 10:12 pm Post subject: |
|
|
Upgraded to apcupsd-3.10.15-r1 last night; spent this afternoon running full power failure tests (as opposed to abbreviated TIMEOUT tests) in light of recent developments on the troubleshooting thread. All went without incident and performed as expected.
I'm also going to begin listing the system specifications, kernel versions, and UPS models I test with here for an added degree of granularity should troubleshooting become necessary. The follow performed fine with the latest stable version of apcupsd:- P4 2.53GHz, SiS chipset, gentoo-dev-sources-2.6.9-r1, Back-UPS XS 800, standalone configuration.
- P3 600MHz, Intel chipset, gentoo-dev-sources-2.6.9-r1, Back-UPS XS 800, standalone configuration.
- Celeron 733MHz, Intel chipset, gentoo-sources-2.4.26-r9, Back-UPS RS 1000, netmaster configuration.
- Celeron 533MHz, VIA chipset, gentoo-sources-2.4.26-r9, Back-UPS RS 1000, netslave configuration.
Please post any problems to the Troubleshooting apcupsd with USB thread. |
|
Back to top |
|
|
whiskeypriest Tux's lil' helper
Joined: 05 Feb 2004 Posts: 91
|
Posted: Sat Oct 30, 2004 10:10 pm Post subject: CHANGELOG: 10.30.04 |
|
|
CHANGELOG:
Thanks go to ectospasm for providing the information which now makes up the new CALIBRATION section of the main document.
ADDED CALIBRATION SECTION. |
|
Back to top |
|
|
aaronjb Tux's lil' helper
Joined: 25 May 2003 Posts: 106 Location: Berkshire, UK
|
Posted: Fri Nov 12, 2004 10:39 pm Post subject: |
|
|
Just wanted to say thanks for an excellent HOW-TO
My SmartUPS 750 arrived today, so after spending all day drilling holes in walls and moving the servers into a big cupboard it was so nice to have something go really smoothly
In fact, all I did was skip the USB parts (I'm old school, so it's RS232 all the way for me.. plus I was feeling too damned lazy to set up USB ) and bingo, one working master and slave setup.
I'll have a fiddle with the Windows builds of apcupsd in a bit so that all three systems will be running in sync
Only downside is the UPS runs at 95% load with all three machines on - should have gotten the 1000VA - ah well you live and learn _________________ #my gentoo farm |
|
Back to top |
|
|
whiskeypriest Tux's lil' helper
Joined: 05 Feb 2004 Posts: 91
|
Posted: Mon Nov 15, 2004 3:28 pm Post subject: |
|
|
Thanks.
I'd be interested in hearing about your experiences with apcupsd under Windows; this is one area I haven't explored extensively, but would eventually like to add to the main document (for those running heterogeneous environments). |
|
Back to top |
|
|
ectospasm l33t
Joined: 19 Feb 2003 Posts: 711 Location: Mobile, AL, USA
|
Posted: Mon Nov 15, 2004 7:40 pm Post subject: |
|
|
When I get the time (which I probably won't have for more than a month) I'll play around with the Windows port of apcupsd. I'm running APC PowerChute Personal addition, and that suffices for now.
Any tips aaronjb on getting apcupsd working under Windows? I really don't like the fact that PowerChute doesn't keep a log of what goes on, so I can't be sure how long powerfail tests take. And I'm not gonna shell out for the professional addition... _________________ Join the adopt an unanswered post initiative today
Join the EFF!
Join the Drug Policy Alliance! |
|
Back to top |
|
|
mark_lagace Tux's lil' helper
Joined: 19 Nov 2002 Posts: 77 Location: Ottawa, Canada
|
Posted: Fri Dec 31, 2004 6:46 am Post subject: |
|
|
Quote: | NOTES ON MISCELLANEOUS FUNCTIONALITY:
* Currently, apcupsd on USB UPS units does not send the UPS into hibernation when it powers down the system(s) it supports. This means that while apcupsd will monitor the status of the UPS and shutdown its supported system(s) as appropriate, it will not automatically bring the UPS and its supported systems(s) back online when power returns, as the UPS itself is never shut down (unless, of course, youre without power long enough that the UPS actually exhausts itself). Please see this section of the Troubleshooting apcupsd with USB thread for more details, but this functionality should be enabled sometime in the near future. Once apcupsd includes this feature for USB UPS units, Ill update this document with general guidelines regarding the procedure for making sure your system(s) come back to life automatically following a UPS-induced shutdown. |
Assuming your UPS supports it, you can have acpupsd kill the power to your UPS. The problem lies in the default 'onbattery' script and the system 'halt' script. Here's what I did:
First things first: The Problem...
If you want your computer to automatically restart after a powerfail situation (as is the case for most servers) then you need to have a couple things set up to happen: - The system has to be set up to boot up when it gets power. This is usually just a simple BIOS setting.
- The system has to lose power! When there is a UPS attached this doesn't happen unless the UPS is told to shut off power, or it completely drains the battery (and thus has no power to provide). With proper shutdown scripts though, your system will shutdown before the UPS is completely drained, at which point there's no load on the UPS and the battery can last a very very long time. Since the computer never detects that the power was cut out, it conversely never detects that the power is back on and that it should boot up.
apcupsd is capable of sending the "--killpower" command to the UPS, but in the default setup that happened when I emerged apcupsd-3.10.15-r1 this didn't happen. After much poking around, here's what worked for me. For the record, my UPS is the APC BackUPS XS800 (model BR800 according to the USB info).
The solution.
apcupsd apparently checks for the presence of the file /etc/apcupsd/powerfail when the command to kill the ups power is sent to it. If this file does not exist, it ignores the request. If use the command /etc/apcupsd/apccontrol killpower, you'll see the following output:
Code: | Apccontrol doing: /usr/sbin/apcupsd --killpower on UPS
apcupsd FATAL ERROR in apcdevice.c at line 127
Cannot find /etc/apcupsd/powerfail file.
Killpower requested in non-power fail condition or bug.
Killpower request ignored at apcdevice.c:127
|
N.B. DO NOT DO THIS: To test out if I could get apcupsd to shut off my UPS, I manually created the /etc/apcupsd/powerfail file and re-tried the apccontrol killpower command. Lo and behold, it worked (and my system went ker-clunk as power was cruelly and heartlessly yanked from it).
Thus, all that was left was to automate the process and get it happening at the right time...
To do this, you'll need to modify 3 files. First, edit /etc/apcupsd/powerout (in my case, it's symlinked to /etc/apcupsd/onbattery). Add the following line prior to the exit 0 line:
Code: | touch /etc/apcupsd/powerfail |
This will create the file /etc/apcupsd/powerfail when apcupsd detects loss of power.
Now edit the file /etc/apcupsd/mainsback and add the following command before the exit 0 line:
Code: | rm -rf /etc/apcupsd/powerfail
|
This will get rid of that file if the power comes back. N.B. The default init script for apcupsd automatically deletes the /etc/apcupsd/powerfail file upon apcupsd startup, so you don't have to worry about modifying any startup scripts to get rid of it.
The last thing to do, is to get your shutdown scripts to call /etc/apcupsd/apccontrol killpower when they are done shutting everything down. Edit the file /etc/init.d/halt.sh and add the following commands at the end of it:
Code: | # Attempting to add APCUPSD's killpower function here
if [ -f /etc/apcupsd/powerfail ]; then
ewarn "Powerfail situation - shutting off the UPS"
/etc/apcupsd/apccontrol killpower
sleep 120
exit 1
fi
|
The "sleep 120" line is required to give apcupsd enough time to send the commands to the UPS. You may need to increase this value if it's too low for your system.
DISCLAIMER: This worked for me. I can't guarantee it will work in every situation, but the general concept is sound. The basic idea is to have your system issue the command "/etc/apcupsd/apccontrol killpower" when it shuts down, if there has been a power failure.
If there are other things that should be modified, or better places to stick the modifications, I'd appreciate any insight you might have. |
|
Back to top |
|
|
whiskeypriest Tux's lil' helper
Joined: 05 Feb 2004 Posts: 91
|
Posted: Fri Dec 31, 2004 9:47 pm Post subject: |
|
|
That's a nice piece of work, sir.
I've tested this three times on the following configuration:- P4 2.53GHz, SiS chipset, gentoo-dev-sources-2.6.8-r10, Back-UPS XS 800, standalone configuration.
...and it seems to work. The only issue I had was during the first test: I apparently forgot to restart some service or another after making the changes you advised, and was rewarded with an immediate shutdown of my system (followed shortly thereafter by the UPS unit shutting down, as advertised). After bringing the system back online, subsequent tests ran without incident i.e. UPS support until shutdown parameters reached, followed by a graceful system shutdown, followed by the UPS unit itself powering off.
I didn't expect this functionality until apcupsd-3.10.16, so while we're all waiting for that, your solution seems to be an excellent workaround. Rather than rewriting a perfectly good post, I've simply linked to it from the main document.
Please remember, all: take the proper precautions before giving this a go, e.g. back up the files you're changing, make sure your system is prepared for a sudden/possibly-catastrophic loss of power, etc. Just because two people were able to make this work doesn't make it gospel.
With all that said...thanks for posting, Mark! If anyone has any issues with this or needs help implementing it, feel free to post to the Troubleshooting apcupsd with USB thread. |
|
Back to top |
|
|
mad_turk n00b
Joined: 12 Jan 2005 Posts: 3 Location: boulder creek, ca
|
Posted: Wed Jan 19, 2005 12:28 am Post subject: |
|
|
Mr. whiskey & others,
Which version of PowerChute have you guys installed on your gentoo machines?
Thanks, _________________ DILLIGAF |
|
Back to top |
|
|
ectospasm l33t
Joined: 19 Feb 2003 Posts: 711 Location: Mobile, AL, USA
|
Posted: Wed Jan 19, 2005 5:54 pm Post subject: |
|
|
mad_turk wrote: | Mr. whiskey & others,
Which version of PowerChute have you guys installed on your gentoo machines?
Thanks, |
Unless you've got access to the Business Edition, PowerChute is Windows or MacOS only. Besides, apcupsd is a free replacement of PowerChute. I can't wait for apcupsd to support USB cables in Windows; then I can ditch PowerChute altogether... _________________ Join the adopt an unanswered post initiative today
Join the EFF!
Join the Drug Policy Alliance! |
|
Back to top |
|
|
ectospasm l33t
Joined: 19 Feb 2003 Posts: 711 Location: Mobile, AL, USA
|
Posted: Fri Jan 28, 2005 4:56 pm Post subject: |
|
|
My hard drive crashed, and so I have to go through the apcupsd setup again. Again, great job on this HOWTO whiskeypriest.
I have some suggestions, though:
- You might want to mention that with the current version of apcupsd (3.10.16), the /etc/apcupsd/apcupsd.conf file has a heavy dose of comments, so it's quite easy to figure out what each option does, and tailor it for your needs. RTFM (or RTFConfigFile) would apply here.
- In the Communications Test, where you disconnect the USB cable, you might want to mention that the message in /var/log/apcupsd.events may not appear immediately. It didn't for me just now. However, it did recognize the reconnect immediately. I think you should say that YMMV.
- Another thing you can mention is that you can comment out the Wall=wall variable in /etc/apcupsd/apccontrol to get rid of those annoying console messages. Just make sure to note that (according the apcupsd docs) it will be replaced when you upgrade apcupsd. I couldn't figure a better place to do it.
I'm about to do the full powerfail test. I'll come back and edit this if there are any other suggestions I can make.
[edit]Added the "comment out Wall=wall" suggestion _________________ Join the adopt an unanswered post initiative today
Join the EFF!
Join the Drug Policy Alliance! |
|
Back to top |
|
|
whiskeypriest Tux's lil' helper
Joined: 05 Feb 2004 Posts: 91
|
Posted: Mon Jan 31, 2005 11:19 pm Post subject: |
|
|
ectospasm:
First off, thanks for the input. Let me take this point-by-point...
ectospasm wrote: | You might want to mention that with the current version of apcupsd (3.10.16), the /etc/apcupsd/apcupsd.conf file has a heavy dose of comments, so it's quite easy to figure out what each option does, and tailor it for your needs. RTFM (or RTFConfigFile) would apply here. |
I'm glad to hear it; I haven't seen 3.10.16 yet, because I don't have the appropriate keywords enabled for apcupsd. While part of me would very much like to see what's coming, I don't feel it's appropriate to maintain one version of this HOWTO for the stable release and another for the currently-masked version. I think the HOWTO is verging on unwieldy as-is and such additions would probably add more confusion to what was supposed to be a straightforward procedure. Corollary to this is the fact that my time is very limited these days, and there just aren't enough hours in my day to maintain parallel documents.
All that said, I'm glad to hear they've added more comments to the configuration file; I'm sure many (myself included) will find those comments useful. I make numerous exhortations to check out the apcupsd User's Manual within the course of the HOWTO, and I expect serious users to pay attention to their configuration files...but this is still a HOWTO, written to assist people in achieving functionality with a minimum of fuss and hair-pulling. I don't believe RTFM (or RTFConfigFile) has a place in most HOWTO's, despite the fact that it's very good advice.
ectospasm wrote: | In the Communications Test, where you disconnect the USB cable, you might want to mention that the message in /var/log/apcupsd.events may not appear immediately. It didn't for me just now. However, it did recognize the reconnect immediately. I think you should say that YMMV. |
Never experienced this personally, but my experience isn't universal. Done.
ectospasm wrote: | Another thing you can mention is that you can comment out the Wall=wall variable in /etc/apcupsd/apccontrol to get rid of those annoying console messages. Just make sure to note that (according the apcupsd docs) it will be replaced when you upgrade apcupsd. I couldn't figure a better place to do it. |
Done.
I realize there are those who might construe my comments here as snotty or defensive; that's certainly not my intention. I appreciate any feedback on the HOWTO and will incorporate it into the document as I feel appropriate. My only purpose in the above lines is to clarify my position with regards to the HOWTO's purpose and direction within my present capabilities.
Once again, thanks for the input and I'm glad to hear your system's running once again. |
|
Back to top |
|
|
tnt Veteran
Joined: 27 Feb 2004 Posts: 1221
|
Posted: Wed Mar 16, 2005 4:01 am Post subject: |
|
|
mark_lagace wrote: | # Attempting to add APCUPSD's killpower function here
if [ -f /etc/apcupsd/powerfail ]; then
ewarn "Powerfail situation - shutting off the UPS"
/etc/apcupsd/apccontrol killpower
sleep 120
exit 1
fi |
Well, I've done those modifications and I've menaged to bring down system and power off UPS after that (so, my computer lost power and turned off, too).
But, after few minutes I've put power cord back to the UPS and nothing happened. UPS stayed powered off. I've waited for 15 minutes (to charge a battery a little bit, although it was almost full), and nothing happened again. When I switched on UPS manually, my computer turned on emediately, as was intendend.
Is there any way to explain my UPS it should be switching itself on when power comes back?
P.S. I'm using APC Back-UPS CS 500 _________________ gentoo user |
|
Back to top |
|
|
whiskeypriest Tux's lil' helper
Joined: 05 Feb 2004 Posts: 91
|
Posted: Sun Mar 20, 2005 8:01 pm Post subject: |
|
|
Sorry for the delay in replying to this; been on the road the past week.
I've done some digging around the apcupsd-users list, and found this. Scroll down to the bottom for the official word, but I infer that the CS-series currently has issues "hibernating" properly. This will hopefully be resolved in 3.10.17, but since 3.10.16 has yet to become stable in Portage, I couldn't tell you when that'll happen...
If you have any luck sorting this, please feel free to post; should you have any other questions, please post them to the Troubleshooting apcupsd with USB thread. |
|
Back to top |
|
|
tnt Veteran
Joined: 27 Feb 2004 Posts: 1221
|
|
Back to top |
|
|
ectospasm l33t
Joined: 19 Feb 2003 Posts: 711 Location: Mobile, AL, USA
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|