LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


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

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


Hi,
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.

Marshall
 
Old 07-10-2006, 02:11 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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). :}


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

Rep: Reputation: 37
Normal.
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.
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:16 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration