Announcement

Collapse
No announcement yet.

Log cleared after reboot - solved!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Log cleared after reboot - solved!

    This morning I found HS4 on my HomeTroller Pi seemingly stuck. The last logged event was at 3am when the HS4 service restarted itself for some reason. No automations were working, no new events being logged, so I rebooted the Pi (from the Linux > Restart System) menu.

    Once it came back up, everything was working again, but I noticed that the log now only goes back to this morning when it rebooted. Is this normal to have the log be cleared during a reboot? Now I can't refer back to my historical events. What's the normal retention on events? Is this something I can control with logrotate or similar log tools in Linux?

    #2
    Check your Start Date and Start Time filter at the top of the log page. It is probably set to the last time the system started. Set that to an earlier date/time and you should see older event entries.

    Comment


      #3
      When I click on Start Date it only shows me today as an option and I can't type in anything else.

      Comment


        #4
        Look in /tmp for a file named HomeSeerLog.hsd. That's where the log was stored in the HS3-Pi edition.

        Because this is a tmpfs filesystem (store in RAM), it doesn't survive a reboot.

        Comment


          #5
          Well that seems dumb! Yeah, I found it there, thanks.

          Next question: can I change the location of that log so it persists a reboot? Or do I need to look into some sort of log shipping into another DB?

          Comment


            #6
            Originally posted by windracer View Post
            Well that seems dumb! Yeah, I found it there, thanks.

            Next question: can I change the location of that log so it persists a reboot? Or do I need to look into some sort of log shipping into another DB?
            It generally only happens when processes are not shutdown gracefully. In your case your system hung so that should explain a bit.

            A little bit of background to the tmp issue https://askubuntu.com/questions/380238/how-to-clean-tmp

            Comment


              #7
              Calling it dumb is being kind ...

              Check on the Setup->Labs tab. On the HS3-Pi, the first item there is 'Log is Persistent (saved to Data folder)'. But you guessed it ... it doesn't do anything!

              Comment


                #8
                I've tried turning on the labs feature in HS4 .... fingers crossed. I might also try replacing /tmp/HomeSeerLog.hsd with a symlink and see if that might work.

                Comment


                  #9
                  Actually, the "Log is Persistent" setting under Setup > Labs does work ... after a restart. My HomeSeerLog.hsd file is now under /usr/local/HomeSeer/Logs instead of /tmp.

                  Comment

                  Working...
                  X