Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Beta test of new NUT UPS package

    Scheduled Pinned Locked Moved pfSense Packages
    114 Posts 15 Posters 39.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dennypageD
      dennypage
      last edited by

      Thanks Ben. I actually have code to fix up a missing /var/db/nut, but it's currently only run at install time to fix a problem with the prior nut package. It's easy enough to move the fix up check to be executed at each config sync. I'll have it for you when I get back in a day or two.

      @Starrbuck:

      I did find an issue.  Following a reboot, it was unable to chdir to /var/db/nut as I have my /var in a ramdisk because I am running on mirrored SSDs for system drives.

      1 Reply Last reply Reply Quote 0
      • dennypageD
        dennypage
        last edited by

        Btw, do you mind posting the ups type and driver that you are testing with?

        1 Reply Last reply Reply Quote 0
        • J
          johnabbot
          last edited by

          Hi,

          I'm running a generic asian ups with the following

          (Various USB)
          UPSilon 2000 software blazer_usb langid_fix=0x409

          It installed perfectly, looks great, unfortunately it gives me

          "Failed to retrieve status"

          1 Reply Last reply Reply Quote 0
          • S
            Starrbuck
            last edited by

            @dennypage:

            Thanks Ben. I actually have code to fix up a missing /var/db/nut, but it's currently only run at install time to fix a problem with the prior nut package. It's easy enough to move the fix up check to be executed at each config sync. I'll have it for you when I get back in a day or two.

            Awesome, that should be a rather easy fix!

            @dennypage:

            Btw, do you mind posting the ups type and driver that you are testing with?

            I will have to check this evening after I get home with access to the server.

            1 Reply Last reply Reply Quote 0
            • dennypageD
              dennypage
              last edited by

              Several questions:

              What messages are in the system log? Look for messages from upsd, upsmon, upsdrvctl, blazer*.
              What are the contents of /usr/local/etc/nut/ups.conf and upsd.conf?
              What nut processes are running? (ps -axuwww | grep ups)
              Does anything change if you restart the nut service via the nut status page or the services page?
              Have you successfully tested this specific ups model with nut previously?

              @johnabbot:

              I'm running a generic asian ups with the following

              (Various USB)
              UPSilon 2000 software blazer_usb langid_fix=0x409

              It installed perfectly, looks great, unfortunately it gives me

              "Failed to retrieve status"

              1 Reply Last reply Reply Quote 0
              • S
                Starrbuck
                last edited by

                USB type:  Local USB
                Driver:  usbhid

                1 Reply Last reply Reply Quote 0
                • dennypageD
                  dennypage
                  last edited by

                  Hey Starrbuck, I sent you an update that should address your ram disk issue. Please let me know that it works for you. Thanks.

                  1 Reply Last reply Reply Quote 0
                  • S
                    Starrbuck
                    last edited by

                    Got it, thanks!

                    1 Reply Last reply Reply Quote 0
                    • S
                      Starrbuck
                      last edited by

                      @dennypage:

                      Hey Starrbuck, I sent you an update that should address your ram disk issue. Please let me know that it works for you. Thanks.

                      The ramdisk issue is corrected.  Upon rebooting the package started up normally and the status looks fine.

                      1 Reply Last reply Reply Quote 0
                      • dennypageD
                        dennypage
                        last edited by

                        Good to hear. Thanks again for testing.

                        1 Reply Last reply Reply Quote 0
                        • dennypageD
                          dennypage
                          last edited by

                          w0w, I may have an approach that will address the SNMP unreachable on startup issue issue. Give me a couple of days, and I'll let you know. In the mean time, please test the existing beta2 version. Thanks.

                          1 Reply Last reply Reply Quote 0
                          • w0wW
                            w0w
                            last edited by

                            UPS Status — OFF, but displayed battery charge and load are OK.
                            Fixed with an extra argument for driver.
                            mibs=ietf
                            Looks much better now :)
                            Good job!

                            P.S. Don't look at I/O Voltage at first picture, it's Powercom firmware bug that could not be fixed anyway.

                            nut1.jpg
                            nut1.jpg_thumb
                            nut2.jpg
                            nut2.jpg_thumb

                            1 Reply Last reply Reply Quote 0
                            • w0wW
                              w0w
                              last edited by

                              Can I request some features for package? (lowest priority in your list) :)
                              1. I want shutdown pfsense before battery get LOW condition, for example after running 5 minutes on battery, I have seen some implementations using internal nut scripting, but not for pfsense. Feature is very similar to what APCUPSD already have for years.
                              2. It would be good to kill UPS power, sending command to shutdown UPS, like APCUPSD doing it.

                              BTW I am using APCUPSD on windows for the same UPS.

                              1 Reply Last reply Reply Quote 0
                              • J
                                johnabbot
                                last edited by

                                @dennypage:

                                Several questions:

                                What messages are in the system log? Look for messages from upsd, upsmon, upsdrvctl, blazer*.

                                upsmon 73821 Poll UPS [sunpac] failed - Driver not connected
                                upsd 71207 Can't connect to UPS [sunpac] (blazer_usb-sunpac): No such file or directory

                                What are the contents of /usr/local/etc/nut/ups.conf and upsd.conf?

                                sunpac]
                                driver=blazer_usb
                                port=auto
                                langid_fix=0x4095
                                subdriver=krauler
                                productid=1234
                                vendorid=0925

                                LISTEN 127.0.0.1
                                LISTEN ::1

                                What nut processes are running? (ps -axuwww | grep ups)

                                ps -axuwww | grep ups
                                root    71207  0.0  0.0  20712    2368  -  Ss    6:10PM    0:00.24 /usr/local/sbin/upsd -u root
                                root    72651  0.0  0.0  16612    2308  -  Is    6:10PM    0:00.00 /usr/local/sbin/upsmon
                                uucp    73821  0.0  0.0  16612    2340  -  S    6:10PM    0:00.20 /usr/local/sbin/upsmon
                                root    58229  0.0  0.0  18740    2240  0  S+    9:44PM    0:00.00 grep ups

                                Does anything change if you restart the nut service via the nut status page or the services page?

                                No

                                Have you successfully tested this specific ups model with nut previously?

                                No

                                @johnabbot:

                                I'm running a generic asian ups with the following

                                (Various USB)
                                UPSilon 2000 software blazer_usb langid_fix=0x409

                                It installed perfectly, looks great, unfortunately it gives me

                                "Failed to retrieve status"

                                1 Reply Last reply Reply Quote 0
                                • w0wW
                                  w0w
                                  last edited by

                                  I have "tecnoware" UPS, some ERA series but not the same as listed in NUT supported devices. It have similar behavior to yours,  johnabbot
                                  Playing with driver options not helped, strange… but UPSilon 2000 works under windows environment at least.

                                  1 Reply Last reply Reply Quote 0
                                  • dennypageD
                                    dennypage
                                    last edited by

                                    John, it looks like the usb information for the ups doesn't match. I would recommend dumping the usb information on the device and heading over to the NUT forums with it. You can dump the usb information with the following command on the console:

                                    usbconfig dump_device_desc

                                    1 Reply Last reply Reply Quote 0
                                    • dennypageD
                                      dennypage
                                      last edited by

                                      I've sent out beta 3. You do not need to remove the beta 1/2 package before installing the beta 3 package. Note that it is normal that the nut service is stopped during the install–you will need to restart the service after the install completes.

                                      Again, thank you for all your help!

                                      1 Reply Last reply Reply Quote 0
                                      • dennypageD
                                        dennypage
                                        last edited by

                                        w0w, with the beta 3 release you should be able to address the SNMP unreachable on startup issue issue. Add the following lines to ups.conf in the advanced section:

                                        maxretry=60
                                          retrydelay=60

                                        This will result in a retry every minute for an hour. Be careful how you use this.

                                        See the ups.conf man page for more information.

                                        1 Reply Last reply Reply Quote 0
                                        • dennypageD
                                          dennypage
                                          last edited by

                                          I believe NUT already handles this. Have a look at the man page for the apcsmart driver. Pretty rich configuration options for power handling in there.

                                          @w0w:

                                          It would be good to kill UPS power, sending command to shutdown UPS, like APCUPSD doing it.

                                          1 Reply Last reply Reply Quote 0
                                          • dennypageD
                                            dennypage
                                            last edited by

                                            Hey John, just wondering if you had a chance to dump the usb config to check the vendor and product id?

                                            @johnabbot:

                                            driver=blazer_usb
                                            port=auto
                                            langid_fix=0x4095
                                            subdriver=krauler
                                            productid=1234
                                            vendorid=0925

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.