Koozali.org: home of the SME Server

Nut logging issue

Offline ReetP

  • *
  • 3,956
  • +6/-0
Nut logging issue
« on: November 08, 2006, 12:44:46 PM »
On a SME V7 I have a APC Smart-UPS 1000

I configured it along the lines of :

http://forums.contribs.org/index.php?topic=32533.0

Configured NUT and it seems to work OK apart from masses of entries in my message logs :

Nov  8 10:52:00 esmith upsd[2106]: Connection from 127.0.0.1
Nov  8 10:52:00 esmith upsd[2106]: Client on 127.0.0.1 logged out
Nov  8 10:53:00 esmith upsd[2106]: Connection from 127.0.0.1
Nov  8 10:53:00 esmith upsd[2106]: Client on 127.0.0.1 logged out
Nov  8 10:54:00 esmith upsd[2106]: Connection from 127.0.0.1
Nov  8 10:54:00 esmith upsd[2106]: Client on 127.0.0.1 logged out
Nov  8 10:55:00 esmith upsd[2106]: Connection from 127.0.0.1
Nov  8 10:55:00 esmith upsd[2106]: Client on 127.0.0.1 logged out
Nov  8 10:56:00 esmith upsd[2106]: Connection from 127.0.0.1
Nov  8 10:56:00 esmith upsd[2106]: Client on 127.0.0.1 logged out


It would appear that NUT is polling every 30 seconds and logging accordingly.

I have the following settings :

/etc/ups

DEVICE=/dev/ttyS0
MODEL=apcsmart

OPTIONS=

SERVER=yes

/etc/ups.conf

[UPS]
   driver = apcsmart
   port = /dev/ttyS0

/etc/upsmon.conf



DEADTIME 15
FINALDELAY 5
HOSTSYNC 15
MINSUPPLIES 1
MONITOR UPS@localhost 1 monuser mypassword slave
NOCOMMWARNTIME 300
NOTIFYCMD /sbin/e-smith/nutUPS.notify
# NOTIFYMSG is set to default
POLLFREQ 5
POLLFREQALERT 5
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
# RUN_AS_USER nutmon
SHUTDOWNCMD "/sbin/e-smith/signal-event halt"

/etc/upsd.users

[monuser]
               password  = mypassword
               allowfrom = localhost
               upsmon slave


/etc/upsd.conf

ACL all 0.0.0.0/0
ACL localhost 127.0.0.1/32
ACCEPT localhost
REJECT all

[root@server]# config show nut
nut=service
    Device=/dev/ttyS0
    Model=apcsmart
    status=enabled

upsc UPS@localhost gives a page of data


Has anyone any idea why this is happening and how I can stop it ?

B. Rgds
JC
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,956
  • +6/-0
Nut logging issue
« Reply #1 on: November 10, 2006, 08:47:09 PM »
Well, no one seems to have an answer to this one so I disabled NUT, installed apcupsd and off we went. A shame that NUT didn't quite work 'out of the box'.

Would love to get Darell Mays apc contrib updated but I'm no guru on Perl & building RPMs etc. How difficult is it and can anyone help ??
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Nut logging issue
« Reply #2 on: November 10, 2006, 09:24:46 PM »
Quote from: "ReetP"
Well, no one seems to have an answer to this one so I disabled NUT, installed apcupsd and off we went. A shame that NUT didn't quite work 'out of the box'.


Everything should work 'out of the box'. If it doesn't, you should report the details via the bug tracker.

Offline ReetP

  • *
  • 3,956
  • +6/-0
Nut logging issue
« Reply #3 on: November 10, 2006, 10:44:17 PM »
Certainly will Charlie. Just wondered if anyone had similar experiences.

B. Rgds
JC
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline byte

  • *
  • 2,183
  • +2/-0
Re: Nut logging issue
« Reply #4 on: November 10, 2006, 11:31:26 PM »
Quote from: "ReetP"
APC Smart-UPS 1000


I have exactly the same ups and I don't get any of those message(s) you mention, have you tweaked anything?
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline ReetP

  • *
  • 3,956
  • +6/-0
Nut logging issue
« Reply #5 on: November 11, 2006, 04:36:22 AM »
Hi Byte,

Your post prompted me to go back through /var/log/messages to try and find out when it started and if it was related to anything.

From the looks of things, it started after the install of the Sysmon contrib. That polls things every 60 seconds which would be right.

I will try and remove it and restart NUT to see if it cures the situation.

Thanks.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline pmstewart

  • *
  • 73
  • +0/-0
Nut logging issue
« Reply #6 on: December 09, 2006, 08:44:00 PM »
First Post - forgive the format.......

I tried to find this reported in the bug-tracker but could not.

I have an APC USB BackUPS-350 which is reporting the same
log messages as the first in the post - would love to submit to
bug tracker if one can show me where the bug has been originally
reported.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Nut logging issue
« Reply #7 on: December 10, 2006, 12:22:02 AM »
Quote from: "pmstewart"

I tried to find this reported in the bug-tracker but could not.

