Philip Gaskell
2005-Jul-20 17:21 UTC
[Nut-upsuser] Computer doesn't shutdown, only broadcasts a message to say low battery
Hi, I have a Liebert Powersure Personal XT 700 and have followed the installation instructions from here http://www.networkupstools.org/doc/2.0.0/INSTALL.html. I'm pretty sure I've got the ups.conf, upsd.conf and ups.users correct. I have setup upsmon.conf as suggested in the installtion guide with the exception of FINALDELAY which I set to 0 when I found things weren't working correctly. I have seen the hardware list and know my ups isn't listed so I'm not expecting great things. What happens is when I yank the plug the UPS starts beeping correctly, /usr/local/ups/bin/upsc myupsname@localhost ups.status gives OL. When the battery starts running out I get a message broadcast on all active terminals saying battery is low but the system doesn't shutdown. Wondering if I had `shutdown` and its associated files wrong I changed the SHUTDOWNCMD from `/sbin/shutdown -h +0` to `touch /tmp/should.be.shutting.down`, however this file isn't created after the broadcast message saying the battery is low. `/usr/local/ups/bin/upsc myupsname@localhost ups.status` gives "OL LB", when the battery is low. Is there a vital option I have not set, when firing up upsdrvctl, upsd and upsmon no errors are given. thanks for any help, Phil Oh, by the way I'm running Slackware 10.1 with the 2.6.10 kernel from /testing. Though I think I'm almost there, perhaps its something to do with it thinking its got power when its not.
arnaud.quette@mgeups.com
2005-Jul-21 07:08 UTC
[Nut-upsuser] Re: Computer doesn't shutdown, only broadcasts a message to say low battery
Hi,> I have a Liebert Powersure Personal XT 700 and have followed the > installation instructions from here > ... > I have seen the hardware list and know my ups isn't listed so I'm not > expecting great things. > > ... > broadcast message saying the battery is low. `/usr/local/ups/bin/upsc > myupsname@localhost ups.status` gives "OL LB", when the battery is low.this problem comes from the fact that your unit isn't well supported. To launch a shutdown, upsmon need to be instructed first with an "OB" flag, and then an "OB LB". Otherwise, if you have "OL LB", you might have rebooted, and the system don't need to be shutdown as the power is present... So we clearly can't shutdown upon "OL LB"... So the only solution for you is to look at the driver you've used (BTW, which one did you use?), and to adapt it to better handle your UPS... As a temporary solution, you might have a look at upssched to handle your situation, and shutdown upon "OL LB", calling "upsmon -c fsd" Arnaud --- Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt OpenSource Developer - http://arnaud.quette.free.fr/ Debian Developer - http://people.debian.org/~aquette/ ... and much more ...
Philip Gaskell
2005-Jul-21 12:20 UTC
[Nut-upsuser] Re: Computer doesn't shutdown, only broadcasts a message to say low battery
Hi, I have been looking through the documentation of my UPS, it seems that the serial port has two modes of operation. One seems to be "smart"ish mode and the other dumb mode. The PIN configuration for the Serial Port is: PIN MODE ASSIGNEMENT DESCRIPTION 1 1 Low Battery (Open collector) 2 3 TxD 3 3 RxD 4 1 Remote Shutdown (5-12V); on battery 5 Both Common 6 1 Remote Shutdown (Short to PIN5); any mode operation 7 1 Low Battery (Open Emitter) 8 1 AC Fail (Open emitter) 9 1 AC Fail (Open collector) The pins for mode 2 are used by the software that came with the UPS, and there is no documentation to say what signal means what from them. I have studied the source for the Liebert driver and it seems that for the particular model the driver was designed for the UPS connects RX and TX on Line failure, so if I were to change the pins that the data is read from and written to from RX and TX, whatever pins they are to pins 8 and 9 then driver should then correctly identify when the UPS has lost mains power? I know a little C, though I haven't done serial programming at all but I am willing to learn and abviously I am not familiar with the nut code, I only downloaded and compiled the software yesterday! Could someone give me a few pointers on how to implement these changes. In liebert.c I can't find anywhere that sets what ports to read and write from. Cheers Phil