[Nut-upsuser] abusing nut ups to do temperature shutdownWHILEmonitoring UPS'es
Arjen de Korte
nut+users at de-korte.org
Thu Jul 26 14:14:37 UTC 2007
> Do you really need a fake thing?
No.
> cant you fake it in software and once the temperature goes too high you
> just run a script which hooks into NUT and sets the TemperaturUPS to NO
> battery or something and shut it down using that? I was planning to use
> lmsensors to monitor the temperature and then shutdown.
The problem is not initiating the shutdown procedure. You can easily call
'upsmon -c fsd' on the master and both master and slaves will be shutdown
cleanly.
The problem is in shutting down in a way that the UPS will stay off.
When you shutdown a upsmon master (because you send it a FSD or there is
insufficient power available through a 'fake' UPS that has gone critical),
it will set the POWERDOWNFLAG which (if you don't do something) will
probable cause that in your halt script, 'upsdrvctl shutdown' is called.
This in turn will reboot your UPS, so that all systems will be restarted
again. That's probably something you want to prevent.
Even if the flag is not created, you probably want the UPS to shutdown and
stayoff. I suggest that, in addition to calling 'upsmon -c fsd', you also
create an additional flag for which you test in the halt script. If it is
there, you should not call 'upsdrvctl shutdown', but instead the necessary
commands to shutdown.stayoff the UPS (if that command is available). This
is the tricky part, since that requires both the driver and upsd server to
be running. It is doable however.
Best regards, Arjen
--
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57
More information about the Nut-upsuser
mailing list