[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
> 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.
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
babylon4:root:/opt/nut:12 # upsc tokamak at localhost
ups.model: COMPAQ UPS 2900VA
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