[Nut-upsuser] two MGE Ellipse 1500 ups via usb
Arjen de Korte
nut+users at de-korte.org
Thu Nov 19 22:15:57 UTC 2009
Citeren Thomas Gutzler <thomas.gutzler op gmail.com>:
> So when the batteries are critical, the master
> - sends out FSD to all slaves and touches POWERDOWNFLAG
> - waits for slaves to disconnect or max HOSTSYNC seconds to pass
> - waits another FINALDELAY seconds
> - executes its SHUTDOWNCMD, which
> - stops upsd, the drivers and the master upsmon (K50nut)
> - stops the nfs server (K80nfs-kernel-server)
> - runs upsdrvctl shutdown (S90halt) to shut down the UPSes
>
> When a slave detects a FSD, it
> - processes NOTIFY_SHUTDOWN (send an email in my case)
> - waits for FINALDELAY seconds
> - executes its SHUTDOWNCMD instantly, which
> - unmounts all nfs drives (S31umountnfs.sh)
> - causes upsmon to disconnect and stop (K50nut) and
> - shortly after powers off the system (as long as it takes to execute
> the remaining few shutdown scripts)
>
> If that's correct, isn't it better to set FINALDELAY to 0 and increase
> HOSTSYNC for all slaves rather than increasing FINALDELAY for the
> master? Shouldn't HOSTSYNC be the time the slowest slave needs to get to
> the nut shutdown script after receiving a shutdown, which can be delayed
> by up to POLLFREQALERT seconds?
The above may work, provided the kill script for NUT isn't run before
the NFS drives have unmounted. In your setup, this may be true, but
this may not be so in the general case. Also, the behavior of NUT
clients when they see the FSD flag is explicitly not defined. They may
logout from the server immediately and start shutting down only after
that. A 'FINALDELAY 120' on the NFS system guarantee at *least* 120
seconds for the clients to unmount their NFS drives from the moment
the FSD flag is set. Using 'HOSTSYNC 120' guarantees at *most* 120
seconds (but it could be lower as well), so we don't recommend that.
You can't use POLLFREQALERT to delay the shutdown. This is meant to be
able to use different upsmon polling intervals, depending on the power
state of the UPS they are monitoring. You may choose to poll less
frequently (60 seconds) when the mains is present and poll more
frequently (5 seconds) when the mains is out. On a upsd server with
only six clients attached, the clients will cause a negligible load
regardless of the poll interval, so changing this will bring you no
nothing. You'll need several hundreds of clients polling every 5
seconds each to be able to see a noticeable difference in the load.
Best regards, Arjen
--
Please keep list traffic on the list
More information about the Nut-upsuser
mailing list