[Nut-upsuser] script to check configuration

Roger Price roger at rogerprice.org
Thu Apr 4 08:34:11 BST 2019


On Wed, 3 Apr 2019, James wrote:

> Is there a script to check that the automatic shutdown and logging 
> configuration is set right?

Not that I know of.  Since the sysadmin is free to configure as he or she sees 
fit it would be a huge job to check every possible situation.

> I had hoped I set it up right to at least log when it goes and off 
> battery but I guess I missed something.
>
> /etc/nut# grep upssched /var/log/syslog
> Apr  3 12:31:06 gw upssched[12732]: Timer daemon started
> Apr  3 12:31:06 gw upssched[12732]: New timer: onbatt (30 seconds)
> Apr  3 12:31:36 gw upssched[12732]: Event: onbatt
> Apr  3 12:31:36 gw upssched-cmd: Unrecognized command: onbatt
> Apr  3 12:31:51 gw upssched[12732]: Timer queue empty, exiting
> Apr  3 16:03:55 gw upssched-cmd: Unrecognized command:

I find that very detailed logging from upssched-cmd together with command line 
calls of the upssched-cmd script help to debug that script.

In your case, the « Apr  3 12:31:36 gw upssched-cmd: Unrecognized command: 
onbatt » is a good starting point.

Roger


More information about the Nut-upsuser mailing list