[Nut-upsuser] How to shut down the running usbhid-ups driver and start with -DDD option?

Niels Kristian Jensen nkj at internetgruppen.dk
Fri Nov 19 09:42:34 UTC 2010


Quoting Arjen de Korte <nut+users at de-korte.org>:

> The usbhid_resumer is not part of NUT and I don't know what happens if
> you send it a kill signal. On the other hand, sending a kill signal to
> usbhid-ups is not dangerous. This is the same what happens if you send
> 'upsdrvctl stop'. The upsdrvctl wrapper will attempt to find the proper
> PID to send the signal to, but if you already know that, sending it
> directly will have identical results.

OK, I tried:

root at grisen:/var/run/nut# ps ax | grep ups
   305 ?        S      0:00 upstart-udev-bridge --daemon
  1035 ?        Ss    37:48 /lib/nut/usbhid-ups -a PingvinUPS
  1039 ?        Ss     2:16 /sbin/upsd
  1050 ?        Ss     0:00 /sbin/upsmon
  1052 ?        S      1:18 /sbin/upsmon
32753 pts/0    S+     0:00 grep ups

root at grisen:/var/run/nut# kill 1035

root at grisen:/var/run/nut# ps ax | grep ups
   305 ?        S      0:00 upstart-udev-bridge --daemon
  1039 ?        Ss     2:16 /sbin/upsd
  1050 ?        Ss     0:00 /sbin/upsmon
  1052 ?        S      1:18 /sbin/upsmon
  1752 ?        Z      0:00 [upsmon] <defunct>
  1756 pts/0    S+     0:00 grep ups

Now /lib/nut/usbhid-ups -DDD -a PingvinUPS gives a long file, which I attach.

I had to boot the server for other reasons, and now ps ax shows:

nkj at grisen:~$ ps ax | grep ups
   289 ?        S      0:00 upstart-udev-bridge --daemon
  1010 ?        Ss     0:00 /lib/nut/usbhid-ups -a PingvinUPS
  1013 ?        Ss     0:00 /sbin/upsd
  1016 ?        Ss     0:00 /sbin/upsmon
  1017 ?        S      0:00 /sbin/upsmon
  1317 pts/1    S+     0:00 grep ups

which looks normal to me. The directory:

/var/run/nut lists:

nkj at grisen:~$ sudo ls -al /var/run/nut
total 12
drwxrwx---  2 root nut  120 2010-11-19 10:38 .
drwxr-xr-x 16 root root 640 2010-11-19 10:40 ..
-rw-r--r--  1 nut  nut    5 2010-11-19 10:38 upsd.pid
-rw-r--r--  1 root root   5 2010-11-19 10:38 upsmon.pid
srw-rw----  1 nut  nut    0 2010-11-19 10:38 usbhid-ups-PingvinUPS
-rw-r--r--  1 nut  nut    5 2010-11-19 10:38 usbhid-ups-PingvinUPS.pid


Best regards,
Niels Kristian Jensen



-------------- next part --------------
A non-text attachment was scrubbed...
Name: putty.zip
Type: application/x-zip-compressed
Size: 14802 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20101119/89d06c19/attachment-0001.bin>


More information about the Nut-upsuser mailing list