nut upsmon not observing it's config file

Bug #224791 reported by Al Grimstad
2
Affects Status Importance Assigned to Milestone
nut (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: nut

This bug concerns the ill-fated nut 2.2.1-2.1ubuntu7 in ubuntu 8.04.

The bug is that upsmon, which I've configured to write its warnings to tty sessions is frequently reporting spurious low-battery conditions. I immediately run upsc to check the battery and it's at 100%. Worst, I've tried to turn off low battery warnings in upsmon.conf without defeating the spurious warnings. The only relief has been to shut down nut entirely.

Here's an excerpt from upsmon.conf:

NOTIFYFLAG NOCOMM SYSLOG
NOTIFYFLAG COMMOK SYSLOG
NOTIFYFLAG COMMBAD SYSLOG
NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC
#NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC
NOTIFYFLAG FSD SYSLOG+WALL+EXEC
NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC
#NOTIFYFLAG REPLBATT SYSLOG+EXECbattery.alarm.threshold: 0

Here is the battery portion of the upsc report right after a spurious warning of "low battery":

battery.charge: 100.0
battery.charge.restart: 00
battery.date: 02/18/00
battery.runtime: 240
battery.runtime.low: 120
battery.voltage: 13.61
battery.voltage.nominal: 012

I'm attach the whole config file to the message. -- al

Revision history for this message
Al Grimstad (al-grimstad) wrote :
Revision history for this message
Arnaud Quette (aquette) wrote : Re: [Bug 224791] [NEW] nut upsmon not observing it's config file

2008/4/30 Al Grimstad <email address hidden>:
> Public bug reported:
>
> Binary package hint: nut
>
> This bug concerns the ill-fated nut 2.2.1-2.1ubuntu7 in ubuntu 8.04.
>
> The bug is that upsmon, which I've configured to write its warnings to
> tty sessions is frequently reporting spurious low-battery conditions. I
> immediately run upsc to check the battery and it's at 100%. Worst, I've
> tried to turn off low battery warnings in upsmon.conf without defeating
> the spurious warnings. The only relief has been to shut down nut
> entirely.
> ...

2 things:
- upsmon only reports things it catches. This means that it won't
report a low battery status by itself, but only if it has been
reported by the driver and so upsd. And the low battery is reported
through "ups.status=LB".
So I would be in favor of a driver bug. To catch this, you'll have to
reproduce it while running the driver in debug mode (using -DDD).
- upsmon, as upsd, will only honor configuration changes if it has
either been restarted or reloaded.
so either using "upsmon -c reload" or "invoke-rc.d nut restart"

-- 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/

Revision history for this message
Al Grimstad (al-grimstad) wrote :

On Wed, 2008-04-30 at 16:30 +0000, Arnaud Quette wrote:
> 2008/4/30 Al Grimstad <email address hidden>:
...
> 2 things:
> - upsmon only reports things it catches. This means that it won't
> report a low battery status by itself, but only if it has been
> reported by the driver and so upsd. And the low battery is reported
> through "ups.status=LB".

I'm sure that's all true, but upsmon is doing a WALL on low battery and
I've configured it not to do that. At least I left the LOWBATT
configuration as the default, whatever that is. I suppose I should go
check the docs to see if I can configure LOWBATT to do something else,
such as ignore totally. Anyway, just because the apcsmart driver might
be acting up, I don't think upsmon is absolved of guilt.

> So I would be in favor of a driver bug. To catch this, you'll have to
> reproduce it while running the driver in debug mode (using -DDD).
> - upsmon, as upsd, will only honor configuration changes if it has
> either been restarted or reloaded.
> so either using "upsmon -c reload" or "invoke-rc.d nut restart"

I need a bit of help to do this. Suppose I just hack /etc/init.d/nut and
change the upsdrvctl start line to add the -DDD argument? And report
whatever upsdrvctl spits out about the time I get the next WALL? -- al

> -- 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/
>

Revision history for this message
Al Grimstad (al-grimstad) wrote :

OK, I think I have a plausible hypothesis for my experience and a configuration change that makes the annoying WALL messages go away.

First, although my battery is at 100% when I check is--and so the "low battery" message seems wrong, there is something else going on. I have a couple of things attached to the APC UPS and "ups.load" is very high. I have the sense that when ups.load crossed over from the 60% area into the 70% area a "low battery" condition was communicated to upsmon. If this hypothesis is correct, this may be just a design characteristic, not a driver bug.

Second, upsmon seems to have some defaults that I didn't understand. I had commented out my normal "LOWBATT" configuration (NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC)
 to try to kill the WALL messages. That didn't work. What I ended up doing was setting LOWBATT to "NOTIFYFLAG LOWBATT SYSLOG". This seems to have worked. There are now lowbatt messages in syslog, but no WALL messages.

So, the upshot of all this is that I think I should withdraw the bug report. Sorry for sharing my learning experience with you. -- al

Revision history for this message
Chuck Short (zulcss) wrote :

Closing as per requested.

Changed in nut:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.