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

    How do I check whether pfSense was not cleanly shutdown?

    Scheduled Pinned Locked Moved General pfSense Questions
    8 Posts 3 Posters 608 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.
    • pitchforkP
      pitchfork
      last edited by pitchfork

      where would I look for indication that is the case, aside from watching the console during a boot up?

      1 Reply Last reply Reply Quote 0
      • kiokomanK
        kiokoman LAYER 8
        last edited by

        open the console and launch a fsck, it will run in read only mode and it will tell you if the system need to be corrected

        ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
        Please do not use chat/PM to ask for help
        we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
        Don't forget to Upvote with the 👍 button for any post you find to be helpful.

        1 Reply Last reply Reply Quote 1
        • pitchforkP
          pitchfork
          last edited by

          That tells me if the filesystem has problems, but an unclean shutdown might not necessarily cause a FS problem.

          how can I tell it didn't shutdown properly?

          1 Reply Last reply Reply Quote 0
          • KOMK
            KOM
            last edited by

            http://freebsd.1045724.x6.nabble.com/How-to-check-if-not-clean-shutdown-td6258842.html

            It may not be possible unless pfSense has some kind of custom handler for that.

            pitchforkP 1 Reply Last reply Reply Quote 1
            • kiokomanK
              kiokoman LAYER 8
              last edited by

              type on console

              last reboot
              

              idk if it tell you about unclean/clean reboot, i don't have unclean reboot to check

              ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
              Please do not use chat/PM to ask for help
              we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
              Don't forget to Upvote with the 👍 button for any post you find to be helpful.

              pitchforkP 1 Reply Last reply Reply Quote 2
              • pitchforkP
                pitchfork @KOM
                last edited by

                @KOM said in How do I check whether pfSense was not cleanly shutdown?:

                http://freebsd.1045724.x6.nabble.com/How-to-check-if-not-clean-shutdown-td6258842.html

                It may not be possible unless pfSense has some kind of custom handler for that.

                This is promising.

                Does anyone know how to place a shutdown hook in pfSense? Is there a facility to make this easier?

                1 Reply Last reply Reply Quote 0
                • pitchforkP
                  pitchfork @kiokoman
                  last edited by

                  @kiokoman said in How do I check whether pfSense was not cleanly shutdown?:

                  last reboot

                  Here: https://unix.stackexchange.com/a/278166/18568. Especially this part. I will try it in FreeBSD next time I suspect an unclean shutdown:

                  0e2ba6cd-ba51-4a8d-9b89-11884c8854ea-image.png

                  1 Reply Last reply Reply Quote 0
                  • KOMK
                    KOM
                    last edited by

                    https://forums.freebsd.org/threads/execute-rc-d-script-at-shutdown.53304/

                    https://www.freebsd.org/doc/en_US.ISO8859-1/articles/rc-scripting/rcng-hookup.html

                    You put startup scripts and kill scripts in /etc/rc.d.

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