Re: [Nut-upsuser] How to shut down the running usbhid-ups driver and start with -DDD option?
Citeren Niels Kristian Jensen n...@internetgruppen.dk: n...@grisen:~$ sudo su - r...@grisen:~# cd /var/run/nut/ r...@grisen:/var/run/nut# ls -al total 8 drwxrwx--- 2 root nut 100 2010-11-12 14:31 . drwxr-xr-x 16 root root 640 2010-11-19 09:58 .. -rw-r--r-- 1 nut nut5 2010-10-22 22:41 upsd.pid -rw-r--r-- 1 root root 5 2010-10-22 22:41 upsmon.pid srw-rw 1 nut nut0 2010-10-22 22:41 usbhid-ups-PingvinUPS This is wrong. There is no usbhid-ups-PingvinUPS.pid file, although the UNIX domain socket is there. The only way how I can explain this is happening, if that you've started the usbhid-ups driver in a shell and somehow lost control over that shell while it kept running. Only when running in debug mode, no PID file is created since the process is running in the foreground so you can easily stop it (Ctrl-C). Best regards, Arjen -- Please keep list traffic on the list (off-list replies will be rejected) ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
[Nut-upsuser] How to shut down the running usbhid-ups driver and start with -DDD option?
Hi all, Well, I must be missing something so obvious, that it isn't even in the documentation: How to stop all instances of a driver. I tried this on my system, since I use the usbhid-ups: n...@grisen:~$ ps ax | grep usbhid 238 ?S 0:00 [usbhid_resumer] 1035 ?Ss37:14 /lib/nut/usbhid-ups -a PingvinUPS 24223 pts/0S+ 0:00 grep usbhid I would not dare to use kill on neither the usbhid_resumer nor the usbhid-ups with the system running in a remote location. /lib/nut/usbhid-ups -h gives no clue about how to shut down, the -k option probably would shut down the UPS, not the driver. So I searched the mail archives using keywords: error sending control message libusb_get_report If some useful answer came up, I failed to find it. Searching with google: libusb_get_report site:www.networkupstools.org and debug site:www.networkupstools.org Nothing here, either. Can someone tell me how? Please be gentle, I feel like this should be a simple task... Best regards, Niels Kristian Jensen Quoting Arjen de Korte nut+us...@de-korte.org: Citeren Niels Kristian Jensen n...@internetgruppen.dk: (many more resource errors follow) The last lines are telling you what is going on: 4.547868 libusb_get_report: error sending control message: Device or resource busy 4.547886 Can't retrieve Report 06: Device or resource busy 4.547900 Got disconnected by another driver: Device or resource busy Well, I probably need to shut down NUT somehow to release the resource? Yes. You can only claim a device once, so in order to get meaningful output, you must stop all instances of usbhid-ups before starting it in debug mode. Best regards, Arjen -- Please keep list traffic on the list (off-list replies will be rejected) ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] How to shut down the running usbhid-ups driver and start with -DDD option?
On 18/11/2010 21:31, Niels Kristian Jensen wrote: Hi all, Well, I must be missing something so obvious, that it isn't even in the documentation: How to stop all instances of a driver. Please don't top post, it's considered rude. To stop the driver: upsdrvctl stop PingvinUPS Then you can start it again manually: /lib/nut/usbhid-ups -a PingvinUPS -DDD That's only useful if you want to debug the driver of course. Otherwise you'd start it like this: upsdrvctl start PingvinUPS HTH, Chris ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] How to shut down the running usbhid-ups driver and start with -DDD option?
On 18-11-2010 22:35, Chris Boot wrote: On 18/11/2010 21:31, Niels Kristian Jensen wrote: Hi all, Well, I must be missing something so obvious, that it isn't even in the documentation: How to stop all instances of a driver. Please don't top post, it's considered rude. You are right - I forgot that, I'm sorry. To stop the driver: upsdrvctl stop PingvinUPS I tried it, console shows: Ubuntu 10.04.1 LTS Welcome to Ubuntu! * Documentation: https://help.ubuntu.com/ n...@grisen:~$ sudo upsdrvctl stop PingvinUPS [sudo] password for nkj: Network UPS Tools - UPS driver controller 2.4.3 Can't open /var/run/nut/usbhid-ups-auto.pid: No such file or directory Ooops... ? Best regards, Niels Kristian Jensen -- Kan du ikke svare vha. Outlook Express? Se http://www.lind-damkjaer.dk/da/node/68 ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser