[Nut-upsuser] Re: upsmon/upssched on ups temperature
arnaud.quette@mgeups.com
arnaud.quette@mgeups.com
Wed, 29 Jun 2005 13:29:41 +0200
Hi Mark,
> I was wondering what people are doing to shutdown their equipment ba=
sed
> on the temperature NUT grabs from a UPS? It doesn't appear that
> upsmon(8) has an appropriate notify event for temperature levels.
it currently can't. The current notify system is "change" based, which =
means that
if ups.status switch from OL to OB, you generate an ONBATT notification=
.
For non discrete values, the problem is to have a threshold to notify
upon sufficient change (ie if we wake up upssched every .1 =B0 change,
it will be borying...)
> For the time being, it looks like I'll write a simple perl wrapper
> around upsc to get ups.temperature, but would love to use something
> natively from NUT, if possible.
for the moment, this is the best way: have a client that polls
the desired values, and act upon your needs.
In the future, when the asynchronous client pipe will be there,
and the evolved upsmon/sched system with interpreted language [1],
we will be able to do that easilly:
if (ups.temperature > 50)
upsmon -c FSD
Note that the async pipe will allow to remove the polling.
Your client will receive data that has changed...
> Also, I'd like to say that NUT rocks. We are abusing it's flexibilit=
y
> to get things done and it Just Works. Thanks developers!
thanks for the thank in the name of all NUT developers and contributor=
s.
Arnaud
---
[1] http://cvs.alioth.debian.org/cgi-bin/cvsweb.cgi/~checkout~/nut/docs=
/ideas.txt?rev=3D1.1.1.1&content-type=3Dtext/plain&cvsroot=3Dnut
---
Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt
OpenSource Developer - http://arnaud.quette.free.fr/
Debian Developer - http://people.debian.org/~aquette/
... and much more ...
=