LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-21-2011, 10:30 AM   #1
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Bangalore, India
Distribution: Linux Mint 13
Posts: 590

Rep: Reputation: 64
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?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-21-2011, 10:42 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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.
 
3 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dmesg vs /var/log/dmesg drManhattan Linux - Newbie 2 08-07-2011 05:28 AM
/var/log/messages(dmesg) ?‏ hadimotamedi Linux - Newbie 5 02-22-2010 11:06 PM
use of /var/log/dmesg File krajkum Linux - Server 1 03-04-2009 09:57 AM
dmesg (command) and /var/log/dmesg are different? Oxagast Linux - Software 2 07-10-2006 05:50 AM
/var/log/messages is empty, and also dmesg shows nothing beagle2 Linux - General 5 11-08-2005 08:12 AM


All times are GMT -5. The time now is 07:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration