Logs
Logs persistence
The logs are not persisted on reboot and will therefore be lost.
By default, logs are stored to RAM and are not kept over a reboot. This is because intensive logging on persistent memory (NAND memory) will reduce the longevity of the memory.
If you need persistent logging, please check the Persisting logs page.
Only the 10 latest files (2MB) are kept. The older logs are deleted.
Consult the logs
The logs are store in the /var/log/messages file
.
You can display the logs using less
:
You can also displaying in live new incoming messages with tail:
To avoid too large files, a new file is created when it reaches 200KB. The old file is automatically renamed with an index as suffix. After some time, you may have:
lorix-one-0b98c9:~$ ll /var/log/messages* -rw-r--r-- 1 root root 59742 Dec 13 17:15 /var/log/messages -rw-r--r-- 1 root root 204867 Dec 13 17:04 /var/log/messages.0 -rw-r--r-- 1 root root 204922 Dec 13 16:19 /var/log/messages.1 -rw-r--r-- 1 root root 204850 Dec 13 15:35 /var/log/messages.2 -rw-r--r-- 1 root root 204961 Dec 13 14:59 /var/log/messages.3 -rw-r--r-- 1 root root 204932 Dec 13 14:21 /var/log/messages.4 -rw-r--r-- 1 root root 204843 Dec 13 13:43 /var/log/messages.5 -rw-r--r-- 1 root root 204865 Dec 13 13:02 /var/log/messages.6 -rw-r--r-- 1 root root 204860 Dec 13 12:18 /var/log/messages.7 -rw-r--r-- 1 root root 204945 Dec 13 11:34 /var/log/messages.8 -rw-r--r-- 1 root root 204863 Dec 13 10:50 /var/log/messages.9
Inconsistent chronological order
If you have a log that does not follow a correct chronological order regarding the date/time information (for example steps of multiple hours at some moments) it is probably related to timezone change.
The time information in the logs has no timezone information. So when you change the timezone, the new logs can appear "before" regarding the time information. Keep in mind that the display order is always the correct chronological order.