Understanding dmesg
timestamp is pretty simple: it is time in seconds since the kernel started. So, having time of startup (uptime
), you can add up the seconds and show them in whatever format you like.
Or better, you could use the -T
command line option of dmesg
and parse the human readable format.
From the man page:
-T, --ctime
Print human readable timestamps. The timestamp could be inaccurate!
The time source used for the logs is not updated after system SUSPEND/RESUME.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…