I would like to read my Centos 5.x dmesg with timestamp, how do I do this?
Linux Centos with dmesg timestamp
centosdmesglinux
Related Topic
- Linux – How to add message that will be read with dmesg
- Linux SCP – Can SCP Copy Directories Recursively?
- Linux – How to add a timestamp to bash script log
- Ubuntu – How to convert ‘dmesg’ time format to ‘real’ time format
- Firewalld Configuration – How to Block ICMP Timestamp and Timestamp Reply
- Linux – Prevent kernel messages from appearing in dmesg
Best Answer
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 you'd like to send all kernel (dmesg) logs to
/var/log/kern.log
, using the default syslog daemon, you'd add a line like the following to/etc/syslog.conf