[Nut-upsuser] upsmon errors with /usr/sbin/pm-suspend as the shutdown command
Charles Lepple
clepple at gmail.com
Sun May 1 19:24:33 UTC 2016
On Apr 29, 2016, at 7:01 PM, holomek at seznam.cz wrote:
>
> Is nobody using pm-suspend or pm-hibernate with upsmon? Or any other shutdown command besides the default one?
The documentation for this use case was written a long time ago, and I'm not sure if all of the details were worked out.
From the manual <http://networkupstools.org/docs/user-manual.chunked/ar01s06.html#_using_suspend_to_disk>:
> In order for this to work, you need to shutdown NUT (UPS driver, upsd server and upsmon client) in the suspend script and start them again in the resume script. Don’t try to keep them running. The upsd server will latch the FSD state (so it won’t be usable after resuming) and so will the upsmon client. Some drivers may work after resuming, but many don’t and some UPSs will require re-initialization, so it’s best not to keep this running either.
>
> After stopping driver, server and client you’ll have to send the UPS the command to shutdown only if the POWERDOWNFLAG is present. Note that most likely you’ll have to allow for a grace period after sending upsdrvctl shutdown since the system will still have to take a snapshot of itself after that. Not all drivers support this, so before going down this road, make sure that the one you’re using does.
In order to do the driver/server/client shutdown mentioned above, you would probably need to write some hook scripts for the pm-* system. I would make sure that the UPS and driver properly implement the grace period mentioned in the second paragraph before working on the hook scripts.
--
Charles Lepple
clepple at gmail
More information about the Nut-upsuser
mailing list