[Nut-upsuser] Help needed: LIEBERT PowerSure Personal XT - USB interface
Charles Lepple
clepple at gmail.com
Sat Jul 14 02:44:17 UTC 2007
On 7/13/07, Alain Williams <addw at phcomp.co.uk> wrote:
> On Wed, Jul 04, 2007 at 10:10:17AM -0400, Charles Lepple wrote:
> > On 7/4/07, Charles Lepple <clepple at gmail.com> wrote:
> > >http://ocelot.ghz.cc/~buildbot/nut-2.3.0-r1012.tar.gz
> > >
> > >Please post the output of 'upsc' after everything is running.
> >
> > I made some other changes to map the values returned by your UPS into
> > the standard NUT status variables. The new snapshot is here:
> >
> > http://ocelot.ghz.cc/~buildbot/nut-2.3.0-r1014.tar.gz
>
> I did that -- it works, **** many thanks ****.
>
> There are various bits to this email, separated by ****.
>
>
>
> /usr/local/ups/bin/upsc mintups at localhost ups.status
>
> tells me:
>
> OL CHRG
>
> and when I unplug the UPS from the mains:
>
> OB DISCHRG
Hopefully it also says "LB" when the battery is low.
You may want to try testing this again with a dummy load, and the
computer plugged into the wall or another UPS.
Your UPS supports both BelowRemainingCapacityLimit and
ShutdownImminent, so one of those should trigger the LB condition.
> If I go:
>
> /usr/local/ups/bin/upsc mintups at localhost
>
> I get:
>
> battery.charge: 100
> battery.runtime: 600
> battery.voltage: 13
> battery.voltage.nominal: 12
> driver.name: usbhid-ups
> driver.parameter.pollinterval: 2
> driver.parameter.port: auto
> driver.parameter.vendorid: 06da
> driver.version: 2.3.0-r1014
> ups.load: 25
> ups.mfr: LIEBERT
> ups.model: PowerSure Personal XT
> ups.productid: ffff
> ups.status: OL
> ups.vendorid: 06da
>
> and:
>
> battery.charge: 95
> battery.runtime: 600
> battery.voltage: 12
> battery.voltage.nominal: 12
> driver.name: usbhid-ups
> driver.parameter.pollinterval: 2
> driver.parameter.port: auto
> driver.parameter.vendorid: 06da
> driver.version: 2.3.0-r1014
> ups.load: 30
> ups.mfr: LIEBERT
> ups.model: PowerSure Personal XT
> ups.productid: ffff
> ups.status: OB DISCHRG
> ups.vendorid: 06da
>
> I don't see why ups.load goes up when I unplug it ?
If it's not a sine-wave UPS, then the computer might show up as
drawing more current when on battery. Load and battery charge are
usually reported in increments of 5 or 10% anyway, so this shouldn't
be too much cause for alarm.
> ****
> Note that nut-2.3.0-r1014/scripts/RedHat/README is wrong, it should read:
>
> Install ups in /etc/sysconfig/
>
> /etc/sysconfig/ups is used only to store the POWERDOWNFLAG variable
>
> Install upsd & upsmon in /etc/rc.d/init.d
> Then run:
>
> chkconfig --add upsd
> chkconfig --add upsmon
>
> If you have not already started the daemon & monitor, run:
>
> service upsd start
> service upsmon start
Hmm, this hasn't been touched in over two years. It looks like some of
this is done by the RPM spec file:
http://boxster.ghz.cc/projects/nut/browser/trunk/packaging/generic-rpm/nut.spec.in
> Under the default install directory of /usr/local/ups the PATH is wrong;
> nut-2.3.0-r1014/scripts/RedHat/upsmon should be modified, before the line:
>
> case "$1" in
>
> Insert:
>
> PATH=$PATH:/usr/local/ups/sbin:/usr/local/ups/bin
>
> DO NOT change the PATH assignment at the top, since the PATH is reset
> in /etc/rc.d/init.d/functions.
>
> Alternatively the resetting of PATH can be done in /etc/sysconfig/ups
> (as show later).
Actually, for this issue (and some of the others below), would you
mind filing a tracker item for this?
http://alioth.debian.org/tracker/?group_id=30602
Some of these issues are easy to handle, and others might require some
further discussion. The tracker items ensure that nothing gets lost in
the shuffle. If you don't want to bother with signing up for an
account and creating the tracker items, one of us will probably do it
eventually, but this way, you would get notification of changes, etc.
> I modified nut-2.3.0-r1014/scripts/RedHat/upsd to allow UPSDCONF & UPSCONF
> to be set in /etc/sysconfig/ups:
>
> [ -z "$UPSDCONF" ] && UPSDCONF=/etc/ups/upsd.conf
> [ -z "$UPSCONF" ] && UPSCONF=/etc/ups/ups.conf
>
> (The default install puts them in /usr/local/ups/etc/)
We can probably use some autoconf magic to grab values from whatever
the user passes to ./configure.
> Also add:
>
> PATH=$PATH:/usr/local/ups/sbin:/usr/local/ups/bin
>
> just below:
>
> . /etc/rc.d/init.d/functions
>
> Alternatively the resetting of PATH can be done in /etc/sysconfig/ups
> (as show later).
>
> ****
> Twice when I restarted upsd the system hung to 10 minutes or so. I have not had a chance
> to investigate. Leave it alone & it came back.
> System: CentOS 4.5 (==RedHat Enterprise 4.5), kernel 2.6.9-42.0.10.plus.c4, i386
> Seems to be OK now ???
"Needs more info."
I don't think we've ever heard of upsd hanging the system, although
there are cases where upsd could be blocked for a while.
> You need to mention somewhere that the firewall may need to be modified to allow
> incoming connections to TCP port 3493.
The port number is mentioned in the README.
> I pulled the plug, got lots of warning messages about the thing being on
> battery -- after a few minutes it decided to power down but never got there
> as the UPS powered off before Linux had shutdown properly.
> Plug the UPS back in and the machine came up without attention.
>
> I have had a look at upssched ... looks complicated, why not just add
> an extra parameters to ups.conf that 'fakes' an imminent power off
> at the earliest of:
> * X seconds of the UPS being on battery
> * the battery.charge being less than Y%
> * the battery.runtime less than S seconds
Hmm, that looks complicated too :-)
I don't think we'd be opposed to including a script that does just
that, plus some instructions on how to run that from upssched. Bear in
mind that a lot of UPSes are smart about their LB signal, and will
send that even if they haven't totally updated the runtime or charge
level information.
> I attach a new patch against the current RedHat/CentOS 4.5 /etc/init.d/halt
> This basically checks for /etc/killpower and if it is there executes:
> upsdrvctl shutdown
>
> I tested it by creating /etc/killpower by hand - it powers off;
> unfortunately (in my testing) the machine then stayed off, even when
> I unplugged/plugged in the UPS to the mains.
>
> I would like the machine to come back up when power returns, I am
> not convinced that this setup will do that.
Please add these to the patch tracker. (I don't have a Fedora or
RedHat box to test this against, and I would rather give some of the
Fedora-based developers a chance to look at these patches instead of
just blindly committing them myself.)
Thanks for testing the HID driver!
--
- Charles Lepple
More information about the Nut-upsuser
mailing list