[Nut-upsuser] New NUT user with HP R3000XR problem
Brother Railgun of Reason
alaric at caerllewys.net
Wed May 27 22:28:29 UTC 2009
On Wed, May 27, 2009 at 05:10:07PM -0400, Brother Railgun of Reason wrote:
> and then telnetting to port 3493, still from localhost, and I still
> couldn't connect to port 3493. So, being a nasty suspicious sort, I
> checked lsof ... nothing's got port 3493 open. checked the process
> table ... upsd isn't running. It appears to start up, then immediately
> die.
>
> Could this be because something is limiting it to 256 connections?
> (Not that I'm ever going to need even a tenth of that.... 16
> connections would be more than I'm ever going to need to use.)
>
> I'm wondering whether I should go tweak the source to request only 256
> connections (or even 128) and see if upsd still dies on startup.
Indeed, I checked the code, and inability to get the requested number of
connections is a fatal error. Investigating this, I've discovered that
when upsd checks how many connections it may have, it's actually
checking _SC_OPEN_MAX, which is the number of files it's allowed to have
open, and which appears to be governed by rlim_fd_cur. On Solaris 10,
out of the box, rlim_fd_cur defaults to 256.
I'll reset this to 2048 in /etc/system on my next reboot, but in the
meantime I've patched upsd.c to set maxconn to 128, since I'm never
going to need even 256 connections to upsd.
Now:
babylon4:root:/opt/nut:10 # upsd
Network UPS Tools upsd 2.4.1
listening on 10.24.32.14 port 3493
listening on 127.0.0.1 port 3493
Connected to UPS [tokamak]: bcmxcp-tokamak
babylon4:root:/opt/nut:11 # upsc tokamak at localhost ups.status
OL
babylon4:root:/opt/nut:12 # upsc tokamak at localhost
ambient.temperature: 23.8
ambient.temperature.high: 55
battery.charge: 33.1
battery.runtime: 442
battery.voltage: 129.2
driver.name: bcmxcp
driver.parameter.baud_rate: 19200
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/tty00
driver.version: 2.4.1
driver.version.internal: 0.21
input.current: 11.2
input.frequency: 60.0
input.frequency.high: 65
input.frequency.low: 55
input.frequency.nominal: 60
input.transfer.boost.high: 12
input.voltage: 119.8
input.voltage.nominal: 120
outlet.1.delay.shutdown: -1
outlet.1.delay.start: 1
outlet.1.id: 1
outlet.1.status: On
outlet.2.delay.shutdown: -1
outlet.2.delay.start: 2
outlet.2.id: 2
outlet.2.status: On
outlet.3.delay.shutdown: -1
outlet.3.delay.start: 3
outlet.3.id: 3
outlet.3.status: On
output.current: 9.4
output.current.nominal: 24.0
output.frequency: 60.0
output.phases: 1
output.voltage: 115.3
output.voltage.nominal: 120
ups.beeper.status: enabled
ups.firmware: Cont:01.01
ups.load: 37.5
ups.model: COMPAQ UPS 2900VA
ups.power: 1080.5
ups.power.nominal: 2900
ups.serialMPAQ
ups.status: OL
So this is starting to look much better. I wish I'd realized sooner
that upsd wasn't just complaining, but complaining *and dying*.
--
Phil Stracchino, CDK#2 DoD#299792458 ICBM: 43.5607, -71.355
alaric at caerllewys.net alaric at metrocast.net phil at co.ordinate.org
Renaissance Man, Unix ronin, Perl hacker, Free Stater
It's not the years, it's the mileage.
More information about the Nut-upsuser
mailing list