LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Difference between ouput of dmesg and content of /var/log/dmesg (https://www.linuxquestions.org/questions/linux-general-1/difference-between-ouput-of-dmesg-and-content-of-var-log-dmesg-904227/)

Sayan Acharjee 09-21-2011 10:30 AM

Difference between ouput of dmesg and content of /var/log/dmesg
 
Can anyone tell me the difference between ouput of dmesg (the command we use to see bootup messages) and content of /var/log/dmesg?

Sometimes, they are same and sometimes they are different.
I used to think dmesg command shows the contents of /var/log/dmesg when executed, is that right?

druuna 09-21-2011 10:42 AM

Hi,

Quote:

I used to think dmesg command shows the contents of /var/log/dmesg when executed, is that right?
That depends on the distro's implementation.

I've seen systems that do a ring buffer dump right after the boot and the content is placed in /var/log/dmesg. Other distro's dump as well, but place it in a more appropriate named file: /var/log/boot (or alike).

These files are a static representation of your system, just after booting is done and syslogd takes over the logging. If syslogd is set up correctly, all messages are put into the appropriate files.

Hope this helps.


All times are GMT -5. The time now is 08:41 AM.