Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-10-2006, 01:55 AM   #1
Registered: Aug 2003
Location: Mocksville, NC, USA
Distribution: Gentoo, Slackware.
Posts: 410

Rep: Reputation: 30
dmesg (command) and /var/log/dmesg are different?

I was just trying to get tail to work in a terminal I was going to use for monitoring things that happen on the system when I noticed that the output of the command "dmesg" and catting /var/log/dmesg are different. Why is this? Is there something wrong with my system... like my system logger not working properly, or is it suppost to be like this? I can figure out how to make it do what I want it to do even if they are different, it just struck me as strange. The command dmesg updates (eg, when I put in and pull out a USB flash drive it will report it), however /var/log/dmesg doesn't seem to change at all, it's stuck right after something to do with my wireless card. Just wondered if this was normal or something screwy.

Old 07-10-2006, 02:11 AM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912
dmesg (as in the command) is a "window" into the kernels ring-buffer.

The file /var/log/dmesg is only created in certain distros, and to
the best of my knowledge reflects the system messages up to when the
box goes multi-user (but I may have that all wrong since Slack doesn't
have that file in the first place). :}

Old 07-10-2006, 05:50 AM   #3
Registered: Aug 2004
Distribution: Slack10 & curr. tried numerous
Posts: 189

Rep: Reputation: 37
Pat creates/overwrites the /var/log/dmesg in /etc/rc.d/rc.M script just BEFORE starting the logger. So the dmesg file is a snapshot of everything that happened before the logger takes over recording what is currently happening.
1 members found this post helpful.


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plug-in usb hard drive gives errors in /var/log/messeges and dmesg jasone Linux - Hardware 12 11-18-2005 12:19 AM
/var/log/messages is empty, and also dmesg shows nothing beagle2 Linux - General 5 11-08-2005 08:12 AM
/bin/dmesg > /dmesg-boot not Working in Knoppix 3.4 suguru Debian 2 07-04-2004 05:21 PM
dmesg command not functioning IanS Linux - Newbie 1 02-21-2004 03:46 PM
RH 7.1 can't detect my modem ... in dmesg log file. t0dd Linux - Software 1 03-04-2002 08:45 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:23 PM.

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