I think the ouput of the command dmesg
should be the subset of the file /var/log/dmesg
.
But when I am debugging,the segmentation fault information can only be seen in the output of the command dmesg
.
What is the difference between them ?
Advertisement
Answer
The kernel message buffer is a ring buffer with limited space – when new messages arrive old may get dropped.
dmesg
outputs the current buffer.
Normally /var/log/dmesg
is filled directly after boot, so that the boot messages do not get lost.