LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-06-2014, 04:23 AM   #1
BhushanPathak
Member
 
Registered: Nov 2013
Location: Pune, India
Distribution: CentOS
Posts: 85

Rep: Reputation: Disabled
Question Enable dmesg timestamp


I am using CentOS 6.5 64bit. I want to enable timestamp for dmesg log entries [/var/log/dmesg].

I went through this post, but recompiling the kernel is not an option for me.

Is there any other possible way of doing it [via configuration settings]?

I added the following in rsyslog.conf -

Code:
kern.*       /var/log/kern.log
It started printing some messages in kern.log, but dmesg log file still does not have timestamp.

Thanks
Bhushan Pathak
 
Old 05-06-2014, 01:14 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by BhushanPathak View Post
I am using CentOS 6.5 64bit. I want to enable timestamp for dmesg log entries [/var/log/dmesg].
I went through this post, but recompiling the kernel is not an option for me.

Is there any other possible way of doing it [via configuration settings]? I added the following in rsyslog.conf -

Code:
kern.*       /var/log/kern.log
It started printing some messages in kern.log, but dmesg log file still does not have timestamp.
Well, unless you enable the option in the kernel (by recompiling the kernel to have it), then it won't work. A better question is WHY isn't this an option for you? If you're the systems administrator, then this shouldn't be a problem.

If you know what you want to accomplish and know HOW to accomplish it, all that's left is for you to do it.
 
1 members found this post helpful.
Old 05-06-2014, 02:14 PM   #3
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 518
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
You can compile a kernel in 2 easy steps. It's the only way to enable/disable timing information on printks.

Step 1: Download the source for the kernel version you are running now, and copy the .config file belonging to that version from your /boot directory. The file would be named config-<version number>. Rename that file simply to ".config." Open a terminal in that directory, and type "make", followed by "make modules_install" and "make install"

Last edited by DJ Shaji; 05-06-2014 at 02:16 PM. Reason: I've got OCD
 
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
script to timestamp files with timestamp from directory eRJe Programming 4 11-13-2013 06:52 PM
Timestamp dmesg entries loadedmind Linux - Server 3 06-26-2012 04:02 PM
LXer: How to make dmesg timestamp human readable LXer Syndicated Linux News 0 11-13-2011 07:30 PM
Difference between ouput of dmesg and content of /var/log/dmesg Sayan Acharjee Linux - General 1 09-21-2011 10:42 AM
Plugged in mouse, dmesg said found, but don't know how to enable it. Gentoo Linux. RHLinuxGUY Linux - Hardware 0 07-21-2006 09:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:19 PM.

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