Jon Povey
2008-Nov-10 16:07 UTC
[Nut-upsuser] Can't make Smart-UPS 1500 shutdown over serial
Hi folks, Today I installed nut on my Dell Poweredge 1800 server running Ubuntu 8.04 Server, with an APC Smart-UPS 1500 connected to it with the black APC cable. I used apt to install nut, upsd -v gives me "Network UPS Tools upsd 2.2.1-" I then copied and configured the config files. Most of the setup seems OK; I get console messages for line power fail / good, and I can do instant commands to test the front panel and do a test.failure.start - the UPS switches to battery power and back to line power after a couple of seconds. However the commands to shutdown the UPS don't seem to work. shutdown.stayoff, shutdown.return and load.off all seem to silently do nothing. Likewise upsdrvctl shutdown: # upsdrvctl shutdown Network UPS Tools - UPS driver controller 2.2.1- Network UPS Tools (version 2.2.1-) - APC Smart protocol driver Driver version 1.99.8, command table version 2.0 Initiating UPS shutdown On line, sending shutdown+return command... # (nothing happens on the UPS). I "faked" a battery low ups shutdown by creating /etc/killpower with the magic string in and doing a shutdown -h now. According to console output it thought it was telling the UPS to power off. Here's the output of upsc: # upsc ups battery.alarm.threshold: 0 battery.charge: 100.0 battery.charge.restart: 00 battery.date: 09/06/05 battery.packs: 000 battery.runtime: 3720 battery.runtime.low: 120 battery.voltage: 27.40 battery.voltage.nominal: 024 driver.name: apcsmart driver.parameter.pollinterval: 2 driver.parameter.port: /dev/ttyS0 driver.parameter.sdtype: 0 driver.version: 2.2.1- driver.version.internal: 1.99.8 input.frequency: 50.00 input.quality: FF input.sensitivity: H input.transfer.high: 253 input.transfer.low: 208 input.transfer.reason: S input.voltage: 236.1 input.voltage.maximum: 236.1 input.voltage.minimum: 233.2 output.voltage: 236.1 output.voltage.nominal: 230 ups.delay.shutdown: 090 ups.delay.start: 000 ups.firmware: 601.3.I ups.id: UPS_IDEN ups.load: 004.5 ups.mfr: APC ups.mfr.date: 09/06/05 ups.model: Smart-UPS 1500 ups.serial: AS0537230534( ups.status: OL ups.temperature: 031.0 ups.test.interval: 1209600 ups.test.result: NO Are there some log files I should be looking at, or can I put the driver in a debug mode somehow? I want to get this working before I rack the server and forget about it, else if the power comes back at the wrong time, I appreciate that the server won't! As the only *nix server in the building that would be embarrasing for my little *nix fanboy club :) Thanks in advance, -- Jon Povey, Design Engineer jon.povey at racelogic.co.uk | +44(0)1280 825983 Racelogic is a limited company registered in England. Registered number 2743719 . Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, MK18 1TB . The information contained in this electronic mail transmission is intended by Racelogic Ltd for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email so that the sender's address records can be corrected. The views expressed by the sender of this communication do not necessarily represent those of Racelogic Ltd. Please note that Racelogic reserves the right to monitor e-mail communications passing through its network
Jon Povey
2008-Nov-12 10:01 UTC
[Nut-upsuser] Can't make Smart-UPS 1500 shutdown over serial
Hello again folks. On 10 November 2008 16:08 I wrote:> However the commands to shutdown the UPS don't seem to work. > shutdown.stayoff, shutdown.return and load.off all seem to > silently do nothing. Likewise upsdrvctl shutdown:I have some more information. I ran the driver with lots of debug output, inlined below with most of the repeated polling output removed, please say if you'd like a complete log. I have added ... where I removed stuff, and my comments in brackets. I started apcsmart, then rest of the nut system, and tried various upscmd shutdown.return|load.off commands. The first few failed, but then a load.off and load.on did work. I see the [NA] responses and "outside window" reports, which makes me think I have a comms problem? I am a Linux C developer myself so can maybe help try to track this down. If I don't hear anything back from the list this week I suppose I'll try installing the latest nut from sources and see if that's any different. Here's hoping this means something to one of you... --- # /lib/nut/apcsmart -DDDD -a ups Network UPS Tools (version 2.2.1-) - APC Smart protocol driver Driver version 1.99.8, command table version 2.0 debug level is '4' Attempting firmware lookup Firmware: [601.3.I] Not found in table - trying normal method APC - Attempting to find command set APC - Parsing out command set UPS supports variable [ups.model] poll_data: ups.model UPS supports command [load.on] UPS supports variable [input.quality] poll_data: input.quality UPS supports variable [battery.packs] poll_data: battery.packs UPS supports command [test.panel.start] UPS supports variable [battery.voltage] poll_data: battery.voltage UPS supports variable [ups.temperature] poll_data: ups.temperature UPS supports command [calibrate.start] UPS supports command [calibrate.stop] UPS supports variable [ups.test.interval] poll_data: ups.test.interval UPS supports variable [input.frequency] poll_data: input.frequency UPS supports variable [input.transfer.reason] poll_data: input.transfer.reason UPS supports command [shutdown.stayoff] UPS supports variable [input.voltage] poll_data: input.voltage UPS supports variable [input.voltage.maximum] poll_data: input.voltage.maximum UPS supports variable [input.voltage.minimum] poll_data: input.voltage.minimum UPS supports variable [output.voltage] poll_data: output.voltage UPS supports variable [ups.load] poll_data: ups.load UPS supports command [shutdown.return] UPS supports command [test.failure.start] protocol_verify: 0x56 [V] unrecognized UPS supports command [test.battery.start] UPS supports command [test.battery.stop] UPS supports variable [ups.test.result] poll_data: ups.test.result UPS supports command [load.off] UPS supports variable [ups.firmware] poll_data: ups.firmware UPS supports variable [ups.id] poll_data: ups.id UPS supports variable [battery.charge.restart] poll_data: battery.charge.restart UPS supports variable [battery.charge] poll_data: battery.charge UPS supports variable [battery.voltage.nominal] poll_data: battery.voltage.nominal UPS supports variable [battery.runtime] poll_data: battery.runtime UPS supports variable [battery.alarm.threshold] poll_data: battery.alarm.threshold UPS supports variable [input.transfer.low] poll_data: input.transfer.low UPS supports variable [ups.mfr.date] poll_data: ups.mfr.date UPS supports variable [ups.serial] poll_data: ups.serial UPS supports variable [output.voltage.nominal] poll_data: output.voltage.nominal UPS supports variable [ups.delay.shutdown] poll_data: ups.delay.shutdown UPS supports variable [battery.runtime.low] poll_data: battery.runtime.low UPS supports variable [ups.delay.start] poll_data: ups.delay.start UPS supports variable [input.sensitivity] poll_data: input.sensitivity UPS supports variable [input.transfer.high] poll_data: input.transfer.high UPS supports variable [battery.date] poll_data: battery.date APC - About to get capabilities string Supported capability: 75 (I) - input.transfer.high Supported capability: 6c (I) - input.transfer.low Supported capability: 65 (4) - battery.charge.restart Supported capability: 6f (I) - output.voltage.nominal Supported capability: 73 (4) - input.sensitivity Supported capability: 71 (4) - battery.runtime.low Supported capability: 70 (4) - ups.delay.shutdown Supported capability: 6b (4) - battery.alarm.threshold Supported capability: 72 (4) - ups.delay.start Supported capability: 45 (4) - ups.test.interval APC - UPS capabilities determined Detected Smart-UPS 1500 [AS0537230534(] on /dev/ttyS0 update_status update_info_all: starting poll_data: ups.firmware poll_data: ups.model poll_data: ups.serial poll_data: ups.mfr.date poll_data: ups.temperature poll_data: ups.load poll_data: ups.test.interval poll_data: ups.test.result poll_data: ups.delay.start poll_data: ups.delay.shutdown poll_data: ups.id poll_data: input.voltage poll_data: input.frequency poll_data: input.sensitivity poll_data: input.quality poll_data: input.transfer.low poll_data: input.transfer.high poll_data: input.transfer.reason poll_data: input.voltage.maximum poll_data: input.voltage.minimum poll_data: output.voltage poll_data: output.voltage.nominal poll_data: battery.date poll_data: battery.charge poll_data: battery.charge.restart poll_data: battery.voltage poll_data: battery.voltage.nominal poll_data: battery.runtime poll_data: battery.runtime.low poll_data: battery.packs poll_data: battery.alarm.threshold update_info_all: done dstate_init: sock /var/run/nut/apcsmart-ups open on fd 9 ... new connection on fd 10 ... instcmd_chktime: outside window for shutdown.return (1226483025) ... Got [NA] after command [shutdown.return] ... Got [NA] after command [shutdown.return] ... Communications with UPS lost - check cabling Communications with UPS re-established ... Got [NA] after command [load.off] ... Got [NA] after command [shutdown.return] ... Communications with UPS lost - check cabling Communications with UPS re-established update_status Communications with UPS lost - check cabling Communications with UPS re-established ... (I send another load.off command here which succeeds) (at this point I get a console broadcast that I'm on battery) ... poll_data: battery.runtime update_info_normal: done ... (send a load.on command which succeeds) (console broadcast that I'm on line power) ... (try another load.off command which fails) instcmd_chktime: outside window for load.off (46) ... (I ctrl-C) Signal 2: exiting -- Jon Povey, Design Engineer jon.povey at racelogic.co.uk | +44(0)1280 825983 Racelogic is a limited company registered in England. Registered number 2743719 . Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, MK18 1TB . The information contained in this electronic mail transmission is intended by Racelogic Ltd for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email so that the sender's address records can be corrected. The views expressed by the sender of this communication do not necessarily represent those of Racelogic Ltd. Please note that Racelogic reserves the right to monitor e-mail communications passing through its network