dmesg 时间戳转换
The dmesg
results from newer Linux kernels show the timestamps. It seems the time in seconds since the kernel start time.
较新的Linux内核的dmesg
结果显示了时间戳。 从内核启动时间开始 ,似乎是秒数。
How to convert the dmesg timestamps to the real time on Linux?
如何在Linux上将dmesg时间戳转换为实时?
The dmesg timestamp is the time in seconds since the kernel starting time.
dmesg时间戳是自内核启动时间以来的时间(以秒为单位)。
Later dmesg
has an -T
option:
以后的dmesg
具有-T
选项 :
-T, –ctime
Print human-readable timestamps.
Be aware that the timestamp could be inaccurate! The time source used for the logs is not updated after system SUSPEND/RESUME.-T,–ctime
打印人类可读的时间戳。
请注意,时间戳记可能不正确! 挂起/恢复系统后,用于日志的时间源不会更新。
So
所以
dmesg -T
will print the real time stamps like
将打印像
[Mon Oct 3 18:43:21 2016] SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs
[Mon Oct 3 18:53:22 2016] SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs
[Mon Oct 3 19:03:22 2016] SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs
[Mon Oct 3 19:13:23 2016] SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs
翻译自: https://www.systutorials.com/how-to-convert-the-dmesg-timestamps-to-easier-to-read-format-on-linux/
dmesg 时间戳转换