Thank you for the commands... Please find attached log... Im not sure if the Load.on worked, because in the end I had to manually start the UPS (with button). Anyway, let me know should I need to perform some steps again (probably yes, since I believe it was off). Jakub On 11.03.2015 20:11, hyouko at gmail.com wrote:> 2015-03-11 14:21 GMT+01:00 Jakub Scepka <jakub.scepka at gmail.com>: >> Would you be so kind and provide some examples (commands), please? >> I would run them today in the evening and report back with the logs. > First, be sure to have in upsd.users a valid entry to set vars and > execute instant commands: > > [<username>] > password = <password> > actions = SET > instcmds = ALL > > where <username> and <password> are strings of your choice. > > Then stop all the NUT-related things already running and (as per > configuration you posted earlier): > > - terminal #1 - as root (this should generete the log we are after): > nutdrv_qx -a ups -DDDDD >> /path/to/my/precious/log 2>&1 > And keep it running all the time till the tests are over. > > - terminal #2 - as root: > upsd -D > This one too is expected to be kept alive all the time. > > - terminal #3: > # shutdown.stayoff with ups.delay.shutdown set to 30 seconds; > upsrw -s ups.delay.shutdown=30 -u <username> -p <password> ups > upscmd -u <username> -p <password> ups shutdown.stayoff > > # shutdown.stayoff with ups.delay.shutdown set to 60 seconds; > upsrw -s ups.delay.shutdown=60 -u <username> -p <password> ups > upscmd -u <username> -p <password> ups shutdown.stayoff > > # shutdown.return with ups.delay.shutdown set to 30 seconds and > ups.delay.start set to 60 seconds; > upsrw -s ups.delay.shutdown=30 -u <username> -p <password> ups > upsrw -s ups.delay.start=60 -u <username> -p <password> ups > upscmd -u <username> -p <password> ups shutdown.return > > # shutdown.return with ups.delay.shutdown set to 30 seconds and > ups.delay.start set to 0 seconds; > upsrw -s ups.delay.shutdown=30 -u <username> -p <password> ups > upsrw -s ups.delay.start=0 -u <username> -p <password> ups > upscmd -u <username> -p <password> ups shutdown.return > > # shutdown.return with ups.delay.shutdown set to 60 seconds and > ups.delay.start set to 60 seconds; > upsrw -s ups.delay.shutdown=60 -u <username> -p <password> ups > upsrw -s ups.delay.start=60 -u <username> -p <password> ups > upscmd -u <username> -p <password> ups shutdown.return > > # shutdown.return with ups.delay.shutdown set to 60 seconds and > ups.delay.start set to 0 seconds; > upsrw -s ups.delay.shutdown=60 -u <username> -p <password> ups > upsrw -s ups.delay.start=0 -u <username> -p <password> ups > upscmd -u <username> -p <password> ups shutdown.return > > # shutdown.stop executed after one of the previous commands (while > ups.delay.shutdown elapses); > # e.g. after a shutdown.return: > upsrw -s ups.delay.shutdown=30 -u <username> -p <password> ups > upsrw -s ups.delay.start=60 -u <username> -p <password> ups > upscmd -u <username> -p <password> ups shutdown.return > # wait ~15 seconds, then: > upscmd -u <username> -p <password> ups shutdown.stop > > # load.on executed after one of the previous shutdowns (after a > successful shutdown.stayoff or while ups.delay.start elapses); > # e.g. after a shutdown.return: > upsrw -s ups.delay.shutdown=30 -u <username> -p <password> ups > upsrw -s ups.delay.start=60 -u <username> -p <password> ups > upscmd -u <username> -p <password> ups shutdown.return > # wait ~45 seconds, then: > upscmd -u <username> -p <password> ups load.on > > # load.off and then load.on. > upscmd -u <username> -p <password> ups load.off > # wait ~30 seconds, then: > upscmd -u <username> -p <password> ups load.on > > If you want to stop the shutdowns, you can issue a shutdown.stop: > upscmd -u <username> -p <password> ups shutdown.stop > > If the shutdown.stayoff commands succeed you can turn on the ups with a load.on: > upscmd -u <username> -p <password> ups load.on-------------- next part -------------- A non-text attachment was scrubbed... Name: log.tar.gz Type: application/gzip Size: 62194 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20150311/896edc29/attachment-0001.bin>
2015-03-11 21:43 GMT+01:00 Jakub Scepka (private) <jakub.scepka at gmail.com>:> Thank you for the commands... > Please find attached log...Looking at the log it seems that the only commands understood by the UPS are the two shutdown.return with ups.delay.start=0. If this is the case, I must confess I was sort of expecting something like this as the other ups.delay.{start,shutdown}s and shutdown.stayoff/load.off imply the use of 'SnRm' command which is too long to fit in one 8 bytes interrupt (and then the driver has to use 2 interrupts).> Im not sure if the Load.on worked, because in the end I had to manually > start the UPS (with button). > Anyway, let me know should I need to perform some steps again (probably yes, > since I believe it was off).But.. you say the UPS at the end of the test was off - so I'm a bit puzzled now: I need you to help me clear my mind. A little more testing and logs to produce. First, put a dummy load (something like a lamp should suffice) under UPS protection; cut the power to the UPS (but leave it grounded, I don't want to have you on my conscience) to put it on battery. Then, yet again: - terminal #1 - as root: nutdrv_qx -a ups -DDDDD >> /path/to/my/precious/log 2>&1 - terminal #2 - as root: upsd -D - terminal #3: upsrw -s ups.delay.shutdown=30 -u <username> -p <password> ups upsrw -s ups.delay.start=0 -u <username> -p <password> ups upscmd -u <username> -p <password> ups shutdown.return # Wait ~15 seconds, then: upscmd -u <username> -p <password> ups shutdown.stop # Does this stop the shutdown? If so, wait ~60 seconds then: upscmd -u <username> -p <password> ups shutdown.return # Then wait till the UPS shutdowns the load (does it happen?); wait one minute or so and then give back power to the UPS. # In a short time frame the UPS should now start again bringing back power to the attached load: does this happen? # Now, just to confirm that the various 'SnRm' commands don't work, cut again the power to the UPS and then: upsrw -s ups.delay.shutdown=30 -u <username> -p <password> ups upsrw -s ups.delay.start=60 -u <username> -p <password> ups upscmd -u <username> -p <password> ups shutdown.return # Wait ~60 seconds: does the UPS shutdown the load?
Thanks! Now merged into master, it'll be in the upcoming 2.7.3. As icing on the cake, we'd appreciate a upsc/upsrw/upscmd dump for our own DDL: http://buildbot.networkupstools.org/~buildbot/cayman/docs/latest/ddl/ https://github.com/networkupstools/nut-ddl
Wonderful, great job! On Tue, Mar 17, 2015 at 11:35 PM, hyouko at gmail.com <hyouko at gmail.com> wrote:> Thanks! Now merged into master, it'll be in the upcoming 2.7.3. > > As icing on the cake, we'd appreciate a upsc/upsrw/upscmd dump for our own > DDL: > http://buildbot.networkupstools.org/~buildbot/cayman/docs/latest/ddl/ > https://github.com/networkupstools/nut-ddl >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20150318/78a2a0d1/attachment.html>