nut.user.u830 at neverbox.com
2018-Feb-01 12:23 UTC
[Nut-upsuser] testing shutdown: pc not restarting; and "ups unavailable" messages
> When a UPS unit performs a delayed power off (NUT sets the delay to 20 seconds > by default) it deconnects its power outlets which in some UPS units produces an > audible "clunk". The display of lights on the front panel changes, and the > beeping stops. The delayed power off can be demonstrated with a light bulb or a > mains circuit tester connected to one of the UPS power outlets.Out of curiosity: if the PC has already been switched off from software by the shutdown script, how would it know that the power has been cut while it was off? Are you telling me that the power supply of the PC keeps checking its incoming AC supply even while off, and that with the BIOS setting I selected it will wake up the PC even after a power cut DURING WHICH the PC was already off? I never imagined that... I guess it's something I could try independently, once I find a quiet time with no disk activity when it's OK to shut down that computer.> I looked at the product documentation at > https://www.cyberpower.com/uk/en/product/sku/Value800EILCD and could find > nothing about shutting down the UPS power outlets. Although the 800EILCD is able > to turn off the beeper, this in itself is not sufficient. The proposed typical > applications include NAS & Servers so it should be possible. Perhaps you could > ask the Cyber Power support people if the 800EILCD has this function.What exactly should I be asking? "Is it possible to switch off the power to the outgoing outlet by sending a command to the UPS via USB, and what is that command?" They provide their own Linux software, which I ignored in favour of NUT, so I suspect their answer, if any, might be limited to what can be done through that.> I see at http://networkupstools.org/ddl/Cyber_Power_Systems/Value_800E.html that > the Value 800E does not have variables such as > load.off.delay - Turn off the load with a delay (seconds) > load.on.delay - Turn on the load with a delay (seconds) > > What does command ? upscmd -l <UPS> ? report?I'll try this tonight when I'm back home. Many thanks for your help.
nut.user.u830 at neverbox.com
2018-Feb-01 15:58 UTC
[Nut-upsuser] testing shutdown: pc not restarting; and "ups unavailable" messages
> Out of curiosity: if the PC has already been switched off from software by the shutdown script, how would it know that the power has been cut while it was off? Are you telling me that the power supply of the PC keeps checking its incoming AC supply even while off, and that with the BIOS setting I selected it will wake up the PC even after a power cut DURING WHICH the PC was already off? I never imagined that... I guess it's something I could try independently, once I find a quiet time with no disk activity when it's OK to shut down that computer.It actually occurred to me that I could try this with another (any other) computer here at work, so I did. I set the BIOS to "always on" after power cut. I booted ubuntu. I did "sudo shutdown -h now" from the console. The pc switched off as expected. Then I removed the power cable and then plugged it back in. According to the theory above, this should have caused the computer to detect a power loss and turn itself back on. Instead it remained off (as I expected). So clearly I am missing something here. Once nut has turned off the pc completely with a sequence of unix commands, how can anything the ups might do to to the power line, including cutting the power and restoring, cause the pc to come back on? I would have expected the pc only to come back on if either a) power had been cut off (not from software) while the computer was still running, AND the bios setting said "always on" or b) the UPS simulated some kind of "power button keypress" or the like through the USB link. If my understanding is flawed then please enlighten me. What does actually happen when things work?
Ken Olum
2018-Feb-01 16:30 UTC
[Nut-upsuser] testing shutdown: pc not restarting; and "ups unavailable" messages
After you shut down your PC, it should be in a state where it knows that it was shut down manually and should stay shut down. When the line power goes off, it forgets this state, so when you restore the line power it should boot. That is what the BIOS setting is supposed to provide. This is how it works, for example, on my Dell Inspiron 3668 running Ubuntu. If it doesn't work, I don't see any way that you can get automatic restart after the power is restored. Ken
Lee Damon
2018-Feb-01 16:33 UTC
[Nut-upsuser] testing shutdown: pc not restarting; and "ups unavailable" messages
I have seen cases where 'cleanly shut down' hosts don't come back up, even when the BIOS is set to "last state" or "always on". I had to change my NUT shutdown script to call halt instead of halt -p so the host was halted but still powered on. Then when power was cut and restored the host came back up. nomad On Thu, Feb 1, 2018 at 7:58 AM, <nut.user.u830 at neverbox.com> wrote:> > Out of curiosity: if the PC has already been switched off from software > by the shutdown script, how would it know that the power has been cut while > it was off? Are you telling me that the power supply of the PC keeps > checking its incoming AC supply even while off, and that with the BIOS > setting I selected it will wake up the PC even after a power cut DURING > WHICH the PC was already off? I never imagined that... I guess it's > something I could try independently, once I find a quiet time with no disk > activity when it's OK to shut down that computer. > > > It actually occurred to me that I could try this with another (any other) > computer here at work, so I did. I set the BIOS to "always on" after power > cut. I booted ubuntu. I did "sudo shutdown -h now" from the console. The pc > switched off as expected. Then I removed the power cable and then plugged > it back in. According to the theory above, this should have caused the > computer to detect a power loss and turn itself back on. Instead it > remained off (as I expected). > > So clearly I am missing something here. Once nut has turned off the pc > completely with a sequence of unix commands, how can anything the ups might > do to to the power line, including cutting the power and restoring, cause > the pc to come back on? > > I would have expected the pc only to come back on if either > > a) power had been cut off (not from software) while the computer was still > running, AND the bios setting said "always on" > > or > > b) the UPS simulated some kind of "power button keypress" or the like > through the USB link. > > If my understanding is flawed then please enlighten me. What does actually > happen when things work? > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20180201/f4c0182f/attachment.html>
Denny Page
2018-Feb-01 16:52 UTC
[Nut-upsuser] testing shutdown: pc not restarting; and "ups unavailable" messages
I suggest you repeat the test without the -h. Wait until the OS shuts down (it should not actually power off), then pull the power cord.> On Feb 01, 2018, at 07:58, nut.user.u830 at neverbox.com wrote: > > It actually occurred to me that I could try this with another (any other) computer here at work, so I did. I set the BIOS to "always on" after power cut. I booted ubuntu. I did "sudo shutdown -h now" from the console. The pc switched off as expected. Then I removed the power cable and then plugged it back in. According to the theory above, this should have caused the computer to detect a power loss and turn itself back on. Instead it remained off (as I expected).
nut.user.u830 at neverbox.com
2018-Feb-01 17:01 UTC
[Nut-upsuser] testing shutdown: pc not restarting; and "ups unavailable" messages
> It actually occurred to me that I could try this with another (any other) computer here at work, so I did. I set the BIOS to "always on" after power cut. I booted ubuntu. I did "sudo shutdown -h now" from the console. The pc switched off as expected. Then I removed the power cable and then plugged it back in. According to the theory above, this should have caused the computer to detect a power loss and turn itself back on. Instead it remained off (as I expected).In light of the last few messages I tried again but this time I kept it off for a few minutes rather than a few seconds before plugging the power cord back in, and this time it did come back on. Wow! (That's still the computer at work, though.) If it is possible that this is motherboard-dependent I shall have to try again with the media server computer at home that is supposed to be rescued by the UPS. I envisage two cases. 1) if the computer does restart after I switch it off and then pull and (a while later) reinsert the power cord, then it stands a chance of working with the UPS, but I still need to understand why it hasn't worked so far. 2) if the computer stays off, there is little hope that any software configuration of nut will make the ups turn it back on; except perhaps for Lee's suggestion of "turning it off but not quite". On that note, where in the file system should I be looking for the NUT shutdown script please?
Roger Price
2018-Feb-01 22:03 UTC
[Nut-upsuser] testing shutdown: pc not restarting; and "ups unavailable" messages
On Thu, 1 Feb 2018, nut.user.u830 at neverbox.com wrote:> What exactly should I be asking? "Is it possible to switch off the power to > the outgoing outlet by sending a command to the UPS via USB, and what is that > command?" They provide their own Linux software, which I ignored in favour of > NUT, so I suspect their answer, if any, might be limited to what can be done > through that.Perhaps the best way of asking the question is by comparing your Cyber Power UPS with one which very probably has the required function, the CP900AVR. http://networkupstools.org/ddl/Cyber_Power_Systems/CP900AVR.html Can their software send the required command to the CP900AVR? (their answer should be yes). Can their software do the same thing with your 800EILCD UPS?>> Out of curiosity: if the PC has already been switched off from software by >> the shutdown script, how would it know that the power has been cut while it >> was off? Are you telling me that the power supply of the PC keeps checking >> its incoming AC supply even while off, and that with the BIOS setting I >> selected it will wake up the PC even after a power cut DURING WHICH the PC >> was already off?To get the PC into a state in which the BIOS option "Power on when AC returns" works correctly, the AC must be cut off. Merely telling the PC to halt is not sufficient.> So clearly I am missing something here. Once nut has turned off the pc > completely with a sequence of unix commands,NUT cannot turn off the PC completely. It's computing operation stops, but there is still a piece of the mother board that is alive. Sometimes one can even see a light.> how can anything the ups might do to to the power line, including cutting the > power and restoring, cause the pc to come back on?If the UPS finally cuts power to the PC after some delay, the BIOS is reset to a state in which the required BIOS option "Power on when AC returns" will work. Roger
nut.user.u830 at neverbox.com
2018-Feb-01 23:06 UTC
[Nut-upsuser] testing shutdown: pc not restarting; and "ups unavailable" messages
> >> I see at http://networkupstools.org/ddl/Cyber_Power_Systems/Value_800E.html that >> the Value 800E does not have variables such as >> load.off.delay - Turn off the load with a delay (seconds) >> load.on.delay - Turn on the load with a delay (seconds) >> >> What does command ? upscmd -l <UPS> ? report? > > I'll try this tonight when I'm back home.It looks like the two commands you mention are there: $ upscmd -l cyber Instant commands supported on UPS [cyber]: beeper.disable - Disable the UPS beeper beeper.enable - Enable the UPS beeper beeper.mute - Temporarily mute the UPS beeper beeper.off - Obsolete (use beeper.disable or beeper.mute) beeper.on - Obsolete (use beeper.enable) load.off - Turn off the load immediately load.off.delay - Turn off the load with a delay (seconds) load.on - Turn on the load immediately load.on.delay - Turn on the load with a delay (seconds) shutdown.return - Turn off the load and return when power is back shutdown.stayoff - Turn off the load and remain off shutdown.stop - Stop a shutdown in progress test.battery.start.deep - Start a deep battery test test.battery.start.quick - Start a quick battery test test.battery.stop - Stop the battery test Would it be possible to sequence them? Could I say, for example, turn the load off in 10 seconds and turn it back on in 100 seconds by saying upscmd cyber load.off.delay 10 upscmd cyber load.on.delay 100 ? I suspect not, because I imagine that the timer that counts these delays is inside nut rather than being inside the UPS, and therefore after the load has been switched off then nut no longer runs and cannot get to the end of the second timer---right? Anyway, that's not what I need in any case. I don't care about power cycling the computer, other than for testing. What I really want is to switch it off when the UPS's battery power is about to run out, and turn it back on when the UPS powers up again. Am I right in thinking that what I want is shutdown.return - Turn off the load and return when power is back ? The message is slightly ambiguous on whether it's the ups or the load that's supposed to shutdown, turn off or return. I hope it means "Dear UPS, turn off the load and turn the load back on when power is back to the UPS". Would this be it? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20180201/1aed3abe/attachment-0001.html>
Charles Lepple
2018-Feb-02 04:04 UTC
[Nut-upsuser] testing shutdown: pc not restarting; and "ups unavailable" messages
On Feb 1, 2018, at 10:58 AM, nut.user.u830 at neverbox.com wrote:> > According to the theory above, this should have caused the computer to detect a power loss and turn itself back on. Instead it remained off (as I expected).I have an older box set up this way for continuous integration, and it needs to see more than a few seconds of power loss for the "always turn on" BIOS setting to work. I forget how many different intervals I tried, but 30 seconds of off time is reliable for that particular box.
Roger Price
2018-Feb-02 09:49 UTC
[Nut-upsuser] testing shutdown: pc not restarting; and "ups unavailable" messages
On Thu, 1 Feb 2018, nut.user.u830 at neverbox.com wrote:> load.off - Turn off the load immediately > load.off.delay - Turn off the load with a delay (seconds) > load.on - Turn on the load immediately > load.on.delay - Turn on the load with a delay (seconds) > > Would it be possible to sequence them? > Could I say, for example, turn the load off in 10 seconds and turn it back on in 100 seconds by saying > > upscmd cyber load.off.delay 10 > upscmd cyber load.on.delay 100NUT takes charge of sending the required commands through the driver; the default values are load.off.delay 20 and load.on.delay 30. These values can be changed by adding lines such as offdelay = 30 ondelay = 100 to the corresponding UPS section in file ups.conf. Roger
nut.user.u830 at neverbox.com
2018-Feb-02 12:51 UTC
[Nut-upsuser] testing shutdown: pc not restarting; and "ups unavailable" messages
> NUT takes charge of sending the required commands through the driver; the > default values are load.off.delay 20 and load.on.delay 30. These values can be > changed by adding lines such as > > offdelay = 30 > ondelay = 100 > > to the corresponding UPS section in file ups.conf.This sounded like a very appealing and sensible suggestion, thanks, so I just tried it. I edited /etc/nut/ups.conf to contain the following stanza [cyber] driver = usbhid-ups port = auto desc = "Cyber Power Systems VALUE800EILCD" offdelay = 30 ondelay = 100 and then I "tested the shutdown sequence" with sudo upsmon -c fsd The computer duly shut down but then didn't come back up for 3 minutes, at which point I power-cycled it by removing and re-inserting the cable. (By the way, 5 seconds of off time wasn't enough to wake it up, but 30 was.) So what else could be wrong? - Should I have written load.off.delay instead of offdelay? - Should I have issued any other command to cause the driver to read its ups.conf file? - Could it be that the second issue I reported in my original message to the list is also affecting what happens? http://lists.alioth.debian.org/pipermail/nut-upsuser/2018-February/011034.html <http://lists.alioth.debian.org/pipermail/nut-upsuser/2018-February/011034.html> I am still getting quite a few console broadcasts that "UPS cyber at localhost is unavailable" and (a) I don't know why (b) I wonder if this is preventing nut from telling the UPS those new values for the on-delay and off-delay. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20180202/23355040/attachment.html>
Possibly Parallel Threads
- testing shutdown: pc not restarting; and "ups unavailable" messages
- testing shutdown: pc not restarting; and "ups unavailable" messages
- testing shutdown: pc not restarting; and "ups unavailable" messages
- testing shutdown: pc not restarting; and "ups unavailable" messages
- testing shutdown: pc not restarting; and "ups unavailable" messages