Linux Centos with dmesg timestamp

dmesg reads the Kernel log ring buffer. It doesn’t do timestamps. What you should do is configure syslog to grab the kernel logs from that buffer and send them to a file (if it isn’t already set to do so). Note, default CentOS 5.x syslog config sends kernel logs to /var/log/messages, as I recall. If … Read more

How to convert ‘dmesg’ time format to ‘real’ time format

It looks as if it was implemented recently for Quantal (12.10) : see http://brainstorm.ubuntu.com/idea/17829/ . Basically, dmesg is reported to have a new switch -T, –ctime. Edit. As another extension on Ignacio’s answer, here are some scripts to enhance dmesg output on older systems. ( Note: for the python version of the code shown there, … Read more