[Nut-upsdev] Using upssched under Solaris

Kjell Claesson kjell.claesson at telia.com
Tue May 16 18:28:15 UTC 2006


Hi Ron.

Have you configured the upsmon.conf to call the upsched ?

You need the EXEC in the NOTIFYFLAG.

8<--------------------------snip-------------------------------------
When an event occurs, upsmon will call whatever you specify as a
NOTIFYCMD
in your upsmon.conf, if you also enable the EXEC in your NOTIFYFLAGS.
In
this case, we want upsmon to call upssched as the notifier, since it
will
be doing all the work for us.  So, in the upsmon.conf:

	NOTIFYCMD /usr/local/ups/bin/notifycmd

Then we want upsmon to actually _use_ it for the notify events, so again
in the upsmon.conf we set the flags:

	NOTIFYFLAG ONLINE SYSLOG+EXEC
	NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
	NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC

... and so on.  For the purposes of this document I will only use those
three, but you can set the flags for any of the valid notify types.

Setting up your upssched.conf
=============================

Once upsmon has been configured with the NOTIFYCMD and EXEC flags,
you're
ready to deal with the upssched.conf details.  In this file, you specify
just what will happen when a given event occurs on a particular UPS.
8<-----------------------snip---------------------------------------------

Regards
Kjell

tis 2006-05-16 klockan 09:47 -0700 skrev Iwamiya, Ron SPAWAR:
> Hi, I'm attempting to use the UPS network tools. I'm sure I got the
> configurations worked out as I get notified when the ups goes on
> battery and back  online. I am having problems with upssched. I have
> the following in my upssched.conf: 
>  
> CMDSCRIPT /usr/local/ups/sbin/upssched-cmd
> AT ONBATT * EXECUTE onbatt
>  
> The problem I have is that is seems like the script in CMDSCRIPT never
> gets executed. If I replace the script with an executable, the
> executable never gets executed. While looking in the prstat window, I
> see the program upssched get executed like it is suppose to but
> whatever I have in the CMDSCRIPT never seems like it runs. I have
> tried this with version 2.0.3 and 2.0.0. This is using Solaris on a
> Sun.
>  
> Any suggestions?
>  
> Thanks
>  
> Ron
> _______________________________________________
> Nut-upsdev mailing list
> Nut-upsdev at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev




More information about the Nut-upsdev mailing list