Select the version of your OS from the tabs below. If you don't know the version you are using, run the command cat /etc/os-release
or cat /etc/issue
on the board.
Journald is a system service for collecting and storing log data, introduced with systemd. It tries to make it easier for system administrators to find interesting and relevant information among an ever-increasing amount of log messages.
To avoid excessive wear of the limited flash memory on Toradex modules, the journald data is stored in RAM by default. To debug certain aspects such as unexpected reboots, it is handy to activate persistent journald logging, so the log messages of previous boot cycles can be reviewed.
Attention: Please, use this function with caution, as it can decrease the lifespan of your eMMC/NAND due to flash usage for logging.
For more details about each possible parameter to be set for Journald, please consult the Journald Documentation.
Note: Make sure you are logged as root
before executing the next steps.
Storage=persistent
:# sed -i 's/^#Storage=auto/Storage=persistent/g' /etc/systemd/journald.conf
/var/volatile/log
:# sed -i '/\/var\/volatile\/log/d' /etc/tmpfiles.d/00-create-volatile.conf
# rm /var/log
That's it!
# reboot
# journalctl --list-boots
# journalctl -b -1
Enabling persistent logs on production is a "good thing", but you shall balance it to avoid memory stress and wear-out. When enabling logging keep the following in mind:
Search the internet for more information. One example is the article Ultimate Guide to Logging.
Journald is a system service for collecting and storing log data, introduced with systemd. It tries to make it easier for system administrators to find interesting and relevant information among an ever-increasing amount of log messages.
To avoid excessive wear of the limited flash memory on Toradex modules, the journald data is stored in RAM by default. To debug certain aspects such as unexpected reboots, it is handy to activate persistent journald logging, so the log messages of previous boot cycles can be reviewed.
Attention: Please, use this function with caution, as it can decrease the lifespan of your eMMC/NAND due to flash usage for logging.
For more details about each possible parameter to be set for Journald, please consult the Journald Documentation.
#Storage=auto
to
Storage=persistent
d /var/volatile/log 1777 - -
# rm /var/log
That's it!
# reboot
# journalctl --list-boots
# journalctl -b -1