3 ## Viewing the System Log from LuCi
5 Select the `Status >> System Log` menu entry.
7 ![alt text](images/librecmc-luci-selecting-system-log.png "Selecting
8 the System Log page in LuCi")
10 ![alt text](images/librecmc-luci-system-log.png "The System Log page
13 The `System Log` page in LuCi does not have an interface for filtering
14 output. Therefore, you will likely want to use the shell interface.
16 ## Viewing the System Log from the shell
18 Once logged in via SSH, use the `logread` command
21 Usage: logread [options]
23 -s <path> Path to ubus socket
24 -l <count> Got only the last 'count' messages
25 -e <pattern> Filter messages with a regexp
26 -r <server> <port> Stream message to a server
30 -h <hostname> Add hostname to the message
31 -P <prefix> Prefix custom text to streamed messages
32 -f Follow log messages
33 -u Use UDP as the protocol
34 -t Add an extra timestamp
35 -0 Use \0 instead of \n as trailer when using TCP
41 root@libreCMC:~$ logread | grep 'kern\.warn'
42 Mon Jan 15 20:22:01 2018 kern.warn kernel: [ 0.000000] No valid device tree found, continuing without
43 Mon Jan 15 20:22:01 2018 kern.warn kernel: [ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
44 Mon Jan 15 20:22:01 2018 kern.warn kernel: [ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
45 Mon Jan 15 20:22:01 2018 kern.warn kernel: [ 0.669305] Crashlog allocated RAM at address 0x3f00000
46 Mon Jan 15 20:22:01 2018 kern.warn kernel: [ 0.752178] m25p80 spi0.0: found mx25l12805d, expected m25p80
49 One should be able to use `logread -e` instead of `grep`, but it seems
50 that not all the same regular expressions work for both:
53 root@libreCMC:~$ logread -e 'kern\.warn' # and other similar variations
57 The system log is contained in a limited size, circular buffer in
58 memory. So, if you have some process writing messages periodically,
59 this will eventually erase messages that were only written once.
61 ## Configuring the system log
65 ## Monitoring the system log