[Nut-upsuser] Can't get 'load.off' to turn off power to the PC: CyberPower 1200AVR

Mark E. Hansen meh at Winfirst.Com
Thu Sep 20 23:31:33 UTC 2007


On 09/20/07 13:28, Mark E. Hansen wrote:
> On 09/20/07 12:13, Arjen de Korte wrote:
>> Mark E. Hansen wrote:
>> 
>>> Thanks again, Arjen (and others). Once I got home yesterday and tried the
>>> "load.off" command using the new (development) version of the package, and
>>> it now works!
>> 
>> Uh oh...
> 
> Uh oh ;-(
> 
>> 
>>> This is great, because I would not be able to get my machine to reboot without
>>> the ability to cut its power.
>> 
>> This is actually not so great, because I really have no clue why this
>> didn't work on nut-2.2.0 before. Essentially, the commands that are sent
>> to the UPS are identical, which would mean previously they were not
>> sent. To rule out other problems and assuming that you've setup
>> usbhid-ups, upsd and upsmon, could you run the following command (as root):
>> 
>> 	upsmon -c fsd
>> 
>> With mains plugged in, this should shutdown your system cleanly, power
>> off the UPS and should switch the UPS on automatically again within one
> 
> By "Power off the UPS", do you mean kill the power being provided by the
> UPS to the PC? The UPS is actually still powered on, right?
> 
> 
>> minute. If you do the same with the mains *not* plugged in, it should
>> wait until the mains comes back (see also docs/shutdown.txt for a more
>> detailed description what should be happening).
> 
> I'll run this once I get home and report what happens. The last time I
> did run this command, I was still using the 2.2.0 version of NUT. At
> that time, it sent the shutdown command to the PC (which shutdown
> cleanly) but didn't change the state of the power supplied to the PC.

I just tried using the "upsmon -c fsd" while running the development
NUT package. It caused the package to send the 'shutdown' command to
the PC, which caused the PC to shutdown (gracefully), but the UPS
never killed the power to the PC.

Perhaps I misunderstood, but I thought the sequence of events was
supposed to be:

- line power fails;
- UPS notices and at some point, sends the 'shutdown' command to the PC;
- the PC begins its normal shutdown sequence;
- during the shutdown, after all the disk drives are safe but before
  the machine actually halts, the PC sends a request to the UPS to
  kill the PC's power (this is something I understood I had to add
  to the PC's /etc/init.d/halt script)
- the UPS kills the power to the PC;

- line power returns;
- the UPS see line power restored and restores power to the PC;
- the PC reboots (because it is set to boot after power failure).

If this is correct, why would we think that "upsmon -c fsd" would
cause the UPS to kill the power to the PC (without the changes to
/etc/init.d/halt)?

Thanks again for your help.




More information about the Nut-upsuser mailing list