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

    Netgate 3100, nut and Cyberpower UPS Issue

    Official NetgateĀ® Hardware
    4
    15
    1.4k
    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.
    • J
      jostermacedo
      last edited by

      I have a Netgate 3100 with 21.05.2 version of PfSense, which is connected to a Cyberpower UPS with the proper USB cable. The nut package (2.7.4_8) is installed. Yesterday we had a power outage in Western NY and for the first time the power did no come back before the UPS run out of power. I was expecting NUT to gracefully shutdown the router, but it seems it did not happen. Log info below:

      Dec 11 19:40:17 upsmon 58817 UPS Macedo on line power
      Dec 11 19:40:22 upsmon 58817 UPS Macedo on battery
      Dec 11 19:42:18 upsmon 58817 UPS Macedo on line power
      Dec 11 19:42:23 upsmon 58817 UPS Macedo on battery
      Dec 11 20:00:00 php 32915 [pfBlockerNG] Starting cron process.
      Dec 11 20:00:04 php 32915 [pfBlockerNG] No changes to Firewall rules, skipping Filter Reload
      Dec 11 21:00:00 php 63132 [pfBlockerNG] Starting cron process.
      Dec 11 21:00:04 php 63132 [pfBlockerNG] No changes to Firewall rules, skipping Filter Reload
      Dec 11 22:00:00 php 93210 [pfBlockerNG] Starting cron process.
      Dec 11 22:00:04 php 93210 [pfBlockerNG] No changes to Firewall rules, skipping Filter Reload
      Dec 11 23:03:10 syslogd kernel boot file is /boot/kernel/kernel
      Dec 11 23:03:10 kernel ---<<BOOT>>---
      Dec 11 23:03:10 kernel Copyright (c) 1992-2021 The FreeBSD Project.

      These are the info I have when I check the nut service:

      UPS Status
      Name: Macedo@localhost
      Summary status: On line
      Runtime (H:M:S): 2:55:30
      UPS Load:
      0%
      Battery charge:
      100%
      Battery voltage: 24.0
      Input voltage: 121.0
      Last test result: No test initiated
      UPS Detail

      This table contains all the variables reported by the UPS via the upsc command. Note that many UPSs report only a subset of the available variables. Also note that some UPSs, particularly those using usbhid, may report an incorrect value for a variable. This is generally not a cause for concern. For additional information, see the Network UPS Tools site

      Variable Value
      battery.charge 100
      battery.charge.low 10
      battery.charge.warning 20
      battery.mfr.date CPS
      battery.runtime 10530
      battery.runtime.low 300
      battery.type PbAcid
      battery.voltage 24.0
      battery.voltage.nominal 24
      device.mfr CPS
      device.model CP1000PFCLCD
      device.serial 000000000000
      device.type ups
      driver.name usbhid-ups
      driver.parameter.pollfreq 30
      driver.parameter.pollinterval 2
      driver.parameter.port auto
      driver.parameter.synchronous no
      driver.version 2.7.4
      driver.version.data CyberPower HID 0.4
      driver.version.internal 0.41
      input.transfer.high 139
      input.transfer.low 88
      input.voltage 121.0
      input.voltage.nominal 120
      output.voltage 137.0
      ups.beeper.status disabled
      ups.delay.shutdown 20
      ups.delay.start 30
      ups.load 0
      ups.mfr CPS
      ups.model CP1000PFCLCD
      ups.productid 0501
      ups.realpower.nominal 600
      ups.serial 000000000000
      ups.status OL
      ups.test.result No test initiated
      ups.timer.shutdown -60
      ups.timer.start -60
      ups.vendorid 0764

      If the shutdown did not happen properly, what setting do I have to change to make it work?

      Thanks!

      M 1 Reply Last reply Reply Quote 0
      • M
        mer @jostermacedo
        last edited by

        @jostermacedo As pertains to NUT and your model of UPS, I don't know, but as a test process, here's what I've done in the past:
        plug the power for the monitoring device into a different power outlet than the UPS
        plug the USB cable from the UPS to the device that is monitoring

        That lets you pull the power cable on the UPS, leaves the device powered but the monitoring device should see the UPS go off power and start to do it's thing.
        You could also hook up the console cable to the SG3100 and see what it says; perhaps the shutdown events aren't logged correctly?

        J 1 Reply Last reply Reply Quote 0
        • J
          jostermacedo @mer
          last edited by

          @mer said in Netgate 3100, nut and Cyberpower UPS Issue:

          @jostermacedo As pertains to NUT and your model of UPS, I don't know, but as a test process, here's what I've done in the past:
          plug the power for the monitoring device into a different power outlet than the UPS
          plug the USB cable from the UPS to the device that is monitoring

          That lets you pull the power cable on the UPS, leaves the device powered but the monitoring device should see the UPS go off power and start to do it's thing.
          You could also hook up the console cable to the SG3100 and see what it says; perhaps the shutdown events aren't logged correctly?

          The shutdown was not done as intended. I found this on the log once the system was up again:

          Dec 11 23:03:10 kernel WARNING: / was not properly dismounted
          Dec 11 23:03:10 kernel WARNING: /:mount pending error: blocks 800 files 110

          1 Reply Last reply Reply Quote 0
          • J jostermacedo referenced this topic on
          • J jostermacedo referenced this topic on
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            What do you have in /usr/local/etc/nut/upsmon.conf ?

            Steve

            J 1 Reply Last reply Reply Quote 0
            • GertjanG Gertjan referenced this topic on
            • J jostermacedo referenced this topic on
            • J
              jostermacedo @stephenw10
              last edited by

              @stephenw10 said in Netgate 3100, nut and Cyberpower UPS Issue:

              What do you have in /usr/local/etc/nut/upsmon.conf ?

              Steve

              Hi Steve, how can I see the contents of this file? Can be a command through the GUI or do I have to connect to the console port to see it?

              Joster

              M 1 Reply Last reply Reply Quote 0
              • M
                mer @jostermacedo
                last edited by

                @jostermacedo Diagnostics menu, Command Prompt should let you enter something like "cat /usr/local/etc/nut/upsmon.conf"

                1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  Yup, that^ or you can just open it in Diag > Edit File.

                  Steve

                  J 1 Reply Last reply Reply Quote 1
                  • J
                    jostermacedo @stephenw10
                    last edited by

                    @stephenw10 said in Netgate 3100, nut and Cyberpower UPS Issue:

                    Yup, that^ or you can just open it in Diag > Edit File.

                    Steve

                    This is the output of the command above:

                    MONITOR Macedo 1 local-monitor 9c0be71e217573e68122 master
                    SHUTDOWNCMD "/sbin/shutdown -p +0"
                    POWERDOWNFLAG /etc/killpower

                    M 1 Reply Last reply Reply Quote 0
                    • M
                      mer @jostermacedo
                      last edited by

                      @jostermacedo
                      @stephenw10 is the SG3100 arm based like the 2100? If so does it actually power off when you do shutdown -p?

                      S 1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        Hmm, the default options then.

                        I don't actually run NUT but as I understand it that should shutdown the firewall when the UPS reports battery low, which looks like 10% as configured. It may require a different value there if your UPS doesn't give enough time to shutdown after signally low.

                        When you pull the plug do you see the expected values reported?

                        Steve

                        J 1 Reply Last reply Reply Quote 0
                        • J
                          jostermacedo @stephenw10
                          last edited by

                          @stephenw10 said in Netgate 3100, nut and Cyberpower UPS Issue:

                          Hmm, the default options then.

                          I don't actually run NUT but as I understand it that should shutdown the firewall when the UPS reports battery low, which looks like 10% as configured. It may require a different value there if your UPS doesn't give enough time to shutdown after signally low.

                          When you pull the plug do you see the expected values reported?

                          Steve

                          Steve, but if the UPS reported battery low, shouldn't that be shown on the log? I'll test it tonight once I'm at home.

                          1 Reply Last reply Reply Quote 0
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            I would expect it to. But, for example, maybe the batteries are toast or uncalibrated and it gets to 20% and then just shuts off.

                            1 Reply Last reply Reply Quote 0
                            • S
                              SteveITS Galactic Empire @mer
                              last edited by

                              @mer said in Netgate 3100, nut and Cyberpower UPS Issue:

                              is the SG3100 arm based like the 2100? If so does it actually power off when you do shutdown -p?

                              It is. If you Halt it, it will stop everything and show a message on the console to the effect that it's OK to power off. But that should be a clean shutdown from the OS standpoint.

                              @jostermacedo How old is the UPS? In general UPS battery life (at least for APC, which we use for clients) is around 3-6 years depending on how often it goes on battery. I have seen multiple old UPSs over the years where the UPS thought its battery was fine but the biweekly self test powered off an attached PC because the battery couldn't produce the power needed. Similar to what stephenw is describing.

                              Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                              When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                              Upvote šŸ‘ helpful posts!

                              J 1 Reply Last reply Reply Quote 1
                              • J
                                jostermacedo @SteveITS
                                last edited by jostermacedo

                                @steveits said in Netgate 3100, nut and Cyberpower UPS Issue:

                                @mer said in Netgate 3100, nut and Cyberpower UPS Issue:

                                is the SG3100 arm based like the 2100? If so does it actually power off when you do shutdown -p?

                                It is. If you Halt it, it will stop everything and show a message on the console to the effect that it's OK to power off. But that should be a clean shutdown from the OS standpoint.

                                @jostermacedo How old is the UPS? In general UPS battery life (at least for APC, which we use for clients) is around 3-6 years depending on how often it goes on battery. I have seen multiple old UPSs over the years where the UPS thought its battery was fine but the biweekly self test powered off an attached PC because the battery couldn't produce the power needed. Similar to what stephenw is describing.

                                The UPS was bought in 2016, but I replaced the battery two months ago. You can see through the log on the original message that the router was running for at least two hours after the power went down (it run PFBlockerNG cron update). SG3100 is the only thing connected to the UPS, so not much power was being used at all.

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  Mmm, yeah I would expect it to have logged battery low if it did reach that.

                                  Maybe it restarted for some other reason?

                                  I think you will need to do a test and see what it actually logs and what the UPS stats are reported as when it's discharging. I would probably run the 3100 directly and not through the UPS during that test so it doesn't actually lose power if/when the batteries are drained.

                                  Steve

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