[Nut-upsuser] Fw: [Nut-upsdev] POWERCOM-UPS-USB : UPS Shutdown

Roger Price roger at rogerprice.org
Mon May 15 10:06:31 UTC 2017


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


More information about the Nut-upsuser mailing list