[gentoo-user] apcupsd no wall messages
I installed apcupsd and testing it I don't see any message being broadcasted via wall when I unplug the power. setting: UPSCABLE 940-0024C usb UPSTYPE usb DEVICE POLLTIME 30 LOCKFILE /run/apcupsd SCRIPTDIR /etc/apcupsd PWRFAILDIR /etc/apcupsd NOLOGINDIR /etc ONBATTERYDELAY 10 BATTERYLEVEL 10 MINUTES 5 TIMEOUT 0 ANNOY 45 ANNOYDELAY 90 NOLOGON disable KILLDELAY 0 NETSERVER on NISIP 127.0.0.1 NISPORT 3551 EVENTSFILE /var/log/apcupsd.events EVENTSFILEMAX 25 UPSCLASS standalone UPSMODE disable STATTIME 0 STATFILE /var/log/apcupsd.status LOGSTATS off DATATIME 0 -- Thelma
Re: [gentoo-user] apcupsd - not emailing me when power down
On Saturday 06 Jun 2015 23:53:31 Joseph wrote: > My remote box is connected direclty to apcups and it is running "apcupsd" > However, when I pull the cord out of the wall the "onbattery" script is not > email me anything. > > My configuration: apcupsd.conf > > UPSCABLE usb > UPSTYPE usb > DEVICE > POLLTIME 60 > LOCKFILE /var/lock > SCRIPTDIR /etc/apcupsd > PWRFAILDIR /etc/apcupsd > NOLOGINDIR /etc > ONBATTERYDELAY 6 > BATTERYLEVEL 60 > MINUTES 10 > TIMEOUT 0 > ANNOY 300 > ANNOYDELAY 60 > NOLOGON disable > KILLDELAY 0 > NETSERVER on > NISIP 0.0.0.0 > NISPORT 3551 > EVENTSFILE /var/log/apcupsd.events > EVENTSFILEMAX 10 > UPSCLASS standalone > UPSMODE disable > STATTIME 0 > STATFILE /var/log/apcupsd.status > LOGSTATS off > DATATIME 0 > > onbattery - script suppose to be called by "/etc/apcupsd/apccontrol" and > execute it. What am I missing? I don't have this UPS to know what its scripts are doing, but have you configured the /etc/apcupsd/onbattery script with your email address and have you installed a mail application to handle emailing tasks on your system? -- Regards, Mick signature.asc Description: This is a digitally signed message part.
[gentoo-user] apcupsd - not emailing me when power down
My remote box is connected direclty to apcups and it is running "apcupsd" However, when I pull the cord out of the wall the "onbattery" script is not email me anything. My configuration: apcupsd.conf UPSCABLE usb UPSTYPE usb DEVICE POLLTIME 60 LOCKFILE /var/lock SCRIPTDIR /etc/apcupsd PWRFAILDIR /etc/apcupsd NOLOGINDIR /etc ONBATTERYDELAY 6 BATTERYLEVEL 60 MINUTES 10 TIMEOUT 0 ANNOY 300 ANNOYDELAY 60 NOLOGON disable KILLDELAY 0 NETSERVER on NISIP 0.0.0.0 NISPORT 3551 EVENTSFILE /var/log/apcupsd.events EVENTSFILEMAX 10 UPSCLASS standalone UPSMODE disable STATTIME 0 STATFILE /var/log/apcupsd.status LOGSTATS off DATATIME 0 onbattery - script suppose to be called by "/etc/apcupsd/apccontrol" and execute it. What am I missing? -- Joseph
Re: [gentoo-user] apcupsd to recycle power
On Friday, November 14, 2014 08:53:13 PM Thanasis wrote: > I have an APC SC620I, which in case of power failure, it successfully > initiates a shutdown to the connected (via SMART cable) PC, but if the > mains power returns, the UPS does not recycle the power to the PC, and > consequently the PC stays off. Not all UPSs have functionality to cycle the power outputs when the power returns. And some that do require a specific command to be sent to it to enable this, which might need some closed-source client that only works on MS Windows. A few years ago there was a message on the nut website asking for a boycot of APC because they changed the protocol and refuse to provide info on it, forcing people to use the APC bloatware. (Requiring Java just to talk to a UPS?) -- Joost
Re: [gentoo-user] apcupsd to recycle power
on 11/17/2014 03:06 AM thegeezer wrote the following: the only way forward that i see would be to get a small device a la raspberry pi, and have that run apcupsd on it. you can then have that device run wake on lan if it detects the power is good, and trigger remote shutdown when not. Thanks. I am going to try and do some more tests though ...
Re: [gentoo-user] apcupsd to recycle power
On 15/11/2014 16:47, Daniel Frey wrote: If the above fails (if the above does indeed fail, some troubleshooting should happen to try to figure out why it doesn't work), KILLDELAY is the parameter you likely seek, but it is dangerous. If you set this it will wait x seconds after a shutdown was requested and forcibly shut down the UPS power. However, in the even that power is restored between the UPS kill and the time it actually turns off the mains will still not be cycled. But theoretically this window should be pretty small. Dan it does seem as though this hits the issue - that when power fails, the ups triggers a shutdown, but the power doesn't fail hard enough to wind down the ups too, in which case the machine that is waiting for the "offbattery" event is fast asleep and misses the message. it's a shame the killpower command does nothing for you. the only way forward that i see would be to get a small device a la raspberry pi, and have that run apcupsd on it. you can then have that device run wake on lan if it detects the power is good, and trigger remote shutdown when not.
Re: [gentoo-user] apcupsd to recycle power
On Saturday 15 Nov 2014 16:54:26 Thanasis wrote: > on 11/15/2014 04:59 PM Mick wrote the following: > > Have you been through them and in particular the "Full Power Down Test"? > > If yes, did you wait long enough after the PC has powered down, for the > > UPS to also switch off (you can affect the overall waiting time by > > setting a shorter TIMEOUT value, rather than waiting for the batteries > > to go flat). > > Yes I have set the TIMEOUT to 30 (seconds) in /etc/apcupsd/apcupsd.conf, > and run the tests. Waited more than 3 minutes after the PC powers off, > the UPS will not kill the power. Hmm ... I'm running out of ideas. :-( > > If this does not get you somewhere, I recommend you post to the > > nut-upsu...@lists.alioth.debian.org (you'll need to register first). > > Is the above list (nut-upsu...@lists.alioth.debian.org) also appropriate > for apcupsd users? I'm sure I saw threads there on APC UPS, so yes it won't hurt if you post there. > > PS. The services I listed running are particular to my UPS, I expect > > different to your APC unit. > > Yes, because they belong to sys-power/nut. I 've been talking about > sys-power/apcupsd, as I said in first post. > (Should I switch to sys-power/nut?) You can try sys-power/nut, and use something like: sudo /opt/local/bin/usbhid-ups -a apcups -DD to get some debug info from your UPS, after you set up the configuration files. You could either try the apcupsd-ups driver which acts as an apcupsd client, or you give usbhid-ups a spin as I show above. In any case, I trust that the guys at the nut M/L will give sound advice for your particular UPS - unless some gentoo user with this UPS chimes in first. HTH. -- Regards, Mick signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] apcupsd to recycle power
On 11/15/2014 09:05 AM, Thanasis wrote: >> >> However, in the even that power is restored between the UPS kill and the >> time it actually turns off the mains will still not be cycled. > > Why would this be so? > That was a musing, it wasn't based on testing. On most UPS systems I've seen when the power comes back the UPS resets. As I said, you can time your shutdown and set KILLDELAY, but make sure you add some extra time in case the shutdown takes longer than expected. `man apcupsd.conf` only has a two-sentence description for killdelay usage. Dan
Re: [gentoo-user] apcupsd to recycle power
on 11/15/2014 06:47 PM Daniel Frey wrote the following: On 11/14/2014 10:53 AM, Thanasis wrote: I have an APC SC620I, which in case of power failure, it successfully initiates a shutdown to the connected (via SMART cable) PC, but if the mains power returns, the UPS does not recycle the power to the PC, and consequently the PC stays off. Regardless if the mains power returns soon after the UPS has initiated a shutdown to the PC, shouldn't the UPS recycle the power anyway, so that the PC comes back on as set in BIOS? I assume that your PC shuts off thus reducing the load - and, of course, this increases the runtime of the remaining battery so the UPS never actually shuts down? I don't think you can get apcupsd in any case to cycle the outlet groups, but you can try a couple things. First, is apcupsd even sending the signal to shutdown the UPS? /etc/init.d/apcupsd.powerfail needs to be added to the shutdown runlevel: `rc-update add apcupsd.powerfail shutdown` I have even tried to run the command "/sbin/apcupsd --killpower" from a root terminal (while in default runlevel, after manually creating the file /etc/apcupsd/powerfail) and nothing happened. At the end of the shutdown this is run and it tells the UPS to power off. If you have multiple PCs this should be enabled on the slowest to shutdown to make sure it doesn't kill a machine still shutting down. Am I missing something in the configuration or the daemons that should be running? (Running sys-power/apcupsd-3.14.8-r2) /etc/apcupsd/apcupsd.conf folows: KILLDELAY 0 If the above fails (if the above does indeed fail, some troubleshooting should happen to try to figure out why it doesn't work), KILLDELAY is the parameter you likely seek, but it is dangerous. If you set this it will wait x seconds after a shutdown was requested and forcibly shut down the UPS power. However, in the even that power is restored between the UPS kill and the time it actually turns off the mains will still not be cycled. Why would this be so? But theoretically this window should be pretty small. Dan
Re: [gentoo-user] apcupsd to recycle power
on 11/15/2014 04:59 PM Mick wrote the following: On Saturday 15 Nov 2014 14:22:47 Thanasis wrote: The PC has an option in BIOS to "Power On" when the mains power is restored to it, without any need to press any button. So, once the UPS has initiated a shutdown to the PC, the PC will shutdown, and if the mains power is restored (to the UPS) shortly after the PC has shutdown, how will the UPS make the PC come back on, unless it cuts (kills) the power to PC's cord, and then restores it after a few seconds. See the link Mick posted in his reply: http://www.apcupsd.com/manual/manual.html#arranging-for-reboot-on-power-up On the same page it lists a number of tests you can perform: http://www.apcupsd.com/manual/manual.html#testing-apcupsd Have you been through them and in particular the "Full Power Down Test"? If yes, did you wait long enough after the PC has powered down, for the UPS to also switch off (you can affect the overall waiting time by setting a shorter TIMEOUT value, rather than waiting for the batteries to go flat). Yes I have set the TIMEOUT to 30 (seconds) in /etc/apcupsd/apcupsd.conf, and run the tests. Waited more than 3 minutes after the PC powers off, the UPS will not kill the power. If this does not get you somewhere, I recommend you post to the nut-upsu...@lists.alioth.debian.org (you'll need to register first). Is the above list (nut-upsu...@lists.alioth.debian.org) also appropriate for apcupsd users? The developers and contributors are offering friendly advice and are very knowledgeable on all things UPS related, including annoying bugs with firmware that defeat reason. PS. The services I listed running are particular to my UPS, I expect different to your APC unit. Yes, because they belong to sys-power/nut. I 've been talking about sys-power/apcupsd, as I said in first post. (Should I switch to sys-power/nut?)
Re: [gentoo-user] apcupsd to recycle power
On 11/14/2014 10:53 AM, Thanasis wrote: > I have an APC SC620I, which in case of power failure, it successfully > initiates a shutdown to the connected (via SMART cable) PC, but if the > mains power returns, the UPS does not recycle the power to the PC, and > consequently the PC stays off. > > Regardless if the mains power returns soon after the UPS has initiated a > shutdown to the PC, shouldn't the UPS recycle the power anyway, so that > the PC comes back on as set in BIOS? I assume that your PC shuts off thus reducing the load - and, of course, this increases the runtime of the remaining battery so the UPS never actually shuts down? I don't think you can get apcupsd in any case to cycle the outlet groups, but you can try a couple things. First, is apcupsd even sending the signal to shutdown the UPS? /etc/init.d/apcupsd.powerfail needs to be added to the shutdown runlevel: `rc-update add apcupsd.powerfail shutdown` At the end of the shutdown this is run and it tells the UPS to power off. If you have multiple PCs this should be enabled on the slowest to shutdown to make sure it doesn't kill a machine still shutting down. > > Am I missing something in the configuration or the daemons that should > be running? > > (Running sys-power/apcupsd-3.14.8-r2) > > /etc/apcupsd/apcupsd.conf folows: > KILLDELAY 0 If the above fails (if the above does indeed fail, some troubleshooting should happen to try to figure out why it doesn't work), KILLDELAY is the parameter you likely seek, but it is dangerous. If you set this it will wait x seconds after a shutdown was requested and forcibly shut down the UPS power. However, in the even that power is restored between the UPS kill and the time it actually turns off the mains will still not be cycled. But theoretically this window should be pretty small. Dan
Re: [gentoo-user] apcupsd to recycle power
on 11/15/2014 04:40 PM Rich Freeman wrote the following: On Sat, Nov 15, 2014 at 8:54 AM, Bruce Schultz wrote: If the UPS battery has not run flat before the mains power is restored, I see no reason why a UPS should kill the output power. So the BIOS has no real way of knowing that it should reboot again in that case. Obviously not directly applicable, but I use nut and a cyberpower UPS and the shutdown scheme it employs is that the master (controls the UPS) commands everything else to shut down, then it begins shutdown, and just before powering off it sends a command to the UPS which causes a several second delay followed by a power off, and then it powers off the host (which is otherwise shutdown already). I need to re-read how exactly this is implemented. As I wrote in the initial post I am running apcupsd because my UPS is an APC (... should I switch to sys-power/nut ?)
Re: [gentoo-user] apcupsd to recycle power
On Saturday 15 Nov 2014 14:22:47 Thanasis wrote: > on 11/15/2014 03:54 PM Bruce Schultz wrote the following: > > If the UPS battery has not run flat before the mains power is restored, > > I see no reason why a UPS should kill the output power. > > The PC has an option in BIOS to "Power On" when the mains power is > restored to it, without any need to press any button. > So, once the UPS has initiated a shutdown to the PC, the PC will > shutdown, and if the mains power is restored (to the UPS) shortly after > the PC has shutdown, how will the UPS make the PC come back on, unless > it cuts (kills) the power to PC's cord, and then restores it after a few > seconds. > See the link Mick posted in his reply: > http://www.apcupsd.com/manual/manual.html#arranging-for-reboot-on-power-up On the same page it lists a number of tests you can perform: http://www.apcupsd.com/manual/manual.html#testing-apcupsd Have you been through them and in particular the "Full Power Down Test"? If yes, did you wait long enough after the PC has powered down, for the UPS to also switch off (you can affect the overall waiting time by setting a shorter TIMEOUT value, rather than waiting for the batteries to go flat). If this does not get you somewhere, I recommend you post to the nut-upsu...@lists.alioth.debian.org (you'll need to register first). The developers and contributors are offering friendly advice and are very knowledgeable on all things UPS related, including annoying bugs with firmware that defeat reason. PS. The services I listed running are particular to my UPS, I expect different to your APC unit. -- Regards, Mick signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] apcupsd to recycle power
On Sat, Nov 15, 2014 at 8:54 AM, Bruce Schultz wrote: > > If the UPS battery has not run flat before the mains power is restored, I > see no reason why a UPS should kill the output power. So the BIOS has no > real way of knowing that it should reboot again in that case. > Obviously not directly applicable, but I use nut and a cyberpower UPS and the shutdown scheme it employs is that the master (controls the UPS) commands everything else to shut down, then it begins shutdown, and just before powering off it sends a command to the UPS which causes a several second delay followed by a power off, and then it powers off the host (which is otherwise shutdown already). I need to re-read how exactly this is implemented. -- Rich
Re: [gentoo-user] apcupsd to recycle power
on 11/15/2014 03:54 PM Bruce Schultz wrote the following: If the UPS battery has not run flat before the mains power is restored, I see no reason why a UPS should kill the output power. The PC has an option in BIOS to "Power On" when the mains power is restored to it, without any need to press any button. So, once the UPS has initiated a shutdown to the PC, the PC will shutdown, and if the mains power is restored (to the UPS) shortly after the PC has shutdown, how will the UPS make the PC come back on, unless it cuts (kills) the power to PC's cord, and then restores it after a few seconds. See the link Mick posted in his reply: http://www.apcupsd.com/manual/manual.html#arranging-for-reboot-on-power-up
Re: [gentoo-user] apcupsd to recycle power
On 15/11/14 22:52, Thanasis wrote: on 11/15/2014 11:35 AM Mick wrote the following: On Friday 14 Nov 2014 18:53:13 Thanasis wrote: I have an APC SC620I, which in case of power failure, it successfully initiates a shutdown to the connected (via SMART cable) PC, but if the mains power returns, the UPS does not recycle the power to the PC, and consequently the PC stays off. Regardless if the mains power returns soon after the UPS has initiated a shutdown to the PC, shouldn't the UPS recycle the power anyway, so that the PC comes back on as set in BIOS? Am I missing something in the configuration or the daemons that should be running? Is it that the UPS does not recycle the power, The UPS does NOT recycle the power. or is it that the PC does not reboot after power is restored? Does the PC reboot if you pull and reinsert its mains plug? The PC's BIOS is correctly configured and tested to start up as soon as power is restored to it. Have a look here if you haven't seen this section already: http://www.apcupsd.com/manual/manual.html#arranging-for-reboot-on-power-up Looks like the UPS does not cut (kill) the power, but I am not sure how to debug it. If the UPS battery has not run flat before the mains power is restored, I see no reason why a UPS should kill the output power. So the BIOS has no real way of knowing that it should reboot again in that case. Have you looked for any BIOS options related to powering on from a USB device? eg, I'm thinking of PCs which can be switched on by pressing a key on the keyboard... could that mechanism be triggered by a UPS? Or perhaps via wake-on-lan? (Note I have no real experience with UPSs, I'm just trying to think of other ways that PCs can be made to power on). Bruce -- :b
Re: [gentoo-user] apcupsd to recycle power
on 11/15/2014 11:35 AM Mick wrote the following: On Friday 14 Nov 2014 18:53:13 Thanasis wrote: I have an APC SC620I, which in case of power failure, it successfully initiates a shutdown to the connected (via SMART cable) PC, but if the mains power returns, the UPS does not recycle the power to the PC, and consequently the PC stays off. Regardless if the mains power returns soon after the UPS has initiated a shutdown to the PC, shouldn't the UPS recycle the power anyway, so that the PC comes back on as set in BIOS? Am I missing something in the configuration or the daemons that should be running? (Running sys-power/apcupsd-3.14.8-r2) /etc/apcupsd/apcupsd.conf folows: UPSNAME SC620I UPSCABLE smart UPSTYPE apcsmart DEVICE /dev/ttyS0 LOCKFILE /var/lock SCRIPTDIR /etc/apcupsd PWRFAILDIR /etc/apcupsd NOLOGINDIR /etc ONBATTERYDELAY 6 BATTERYLEVEL 20 MINUTES 2 TIMEOUT 0 ANNOY 300 ANNOYDELAY 60 NOLOGON disable KILLDELAY 0 NETSERVER on NISIP 192.168.0.1 NISPORT 3551 EVENTSFILE /var/log/apcupsd.events EVENTSFILEMAX 10 UPSCLASS standalone UPSMODE disable STATTIME 600 STATFILE /var/log/apcupsd.status LOGSTATS off DATATIME 0 BATTDATE 10/17/11 SENSITIVITY H WAKEUP 60 SLEEP 180 LOTRANSFER 208 HITRANSFER 253 RETURNCHARGE 45 BEEPSTATE L LOWBATT 5 OUTPUTVOLTS 230 SELFTEST 336 I'm afraid I don't have an APC UPS to know its quirks, but in my case I have these running: upsd upsdrv upslog upsmon the above are not part of apcupsd, are they? Is it that the UPS does not recycle the power, The UPS does NOT recycle the power. or is it that the PC does not reboot after power is restored? Does the PC reboot if you pull and reinsert its mains plug? The PC's BIOS is correctly configured and tested to start up as soon as power is restored to it. WARNING: don't just pull the plug in a fully working system to avoid fs corruption - Press something r e i s u in sequence while holding Ctrl+Alt+SysRq and then pull the plug. If the PC's BIOS is configured correctly it should reboot as soon as you reconnect the mains supply to it. I am aware of it. Have a look here if you haven't seen this section already: http://www.apcupsd.com/manual/manual.html#arranging-for-reboot-on-power-up Looks like the UPS does not cut (kill) the power, but I am not sure how to debug it.
Re: [gentoo-user] apcupsd to recycle power
On Friday 14 Nov 2014 18:53:13 Thanasis wrote: > I have an APC SC620I, which in case of power failure, it successfully > initiates a shutdown to the connected (via SMART cable) PC, but if the > mains power returns, the UPS does not recycle the power to the PC, and > consequently the PC stays off. > > Regardless if the mains power returns soon after the UPS has initiated a > shutdown to the PC, shouldn't the UPS recycle the power anyway, so that > the PC comes back on as set in BIOS? > > Am I missing something in the configuration or the daemons that should > be running? > > (Running sys-power/apcupsd-3.14.8-r2) > > /etc/apcupsd/apcupsd.conf folows: > > UPSNAME SC620I > UPSCABLE smart > UPSTYPE apcsmart > DEVICE /dev/ttyS0 > LOCKFILE /var/lock > SCRIPTDIR /etc/apcupsd > PWRFAILDIR /etc/apcupsd > NOLOGINDIR /etc > ONBATTERYDELAY 6 > BATTERYLEVEL 20 > MINUTES 2 > TIMEOUT 0 > ANNOY 300 > ANNOYDELAY 60 > NOLOGON disable > KILLDELAY 0 > NETSERVER on > NISIP 192.168.0.1 > NISPORT 3551 > EVENTSFILE /var/log/apcupsd.events > EVENTSFILEMAX 10 > UPSCLASS standalone > UPSMODE disable > STATTIME 600 > STATFILE /var/log/apcupsd.status > LOGSTATS off > DATATIME 0 > BATTDATE 10/17/11 > SENSITIVITY H > WAKEUP 60 > SLEEP 180 > LOTRANSFER 208 > HITRANSFER 253 > RETURNCHARGE 45 > BEEPSTATE L > LOWBATT 5 > OUTPUTVOLTS 230 > SELFTEST 336 I'm afraid I don't have an APC UPS to know its quirks, but in my case I have these running: upsd upsdrv upslog upsmon Is it that the UPS does not recycle the power, or is it that the PC does not reboot after power is restored? Does the PC reboot if you pull and reinsert its mains plug? WARNING: don't just pull the plug in a fully working system to avoid fs corruption - Press something r e i s u in sequence while holding Ctrl+Alt+SysRq and then pull the plug. If the PC's BIOS is configured correctly it should reboot as soon as you reconnect the mains supply to it. Have a look here if you haven't seen this section already: http://www.apcupsd.com/manual/manual.html#arranging-for-reboot-on-power-up -- Regards, Mick signature.asc Description: This is a digitally signed message part.
[gentoo-user] apcupsd to recycle power
I have an APC SC620I, which in case of power failure, it successfully initiates a shutdown to the connected (via SMART cable) PC, but if the mains power returns, the UPS does not recycle the power to the PC, and consequently the PC stays off. Regardless if the mains power returns soon after the UPS has initiated a shutdown to the PC, shouldn't the UPS recycle the power anyway, so that the PC comes back on as set in BIOS? Am I missing something in the configuration or the daemons that should be running? (Running sys-power/apcupsd-3.14.8-r2) /etc/apcupsd/apcupsd.conf folows: UPSNAME SC620I UPSCABLE smart UPSTYPE apcsmart DEVICE /dev/ttyS0 LOCKFILE /var/lock SCRIPTDIR /etc/apcupsd PWRFAILDIR /etc/apcupsd NOLOGINDIR /etc ONBATTERYDELAY 6 BATTERYLEVEL 20 MINUTES 2 TIMEOUT 0 ANNOY 300 ANNOYDELAY 60 NOLOGON disable KILLDELAY 0 NETSERVER on NISIP 192.168.0.1 NISPORT 3551 EVENTSFILE /var/log/apcupsd.events EVENTSFILEMAX 10 UPSCLASS standalone UPSMODE disable STATTIME 600 STATFILE /var/log/apcupsd.status LOGSTATS off DATATIME 0 BATTDATE 10/17/11 SENSITIVITY H WAKEUP 60 SLEEP 180 LOTRANSFER 208 HITRANSFER 253 RETURNCHARGE 45 BEEPSTATE L LOWBATT 5 OUTPUTVOLTS 230 SELFTEST 336
[gentoo-user] apcupsd settings for hibernate+shutdown?
I'm running an APC UPS on Gentoo linux (Back-UPS XS 1300G). Up till now, I've used the UPS in "dumb" mode; i.e. no acpusd running. My main concern has been short power blips, and under/over-voltage. All I wanted was a few minutes to shut down or hibernate the PC before the battery gave out. I've enabled the "Master/Controlled outlets" feature. I have the PC plugged into the Master, and a surgeprotector powerbar into a Controlled outlet. The monitor/speakers/modem/etc are plugged into the surgeprotector. When I manually hibernate the PC, the ups cuts off power to the peripherals connected to the surgeprotector (connected to the "Controlled outlet"). I may be getting a contract soon that involves crunching huge text files, with multi-hour overnight data runs, etc. I'll launch a run, and leave things unattended for hours on end. Let's assume I start a run, go away for the day, and a power outage hits. My Google searches always seem to turn up hits involving sending warning messages to users that the system may be going down soon. What I actually want to happen in an extended power outage is... * have the system execute the command "/usr/sbin/hibernate" to save program state, etc to disk, and then shut down. * shut down the APC ups afterwards. Note that once "/usr/sbin/hibernate" is launched, you have to assume that the ups immediately loses contact with the PC, ***BUT THE UPS MUST STAY ON FOR A COUPLE OF MINUTES AFTERWARD*** to give the PC time to shut down gracefully. Will "KILLDELAY 180" give 3 minutes safety margin? And what do I have to do to get it to execute "/usr/sbin/hibernate"? As per instructions from the install, I've done... rc-update add apcupsd.powerfail shutdown ...which is supposed to tell the ups to shut down when the PC shuts down. Colour me confused... * does the ups not shut itself down due to BATTERYLEVEL/MINUTES/TIMEOUT? * if so, why does it need the "apcupsd.powerfail" service in my PC's shutdown runlevel? Here are my config file and apcaccess status output... *** /etc/apcupsd/apcupsd.conf file *** UPSCABLE usb UPSTYPE usb LOCKFILE /var/lock SCRIPTDIR /etc/apcupsd PWRFAILDIR /etc/apcupsd NOLOGINDIR /etc ONBATTERYDELAY 6 BATTERYLEVEL 15 MINUTES 5 TIMEOUT 0 ANNOY 300 ANNOYDELAY 60 NOLOGON disable KILLDELAY 180 NETSERVER on NISIP 0.0.0.0 NISPORT 3551 EVENTSFILE /var/log/apcupsd.events EVENTSFILEMAX 10 UPSCLASS standalone UPSMODE disable STATTIME 0 STATFILE /var/log/apcupsd.status LOGSTATS off DATATIME 0 *** apcaccess status *** APC : 001,037,0914 DATE : 2013-01-13 03:17:56 -0500 HOSTNAME : d531 VERSION : 3.14.8 (16 January 2010) gentoo UPSNAME : d531 CABLE: USB Cable MODEL: Back-UPS XS 1300G UPSMODE : Stand Alone STARTTIME: 2013-01-13 03:15:05 -0500 STATUS : ONLINE LINEV: 122.0 Volts LOADPCT : 7.0 Percent Load Capacity BCHARGE : 100.0 Percent TIMELEFT : 60.0 Minutes MBATTCHG : 15 Percent MINTIMEL : 5 Minutes MAXTIME : 0 Seconds SENSE: High LOTRANS : 088.0 Volts HITRANS : 136.0 Volts ALARMDEL : Always BATTV: 27.2 Volts LASTXFER : No transfers since turnon NUMXFERS : 0 TONBATT : 0 seconds CUMONBATT: 0 seconds XOFFBATT : N/A SELFTEST : NO STATFLAG : 0x0708 Status Flag MANDATE : 2012-07-06 SERIALNO : [ deleted ] BATTDATE : 2012-07-06 NOMINV : 120 Volts NOMBATTV : 24.0 Volts NOMPOWER : 780 Watts FIRMWARE : 864.L6 .D USB FW:L6 APCMODEL : Back-UPS XS 1300G END APC : 2013-01-13 03:17:56 -0500 -- Walter Dnes I don't run "desktop environments"; I run useful applications
Re: [gentoo-user] apcupsd
Sorry, sorry... I just needed to point my browser to cgi-bin/multimin.cgi rather than apcupsd/multimon.cgi... On Mon, Mar 17, 2008 at 09:32:43PM -0400, Michael George wrote: > Today I upgraded apcupsd from 3.10.18-r1 to 3.12.4. The ebuild installs > the files differently than it did and webapp-config is used for the > "install". > > When the emerge is complete, the cgi files are installed into > /var/www/localhost/cgi-bin and are owned by root. There is also a > directory /var/www/localhost/htdocs/apcupsd/, but only the webapp-config > files are in there. > > When I try to access upsstats.cgi with the same path I used to use, I > get "URL not found". The HOWTO discusses the configuration as was done > in 3.10, not with webapp-config. > > Where should I go for more reading to learn how to configure my apache > configs so that I can access those pages again? > > Thanks! > -- > -Michael > > -- > gentoo-user@lists.gentoo.org mailing list > -- -M There are 10 kinds of people in this world: Those who can count in binary and those who cannot. -- gentoo-user@lists.gentoo.org mailing list
[gentoo-user] apcupsd
Today I upgraded apcupsd from 3.10.18-r1 to 3.12.4. The ebuild installs the files differently than it did and webapp-config is used for the "install". When the emerge is complete, the cgi files are installed into /var/www/localhost/cgi-bin and are owned by root. There is also a directory /var/www/localhost/htdocs/apcupsd/, but only the webapp-config files are in there. When I try to access upsstats.cgi with the same path I used to use, I get "URL not found". The HOWTO discusses the configuration as was done in 3.10, not with webapp-config. Where should I go for more reading to learn how to configure my apache configs so that I can access those pages again? Thanks! -- -Michael -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] apcupsd - apache module
> Is there an apache module for apcupsd or is it installed during emerge> apcupsd? Add the "cgi" USE flag, and re-emerge. It'll get installed automagically.
Re: [gentoo-user] apcupsd - apache module
Hi Joseph, * Joseph <[EMAIL PROTECTED]>, Tuesday, September 6, 2005, 4:27:36 AM: > Is there an apache module for apcupsd or is it installed during emerge > apcupsd? An apache module? You mean some webpage with statistic functions? Have a look at nut (http://www.networkupstools.org/). There are some howtos on the web that explain how to integrate nut with rrd-tool (IIRC). Timo -- gentoo-user@gentoo.org mailing list
[gentoo-user] apcupsd - apache module
Is there an apache module for apcupsd or is it installed during emerge apcupsd? If so how to enable it? I have a link to http://127.0.0.1/apcupsd/multimon.cgi but it doesn't work anymore, it must have been removed during recent updates. -- #Joseph -- gentoo-user@gentoo.org mailing list