[Nut-upsuser] How to change shutdown delay time?

Arjen de Korte nut+users at de-korte.org
Sat Nov 13 19:43:45 UTC 2010


Citeren "Thomas H. George" <lists op tomgeorge.info>:

> Can upsmon be set to shutdown the system immediately upon sensing a
> power failure?

Yes.

> I just installed nut on my Debian Squeeze system, connected it to a
> Cyperpower ups and edited /etc/nut/ups.conf and upsmon.conf.  On system
> reboot upsd and upsmon were started.
>
> I would like an immediate orderly system shutdown and power down upon a
> power failure.
>
> I pulled the power plug and the system continued running on battery
> power.

This is by design and described in the FAQ that comes with NUT:

-----------------------------------------------------------------------------

  Q: Why doesn't upsmon shut down my system?  I pulled the plug and nothing
     happened.

  A: Wait.  upsmon doesn't consider a UPS to be critical until it's both
     'on battery' and 'low battery' at the same time.  This is by design.
     Nearly every UPS supports the notion of detecting the low battery
     all by itself.  When the voltage drops below a certain point, it
     _will_ let you know about it.

     If your system has a really complicated shutdown procedure, you
     might need to shut down before the UPS raises the low battery flag.
     For most users, however, the default behavior is adequate.

     Ask yourself this: why buy a nice big UPS with the matching battery
     and corresponding runtime and then shutdown early?  If anything, I'd
     rather have a few more minutes running on battery during which the
     power might return.  Once the power's back, it's business as usual
     with no visible interruption in service.

     If you purposely shut down early, you guarantee an interruption in
     service by bringing down the box.

     See upssched.txt for information on how you can shutdown early if
     this is what you really want to do.

-----------------------------------------------------------------------------

> After several minutes I restored power and entered the command upsdrvctl
> shutdown.  This turned off the power immediately - system crash - which
> I guess is what it is supposed to do.

Yes. You're not supposed to run this unless the system is ready to  
lose power, typically near the end of you shutdown script.

> Have I missed something in the configuration?

Read the documentation (at least the FAQ) that comes with NUT.

Best regards, Arjen
-- 
Please keep list traffic on the list (off-list replies will be rejected)




More information about the Nut-upsuser mailing list