[OE-core] How to enable persistent logfiles with systemd?

Kai Iskratsch kai.iskratsch at zenotrack.com
Fri Sep 16 09:36:03 UTC 2016


Hi all

Since we have system stability issues we need to enable persistent 
logfiles on our system based on yocto 2.0. So i tried a few things but 
the logiles are still created in /run/log/journal.

in /etc/systemd/journald.conf i set
Storage=persistent

and from /etc/default/volatiles/00_core i removed the line which creates 
/var/log/ as a link to /var/volatile/log
and i even created /var/log/journal myself

so now /var/log is a directory on the disk and no longer a link to 
volatile and /var/log/journal exists too, journald does not put any 
files there, the logs get still created in /run/log/journal


root at xxxx:~# ls -la /var/log/journal/
total 8
drwxr-xr-x 2 root root 4096 Sep 16 10:23 .
drwxr-xr-x 6 root root 4096 Sep 16 10:23 ..
root at xxxx:~# ls -la /run/log/journal/
total 0
drwxr-sr-x 3 root systemd-journal  60 Sep 16 10:53 .
drwxr-xr-x 3 root root             60 Sep 16 10:53 ..
drwxr-s--- 2 root systemd-journal 160 Sep 16 10:56 
cb061517ff144c67960c3ff0906cdc41

root at xxxx:~# cat /etc/systemd/journald.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See journald.conf(5) for details.

[Journal]
Storage=persistent
Compress=No
Seal=No
#SplitMode=uid
#SyncIntervalSec=5m
#RateLimitInterval=30s
#RateLimitBurst=1000
#SystemMaxUse=
#SystemKeepFree=
#SystemMaxFileSize=
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#MaxRetentionSec=
#MaxFileSec=1month
#ForwardToSyslog=yes
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg

i am out of ideas what else i have to change to create the logfiles 
persistent.






More information about the Openembedded-core mailing list