[Nut-upsuser] nutdrv_atcl_usb

hyouko at gmail.com hyouko at gmail.com
Wed Mar 11 19:11:56 UTC 2015


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



More information about the Nut-upsuser mailing list