Today I noticed an issue with the timestamps in my Linux box running redhat 7.3. The timestamp as shown in dmesg is behind of the one shown in /proc/uptime
# echo TEST > /dev/kmsg && dmesg | tail -1 && cat /proc/uptime
[661503.956980] TEST
661301.99 15107232.56
As I understand, they both shows the number of seconds passed since the kernel initialized. Then what could be causing the difference here ?
dmesg timestamps show CLOCK_MONOTONIC, while /proc/uptime shows CLOCK_BOOTTIME.
See 'man timer_create' for details on what CLOCK_* is.