Dinow Hsieh
2017-May-16 03:56 UTC
[Nut-upsuser] Fw: [Nut-upsdev] POWERCOM-UPS-USB : UPS Shutdown
Good Day Roger Price AA. Hi, Normally one would expect the UPS to disconnect it's power outlets after the default ups.delay.shutdown = 20 seconds. ==> I got it. I tried to command "upsdrvctl shutdown" on both line-mode and battery-mode ==> But ups do not disconnect its outlets power ----------------------------------------------------------------------------------- BB. Could you show us the output of command "upsc pcmups"? ==> Yes. Below 2 mode were the outputs of command "upsc pcmups" B1. Battery Mode dinow-All-Series:/etc/nut$ upsc pcmups Init SSL without certificate database battery.charge: 100 battery.charge.low: 10 battery.charge.warning: 30 battery.date: 2010/12/20 battery.runtime: 784 battery.type: PbAc device.mfr: POWERCOM Co.,LTD device.model: HID UPS Battery device.serial: 004-0D9F-000 device.type: ups driver.name: usbhid-ups driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.version: 2.7.1 driver.version.data: PowerCOM HID 0.4 driver.version.internal: 0.38 input.frequency: 0.0 input.voltage: 0.0 input.voltage.nominal: 120 output.frequency: 0.0 output.voltage: 120.0 output.voltage.nominal: 120 ups.date: 2010/12/20 ups.delay.shutdown: 20 ups.delay.start: 60 ups.load: 4 ups.mfr: POWERCOM Co.,LTD ups.model: HID UPS Battery ups.productid: 0004 ups.serial: 004-0D9F-000 ups.status: OB DISCHRG ups.test.result: Done and passed ups.timer.shutdown: 120 ups.timer.start: 740160 ups.vendorid: 0d9f B2. Nomal Mode dinow-All-Series:/etc/nut$ upsc pcmups Init SSL without certificate database battery.charge: 100 battery.charge.low: 100 battery.charge.warning: 30 battery.date: 2010/12/20 battery.runtime: 800 battery.type: PbAc device.mfr: POWERCOM Co.,LTD device.model: HID UPS Battery device.serial: 004-0D9F-000 device.type: ups driver.name: usbhid-ups driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.version: 2.7.1 driver.version.data: PowerCOM HID 0.4 driver.version.internal: 0.38 input.frequency: 59.0 input.voltage: 111.0 input.voltage.nominal: 120 output.frequency: 59.0 output.voltage: 120.0 output.voltage.nominal: 120 ups.date: 2010/12/20 ups.delay.shutdown: 20 ups.delay.start: 60 ups.load: 5 ups.mfr: POWERCOM Co.,LTD ups.model: HID UPS Battery ups.productid: 0004 ups.serial: 004-0D9F-000 ups.status: OL ups.test.result: Done and passed ups.timer.shutdown: 0 ups.timer.start: 755760 ups.vendorid: 0d9f ----------------------------------------------------------------------------------- CC. Once the command "upsdrvctl shutdown" works, you will need to incorporate it in your shutdown process. ==> I got it NUT 2.7.4 includes file .../scripts/systemd/nutshutdown . Does Ubunti install this? ==> Yes. Ubuntu haved installed this as below contents dinow-All-Series:/lib/systemd/system-shutdown$ cat nutshutdown #!/bin/sh /sbin/upsmon -K >/dev/null 2>&1 && /sbin/upsdrvctl shutdown ----------------------------------------------------------------------------------- DD. Does wall successfully notify the users on an Ubuntu system? If you type echo "Hello from wall" | wall do the users of Gnome, KDE, LXDE, LightDM etc see the message? ==> Yes. I used the putty and got below 3 messages (Battery Power / Power Resotre / and type commands directly) D1. Broadcast Message from dinow-Al (somewhere) at 10:59 ... UPS pcmups at localhost on battery D2. Broadcast Message from dinow-Al (somewhere) at 11:00 ... UPS pcmups at localhost on line power D3. Broadcast Message from dinow-Al (/dev/pts/0) at 11:02 ... Hello from wall ----------------------------------------------------------------------------------- EE. Perhaps the BSD syntax doesn't work on Debian, ps -elf | grep -E "nut|upsd|upsmon" would have been better. ==> dinow-All-Series:/etc/nut$ ps -elf|grep -E "nut|upsd|upsmon" 1 S root 1010 1 0 80 0 - 9421 - 11:09 ? 00:00:00 /sbin/upsmon 5 S nut 1012 1010 0 80 0 - 11335 - 11:09 ? 00:00:00 /sbin/upsmon 1 S nut 1065 1 0 80 0 - 4324 - 11:09 ? 00:00:00 /lib nut/usbhid-ups -a pcmups 1 S nut 1067 1 0 80 0 - 9424 - 11:09 ? 00:00:00 /sbin/upsd 4 S root 2199 1 0 80 0 - 19215 - 11:10 ? 00:00:00 /usr/sbin/cupsd -f 0 S dinow 2447 2395 0 80 0 - 3989 pipe_w 11:11 pts/2 00:00:00 grep --color=auto -E nut|upsd|upsmon ----------------------------------------------------------------------------------- FF. I will make a note for next time. ==> Deep Appreciation for your reply If you have any questions, please don't hesitate to inform us. Sincerely yours, May. 16th Dinow Hsieh ----- Original Message ----- From: "Roger Price" <roger at rogerprice.org> To: "nut-upsuser Mailing List" <nut-upsuser at lists.alioth.debian.org> Sent: Monday, May 15, 2017 6:06 PM Subject: Re: [Nut-upsuser] Fw: [Nut-upsdev] POWERCOM-UPS-USB : UPS Shutdown> On Mon, 15 May 2017, Dinow Hsieh wrote: > >> ==> I have tried this command "upsdrvctl shutdown" as below results >> (However the UPS still sustain the power) >> >> Network UPS Tools - UPS driver controller 2.7.1 >> Network UPS Tools - Generic HID driver 0.38 (2.7.1) >> USB communication driver 0.32 >> Using subdriver : PowerCOM HID 0.4 >> Initiating UPS shutdown > > Hi, Normally one would expect the UPS to disconnect it's power outlets > after the default ups.delay.shutdown = 20 seconds. Could you show us the > output of command "upsc pcmups"? > >> CC. Do you have a script in a systemd system-shutdown directory which >> calls >> "upsdrvctl shutdown" ? >> >> ==> No > > Once the command "upsdrvctl shutdown" works, you will need to incorporate > it in your shutdown process. NUT 2.7.4 includes file > .../scripts/systemd/nutshutdown . Does Ubunti install this? > > > 5. File = notifycmd > > #!/bin/bash > > # > > # NUT NOTIFYCMD script > > PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin > > trap "exit 0" SIGTERM > > if [ "$NOTIFYTYPE" = "ONLINE" ] > > then > > echo $0: power restored | wall > > Does wall successfully notify the users on an Ubuntu system? If you type > > echo "Hello from wall" | wall > > do the users of Gnome, KDE, LXDE, LightDM etc see the message? > >> fi 6. File =upssched.conf >> CMDSCRIPT /bin/upssched-cmd >> PIPEFN /var/run/nut/upssched/upssched.pipe >> LOCKFN /var/run/nut/upssched/upssched.lock > > It doesn't look as if upssched will be called, since your NOTIFYCMD is > pointing to your script and not upssched. So upssched.conf will not be > used. > >> BB. What does command "ps aux | grep ups" report? >> >> ==> Yes. Below is the concise result >> ... >> nut /lib/nut/usbhid-ups -a pcmups >> nut upsd >> root upsmon >> nut upsmon > > Perhaps the BSD syntax doesn't work on Debian, ps -elf | grep -E > "nut|upsd|upsmon" would have been better. I will make a note for next > time. > > Roger--------------------------------------------------------------------------------> _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170516/e7b90419/attachment.html>
Roger Price
2017-May-16 09:24 UTC
[Nut-upsuser] Fw: [Nut-upsdev] POWERCOM-UPS-USB : UPS Shutdown
On Tue, 16 May 2017, Dinow Hsieh wrote:> BB. Could you show us the output of command "upsc pcmups"? > > ==> Yes. Below 2 mode were the outputs of command "upsc pcmups" > > battery.charge: 100 > battery.charge.low: 10 > battery.charge.warning: 30 > battery.date: 2010/12/20...> ups.date: 2010/12/20 > ups.load: 4...> ups.status: OB DISCHRGIs this battery really 6.5 years old? Is this part of the problem? One would not expect such a battery to support any load. I notice that during the test, you have little or no load, since despite being in state OB DISCHRG the battery.charge is still 100. It's best to perform such tests with a dummy load such as a table lamp and an old fashioned incandescent 100 watt bulb.> ups.delay.shutdown: 20 > ups.delay.start: 60I wonder where the ups.delay.start: 60 comes from. The NUT default value is 30 secs, and you do not change the value in ups.conf.> DD. Does wall successfully notify the users on an Ubuntu system??? If you > type > > ??? echo "Hello from wall" | wall > > do the users of Gnome, KDE, LXDE, LightDM etc see the message? > > ==> Yes. I used the putty and got below 3 messages > (Battery Power / Power Resotre / and type commands directly) > > > D3. Broadcast Message from dinow-Al > ??????? (/dev/pts/0) at 11:02 ... > > Hello from wallI'm guessing that this output is in an xterm window or something similar. It shows that wall is working but does not show that the wall->Gnome, wall->KDE, wall->LXDE, wall->LightDM interfaces are working. Does a Ubuntu user with no xterm window open see the message as part of the system notifications? Roger
Dinow Hsieh
2017-May-17 08:53 UTC
[Nut-upsuser] Fw: [Nut-upsdev] POWERCOM-UPS-USB : UPS Shutdown
Good Day Roger AA. notice that during the test, you have little or no load, since despite being in state OB DISCHRG the battery.charge is still 100. It's best to perform such tests with a dummy load such as a table lamp and an old fashioned incandescent 100 watt bulb. ==> Yes. I got it and try to ascend load as below results dinow-All-Series:~# upsc pcmups Init SSL without certificate database battery.charge: 32 battery.charge.low: 10 battery.charge.warning: 30 battery.date: 2010/12/20 battery.runtime: 256 battery.type: PbAc device.mfr: POWERCOM Co.,LTD device.model: HID UPS Battery device.serial: 004-0D9F-000 device.type: ups driver.name: usbhid-ups driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.version: 2.7.1 driver.version.data: PowerCOM HID 0.4 driver.version.internal: 0.38 input.frequency: 0.0 input.voltage: 0.0 output.frequency: 60.0 output.voltage: 110.0 ups.beeper.status: disabled ups.date: 2010/12/20 ups.delay.shutdown: 20 ups.delay.start: 60 ups.load: 58 ups.mfr: POWERCOM Co.,LTD ups.model: HID UPS Battery ups.productid: 0004 ups.serial: 004-0D9F-000 ups.status: OB DISCHRG TRIM ups.test.result: Done and passed ups.timer.shutdown: 169 ups.timer.start: 755760 ups.vendorid: 0d9f ---------------------------------------------------------------------------------------- BB. I wonder where the ups.delay.start: 60 comes from. The NUT default value is 30 secs, and you do not change the value in ups.conf. ==> I tried below set-command but it react fail dinow-All-Series:~# upsrw -s "ups.delay.shutdown"="30" -u pcmups pcmups at localhost Password: Unexpected response from upsd: ERR ACCESS-DENIED ==> Are there any behaviors that I should confirm ? ---------------------------------------------------------------------------------------- CC. Does a Ubuntu user with no xterm window open see the message as part of the ==> The root and remote user(ssh-putty) get the broadcasting message all from terminal-window ---------------------------------------------------------------------------------------- DD. I have tried below commands and the ups actually works (Battery test and Beeper ON/OFF) dinow-All-Series:~# upscmd -l pcmups Instant commands supported on UPS [pcmups]: beeper.disable - Disable the UPS beeper beeper.enable - Enable the UPS beeper beeper.toggle - Toggle the UPS beeper load.on - Turn on the load immediately load.on.delay - Turn on the load with a delay (seconds) shutdown.return - Turn off the load and return when power is back shutdown.stayoff - Turn off the load and remain off test.battery.start.quick - Start a quick battery test dinow-All-Series:~# upscmd pcmups test.battery.start.quick Username (root): pcmups Password: OK ==> The ups run battery mode dinow-All-Series:~# upscmd pcmups beeper.disable Username (root): pcmups Password: OK ==> The ups turn off it beeper when its on battery mode ==> However, I command center 5 (load.on / delay / shutdown return / stay off) but no any reaction occur If you have any questions, please don't hesitate to inform us. Sincerely yours, May. 17th Dinow Hsieh ----- Original Message ----- From: "Roger Price" <roger at rogerprice.org> To: "nut-upsuser Mailing List" <nut-upsuser at lists.alioth.debian.org> Sent: Tuesday, May 16, 2017 5:24 PM Subject: Re: [Nut-upsuser] Fw: [Nut-upsdev] POWERCOM-UPS-USB : UPS Shutdown> On Tue, 16 May 2017, Dinow Hsieh wrote: > >> BB. Could you show us the output of command "upsc pcmups"? >> >> ==> Yes. Below 2 mode were the outputs of command "upsc pcmups" >> >> battery.charge: 100 >> battery.charge.low: 10 >> battery.charge.warning: 30 >> battery.date: 2010/12/20 > ... >> ups.date: 2010/12/20 >> ups.load: 4 > ... >> ups.status: OB DISCHRG > > Is this battery really 6.5 years old? Is this part of the problem? One > would not expect such a battery to support any load. I notice that during > the test, you have little or no load, since despite being in state OB > DISCHRG the battery.charge is still 100. It's best to perform such tests > with a dummy load such as a table lamp and an old fashioned incandescent > 100 watt bulb. > >> ups.delay.shutdown: 20 >> ups.delay.start: 60 > > I wonder where the ups.delay.start: 60 comes from. The NUT default value > is 30 secs, and you do not change the value in ups.conf. > >> DD. Does wall successfully notify the users on an Ubuntu system? If you >> type >> >> echo "Hello from wall" | wall >> >> do the users of Gnome, KDE, LXDE, LightDM etc see the message? >> >> ==> Yes. I used the putty and got below 3 messages >> (Battery Power / Power Resotre / and type commands directly) >> >> >> D3. Broadcast Message from dinow-Al >> (/dev/pts/0) at 11:02 ... >> >> Hello from wall > > I'm guessing that this output is in an xterm window or something similar. > It shows that wall is working but does not show that the wall->Gnome, > wall->KDE, wall->LXDE, wall->LightDM interfaces are working. Does a > Ubuntu user with no xterm window open see the message as part of the > system notifications? > > Roger--------------------------------------------------------------------------------> _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser