Re: [Nut-upsuser] TrippLite SMART1500LCD no delay before ups shutdown.
That is going to be hard to diagnose without the usbhid-ups logs for the time when those commands are sent - can you try to keep the log going while sending them, then note the time when the command was sent? You can use the "tee" command: /lib/nut/usbhid-ups -DD -a TrippLiteUPS 2>&1 | tee /tmp/log.shutdown.return.txt (please use gzip before attaching the log - the mailing list does not accept messages over 40kB without manual intervention.) Sorry, I think there was a mistake on my part and for the large messages :) When I originally tried to run "/lib/nut/usbhid-ups -DD -a TrippLiteUPS" It complained about other drivers running and did not show any logging of commands given to the driver. So I have been now stopping nut-driver before running that command. After starting the logging then running both upsrw and upscmd I would ctl+c the logging leaving no driver running. I now realize that only a little while after canceling the logging is when NUT decided to shut down the server.If I leave the logging going it does not shutdown. I am assuming that is supposed to do that when no driver is seen running for awhile just incase?? And in that case is not part of my original no delay issue? I have run it again and it looks like ups.shutdown.delay changes show in the log @ 28.068836. But no mention at all in the log of shutdown.return run @ 80.951272. Just the same "ERR CMD-NOT-SUPPORTED" when attempting to run it. I think the load.off.delay behavior is expected, but I really thought the others should honor the delay variables. Will have to look further. log trimmed; appears to be the same as before? Yes looks about the same. Also I did a test on new installs of debian 8 and debian 9. Both worked as expected except for the delay variables are still being ignored and "ERR CMD-NOT-SUPPORTED" when running "upscmd TrippLiteUPS@localhost shutdown.return". NOTE: The issue of having to add a systemd service in my first post seems to be a proxmox issue, so I will look into that issue else where. log.shutdown.return.txt.gz Description: application/gzip ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] TrippLite SMART1500LCD no delay before ups shutdown.
On Aug 21, 2017, at 1:35 PM, Whiteshell Techwrote: > > I ran it again on battery and upsd running, set upsrw ok and then > shutdown.return gave an "ERR CMD-NOT-SUPPORTED" Odd thing is after running > that I am getting random timed ups powering off for one or two seconds then > turns back on even on battery. Server then starts shutting down. Some times > its right away sometimes after 4+ minutes. That is going to be hard to diagnose without the usbhid-ups logs for the time when those commands are sent - can you try to keep the log going while sending them, then note the time when the command was sent? You can use the "tee" command: /lib/nut/usbhid-ups -DD -a TrippLiteUPS 2>&1 | tee /tmp/log.shutdown.return.txt (please use gzip before attaching the log - the mailing list does not accept messages over 40kB without manual intervention.) > I did notice that that return.shutdown was not found in the list running > "upscmd -l TrippLiteUPS". I did see "load.off.delay" which also if I give a > value of 60 (or any other value) it shuts down in 20sec and stays off either > on battery or online. ups does come back on if i replug the ups. I think the load.off.delay behavior is expected, but I really thought the others should honor the delay variables. Will have to look further. > > > I am setting up a test computer with fresh Debian 9 for testing to see if all > my issues are still there without every thing else. > > Thanks for taking the time when you have some. > > > root@host:~# upscmd -l TrippLiteUPS > Instant commands supported on UPS [TrippLiteUPS]: > > beeper.disable - Disable the UPS beeper > beeper.enable - Enable the UPS beeper > beeper.mute - Temporarily mute the UPS beeper > beeper.off - Obsolete (use beeper.disable or beeper.mute) > beeper.on - Obsolete (use beeper.enable) > load.off - Turn off the load immediately > load.off.delay - Turn off the load with a delay (seconds) > reset.watchdog - Reset watchdog timer > shutdown.reboot - Shut down the load briefly while rebooting the UPS > shutdown.stop - Stop a shutdown in progress > test.battery.start.deep - Start a deep battery test > test.battery.start.quick - Start a quick battery test > test.battery.stop - Stop the battery test > > > > root@host:~# upsrw -s ups.delay.shutdown=60 TrippLiteUPS@localhost > Username (root): upsmon > Password: > OK > > root@host:~# upscmd TrippLiteUPS shutdown.return > Username (root): upsmon > Password: > Unexpected response from upsd: ERR CMD-NOT-SUPPORTED > log trimmed; appears to be the same as before? ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] TrippLite SMART1500LCD no delay before ups shutdown.
On Aug 21, 2017, at 12:45 AM, Whiteshell Techwrote: I have attempted to set the delay higher using "upsrw -s ups.delay.shutdown=120 TrippLiteUPS@localhost" and confirmed the value with "upsc TrippLiteUPS@localhost" Still the UPS switches off right away. Due to the way that the HID PDC shutdown sequence works, the value you see from "upsc ups.delay.shutdown" is just a variable in the driver. It does not write that to the UPS until the delayed shutdown command is sent, since the shutdown timer in the UPS starts when that value is written. That makes sense. Thanks for pointing that out I did not realize that. That said, it looks like the TrippLite HID mappings (in v2.7.4 as well as master) are missing the "shutdown.return" command. I'd look into it further, but ironically, the local power company has scheduled maintenance coming up soon, and I am typing this on a machine with a Tripp Lite UPS that doesn't play well with NUT. Should have more time later today or this week. At first after installing the debian nut packages with apt-get and setting up the config files I had to setup a systemd service to exeu "upsdrvctl shutdown" on shutdown or else the ups would not turn off at all. Now after setting up that service is when I discovered the issue, that the ups does not delay in shutting down. This sounds like a bug in the Debian packaging (or Proxmox? Not sure where the dividing line is.) Can you check their bug trackers? Okay, I will check the bug trackers. Also I will setup a fresh Debian 9 install on another system and see if the problem still happens. Thanks, Good luck with the power company. :) ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] TrippLite SMART1500LCD no delay before ups shutdown.
On Aug 21, 2017, at 8:33 AM, Charles Lepplewrote: > > That said, it looks like the TrippLite HID mappings (in v2.7.4 as well as > master) are missing the "shutdown.return" command. I'd look into it further, > but ironically, the local power company has scheduled maintenance coming up > soon, and I am typing this on a machine with a Tripp Lite UPS that doesn't > play well with NUT. Should have more time later today or this week. My mistake, should be handled by the main driver code here: https://github.com/networkupstools/nut/blob/v2.7.4/drivers/usbhid-ups.c#L558-L583 Can you grab a log as before, but with upsd running? You can send the upsrw command to set the timer, then get upscmd to run the "shutdown.return" command (might need to be on battery for this to work). It might also be best to power the server from another outlet or UPS. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] TrippLite SMART1500LCD no delay before ups shutdown.
[when responding, please use reply-all - the list does not mangle the reply-to header] > On Aug 21, 2017, at 12:45 AM, Whiteshell Tech> wrote: > > I have attempted to set the delay higher using "upsrw -s > ups.delay.shutdown=120 TrippLiteUPS@localhost" and confirmed the value with > "upsc TrippLiteUPS@localhost" Still the UPS switches off right away. Due to the way that the HID PDC shutdown sequence works, the value you see from "upsc ups.delay.shutdown" is just a variable in the driver. It does not write that to the UPS until the delayed shutdown command is sent, since the shutdown timer in the UPS starts when that value is written. That said, it looks like the TrippLite HID mappings (in v2.7.4 as well as master) are missing the "shutdown.return" command. I'd look into it further, but ironically, the local power company has scheduled maintenance coming up soon, and I am typing this on a machine with a Tripp Lite UPS that doesn't play well with NUT. Should have more time later today or this week. > At first after installing the debian nut packages with apt-get and setting up > the config files I had to setup a systemd service to exeu "upsdrvctl > shutdown" on shutdown or else the ups would not turn off at all. Now after > setting up that service is when I discovered the issue, that the ups does not > delay in shutting down. > This sounds like a bug in the Debian packaging (or Proxmox? Not sure where the dividing line is.) Can you check their bug trackers? ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
[Nut-upsuser] TrippLite SMART1500LCD no delay before ups shutdown.
Hello, I am hoping someone can point me in the right direction. I am setting up a new UPS, most things seem to be working except the UPS turns off immediately during a test shutdown using///"//upsmon -c fsd".//No delay before the UPS turns itself off leaving no time for the server to shutdown properly. I have attempted to set the delay higher using "upsrw -s ups.delay.shutdown=120 TrippLiteUPS@localhost" and confirmed the value with "upsc ///TrippLiteUPS@localhost/" Still the UPS switches off right away. At first after installing the debian nut packages with apt-get and setting up the config files I had to setup a systemd service to exeu "upsdrvctl shutdown" on shutdown or else the ups would not turn off at all. Now after setting up that service is when I discovered the issue, that the ups does not delay in shutting down. Only occasional errors in syslog I can see are "upsd[1018]: fopen /var/run/nut/upsd.pid: No such file or directory" and "systemd[1]: nut-monitor.service: PID file /var/run/nut/upsmon.pid not readable (yet?) after start: No such file or directory" Might be just because services are slow to start? Some details: TrippLite SMART1500LCD Dell PowerEdge T130 Proxmox on Debian 9 Linux host 4.10.17-2-pve #1 SMP PVE 4.10.17-20 (Mon, 14 Aug 2017 11:23:37 +0200) x86_64 GNU/Linux root@host:~# upsd -V Network UPS Tools upsd 2.7.4 root@host:~# lsusb | grep "Tripp Lite" Bus 001 Device 002: ID 09ae:2012 Tripp Lite root@host:~# cat /etc/nut/nut.conf MODE=standalone root@host:~# cat /etc/nut/ups.conf [TrippLiteUPS] driver = usbhid-ups port = auto vendorid = 09ae productid = 2012 desc = "Proxmox server" offdelay = 120 ondelay = 140 root@host:~# cat /etc/nut/upsd.conf LISTEN 127.0.0.1 3493 LISTEN ::1 3493 root@host:~# cat /etc/nut/upsd.users [upsmon] password = password upsmon master actions = SET instcmds = ALL root@host:~# cat /etc/nut/upsmon.conf MINSUPPLIES 1 SHUTDOWNCMD "/sbin/shutdown -h +0" POLLFREQ 5 POLLFREQALERT 5 HOSTSYNC 15 DEADTIME 15 POWERDOWNFLAG /etc/killpower RBWARNTIME 43200 NOCOMMWARNTIME 300 FINALDELAY 5 MONITOR TrippLiteUPS@localhost 1 upsmon password master NOTIFYFLAG COMMBAD SYSLOG+EXEC NOTIFYFLAG COMMOK SYSLOG+EXEC NOTIFYFLAG FSD SYSLOG+WALL+EXEC NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC NOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC NOTIFYFLAG NOPARENT SYSLOG+WALL+EXEC NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC root@host:~# cat /etc/nut/upssched.conf CMDSCRIPT /bin/upssched-cmd root@host:~# cat /etc/systemd/system/nut-delayed-ups-shutdown.service [Unit] Description=Initiate delayed UPS shutdown Before=umount.target DefaultDependencies=no [Service] Type=oneshot ExecStart=/usr/bin/logger -t upsdrvctl "nut-delayed-ups-shutdown.service calling upsdrvctl to shut down UPS unit" ExecStart=/sbin/upsdrvctl shutdown [Install] WantedBy=final.target root@host:~# upsc TrippLiteUPS Init SSL without certificate database battery.charge: 100 battery.runtime: 3840 battery.type: PbAC battery.voltage: 27.1 battery.voltage.nominal: 24.0 device.mfr: Tripp Lite device.model: Tripp Lite UPS device.type: ups driver.name: usbhid-ups driver.parameter.offdelay: 120 driver.parameter.ondelay: 140 driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.parameter.productid: 2012 driver.parameter.synchronous: no driver.parameter.vendorid: 09ae driver.version: 2.7.4 driver.version.data: TrippLite HID 0.82 driver.version.internal: 0.41 input.frequency: 59.9 input.voltage: 116.2 input.voltage.nominal: 120 output.frequency.nominal: 60 output.voltage: 116.2 output.voltage.nominal: 120 ups.beeper.status: enabled ups.delay.shutdown: 120 ups.load: 0 ups.mfr: Tripp Lite ups.model: Tripp Lite UPS ups.power: 0.0 ups.power.nominal: 1500 ups.productid: 2012 ups.status: OL ups.timer.reboot: 65535 ups.timer.shutdown: 65535 ups.vendorid: 09ae ups.watchdog.status: 0 root@host:~# /lib/nut/usbhid-ups -DD -a TrippLiteUPS Network UPS Tools - Generic HID driver 0.41 (2.7.4) USB communication driver 0.33 0.00debug level is '2' 0.000242upsdrv_initups... 0.115372Checking device (1D6B/0003) (002/001) 0.115817- VendorID: 1d6b 0.115821- ProductID: 0003 0.115822- Manufacturer: unknown 0.115824- Product: unknown 0.115825- Serial Number: unknown 0.115826- Bus: 002 0.115827- Device release number: 0410 0.115829Trying to match device 0.115832Device does not match - skipping 0.115835Checking device (09AE/2012) (001/007) 0.119620- VendorID: 09ae 0.119625- ProductID: 2012 0.119626- Manufacturer: Tripp Lite 0.119627- Product: Tripp Lite UPS 0.119629- Serial Number: unknown 0.119630- Bus: 001 0.119631- Device release number: 0009 0.119632Trying to match device 0.119646Device matches