I have an APC USB BackUPS-350 which is reporting the same
log messages as the first in the post - would love to submit to
bug tracker if one can show me where the bug has been originally
reported.


Please report via a new bug.

Offline pmstewart

  • *
  • 73
  • +0/-0
Nut logging issue
« Reply #8 on: December 10, 2006, 03:59:48 AM »
Done.... javascript:emoticon(':D')
Very Happy

Offline byte

  • *
  • 2,183
  • +2/-0
Nut logging issue
« Reply #9 on: December 10, 2006, 02:26:24 PM »
Quote from: "pmstewart"
Done....


Please put the bug report for others...Here it is for now...

http://bugs.contribs.org/show_bug.cgi?id=2151
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline pmstewart

  • *
  • 73
  • +0/-0
Thank You
« Reply #10 on: December 19, 2006, 07:59:10 AM »
As a beginner it takes a while to learn to walk......

Offline pmstewart

  • *
  • 73
  • +0/-0
Now have information
« Reply #11 on: March 26, 2007, 04:12:14 PM »
During my earlier posts - I was testing SME on different machines and could not post the code or conditions creating the error.

I have successfully re-created the error on SME 7.0 and 7.1 (both from ISO installs) and 7.12 from upgrade.

When running sysmon 5.0.3 and NUT 2.0.5-1 together the logs fill up quickly with:

Code: [Select]

Mar 26 05:47:00 "servername" upsd[2451]: Client on 127.0.0.1 logged out
Mar 26 05:48:00 "servername" upsd[2451]: Connection from 127.0.0.1
Mar 26 05:48:00 "servername" upsd[2451]: Client on 127.0.0.1 logged out
Mar 26 05:49:00 "servername" upsd[2451]: Connection from 127.0.0.1
Mar 26 05:49:00 "servername" upsd[2451]: Client on 127.0.0.1 logged out
Mar 26 05:50:00 "servername" upsd[2451]: Connection from 127.0.0.1
Mar 26 05:50:00 "servername" upsd[2451]: Client on 127.0.0.1 logged out


When running a slave it logs only when it initally connects and if the connection is lost for some reason. (as it was designed to do)

Upon further investigation, it appears the code for sysmon wants to monitor some of the stats from my UPS.  Which would be fantastic since
I have had no success getting any software to monitor the UPS correctly. Have tried nut-cgi 2.0.5-1, cacti and collectd  UPS addons. It would be
much nicer if sysmon could monitor, collect and graph the UPS.

I am running a Belkin F6C800 on a serial connection (cable provided from mfg).  I have two sets of servers (one set PIII and one set Athlon 2500) with master / slave configurations and then reversed slave / master.

Nut performs as expected when the power plug is pulled even with sysmon running.  I have tried to modify / rem the code in sysmon - this makes it perform irratically or it doesn't graph at all.

Turning off either NUT or sysmon makes the log errors disappear.

Output of the UPS using upsc UPS@localhost provides:
Quote

[root@~]# upsc UPS@localhost
battery.charge: 100
battery.voltage: 27.4
battery.voltage.nominal: 24
driver.name: belkinunv
driver.parameter.port: /dev/ttyS0
driver.version: 2.0.5
driver.version.internal: 0.06
input.frequency: 60.1
input.frequency.nominal: 60
input.sensitivity: normal
input.transfer.high: 136
input.transfer.low: 90
input.voltage: 119.5
input.voltage.maximum: 122.5
input.voltage.minimum: 116.8
input.voltage.nominal: 120
output.frequency: 60.1
output.voltage: 119.0
ups.beeper.status: enabled
ups.delay.restart: 0
ups.delay.shutdown: 0
ups.firmware: 4
ups.load: 42
ups.model: F6C800-UNV
ups.power.nominal: 800
ups.status: OL CHRG
ups.test.result: no test performed
ups.type: OFFLINE


The original bug 2151 had been closed but I have re-opened it.

I am providing a longer explanation of the problem here for discussion purposes while the bug is being investigated.  Further, I hope we can come
up with a basic how-to and software to monitor a UPS.  

Note:  I also have an APC BackUPS 350 usb battery backup which generates the same errors. (As seen in earlier posts) so I bought a different battery backup thinking the USB was the problem.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Now have information
« Reply #12 on: March 26, 2007, 05:00:19 PM »
Quote from: "pmstewart"

Turning off either NUT or sysmon makes the log errors disappear.
...
The original bug 2151 had been closed but I have re-opened it.


They are not log errors, they are information logs - indicating when a client connects, and when it logs off.

I've reclosed the 'bug' - the software is working as expected. Please open a new bug if something is not working correctly, or a feature request, if you want some change in the way the software is working. Please be clear about what you think is wrong, or needs to change.

Offline pmstewart

  • *
  • 73
  • +0/-0
Nut logging issue
« Reply #13 on: March 27, 2007, 03:04:15 PM »
Even if it's designed to log every 60 seconds - IMHO it's a waste of precious time and space.

Is there a way to change this behavior to say every 5 or 10 minutes without breaking the contrib?