[Nut-upsuser] upsmon Poll UPS "Driver not connected" messages
Larry Baker
baker at usgs.gov
Mon Oct 19 21:01:46 UTC 2015
I use the NUT RPM package for CentOS 6.7, which is version 2.6.5-2.
I am testing implementation of NUT features with APC and Tripp-Lite USB UPS interfaces. Things are going reasonably well. However, I'm seeing many more messages than I would like in /var/log/messages when I boot the system without the UPS connected. I have configured NOCOMMWARNTIME 3600, which takes care to only broadcast to logged in terminals and send me emails once an hour. However, /var/log/messages is being filled with "upsmon[2391]: Poll UPS [tripplite at localhost] failed - Driver not connected" messages every five seconds. I cannot seem to find a way to reduce that chatter.
These messages originate in pollups() in clients/upsmon.c. It looks to me like pollups() sees the utype_t->status flag ST_CONNECTED set, yet the UPSCONN_t->fd is -1, which means there is no valid connection (upscli_sendline() in clients/upsclient.c sets UPSCONN_t->upserror = UPSCLI_ERR_DRVNOTCONN). If ST_CONNECTED was clear, the connection would be retried. It appears to me that because ST_CONNECTED is set, pollups() thinks it should have a good connection and is surprised to find out it does not. Thus, it always writes the "Driver not connected" message to /var/log/messages. This looks like an incorrect ST_CONNECTED state in the utype_t->status flag.
I know I can slow down the polling interval. But, I really don't want to do that. That reduces, but does not really eliminate filling /var/log/messages with all these messages.
Larry Baker
US Geological Survey
650-329-5608
baker at usgs.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20151019/77c2d89f/attachment.html>
More information about the Nut-upsuser
mailing list