How to view linux kernel logs live?
Solution 1:
Have you tried tail -F
, eg.
tail -F /var/log/messages
Solution 2:
You can:
- execute dmesg every second:
while true; do dmesg -c; sleep 1; done
- print everything appended to /var/log/messages:
tail -f /var/log/messages
- dump the logs on the serial port and read them on another PC. You will need to add to your kernel boot parameters:
console=ttyS0,115200 console=tty0 ignore_loglevel
and removequiet
Solution 3:
You could use
cat /proc/kmsg
By this way you could get all kernel messages when they come