2 Replies Latest reply on Jul 4, 2016 5:04 PM by Cooper132

    Persistency of journal logs

    Cooper132

      Hi,

       

      So I am trying to access the yocto system logs from a previous boot, via journalctl for example, but apparently only the current boot is saved.

      The directory /var/log/journal exists and the config file /etc/systemd/journald.conf has the line

      Storage=persistent

      (unchanged since flashing the image)

       

      > journalctl --list-boots
       0 a8ac725d5a734e0e826b3d3976a2dfb2 Sat 2000-01-01 01:00:11 CET—Mon 2016-07-04 13:54:33 CEST
      >
      

       

      I am using the latest prebuilt Intel yocto (3.5).

      Is there any configuration I would have to change to make logs truly persistent? Logs from only the last boot before the current would suffice.

       

      Regards,

      Cooper

        • 1. Re: Persistency of journal logs
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hello Cooper132,
           
          In the early releases of Edison's image there was an issue, the rootfs partition would be filled very quickly. We discovered (with help from the users of the community) that it was caused by the logs overpopulating the partition, so, they were disabled in newer releases.
          If you would like to store the logs, I’d suggest you to create a system service that automatically stores the last log in a file. I would not suggest you to change this back as it was in the early images as this would probably cause the same issue they had.
          If you would like to learn how to make a system service, I'd suggest you to check the following guide: https://communities.intel.com/docs/DOC-111103.
           
          -Peter.

          • 2. Re: Persistency of journal logs
            Cooper132

            Hi Peter,

             

            In the early releases of Edison's image there was an issue, the rootfs partition would be filled very quickly. We discovered (with help from the users of the community) that it was caused by the logs overpopulating the partition, so, they were disabled in newer releases.

            Ah yes, I remember having this exact problem back then . I think at that time the partitioning of the image was also a bit different IIRC, the root partition was a bit smaller so was filled up more quickly.

             

            I’d suggest you to create a system service that automatically stores the last log in a file.

            Thanks for the suggestion, I guess this would be the easiest solution for my case. Will look into that.

             

            Regards,

            Cooper