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

    NUT package (2.8.0 and below)

    Scheduled Pinned Locked Moved UPS Tools
    1.2k Posts 128 Posters 4.1m 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.
    • K
      kevindd992002 @dennypage
      last edited by kevindd992002

      @dennypage said in NUT package:

      @kevindd992002 There's no magic in NUT. A NUT "safe shutdown" is usually invoking a standard system command. For example, "/bin/shutdown -p +0" is used on pfSense.

      I've recently upgraded from DSM6 to DSM7. I don't have a DSM6 system to examine, and I haven't had an opportunity to look at NUT in DSM7 to see how it is configured.

      That's not entirely true. Have you recently noticed how a Synology NAS acts when it receives an FSD from the NUT server? It only does a safe shutdown, not a complete shutdown. I'm a 100% sure of this as I've been working in the past with Synology support regarding this. I didn't understand why it wasn't turning off completely so I thought I asked them. They said that it is by design that when you set a Synology NAS to shutdown with the "same as server" option, it only does a safe shutdown. It dismounts the drives and kills the services. When that process happens and power is cutoff by the UPS, then it's the same effect as a graceful/complete shutdown. I can vouch for this in DSM 6. I recently upgraded to DSM 7 but I'm not sure if it'll still work that way.

      1 Reply Last reply Reply Quote 0
      • K
        kevindd992002
        last edited by

        I think they're also calling it safe mode instead of shutdown. See post of Ramzi in this thread:

        https://community.synology.com/enu/forum/1/post/121370?page=2&sort=oldest

        In short, when Synology receives an FSD signal, it goes to safe mode. It does not shut down at all. It only gets turned off when the UPS cuts off power to it.

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

          @kevindd992002 I don't think that some of the people writing in that thread know how NUT works.

          The concept of a mode where the system is quiesced but is listening to the UPS and will start back up if the UPS signals that mains have returned is not supported with NUT. There is no concept of shutdown being started and subsequently aborted--when shutdown is started, is it expected to be completed through to the point of having the UPS cut the load.

          Specifically to the Ramzi post (Synology support), he is saying that there is no way to have the Synology shut down but to leave the UPS powered. He is 100% correct in what he says. As noted above, this is exactly how NUT works. Once NUT shutdown is started, the UPS must be told to cut the load and remove power to the Synology.

          If you prefer, you can use this phrasing instead of the prior:

          Start a shutdown on the Synology and check the amount of time between the log off message in pfSense and the time the Synology actually enters safe mode.

          This will probably be about a 1/4 second less than a power off test. 😳

          K 1 Reply Last reply Reply Quote 0
          • K
            kevindd992002 @dennypage
            last edited by kevindd992002

            @dennypage said in NUT package:

            @kevindd992002 I don't think that some of the people writing in that thread know how NUT works.

            The concept of a mode where the system is quiesced but is listening to the UPS and will start back up if the UPS signals that mains have returned is not supported with NUT. There is no concept of shutdown being started and subsequently aborted--when shutdown is started, is it expected to be completed through to the point of having the UPS cut the load.

            Specifically to the Ramzi post (Synology support), he is saying that there is no way to have the Synology shut down but to leave the UPS powered. He is 100% correct in what he says. As noted above, this is exactly how NUT works. Once NUT shutdown is started, the UPS must be told to cut the load and remove power to the Synology.

            If you prefer, you can use this phrasing instead of the prior:

            Start a shutdown on the Synology and check the amount of time between the log off message in pfSense and the time the Synology actually enters safe mode.

            This will probably be about a 1/4 second less than a power off test. 😳

            Right. I completely understand that this is not supported because I've experienced this myself. Sometimes, people in the house turn on the generator (when there's a blackout) a few seconds after the FSD is sent by NUT to the remote monitors. This messes up everything.

            I think we're pertaining to the same thing but different wordings :)

            I use "safe mode + Synology waits for UPS to cut power" which is exactly what the Synology support person was saying. If safe mode is just 1/4 second less than a full power off test, then doing a manual power off test would then be an accurate test. I did do this in the past and since I also have an expansion unit in the mix, I remember that both units turned off in the span of two to three minutes.

            Would that value be a good value for the power off delay of the UPS then? I just need to make sure that the UPS has still enough juice to wait for that long.

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

              @kevindd992002 said in NUT package:

              Would that value be a good value for the power off delay of the UPS then? I just need to make sure that the UPS has still enough juice to wait for that long.

              You’ll have to time it. Difference between NUT log off and entry to safe mode. My guess (hope) would be that it is significantly less 60 seconds, but that’s just a guess. Note that you’ll need to recheck whenever you make significant changes to the Synology.

              Just out of curiosity, are you running DSM 6 or 7?

              K 1 Reply Last reply Reply Quote 0
              • K
                kevindd992002 @dennypage
                last edited by

                @dennypage said in NUT package:

                @kevindd992002 said in NUT package:

                Would that value be a good value for the power off delay of the UPS then? I just need to make sure that the UPS has still enough juice to wait for that long.

                You’ll have to time it. Difference between NUT log off and entry to safe mode. My guess (hope) would be that it is significantly less 60 seconds, but that’s just a guess. Note that you’ll need to recheck whenever you make significant changes to the Synology.

                Just out of curiosity, are you running DSM 6 or 7?

                When I manually shutdown the NAS, its remote monitor will also log off from the NUT server, correct? So difference between that time and when the NAS is completely shutdown (no lights and all).

                Inwas running DSM 6 when I timed it to be 3 minutes from the time I initiated a shutdown sequence up to when the units are completely shutdown. Last week, I upgraded to DSM 7 and haven't checked since.

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

                  @kevindd992002 said in NUT package:

                  Last week, I upgraded to DSM 7 and haven't checked since.

                  I haven't timed a lot of things, but DSM 7 seems a lot faster across the board. I'm guessing that shutdown/safe mode will be faster as well. Your Mileage May Very.

                  K 1 Reply Last reply Reply Quote 0
                  • K
                    kevindd992002 @dennypage
                    last edited by

                    @dennypage said in NUT package:

                    @kevindd992002 said in NUT package:

                    Last week, I upgraded to DSM 7 and haven't checked since.

                    I haven't timed a lot of things, but DSM 7 seems a lot faster across the board. I'm guessing that shutdown/safe mode will be faster as well. Your Mileage May Very.

                    I'll try and time it today. For the UPS delay, when does that delay start? Is it as soon as I see the auto shutdown message in the pfsense NUT?

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

                      @kevindd992002 said in NUT package:

                      For the UPS delay, when does that delay start? Is it as soon as I see the auto shutdown message in the pfsense NUT?

                      You're looking for the amount of time between the point the Synology disconnects from pfSense NUT and the time it has fully entered safe mode.

                      K 1 Reply Last reply Reply Quote 0
                      • K
                        kevindd992002 @dennypage
                        last edited by

                        @dennypage said in NUT package:

                        @kevindd992002 said in NUT package:

                        For the UPS delay, when does that delay start? Is it as soon as I see the auto shutdown message in the pfsense NUT?

                        You're looking for the amount of time between the point the Synology disconnects from pfSense NUT and the time it has fully entered safe mode.

                        What I meant is when does the ups.delay.shutdown countdown start? When does the UPS start counting down before it cuts off power to its loads?

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

                          @kevindd992002 said in NUT package:

                          What I meant is when does the ups.delay.shutdown countdown start? When does the UPS start counting down before it cuts off power to its loads?

                          It starts when the UPS receives a shutdown command.

                          1 Reply Last reply Reply Quote 0
                          • K
                            kevindd992002
                            last edited by

                            @dennypage

                            Do you have any ideas why is it that when I connect to my APU2C4 via a serial port, the NUT package cannot detect my USB UPS?

                            ed1c00bd-9c12-47af-9b7f-84cc81d6c480-image.png

                            As soon as I remove the serial cable connection and restart NUT, it works just fine.

                            GertjanG dennypageD 2 Replies Last reply Reply Quote 0
                            • GertjanG
                              Gertjan @kevindd992002
                              last edited by Gertjan

                              @kevindd992002 said in NUT package:

                              I connect to my APU2C4 via a serial port, the NUT package cannot detect my USB UPS?

                              Serial or USB ?

                              As soon as I remove the serial cable connection and restart NUT, it works just fine.

                              ? Without the cable, NUT works ?

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

                              K 1 Reply Last reply Reply Quote 0
                              • K
                                kevindd992002 @Gertjan
                                last edited by

                                @gertjan said in NUT package:

                                @kevindd992002 said in NUT package:

                                I connect to my APU2C4 via a serial port, the NUT package cannot detect my USB UPS?

                                Serial or USB ?

                                As soon as I remove the serial cable connection and restart NUT, it works just fine.

                                ? Without the cable, NUT works ?

                                APC UPS is connected via USB and I'm trying to keep a serial connection alive but when I do that it kills the APC USB connection. It only happens for the APC USB connection, not with other USB devices.

                                Yes, it works without the serial connection.

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

                                  @kevindd992002 This is a basic NUT issue rather than a package issue. You'll need to diagnose this at the NUT level, and probably follow up with the NUT forum. I'd suggest you start by examining the log entries for NUT...

                                  J 1 Reply Last reply Reply Quote 0
                                  • J
                                    josepr @dennypage
                                    last edited by josepr

                                    So I am able to monitor and query the values of the two ups that power my firewall, by adding a second one at Advance Settings under ups.conf

                                    Any tips on what files, and their location the status widget uses to be able to modify and display data for each of the ups. (Hopefully something as simple as adding a loop or hardcoding a link for the second entry).

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

                                      @josepr The pfSense NUT package is designed to supervise/monitor a single UPS only.

                                      I'm curious as to why you have two UPSs on your firewall... does you firewall hardware have dual power supplies connected to separate UPSs?

                                      J 1 Reply Last reply Reply Quote 0
                                      • J
                                        josepr @dennypage
                                        last edited by

                                        @dennypage
                                        Two ups each ones feeds a pdu which feeds a dual power supply host and other dual power equipment on a small 12U rack.
                                        I am comfortable with programming and some html so wanted to see if could modify my copy of the package locally on my machine and make it work.

                                        J dennypageD 2 Replies Last reply Reply Quote 0
                                        • J
                                          josepr @josepr
                                          last edited by

                                          @josepr
                                          So was able to find the widget php and for now hardcode the second ups, havent had the chance to play with php before but will try to make it so that it can read all ups from the ups.conf and do something like the traffic or gateway widget were i can select which to display, get a chance to learn php.
                                          3e7850aa-87b5-4dff-8230-00682ac39f2f-image.png

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

                                            @josepr said in NUT package:

                                            Two ups each ones feeds a pdu which feeds a dual power supply host and other dual power equipment on a small 12U rack.

                                            I see. Old school cool. Given the lower cost of hardware these days, I don't see that much anymore. These days I usually see dual systems, each with their own UPS, set up as a fault tolerant or load balanced pair. But you probably have that as well. 😀

                                            Unfortunately, while NUT itself has support for multiple power sources, the pfSense NUT package does not support that configuration. The pfSense NUT package is single UPS only. It would take quite a bit of work to make it support multiples in the various (extensive) configurations, and there really hasn't been any interest. You are actually the first to ask about it.

                                            Probably your best bet is to use one of your other systems to run NUT on, and have that system initiate a remote shutdown of pfSense when the time comes. Sorry.

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