LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-29-2009, 10:12 AM   #1
loadedmind
Member
 
Registered: Sep 2003
Location: South
Distribution: Red Hat/CentOS
Posts: 207
Blog Entries: 1

Rep: Reputation: 16
Timestamp dmesg entries


Hi all. Is it possible to timestamp system events shown by dmesg as they occur? For example, I'm using VMware ESX/vCenter and have a RedHat 5.3 VM. I edit the CD-ROM settings for the VM and connect an ISO located on a datastore. I'd like to see if/when the CD-ROM was connected or any other event, for that matter, as they occur, real-time.

Thanks ahead of time,
Loadedmind
 
Old 10-29-2009, 12:32 PM   #2
bhaslinux
Member
 
Registered: Oct 2003
Location: UnitedKingdom
Distribution: Debian Lenny
Posts: 351

Rep: Reputation: 47
yes!
but you have to re-compile the kernel and enable
CONFIG_PRINTK_TIME=y
 
Old 10-29-2009, 02:50 PM   #3
loadedmind
Member
 
Registered: Sep 2003
Location: South
Distribution: Red Hat/CentOS
Posts: 207
Blog Entries: 1

Original Poster
Rep: Reputation: 16
Ugghhh, ok. Thanks for the info. Was hoping for a something a bit less intrusive, but thank you nonetheless.

Loadedmind
 
Old 06-26-2012, 04:02 PM   #4
Mattw4
LQ Newbie
 
Registered: Jun 2012
Distribution: Ubuntu/Fedora
Posts: 1

Rep: Reputation: Disabled
Talking Simpler dmesg output

old thread, I know, but this deserves a good answer.

On a Fedora/CentOS/RHEL system, one way to do what you're asking is to use the tail command on /var/log/messages that holds kernel prints and time:
tail -f /var/log/messages

The -f flag will keep it alive and display new messages as they hit the kernel.
You'd obviously have to watch a terminal or something, but you could also filter the output through grep to only show what you wanted.

Cheers!
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to sort output at latest entries without disturbing the previous entries record nabmufti Programming 4 02-11-2008 11:36 PM
dmesg (command) and /var/log/dmesg are different? Oxagast Linux - Software 2 07-10-2006 05:50 AM
UDP: Short Packets: and UDP bad checksum: entries in dmesg minutes2memories Linux - Networking 2 02-26-2006 07:28 PM
wierd dmesg entries slinky2004 Linux - General 5 10-10-2005 10:20 PM
/bin/dmesg > /dmesg-boot not Working in Knoppix 3.4 suguru Debian 2 07-04-2004 05:21 PM


All times are GMT -5. The time now is 08:16 PM.

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