[Nut-upsuser] upssched

Arnaud Quette aquette.dev at gmail.com
Tue May 13 14:02:40 UTC 2008


Bonjour Alain,

Le 13 mai 2008 15:16, Alain Le Thomas <alain.le-thomas at ac-rennes.fr> a écrit :
> Hello,
>  (Saddened for my bad English)
>  I have just created a script to install NUT
>  I manage the events with UPSSCHED and I would like to know how to launch
> this command via /etc/nut/upssched-cmd every 5 minutes to verify the level
> of battery of the UPS and decide on the action to be run.

your best bet is the cron daemon if you really want to do that.
upssched will only react to configured event (com{bad,ok}, power
failure and restored, ...) and act immediatly or delayed (using the
timers).

but the fact is that checking the battery only when on battery, with a
loop and a delay (5 mn) inside your upssched script should be
sufficient.

>  Is there an option in the configuration which I was able to forget?
>
>  Other question : there is another command than WALL to show the result in
> screen

I'm not sure to understand your question (even the french version) ?!
the message broadcasting always use wall for broadcasting the message
on all console and terminals.
if your problem is with the format of the message, take a look at the
NOTIFYMSG flags.
Otherwise, you need to use your upssched script to write to the terms
(try an "echo FrogPower > /dev/pts/1" for example)

>  Bonjour,
>  (Désolé pour mon mauvais anglais)
>  Je viens de créer un script pour installer NUT
>  Je gère les événements avec UPSSCHED et je voudrais savoir comment lancer
> cette commande  via /etc/nut/upssched-cmd tous les 5 minutes afin de
> vérifier le niveau de batterie de l'onduleur et décider de l'action à
> entreprendre.
>
>  Existe-t-il une option dans la configuration que j'ai pu oublier ?
>
>  Autre question : y a-t-il une autre commande que WALL pour afficher le
> résultat à l'écran ??

note that if you need some more info in french, we might continue off the list.

Arnaud
-- 
Linux / Unix Expert R&D - MGE Office Protection Systems - http://www.mgeops.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/
Free Software Developer - http://arnaud.quette.free.fr/


More information about the Nut-upsuser mailing list