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. Thank you. Jakub S. On Tue, Mar 10, 2015 at 11:44 PM, hyouko at gmail.com <hyouko at gmail.com> wrote:> mmh.. it looks like someone forgot to hit 'reply all'. > > - relaying the originally attached files (gzipped, minus the two > screenshots, to keep size down). > > 2015-03-09 23:20 GMT+01:00 Jakub Scepka (private) <jakub.scepka at gmail.com > >: > > Hi everyone! > > > > Here is summary for our fellows wit the same/similar UPS to save them 3 > > weeks of life :) > > > > First of all I'm running Ubuntu 14.10 (Utopic) on a normal laptop (not > > VirtualMachine!) and I had to download the source from: > > > > https://github.com/zykh/nut/tree/nutdrv_qx-fuji (Thank you Charles) > > > > > > #sudo apt-get remove nut > > #sudo su > > #apt-get install autoconf > > #apt-get install libtool > > #apt-get install libusb-dev > > > > #./configure --without-ssl --with-usb --with-user=nut --with-group=nut > > #make > > #make install > > > > > > #lsusb -vvv -d 0001:0000 > > > > (see attached lsusb.log) > > > > > > > > Content of ups.conf: > > > > [ups] > > driver=nutdrv_qx > > protocol=megatec > > subdriver=fuji > > port=auto > > vendorid=0001 > > productid=0000 > > > > > > #/usr/local/ups/bin$ sudo ./nutdrv_qx -a ups -DDDDD > > (see attached log.log) > > - I have tried to pull the plug > > - reinsert / reconnect it (220V) > > - poweroff the UPS (by button) > > - and power on (by button) > > > > #/usr/local/ups/sbin$ sudo ./upsdrvctl start > > Network UPS Tools - UPS driver controller 2.7.2.5 > > Network UPS Tools - Generic Q* USB/Serial driver 0.13 (2.7.2.5) > > USB communication driver 0.32 > > Using protocol: Megatec 0.02 > > No values for battery high/low voltages > > Using 'guesstimation' (low: 31.200000, high: 39.000000)! > > Battery runtime will not be calculated (runtimecal not set) > > > > # /usr/local/ups/sbin$ sudo ./upsd > > Network UPS Tools upsd 2.7.2.5 > > fopen /var/state/ups/upsd.pid: No such file or directory > > listening on 0.0.0.0 port 3493 > > Connected to UPS [ups]: nutdrv_qx-ups > > > > > > NUT monitor (GUI): > > see screenshot3.png > > and screenshot4.png > > I have tested (and it worked like a charm): > > - beeper.toggle > > - test.battery.start > > - test.battery.stop > > > > THANKS TO ALL OF YOU PEOPLE > > > > ------------------------------------------ > > Originally my planes were to install NUT on a router (DD-WRT/Tomato) or > on > > QNAP NAS (ARM arch.) but packages for these devices are too old and I > don't > > know (so far) anything about compiling on/for these devices. > > My next logical step was to install Debian Virtual Machine on ESX server > and > > compile NUT on it. > > But, this setup suddenly didn't worked, I blame ESX USB passthrought, or > > maybe I'm missing something else... Who knows... :) > > > > See nutdrv_qx_5xD.txt (commands: ./nutdrv_qx -a ups -DDDDD and > ./nutdrv_qx > > -a ups -DDDDD -u root) > > or debianVM.txt (command: lsusb) > > if you are interested... > > It look similar to this: > > http://comments.gmane.org/gmane.comp.monitoring.nut.user/8970 > > ------------------------------------------ > > > > > > BR > > > > Jakub > > > > > > > > > > On 09.03.2015 16:27, hyouko at gmail.com wrote: > >> > >> Nice! > >> By the way, to avoid the initial protocol autodetection procedure and > >> to speed up the startup, you should set 'protocol=megatec'. > >> Do the various instant commands seem to work? Can you test them all > >> and report back the logs (a debug level of 5 should be enough)? > >> Also, what's the output of 'lsusb -vvv -d 0001:0000' (as root)? > > > > > > So far, so good! > However, I need a little more testing before I can merge this into master. > > If possible, I'd like you to test and report back the logs (still with > a debug level of 5) of: > - shutdown.stayoff with ups.delay.shutdown set to 30 seconds; > - shutdown.stayoff with ups.delay.shutdown set to 60 seconds; > - shutdown.return with ups.delay.shutdown set to 30 seconds and > ups.delay.start set to 60 seconds; > - shutdown.return with ups.delay.shutdown set to 30 seconds and > ups.delay.start set to 0 seconds; > - shutdown.return with ups.delay.shutdown set to 60 seconds and > ups.delay.start set to 60 seconds; > - shutdown.return with ups.delay.shutdown set to 60 seconds and > ups.delay.start set to 0 seconds; > - shutdown.stop executed after one of the previous commands (while > ups.delay.shutdown elapses); > - load.on executed after one of the previous shutdowns (after a > successful shutdown.stayoff or while ups.delay.start elapses); > - load.off and then load.on. > > Thanks in advance for your patience. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20150311/365e18ea/attachment-0001.html>
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
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>