# dmesg showing date and time

## Raposatul

Is that possible? If so, how?

Thanks a lot!

----------

## ok

Not exactly what you want (?), but may be you could do with:

Kernel .config: CONFIG_PRINTK_TIME

Kernel hacking  --->

[*] Show timing information on printks

----------

## Raposatul

I would like to do dmesg on my servers and see at what date/time did happened the event.

----------

## gentoo_ram

The data in dmesg does not keep track of the system time.  Instead, the best way to do this is with syslog.  syslog listens for kernel messages and it timestamps every one with the date/time.  The only exception is at boot.  Any messages in the kernel log buffer at boot will show up as the same time when syslog starts.

Even better, syslog can send its logging to another server.  You can centralize all of your kernel logging from multiple machines to a central syslog server if you want.

I'd recommend using the syslog-ng package.

----------

## Raposatul

 *gentoo_ram wrote:*   

> The data in dmesg does not keep track of the system time.  Instead, the best way to do this is with syslog.  syslog listens for kernel messages and it timestamps every one with the date/time.  The only exception is at boot.  Any messages in the kernel log buffer at boot will show up as the same time when syslog starts.
> 
> Even better, syslog can send its logging to another server.  You can centralize all of your kernel logging from multiple machines to a central syslog server if you want.
> 
> I'd recommend using the syslog-ng package.

 

Roger!Thanks a lot!

----------

## skaumo

dmesg -e

----------

