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

NUT package (2.8.0 and below)

UPS Tools
128
1.2k
4.0m
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.
  • G
    Gertjan @Sir_SSV
    last edited by Jun 12, 2020, 10:51 AM

    @Sir_SSV said in NUT package:

    20 % - it just did not leave enough time for pfSense to gracefully shut down.

    pfSense shuts down relatively fast.
    "20 %" should leave you with 30 seconds or so, probably far more.
    If non, the battery isn't in good shape. Or the UPS overloaded. Which decreases battery life / shape.

    I advise you to check out the NUT support forum.

    No "help me" PM's please. Use the forum, the community will thank you.
    Edit : and where are the logs ??

    S 1 Reply Last reply Jun 12, 2020, 12:17 PM Reply Quote 0
    • D
      dennypage @Sir_SSV
      last edited by Jun 12, 2020, 11:30 AM

      @Sir_SSV Few quick comments

      The "ignorelb" option literally means that you want to ignore a low battery condition signaled by the UPS. Unless your UPS sends a low battery indication immediately upon going to battery, this probably isn't something you want.

      battery.charge.low is a value managed in the UPS. You are trying to set it, and don't have SNMP privs to do so. This probably isn't something you want either.

      SNMP is polled at 30 seconds. This means there is an up to 30 second delay before nut knows it is on battery, and up to 30 seconds before nut knows that the battery is low.

      In general, if you want to shut down sooner it's better to look at runtime remaining than battery charge.

      1 Reply Last reply Reply Quote 0
      • S
        Sir_SSV @Gertjan
        last edited by Sir_SSV Jun 12, 2020, 12:25 PM Jun 12, 2020, 12:17 PM

        @Gertjan said in NUT package:

        @Sir_SSV said in NUT package:

        20 % - it just did not leave enough time for pfSense to gracefully shut down.

        pfSense shuts down relatively fast.
        "20 %" should leave you with 30 seconds or so, probably far more.
        If non, the battery isn't in good shape. Or the UPS overloaded. Which decreases battery life / shape.

        I advise you to check out the NUT support forum.

        The ups is new, only had it for approx 1 month. It is not overloaded, have pfSense, freenas and a couple unifi switches.

        @dennypage said in NUT package:

        @Sir_SSV Few quick comments

        The "ignorelb" option literally means that you want to ignore a low battery condition signaled by the UPS. Unless your UPS sends a low battery indication immediately upon going to battery, this probably isn't something you want.

        battery.charge.low is a value managed in the UPS. You are trying to set it, and don't have SNMP privs to do so. This probably isn't something you want either.

        SNMP is polled at 30 seconds. This means there is an up to 30 second delay before nut knows it is on battery, and up to 30 seconds before nut knows that the battery is low.

        In general, if you want to shut down sooner it's better to look at runtime remaining than battery charge.

        Thanks. Should I set the default polling time to a lower value?

        How would I go about setting a runtime remaining configuration in nut?

        D 1 Reply Last reply Jun 12, 2020, 3:31 PM Reply Quote 0
        • D
          dennypage @Sir_SSV
          last edited by Jun 12, 2020, 3:31 PM

          @Sir_SSV said in NUT package:

          Should I set the default polling time to a lower value?

          How would I go about setting a runtime remaining configuration in nut?

          As to the NUT config, it all depends upon how much runtime the UPS has in general, and how much runtime is remaining when the UPS signals a low battery situation. If the UPS has 3 or more minutes of runtime when entering low battery, I would simply let the UPS handle things. If it has less, you may want to shorten the pollfreq.

          Given that you have a snmp management card, you likely have a good deal of configuration available in the UPS to control when low battery state is entered. The UPS is generally a better place to drive decisions than in the NUT configuration.

          1 Reply Last reply Reply Quote 0
          • Q
            q54e3w
            last edited by Jun 12, 2020, 5:37 PM

            I recall my Eaton 5PX throw OB (on battery) and LB (low battery) at the same time, even with a large runtime remaining. In your UPS configuration you can configure the shutdown timers as Denny mentioned. Heres my 5px shutdown parameters.

            If at 20% your UPS is failing to shutdown pfSense its likely your batteries are toast. Even new UPS can sit on shelves for sometime so worth testing before putting into production use.

            login-to-view

            S 1 Reply Last reply Jun 12, 2020, 10:30 PM Reply Quote 1
            • S
              Sir_SSV @q54e3w
              last edited by Jun 12, 2020, 10:30 PM

              @q54e3w said in NUT package:

              I recall my Eaton 5PX throw OB (on battery) and LB (low battery) at the same time, even with a large runtime remaining. In your UPS configuration you can configure the shutdown timers as Denny mentioned. Heres my 5px shutdown parameters.

              If at 20% your UPS is failing to shutdown pfSense its likely your batteries are toast. Even new UPS can sit on shelves for sometime so worth testing before putting into production use.

              login-to-view

              Thank you for the screen shot.

              Under on battery, the values of 1800 seconds and 20% does that mean both of those values have to be met before the ups Initiated a shuts down?

              If I wanted pfSense to shut down at 30% battery, would I pull the mains and see time remaining at 30% and input that value in to remaining time and shut down duration?

              Q 1 Reply Last reply Jun 12, 2020, 10:45 PM Reply Quote 0
              • Q
                q54e3w @Sir_SSV
                last edited by q54e3w Jun 12, 2020, 10:50 PM Jun 12, 2020, 10:45 PM

                @Sir_SSV Been quite some time since I set this up so memory may be fuzzy but i recall its a 'OR' not 'AND'. You could stick 30% in percentage field and a small number in the time and it should shutdown (or flag LB & OB) at 30%.
                Set it to 95% or something to test with to save running batteries up and down.

                EDIT: I just checked the manual and TL;DR

                The first shutdown criteria initiates the restart of the shutdown sequence.

                • If remaining time is under (0 to 99999 seconds, 180 by default) is the minimum remaining backup time
                  from which the shutdown sequence is launched.
                • If battery capacity is under (0 to 100%); this value cannot be less than that of the UPS and is the
                  minimum remaining battery capacity level from which the shutdown sequence is launched.
                • Shutdown after (0 to 99999 minutes, not validated by default) is the operating time in minutes left for
                  users after a switch to backup before starting the shutdown sequence.
                • Shutdown duration (120 seconds by default) is the time required for complete shutdown of systems
                  when a switch to backup time is long enough to trigger the shutdown sequences. It is calculated
                  automatically at the maximum of Shutdown duration of subscribed clients but can be modified in the
                  Advanced mode.
                • If battery capacity exceeds Minimum battery level to reach before restarting the UPS after utility
                  restoration
                S 1 Reply Last reply Jun 13, 2020, 2:28 AM Reply Quote 1
                • S
                  Sir_SSV @q54e3w
                  last edited by Jun 13, 2020, 2:28 AM

                  @q54e3w said in NUT package:

                  @Sir_SSV Been quite some time since I set this up so memory may be fuzzy but i recall its a 'OR' not 'AND'. You could stick 30% in percentage field and a small number in the time and it should shutdown (or flag LB & OB) at 30%.
                  Set it to 95% or something to test with to save running batteries up and down.

                  EDIT: I just checked the manual and TL;DR

                  The first shutdown criteria initiates the restart of the shutdown sequence.

                  • If remaining time is under (0 to 99999 seconds, 180 by default) is the minimum remaining backup time
                    from which the shutdown sequence is launched.
                  • If battery capacity is under (0 to 100%); this value cannot be less than that of the UPS and is the
                    minimum remaining battery capacity level from which the shutdown sequence is launched.
                  • Shutdown after (0 to 99999 minutes, not validated by default) is the operating time in minutes left for
                    users after a switch to backup before starting the shutdown sequence.
                  • Shutdown duration (120 seconds by default) is the time required for complete shutdown of systems
                    when a switch to backup time is long enough to trigger the shutdown sequences. It is calculated
                    automatically at the maximum of Shutdown duration of subscribed clients but can be modified in the
                    Advanced mode.
                  • If battery capacity exceeds Minimum battery level to reach before restarting the UPS after utility
                    restoration

                  At the moment, FreeNAS shuts down after it has been on battery for 5 mins (configured via FreeNAS).

                  I would like pfSense to shut down when battery is approx 30% and the ups to shut down when it hits the low battery state of 20%

                  Will have to play with a few of these values. I read through the ussr manual prior but damn it confused me!

                  D 1 Reply Last reply Jun 14, 2020, 3:56 AM Reply Quote 0
                  • D
                    dennypage @Sir_SSV
                    last edited by Jun 14, 2020, 3:56 AM

                    @Sir_SSV said in NUT package:

                    At the moment, FreeNAS shuts down after it has been on battery for 5 mins (configured via FreeNAS).

                    I would like pfSense to shut down when battery is approx 30% and the ups to shut down when it hits the low battery state of 20%

                    Staggering shutdowns like this may not be what you want. The problem comes when a system has initiated shutdown, but the mains return before the UPS enters a low battery state. Without a low battery state, the UPS will not cut / restore the load, and there will be nothing to trigger a restart of the system. It’s often better to configure the UPS and then let it manage shutdown.

                    S 1 Reply Last reply Jun 15, 2020, 3:02 AM Reply Quote 0
                    • S
                      Sir_SSV @dennypage
                      last edited by Jun 15, 2020, 3:02 AM

                      @dennypage said in NUT package:

                      @Sir_SSV said in NUT package:

                      At the moment, FreeNAS shuts down after it has been on battery for 5 mins (configured via FreeNAS).

                      I would like pfSense to shut down when battery is approx 30% and the ups to shut down when it hits the low battery state of 20%

                      Staggering shutdowns like this may not be what you want. The problem comes when a system has initiated shutdown, but the mains return before the UPS enters a low battery state. Without a low battery state, the UPS will not cut / restore the load, and there will be nothing to trigger a restart of the system. It’s often better to configure the UPS and then let it manage shutdown.

                      During my testing over the weekend, this is what I noticed.

                      I have since scheduled a shut down of both FreeNAS and pfSense close to the low battery of the ups (20%).

                      1 Reply Last reply Reply Quote 0
                      • S
                        Sir_SSV
                        last edited by Jun 15, 2020, 9:09 AM

                        I'm having a bit of trouble with the nut daemon starting when pfSense restarts from a complete shut down.

                        I found an earlier post and tried entering the below:

                        Extra arguments:
                        snmp_retries = 10
                        snmp_timeout = 2

                        Get the error in System Logs

                        Poll UPS [Eaton] failed - Driver not connected

                        Removed the above Extra Arguments and entered the below:

                        ups.conf:
                        retrydelay = 30
                        maxretry = 20

                        Get the error in System Logs

                        Data for UPS [Eaton] is stale - check driver
                        UPS [Eaton] data is no longer stale

                        and it repeats the above error constantly until the service is stopped/restarted.

                        Once pfSense starts, if I manually stop and restart the service everything works ok!

                        Is there something I am doing incorrectly?

                        D 1 Reply Last reply Jun 15, 2020, 3:01 PM Reply Quote 0
                        • D
                          dennypage @Sir_SSV
                          last edited by Jun 15, 2020, 3:01 PM

                          @Sir_SSV Please see posts here and here

                          Make sure that the UPS is configured to use a static IP address, and that you are addressing the UPS by IP address and not by DNS name.

                          S 1 Reply Last reply Jun 16, 2020, 7:49 AM Reply Quote 0
                          • S
                            Sir_SSV @dennypage
                            last edited by Jun 16, 2020, 7:49 AM

                            @dennypage said in NUT package:

                            @Sir_SSV Please see posts here and here

                            Make sure that the UPS is configured to use a static IP address, and that you are addressing the UPS by IP address and not by DNS name.

                            Thanks for the tip!

                            I had pfSense serving an ip address to the UPS via DHCP. I think the problem is the UPS boots very quickly and pfSense takes a little longer (UniFi switches take even longer again). The UPS wasn't being served it's allocated IP address in enough time and hence was causing the nut daemon to hang (and subsequent System Log errors and email alerts).

                            I removed the UPS from pfSense DHCP server and changed the Network settings via Eaton gui to Static and assigned an IP address on the UPS vlan . When pfSense starts, because the UPS has already started (and has it's own IP) the nut daemon can talk with the UPS and automatically update the status.

                            Final testing has been completed with both pfSense and FreeNAS shutting down once the UPS is at 24% and the UPS shutting down at 20% (factory set by Eaton).

                            Happy that everything has worked out and big thanks to everyone that helped 😀

                            D 1 Reply Last reply Jun 16, 2020, 3:06 PM Reply Quote 0
                            • D
                              dennypage @Sir_SSV
                              last edited by Jun 16, 2020, 3:06 PM

                              @Sir_SSV You're welcome.

                              1 Reply Last reply Reply Quote 0
                              • T
                                turboturtle
                                last edited by Jun 18, 2020, 12:02 AM

                                I have an APC BX1000M that I recently connected to my pfsense box, running on an apu2c4, via usb cable. NUT is set to use usbhid as the driver.

                                apcupsd detects the UPS straight away and can poll it on demand, however NUT is not able to poll the device it seems. The logged messages apparently show that a login does occur, but then connection is immediately lost.

                                Jun 17 18:51:42	upsd	37544	Startup successful
                                Jun 17 18:51:44	upsd	37544	User local-monitor@::1 logged into UPS [apcups]
                                Jun 17 18:51:44	upsmon	37226	Poll UPS [apcups] failed - Driver not connected
                                Jun 17 18:51:44	upsmon	37226	Communications with UPS apcups lost
                                Jun 17 18:51:49	upsmon	37226	Poll UPS [apcups] failed - Driver not connected
                                Jun 17 18:51:49	upsmon	37226	UPS apcups is unavailable
                                

                                I'm hoping this is a simple case of me overlooking something obvious, as so far my reading of this topic, the manual, and Google-fu has not gotten me anywhere, so any pointers would be greatly appreciated.

                                D 1 Reply Last reply Jun 18, 2020, 5:36 PM Reply Quote 0
                                • D
                                  dennypage @turboturtle
                                  last edited by Jun 18, 2020, 5:36 PM

                                  @turboturtle The "login" is the upsmon process connecting to upsd. It doesn't indicate anything about the actual UPS driver.

                                  You are missing log entries for the driver itself. Look for entries matching "usbhid-ups" which is the NUT device driver for USB.

                                  To address the most commonly experienced issue... if this is a fresh NUT install, you will need to either disconnect/reconnect the USB connection or reboot pfSense to have correct permissions on the USB port.

                                  T 1 Reply Last reply Jun 18, 2020, 6:20 PM Reply Quote 0
                                  • T
                                    turboturtle @dennypage
                                    last edited by Jun 18, 2020, 6:20 PM

                                    @dennypage reboot did it, thanks!

                                    Interesting to note however, there were no log messages about the driver itself - nothing matched "usbhid-ups".

                                    D 1 Reply Last reply Jun 18, 2020, 8:19 PM Reply Quote 0
                                    • D
                                      dennypage @turboturtle
                                      last edited by Jun 18, 2020, 8:19 PM

                                      @turboturtle said in NUT package:

                                      Interesting to note however, there were no log messages about the driver itself - nothing matched "usbhid-ups".

                                      The log entries may have rolled off. The default log retention is somewhat small.

                                      Glad it's working for you.

                                      1 Reply Last reply Reply Quote 0
                                      • N
                                        newberger
                                        last edited by Jul 23, 2020, 3:49 PM

                                        Hi - I have a Cyberpower OR700, which I previously had on my pfSense system using USB. I added the RMCARD205 and am now trying to connect to NUT via SNMP. My initial setup in the NUT menu only specifies the UPS IP (set static in the pfSense DHCP) UPS Type (Remote SNMP) and UPS name.

                                        pfSense/NUT does see the UPS and reports the status, but the amount of data is much less than when I connected via USB.

                                        I am using SNMPv1, although the UPS has SNMPv3 available. I'm not sure if that would make any difference?

                                        D 1 Reply Last reply Jul 23, 2020, 4:14 PM Reply Quote 0
                                        • D
                                          dennypage @newberger
                                          last edited by Jul 23, 2020, 4:14 PM

                                          @newberger A quick google search for "NUT RMCARD205" finds this in the NUT issues list: Support CyberPower RMCARD205

                                          N 1 Reply Last reply Jul 23, 2020, 4:51 PM Reply Quote 1
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.