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

    Need driver for hardware watchdog

    Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
    64 Posts 8 Posters 41.0k 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.
    • C Offline
      Cino
      last edited by

      I have a suggestion as this has save my a$$ here and there doing remote updates and getting a panic for no reason.

      Instead of putting 10_watchdog.sh in /usr/local/etc/rc.d so it autostarts AFTER pfsense finishes its startup processes. Copy the script to say the /root folder. In my case, I add it to /root/custom/scripts since I have to run scripts after every update so it updates my files for my build. Then manually add it to your config.xml under earlyshellcmd section. You can add the 'shellcmd' package and add it via the gui interface.

      This way the watchdogd will start before core processes and interfaces are started.

      Last night I was messing around with snort and was rebooting the box a lot… On one reboot, I get a panic after it started OpenNTPD for some reason...16 seconds later, the box rebooted... If the watchdog started when the normal autostart scripts started, it would had never rebooted.

      1 Reply Last reply Reply Quote 0
      • _ Offline
        _igor_
        last edited by

        ah, i had that too. So i changed watchdog settings to:

        bmc-watchdog -d -i 20 -e 16
        ```.
        
        That helped. Since this change no more unsolicited boots. Seems to be that on heavy config reads/writes the watchdog gets its updates too late. Hope that helps you. good luck!
        1 Reply Last reply Reply Quote 0
        • _ Offline
          _igor_
          last edited by

          Exists there any way to get that file as an entry in the menu (http://forum.pfsense.org/index.php/topic,34056.msg188926.html#msg188926)?
          It would be nice to have that info "at a mouse-click". Thanks for any help to do this!

          1 Reply Last reply Reply Quote 0
          • C Offline
            Cino
            last edited by

            Open file /usr/local/www/fbegin.inc and add this line of code under the "//Diagnostics" section (around line 180)

            $diagnostics_menu[] = array("IPMP Sensors", "/diag_ipmi-sensors.php" );
            

            Now any firmware/gitsync will erase this change, so you will have to add it back.

            1 Reply Last reply Reply Quote 0
            • jimpJ Offline
              jimp Rebel Alliance Developer Netgate
              last edited by

              Add it into your config.xml

              	 <installedpackages>[...]
              
              <menu>
              			<name>IPMP Sensors</name>
              			<tooltiptext>IPMP Sensors</tooltiptext>
              			Diagnostics
              			<url>/diag_ipmi-sensors.php</url>
              		</menu>
              
              		[...]</installedpackages> 
              

              No code hacks, and it'll never go away.

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • _ Offline
                _igor_
                last edited by

                Thanks a lot!

                1 Reply Last reply Reply Quote 0
                • C Offline
                  Cino
                  last edited by

                  Thanks Jimp!!! I'm always learn something new from you :-)

                  1 Reply Last reply Reply Quote 0
                  • _ Offline
                    _igor_
                    last edited by

                    one more question: after adding the item to the config.xml, do i have to reboot or is there a manual way to get the menus reloaded to get the new entry shown?
                    Thanks again for your help!

                    1 Reply Last reply Reply Quote 0
                    • jimpJ Offline
                      jimp Rebel Alliance Developer Netgate
                      last edited by

                      If you just restore the config it may force a reboot. If you edit it in live on the box in the gui, then rm /tmp/config.cache

                      If you edit it from the console with viconfig, it will do that automatically and should show up next time you refresh the page in the browser.

                      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                      Need help fast? Netgate Global Support!

                      Do not Chat/PM for help!

                      1 Reply Last reply Reply Quote 0
                      • _ Offline
                        _igor_
                        last edited by

                        Another change i did, which is cosmetic:

                        in the "diag_ipmi-sensors.php" i changed the call of the sensors from

                        $text = `/usr/local/sbin/ipmi-sensors`
                        

                        to

                        $text = `/usr/local/sbin/ipmi-sensors | sed 's/\[Unrecognized\ State\].*/\ /'`;
                        
                        

                        So the final entry of the ipmi-sensors output doesn't have the multiple "[Unrecognized State]" occurencies which destroy the page-layout. Its a crude hack, but works - with the Supermicro board.

                        And again thanks jimp for your quick answer to reload the menu! Great! That makes test changes quickly.

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          MrKoen
                          last edited by

                          Good stuff guys! I have updated my article to raise the hearbeat (although it worked fine for me) and added instructions how to add the diagnostics menu item.

                          Keep up the good work!

                          1 Reply Last reply Reply Quote 0
                          • C Offline
                            Cino
                            last edited by

                            Thanks for the code change igor!! I've been meaning to play with it as I didn't like the spacing either.

                            1 Reply Last reply Reply Quote 0
                            • _ Offline
                              _igor_
                              last edited by

                              Sorry for being somewhat active the last days, but i did a bit more looking about and ended with this:

                              $text = `/usr/local/sbin/ipmi-sensors | sed -e 's/\[[^P].*\]*/\[OK\]/' -e 's/\:\ /\:\t/g'`;
                              

                              it reproduces now the following output:

                              edit: the regex has an error, it should be this:```
                              's/[[^PO].*]//' -e 's/:\ /:\t/g'

                              
                              ![ipmi-sensors.gif](/public/_imported_attachments_/1/ipmi-sensors.gif)
                              ![ipmi-sensors.gif_thumb](/public/_imported_attachments_/1/ipmi-sensors.gif_thumb)
                              1 Reply Last reply Reply Quote 0
                              • C Offline
                                Cino
                                last edited by

                                i like the new format!! thanks again..

                                I wish i could get my box down to 32c/27c  i'm running 56c/63c….

                                1 Reply Last reply Reply Quote 0
                                • M Offline
                                  MrKoen
                                  last edited by

                                  Nice temperatures indeed. Mine is at about 48 degrees Celsius though it being totally passive cooled without a single fan.

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