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

    Proper UPS management

    Scheduled Pinned Locked Moved General pfSense Questions
    12 Posts 5 Posters 1.4k Views 7 Watching
    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.
    • W Offline
      Wastapi
      last edited by

      Hi, we're trying to get the perfect routine here to reduce outage time.

      -Our UPS is a APC Backups Pro 1500
      -We have installed Apcupsd on pfsense. (I don't like their interface but the NUT did not seem to detect our UPS. Weirdly)

      Any way... to our issue...
      Here are our objectives if there is an power outage:

      • the computer sends an email to the admin mentioning the computer is now on battery mode (that works now).
      • the computer stays on until {threshold} minutes remain. (that works now)
      • Below the threshold:
        ** The computer must send an email to the admin to alert it's shutting down.
        ** The computer needs a FULL SHUT DOWN and stop drawing electricity from the UPS. (Now the computer just halts and still drains the battery)

      When the electricity comes back

      • The computer remains off.

      • The UPS fills up.

      • When it reaches the threshold, it sends a signal to the BIOS of the computer for it to do a full startup.

      • It sends an email to the admin to alert that it is restarted and back online.

      Is this just a dream or we can achieve this?

      The first problem we're encountering: The computer Halts, it does not shut down. Which means that all services are off, but it still runs and draws power from the UPS. This slows the recovery and I feel that eventually it will crash when UPS reaches real zero.

      S stephenw10S 2 Replies Last reply Reply Quote 0
      • S Offline
        SteveITS Rebel Alliance @Wastapi
        last edited by

        @wastapi Do you have "Shutdown Behavior" set to Halt or Power Off? What hardware...some Netgate of the smaller devices can't power off on command.

        If general notifications are enabled (System/Advanced) pfSense will email when it boots up.

        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 reboot, or more depending on packages, and device or disk speed.
        Upvote ๐Ÿ‘ helpful posts!

        W 1 Reply Last reply Reply Quote 0
        • W Offline
          Wastapi @SteveITS
          last edited by

          Thanks! @steveits

          It is installed on an eMachine PC / AMD Athlon(tm) Dual Core Processor 4050e
          Yes, you're right I was set to Halt in apcupsd! Good catch. I have now set it to Power Off.

          But how will the PC start again if it is OFF? I need to set something in the Bios?

          Is there a good way to test this other than pulling the plug?
          Will it send all the notifications I have mentioned in my procedure above?

          Thanks!

          T S 2 Replies Last reply Reply Quote 0
          • T Offline
            tquade @Wastapi
            last edited by

            @wastapi

            "But how will the PC start again if it is OFF? I need to set something in the Bios?" Yes you do.

            "Is there a good way to test this other than pulling the plug?" Pulling the plug is the sure test.

            Ted

            1 Reply Last reply Reply Quote 0
            • S Offline
              SteveITS Rebel Alliance @Wastapi
              last edited by

              @wastapi said in Proper UPS management:

              PC start again if it is OFF

              If it's a PC, most have a BIOS setting for power loss of on/off/last state (whatever it was when power was lost).

              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 reboot, or more depending on packages, and device or disk speed.
              Upvote ๐Ÿ‘ helpful posts!

              W 1 Reply Last reply Reply Quote 0
              • W Offline
                Wastapi @SteveITS
                last edited by Wastapi

                @steveits

                But I don't want the PC to reboot right when the power comes up. I need the battery to charge a bit don't I ?

                S 1 Reply Last reply Reply Quote 0
                • AndyRHA Offline
                  AndyRH
                  last edited by

                  Maybe, if you are working with the assumption the power may not be stable after an outage you want enough charge to shutdown again. 1 way is to make sure you shutdown the first time with enough battery to start and stop again. Automated and without a generator there are limited scenarios you can successfully code for.

                  o||||o
                  7100-1u

                  W 1 Reply Last reply Reply Quote 0
                  • stephenw10S Offline
                    stephenw10 Netgate Administrator @Wastapi
                    last edited by

                    @wastapi said in Proper UPS management:

                    When it reaches the threshold, it sends a signal to the BIOS of the computer for it to do a full startup.

                    Not sure how you expect to achieve that. Wake on Serial? Wake on USB? I've never tried anything like that but you'd need support for it in both the UPS and the BIOS. Nothing (we can influence) is running at that point so it can't be coded.

                    Steve

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      SteveITS Rebel Alliance @Wastapi
                      last edited by

                      @wastapi said in Proper UPS management:

                      I don't want the PC to reboot right when the power comes up. I need the battery to charge a bit don't I ?

                      The Windows APC software has a setting for, basically, "don't turn on until the battery is at _% charge" but I don't see that in this package.

                      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 reboot, or more depending on packages, and device or disk speed.
                      Upvote ๐Ÿ‘ helpful posts!

                      1 Reply Last reply Reply Quote 1
                      • W Offline
                        Wastapi @AndyRH
                        last edited by Wastapi

                        Ok... so though the Bios. But then:

                        The UPS will send a signal on USB for the computer to shut down.
                        The computer will shut down
                        But since this is a UPS, there will STILL be power delivered to the electric outlet.
                        Hence the BIOS will detect power and start again right away?!
                        How will the computer detect the power is back if indeed it still receives power from the battery the whole time?

                        S 1 Reply Last reply Reply Quote 0
                        • S Offline
                          SteveITS Rebel Alliance @Wastapi
                          last edited by

                          @wastapi The assumption is, I think, that at 5% battery it's unlikely wall power will return in the next few minutes. So there is a window there. When the UPS does shut off power it's like unplugging the cord to the PC. When power is restored it will provide power again. To the PC it looks like the power cord was reconnected.

                          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 reboot, or more depending on packages, and device or disk speed.
                          Upvote ๐Ÿ‘ helpful posts!

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

                            Ah, yes the UPS can simply not supply power again until it has charged to some specified level. Assuming it can be set for that.

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