Charles Lepple
2018-Aug-30 13:37 UTC
[Nut-upsuser] Wrong battery.date variable value [APC, usbhid-ups]
On Aug 30, 2018, at 6:54 AM, Ong, Kevin wrote:> > I'm very sorry for the delay here, I've been very swamped with work. Here's the relevant information you guys need: > > "upsc APC_BR1500GI" output: https://pastebin.com/rH3W0dbz > "upsrw APC_BR1500GI" output: https://pastebin.com/tEWv8a3d > "upscmd -l APC_BR1500GI" output: https://pastebin.com/MraRQnEk > "clog /var/log/system.log | grep -i ups" output: https://pastebin.com/QxXLqEcHHi Kevin, The key points here are the usbhid-ups driver (versus the serial APC driver), a serial number that appears to be more recent than some of the correct values in the DDL, and that this looks like the battery.mfr.date matches the value from apcupsd. Is the ups.mfr.date value incorrect as well, or has the battery been changed at least once in 2016? battery.date: 2001/09/25 battery.mfr.date: 2016/05/11 ups.mfr.date: 2012/01/30 The next test involves stopping NUT, and briefly running the driver in debug mode. The commands will be something like this (run in a shell as root): upsdrvctl stop /usr/local/libexec/nut/usbhid-ups -a APC_BR1500GI -DDDDD 2>&1 | tee /tmp/APC_BR1500GI.debug.txt # let it run for ~20 seconds, then stop with Control-C upsdrvctl start and then please post the contents of /tmp/APC_BR1500GI.debug.txt (pastebin works, but if you do email it to the list, please use gzip first) If the debug log looks like it ended on its own (messages to the effect of not being able to find the device), you may need to wait longer after stopping the driver, or maybe unplug and re-plug the USB cable on the UPS. (Not usually an issue with APC devices, but you never know.)
Ong, Kevin
2018-Aug-30 14:05 UTC
[Nut-upsuser] Wrong battery.date variable value [APC, usbhid-ups]
Hi Charles, The battery.mfr.date is actually the correct value I'm looking for. That is the exact date the battery was last replaced. And yes, it is the correct value displayed in apcupsd. For the debug commands, is there a line break between "upsdrvctl stop" and "/usr/local/libexec/nut/usbhid-ups -a APC_BR1500GI -DDDDD 2>&1 | tee /tmp/APC_BR1500GI.debug.txt"? Well, I tried both ways and I come up with an "Ambiguous output redirect." error message. Thank you. Regards, Kevin Mychal M. Ong Sr Infrastructure Engineer, Microsoft Technology Services - Messaging Global Infrastructure Operations Ingram Micro Inc. 4F Three World Square, 22 Upper McKinley Hill, Fort Bonifacio Taguig City, Philippines 1634 Direct +1-716-633-3600 ext. 33996 Mobile +63-917-511-0251 : kevin.ong at ingrammicro.com -----Original Message----- From: Charles Lepple <clepple at gmail.com> Sent: Thursday, August 30, 2018 9:37 PM To: Ong, Kevin <Kevin.Ong at ingrammicro.com> Cc: nut-upsuser at alioth-lists.debian.net Subject: Re: [Nut-upsuser] Wrong battery.date variable value [APC, usbhid-ups] On Aug 30, 2018, at 6:54 AM, Ong, Kevin wrote:> > I'm very sorry for the delay here, I've been very swamped with work. Here's the relevant information you guys need: > > "upsc APC_BR1500GI" output: > https://urldefense.proofpoint.com/v2/url?u=https-3A__pastebin.com_rH3W > 0dbz&d=DwIFAg&c=--1RjWWBW4Kf6aBAaj53vPItwfT0BR1YjSDV46P5EvE&r=TN6j4GXL > SUKZPYR3JmEpqKZ66h5j5bPHOB6zxLw4TWg&m=m2WfFpxmwuqDLMFqY2iJOkiRkgF25qQi > DfG-mKZqxLY&s=MwXdBsfIzC3CWjXaazZqXsU5zkzdT7MouBJxL7BWkYo&e> "upsrw APC_BR1500GI" output: > https://urldefense.proofpoint.com/v2/url?u=https-3A__pastebin.com_tEWv > 8a3d&d=DwIFAg&c=--1RjWWBW4Kf6aBAaj53vPItwfT0BR1YjSDV46P5EvE&r=TN6j4GXL > SUKZPYR3JmEpqKZ66h5j5bPHOB6zxLw4TWg&m=m2WfFpxmwuqDLMFqY2iJOkiRkgF25qQi > DfG-mKZqxLY&s=ez9WU0NIjTfGvRir0lyXrLT_LqBIPgeIYFnqsV1G8_8&e> "upscmd -l APC_BR1500GI" output: > https://urldefense.proofpoint.com/v2/url?u=https-3A__pastebin.com_MraR > QnEk&d=DwIFAg&c=--1RjWWBW4Kf6aBAaj53vPItwfT0BR1YjSDV46P5EvE&r=TN6j4GXL > SUKZPYR3JmEpqKZ66h5j5bPHOB6zxLw4TWg&m=m2WfFpxmwuqDLMFqY2iJOkiRkgF25qQi > DfG-mKZqxLY&s=fiZIByf_2lYqkBX0ld6pdV_z1qIXzm7CvxgWIS1LKl8&e> "clog /var/log/system.log | grep -i ups" output: > https://urldefense.proofpoint.com/v2/url?u=https-3A__pastebin.com_QxXL > qEcH&d=DwIFAg&c=--1RjWWBW4Kf6aBAaj53vPItwfT0BR1YjSDV46P5EvE&r=TN6j4GXL > SUKZPYR3JmEpqKZ66h5j5bPHOB6zxLw4TWg&m=m2WfFpxmwuqDLMFqY2iJOkiRkgF25qQi > DfG-mKZqxLY&s=g52e2K-OwWjKdbBcGdoOvit8q2Q6-I1pOhp5sz3X6oM&eHi Kevin, The key points here are the usbhid-ups driver (versus the serial APC driver), a serial number that appears to be more recent than some of the correct values in the DDL, and that this looks like the battery.mfr.date matches the value from apcupsd. Is the ups.mfr.date value incorrect as well, or has the battery been changed at least once in 2016? battery.date: 2001/09/25 battery.mfr.date: 2016/05/11 ups.mfr.date: 2012/01/30 The next test involves stopping NUT, and briefly running the driver in debug mode. The commands will be something like this (run in a shell as root): upsdrvctl stop /usr/local/libexec/nut/usbhid-ups -a APC_BR1500GI -DDDDD 2>&1 | tee /tmp/APC_BR1500GI.debug.txt # let it run for ~20 seconds, then stop with Control-C upsdrvctl start and then please post the contents of /tmp/APC_BR1500GI.debug.txt (pastebin works, but if you do email it to the list, please use gzip first) If the debug log looks like it ended on its own (messages to the effect of not being able to find the device), you may need to wait longer after stopping the driver, or maybe unplug and re-plug the USB cable on the UPS. (Not usually an issue with APC devices, but you never know.) This email may contain material that is confidential, and proprietary to Ingram Micro, for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. [Ingram_2818e5de]
Charles Lepple
2018-Aug-30 14:27 UTC
[Nut-upsuser] Wrong battery.date variable value [APC, usbhid-ups]
On Aug 30, 2018, at 10:05 AM, Ong, Kevin wrote:> > The battery.mfr.date is actually the correct value I'm looking for. That is the exact date the battery was last replaced. And yes, it is the correct value displayed in apcupsd.I think we're on the same page for the battery date. What about the date of manufacture for the UPS - does 2012 seem reasonable?> > For the debug commands, is there a line break between "upsdrvctl stop" and "/usr/local/libexec/nut/usbhid-ups -a APC_BR1500GI -DDDDD 2>&1 | tee /tmp/APC_BR1500GI.debug.txt"? Well, I tried both ways and I come up with an "Ambiguous output redirect." error message. >yes, line break, and each of the commands you put in quotes should all be on one line. What does "echo $SHELL" say? (I'm assuming something like /bin/sh or /bin/ksh, but it might be csh-based.) You can also try without the "2>&1" - I forget which parts go to stdout and which go to stderr (that attempts to redirect stderr to stdout, which then gets piped to tee).
Charles Lepple
2018-Aug-31 02:33 UTC
[Nut-upsuser] Wrong battery.date variable value [APC, usbhid-ups]
On Aug 30, 2018, at 10:05 AM, Ong, Kevin wrote:> > For the debug commands, is there a line break between "upsdrvctl stop" and "/usr/local/libexec/nut/usbhid-ups -a APC_BR1500GI -DDDDD 2>&1 | tee /tmp/APC_BR1500GI.debug.txt"? Well, I tried both ways and I come up with an "Ambiguous output redirect." error message.Hmm, I ran that exact set of commands under /bin/sh, and it worked on FreeBSD 11.1 (well, almost exactly - had to change the UPS name for my system). Be sure not to put any spaces between the characters "2>&1". Is it possible that you are using a different shell for the root account? For csh, this might work: /usr/local/libexec/nut/usbhid-ups -a APC_BR1500GI -DDDDD >& /tmp/APC_BR1500GI.debug.txt but it won't show the output as it writes it to the log file.