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.2m 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 @Gertjan
      last edited by

      @Gertjan

      Will Synology write the defaults in the file after restarting the ups daemon? I do have the correct upsmon.conf in etc.defaults/ so I can also use that (if it's the same as yours).

      dennypageD GertjanG 3 Replies Last reply Reply Quote 0
      • dennypageD
        dennypage @kevindd992002
        last edited by

        @kevindd992002 Given that the Synology isn’t writing the upsmon.conf file correctly, I wouldn’t count on it starting the upsmon service correctly either.

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

          @Gertjan said in NUT package:

          grep 'ups' /var/log/messages

          Right. I'm at a loss here. I'm checking the syslog and messages log again and I do see the last successful connection of the Syno to my UPS NUT master was last 6/4/2019. Here's a more detailed view of the messages log file: https://pastebin.com/bXk7YEWf

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

            @kevindd992002 Does "ps -elf" on the Synology show any ups processes running?

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

              @dennypage said in NUT package:

              @kevindd992002 Does "ps -elf" on the Synology show any ups processes running?

              Looks like that's a no: https://pastebin.com/dKDHdg2w

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

                @kevindd992002 Just for grins...

                Last ditch effort if I owned that Synology...

                Disable UPS support on the Synology, reboot the Synology, and then re-enable UPS support on the Synology.

                Btw out of curiosity, what model of Synology is it?

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

                  @dennypage said in NUT package:

                  @kevindd992002 Just for grins...

                  Last ditch effort if I owned that Synology...

                  Disable UPS support on the Synology, reboot the Synology, and then re-enable UPS support on the Synology.

                  Btw out of curiosity, what model of Synology is it?

                  Ok, I just did that and checked upsmon.conf and /var/log/messages, same exact results :(

                  I'm using a DS1817+, so it's a pretty recent model.

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

                    @kevindd992002 said in NUT package:

                    Will Synology write the defaults in the file after restarting the ups daemon?

                    I do not have the command for you how to start upsmon manually, but you'll find it on Google ^^ Like https://diktiosolutions.eu/en/synology/synology-ups-nut-en/
                    This will not generate the config file : as pfSense, when you start (or activate) it using the GUI all the config files are build,
                    I was curious : if only the config file building faulted, the process never gets started - but if that file is ok, and you start manually, then that's something that indicated that the GUI is at fault.

                    @kevindd992002 said in NUT package:

                    I do have the correct upsmon.conf in etc.defaults/ so I can also use that (if it's the same as yours).

                    It should / could be somewhat different : like another master IP etc.
                    Strange.
                    I have nothing in this directory

                    root@DiskStation:/etc/defaults# ll
                    total 12
                    drwxr-xr-x  2 root root 4096 Jul 10  2013 .
                    drwxr-xr-x 51 root root 4096 Aug 20 20:47 ..
                    -rw-r--r--  1 root root  459 Mar  4  2013 rc.conf
                    

                    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:

                      Will Synology write the defaults in the file after restarting the ups daemon?

                      I do not have the command for you how to start upsmon manually, but you'll find it on Google ^^ Like https://diktiosolutions.eu/en/synology/synology-ups-nut-en/
                      This will not generate the config file : as pfSense, when you start (or activate) it using the GUI all the config files are build,
                      I was curious : if only the config file building faulted, the process never gets started - but if that file is ok, and you start manually, then that's something that indicated that the GUI is at fault.

                      @kevindd992002 said in NUT package:

                      I do have the correct upsmon.conf in etc.defaults/ so I can also use that (if it's the same as yours).

                      It should / could be somewhat different : like another master IP etc.
                      Strange.
                      I have nothing in this directory

                      root@DiskStation:/etc/defaults# ll
                      total 12
                      drwxr-xr-x  2 root root 4096 Jul 10  2013 .
                      drwxr-xr-x 51 root root 4096 Aug 20 20:47 ..
                      -rw-r--r--  1 root root  459 Mar  4  2013 rc.conf
                      

                      Yeah, that makes sense. I think the GUI is at fault here. It's just weird that when I change the UPS IP to an IP that I know is not used, the GUI also errors out, making it like it's connecting properly to the UPS.

                      It's /usr/syno/etc.defaults/ups

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

                        @dennypage

                        On another note, how do I "reset" the battery install date on my UPS for every time I install a new battery? Similar to how PowerChute does it?

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

                          @kevindd992002 said in NUT package:

                          @dennypage

                          On another note, how do I "reset" the battery install date on my UPS for every time I install a new battery? Similar to how PowerChute does it?

                          Good question.
                          I used Pan B : I'll hook them up to a PC with run PowerShute, and use that tool to reset the counter.
                          (otherwise I have to reverse engineer a binary Windows app to see what communication goes over the USB wire .... or read the complete NUTS manual ....)

                          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:

                            @dennypage

                            On another note, how do I "reset" the battery install date on my UPS for every time I install a new battery? Similar to how PowerChute does it?

                            Good question.
                            I used Pan B : I'll hook them up to a PC with run PowerShute, and use that tool to reset the counter.
                            (otherwise I have to reverse engineer a binary Windows app to see what communication goes over the USB wire .... or read the complete NUTS manual ....)

                            Yeah, I mean I can always do that but I just want to know if there's a NUT command that can do the same action.

                            As for my UPS issue, here's a some kind of useless reply from Synology (as I half expected):

                            Dear Customer,

                            Thank you for contacting Synology support.

                            As the design, the configuration will be rewrite after you set up in DSM.

                            And we checked the system seems like we can get contact to UPS properly.

                            root@Synology:~# upsmon -D
                            Network UPS Tools upsmon DSM6-2-2-24922-nano-1-C5-190604
                            kill: No such process
                            0.000000 UPS: ups@192.168.10.1 (slave) (power value 1)
                            0.000344 Using power down flag file /etc/killpower
                            0.000924 debug level is '1'
                            0.006931 Trying to connect to UPS [ups@192.168.10.1]
                            0.009822 Logged into UPS ups@192.168.10.1
                            0.010296 UPS [ups@192.168.10.1] connected
                            Executing command: online
                            ^C 50.141267 Signal 2: exiting

                            Would you like to tell us other finding, since the login log may need to refer to your configuration of NUT master.

                            Looking forward to your messages.

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

                              Oh wait! They're not useless after all. It looks like they did something and now my upsmon.conf file is populated with the expected contents! And I can see the monuser account logged in in my pfsense ups logs :) I'll ask what they did, because they had remote access to my Syno. I see this in my /var/log/messages now:

                              2019-08-26T10:17:51+08:00 Synology upsmon[25917]: Startup successful
                              2019-08-26T10:17:51+08:00 Synology upsmon[25919]: UPS [ups@192.168.10.1] connected
                              2019-08-26T10:55:26+08:00 Synology upsmon[25919]: Poll UPS [ups@192.168.10.1] failed - Server disconnected
                              2019-08-26T10:55:55+08:00 Synology SystemInfo.cgi: ups_info_get.c:97 Can't get UPS status[0]
                              2019-08-26T10:59:04+08:00 Synology upsmon[25919]: UPS [ups@192.168.10.1] connected
                              2019-08-26T13:59:23+08:00 Synology upsmon[5713]: Startup successful
                              2019-08-26T13:59:23+08:00 Synology upsmon[5715]: UPS [ups@192.168.10.1] connected
                              
                              
                              dennypageD 1 Reply Last reply Reply Quote 0
                              • dennypageD
                                dennypage @kevindd992002
                                last edited by

                                @kevindd992002 said in NUT package:

                                @dennypage
                                On another note, how do I "reset" the battery install date on my UPS for every time I install a new battery? Similar to how PowerChute does it?

                                You can run upsrw and see what variables are exposed by the UPS. I believe the variable you are looking for is "battery.date". If it's there, you can update it via the "-s" option.

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

                                  @kevindd992002 said in NUT package:

                                  Oh wait! They're not useless after all. It looks like they did something and now my upsmon.conf file is populated with the expected contents! And I can see the monuser account logged in in my pfsense ups logs :) I'll ask what they did, because they had remote access to my Syno.

                                  I'm also very interested to know what they changed.

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

                                    @dennypage said in NUT package:

                                    @kevindd992002 said in NUT package:

                                    Oh wait! They're not useless after all. It looks like they did something and now my upsmon.conf file is populated with the expected contents! And I can see the monuser account logged in in my pfsense ups logs :) I'll ask what they did, because they had remote access to my Syno.

                                    I'm also very interested to know what they changed.

                                    Their reply, lol:

                                    Dear Customer,

                                    Thank you for contacting Synology support.

                                    Like the mail last time, we can't find the root cause from the log.

                                    We are still tracing this case, if you have more clues it will be helpful to let us know.

                                    The design of this configuration will be modify once you connect to other device.

                                    And we just copy it from the etc.default. Please check if there are any problem or not.

                                    Also just recommendation, if the upsmon.conf lose its content again please tell us, and let us check.

                                    Please don't copy it from etc.default by yourself because there might be some symptom to let us know the root cause.

                                    Thank you for your patience, and sorry for any inconvenience caused.

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

                                      Last 10/3/2019 there was a power failure and I received a message from my Syno:

                                      Dear user,
                                      
                                      The UPS connected to Synology has reached low battery. All services are shut down. The services will be restarted once the UPS is recovered.
                                      
                                      Sincerely,
                                      Synology DiskStation
                                      

                                      This is expected. It happened 5:47PM and then at 10:39PM I received this:

                                      Dear user,
                                      
                                      Synology suffered from power failure and was shut down improperly.
                                      
                                      Sincerely,
                                      Synology DiskStation
                                      

                                      I then checked my Syno's upsmon.conf and it is 0 bytes again! I don't know what could've caused this but I'll report back to Syno support as they requested last time. So between 5:47PM and 10:39PM, that conf file got corrupted again for some reason, and was the cause of the improper shutdown.

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

                                        @kevindd992002 Did you have the HOSTSYNC setting in the upsmon.conf section?

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

                                          @dennypage said in NUT package:

                                          @kevindd992002 Did you have the HOSTSYNC setting in the upsmon.conf section?

                                          Yes I did, for 120 seconds. That's what I thought at first but digging through the logs of pfsense, the power went out again at 8:15PM and came back at 10:39PM. And what I think happened is the upsmon.conf file was reverted to 0 bytes right after the Syno turned on when the power went back on at 6:15PM. So at 6:15PM, the Syno never was able to connect to the NUT master.

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

                                            @kevindd992002 That's pretty strange (scary). Other than talking with Synology, the only thing I can think to suggest is to double check that your Synology can easily shut down in 120 seconds. Mine used to shutdown in under 60 seconds. I just retested (glad I did) and I'm seeing it now at 90 seconds. I don't know if the change is due to a newer DSM or because of changes I've made with Surveillance Station.

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