So....seems so better... Each time I rebbot, I miss the /var/run/nut folder... root at artu:~# upsdrvctl start Network UPS Tools - UPS driver controller 2.7.2 Network UPS Tools - Megatec/Q1 protocol USB driver 0.11 (2.7.2) Can't chdir to /var/run/nut: No such file or directory Driver failed to start (exit status=1) root at artu:~# upsd Network UPS Tools upsd 2.7.2 fopen /var/run/nut/upsd.pid: No such file or directory listening on 192.168.1.1 port 3493 listening on 127.0.0.1 port 3493 Can't chdir to /var/run/nut: No such file or directory Once manually created ad giving permission to nut group, I can start the driver and the daemon: root at artu:~# upsdrvctl start Network UPS Tools - UPS driver controller 2.7.2 Network UPS Tools - Megatec/Q1 protocol USB driver 0.11 (2.7.2) Supported UPS detected with megatec protocol Rating information unavailable Vendor information unavailable No values provided for battery high/low voltages in ups.conf Using 'guestimation' (low: -0.866667, high: -1 root at artu:~# upsd -c reload Network UPS Tools upsd 2.7.2 .083333)! Battery runtime will not be calculated (runtimecal not set) root at artu:~# upsc Elit at artu Init SSL without certificate database battery.voltage: 13.90 battery.voltage.high: -1.08 battery.voltage.low: -0.87 device.type: ups driver.name: blazer_usb driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.version: 2.7.2 driver.version.internal: 0.11 input.frequency: 50.0 input.voltage: 228.7 input.voltage.fault: 140.0 output.voltage: 226.5 ups.beeper.status: enabled ups.delay.shutdown: 30 ups.delay.start: 180 ups.load: 16 ups.productid: 0000 ups.status: OL ups.temperature: 30.0 ups.type: offline / line interactive ups.vendorid: ffff What's the right procedure for loading driver/daemon at boot? I have read a lot about /var/run/nut missing, but haven't find any solution.... I have also successfully tested the battery... upscmd -uadmin -pups Elit at artu test.battery.start.quick Thank you lots, Andrea 2017-06-11 5:31 GMT+02:00 Daniele Pezzini <hyouko at gmail.com>:> > Starting the driver with debug level 5 seems happier, but continue to > cycle > > It is meant to 'cycle', it's working correctly. > When you run the driver normally (i.e. not in debug mode), you don't > see all that output (plus, after having established a connection with > the device, the driver goes into the background), but it's doing > exactly the same thing. > > > nutdrv_qx.... > > > > rroot at artu:~# upsdrvctl start > > Network UPS Tools - UPS driver controller 2.7.2 > > Network UPS Tools - Megatec/Q1 protocol USB driver 0.11 (2.7.2) > > Can't chdir to /var/run/nut: No such file or directory > > Driver failed to start (exit status=1) > > > > but with blazer_usb seems better.... > > > > root at artu:~# upsdrvctl start > > Network UPS Tools - UPS driver controller 2.7.2 > > Network UPS Tools - Megatec/Q1 protocol USB driver 0.11 (2.7.2) > > Supported UPS detected with megatec protocol > > Rating information unavailable > > Vendor information unavailable > > No values provided for battery high/low voltages in ups.conf > > > > Using 'guestimation' (low: -0.866667, high: -1.083333)! > > Battery runtime will not be calculated (runtimecal not set) > > > > but > > > > root at artu:~# upsc Elit at artu > > Error: Connection failure: Connection refused > > Also, remember that, if you launch upsd and then you change the > content of ups.conf (for example, changing the driver of your UPS from > 'nutdrv_qx' to 'blazer_usb'), you need to reload its configuration > (upsd -c reload) or restart it (mandatory, if it's running in debug > mode). > > So, let's try this: > 1. stop all NUT-related services, > 2. make sure to have the right things in your ups.conf (i.e. your UPS > configured for driver 'blazer_usb'), > 3. launch upsd, > 4. launch the driver, > 5. now check the values with upsc: what happens? >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170611/4b755dbb/attachment.html>
2017-06-11 14:10 GMT+02:00 Andrea de Lutti <adelutti at gmail.com>:> So....seems so better... > > Each time I rebbot, I miss the /var/run/nut folder... > > root at artu:~# upsdrvctl start > Network UPS Tools - UPS driver controller 2.7.2 > Network UPS Tools - Megatec/Q1 protocol USB driver 0.11 (2.7.2) > Can't chdir to /var/run/nut: No such file or directory > Driver failed to start (exit status=1) > > root at artu:~# upsd > Network UPS Tools upsd 2.7.2 > fopen /var/run/nut/upsd.pid: No such file or directory > listening on 192.168.1.1 port 3493 > listening on 127.0.0.1 port 3493 > Can't chdir to /var/run/nut: No such file or directory > > Once manually created ad giving permission to nut group, I can start the > driver and the daemon: > > root at artu:~# upsdrvctl start > Network UPS Tools - UPS driver controller 2.7.2 > Network UPS Tools - Megatec/Q1 protocol USB driver 0.11 (2.7.2) > Supported UPS detected with megatec protocol > Rating information unavailable > Vendor information unavailable > No values provided for battery high/low voltages in ups.conf > > Using 'guestimation' (low: -0.866667, high: -1 > > root at artu:~# upsd -c reload > Network UPS Tools upsd 2.7.2 > .083333)! > Battery runtime will not be calculated (runtimecal not set) > > > root at artu:~# upsc Elit at artu > Init SSL without certificate database > battery.voltage: 13.90 > battery.voltage.high: -1.08 > battery.voltage.low: -0.87 > device.type: ups > driver.name: blazer_usb > driver.parameter.pollinterval: 2 > driver.parameter.port: auto > driver.version: 2.7.2 > driver.version.internal: 0.11 > input.frequency: 50.0 > input.voltage: 228.7 > input.voltage.fault: 140.0 > output.voltage: 226.5 > ups.beeper.status: enabled > ups.delay.shutdown: 30 > ups.delay.start: 180 > ups.load: 16 > ups.productid: 0000 > ups.status: OL > ups.temperature: 30.0 > ups.type: offline / line interactive > ups.vendorid: ffffGlad it works.> What's the right procedure for loading driver/daemon at boot?There's not a single right procedure, it's very much platform/distribution-dependent. Probably, it would be better to check the documentation of your platform/distribution/whatever or ask their packagers.> I have read a lot about /var/run/nut missing, but haven't find any > solution....The same applies here.> I have also successfully tested the battery... > > upscmd -uadmin -pups Elit at artu test.battery.start.quickI would also recommend testing the shutdown procedure and making sure that everything works as expected on power failures. Please, let us know the results of these tests, so that we can add a more informed report about your device to our library (http://networkupstools.org/ddl/).
> > > root at artu:~# upsc Elit at artu > > Init SSL without certificate database > > battery.voltage: 13.90 > > battery.voltage.high: -1.08 > > battery.voltage.low: -0.87 > > device.type: ups > > driver.name: blazer_usb > > driver.parameter.pollinterval: 2 > > driver.parameter.port: auto > > driver.version: 2.7.2 > > driver.version.internal: 0.11 > > input.frequency: 50.0 > > input.voltage: 228.7 > > input.voltage.fault: 140.0 > > output.voltage: 226.5 > > ups.beeper.status: enabled > > ups.delay.shutdown: 30 > > ups.delay.start: 180 > > ups.load: 16 > > ups.productid: 0000 > > ups.status: OL > > ups.temperature: 30.0 > > ups.type: offline / line interactive > > ups.vendorid: ffff > > Glad it works. >?Yep! :)?> > > > I have also successfully tested the battery... > > > > upscmd -uadmin -pups Elit at artu test.battery.start.quick > > I would also recommend testing the shutdown procedure and making sure > that everything works as expected on power failures. > Please, let us know the results of these tests, so that we can add a > more informed report about your device to our library > (http://networkupstools.org/ddl/). >?Nice, I would like to test it, but if I don't have battery runtime value and / or battery charge, how may I test it correctly? I have seen also some strange values for battery.voltage.high and battery.voltage.low....are they correct? TY Andrea? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170612/592db249/attachment.html>
Charles Lepple
2017-Jun-16 13:00 UTC
[Nut-upsuser] Help with Elite 800VA usb UPS (/var/run/nut on Ubuntu 16.04)
On Jun 11, 2017, at 8:10 AM, Andrea de Lutti <adelutti at gmail.com> wrote:> > What's the right procedure for loading driver/daemon at boot? > I have read a lot about /var/run/nut missing, but haven't find any solution....Your copy of /etc/init.d/nut-server should have the following lines: # Check if /var/run/nut exists and has the correct perms check_var_directory() { [ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \ && chown root:nut ${pid_dir} \ && chmod 770 ${pid_dir} \ && [ -x /sbin/restorecon ] && /sbin/restorecon ${pid_dir} } This works on my Ubuntu 16.04 test system. I am using a PPA with some libusb-1.0 changes, but this particular file does not seem to have changed since Ubuntu 14.04 (looks like there is some systemd emulation of SysV-style init scripts for NUT on 16.04). Are you using systemd or upstart?