linux printk 时间戳,linux – kern.log中“00:00:00”时间戳的含义是什么?
我正在尋找kern.log中特定問題的原因.有許多條目的00:00:00時間戳:
Jun 11 00:00:00 mymachine kernel: [ 0.000000] Initializing cgroup subsys cpusetJun 11 00:00:00 mymachine kernel: [ 0.000000] Initializing cgroup subsys cpu
Jun 11 00:00:00 mymachine kernel: [ 0.000000] Linux version 3.2.0-33-virtual (buildd@batsu) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #52-Ubuntu SMP Thu Oct 18 16:48:3
7 UTC 2012 (Ubuntu 3.2.0-33.52-virtual 3.2.31)
Jun 11 00:00:00 mymachine kernel: [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.2.0-33-virtual root=LABEL=cloudimg-rootfs ro console=ttyS0
假設我實際上沒有在午夜啟動機器 – 00:00:00時間戳是否意味著啟動過程的特定階段?他們這樣做有什么特別的原因?
(這是一個托管在OpenStack上的Ubuntu Precise VM,如果這很重要的話.我認為這個啟動是在從另一個圖像克隆后立即啟動的.)
編輯更多信息:
據我所知(pgrep ntp,ls / etc / ntp *)ntp沒有運行.
時間似乎(正確)設置為UTC,(錯誤地)沒有設置本地時區.
EDIT2 00:00:00的最后一個日志條目如下所示:
Jun 11 00:00:00 mymachine kernel: [ 6.324599] type=1400 audit(1370908796.761:11): apparmor="STATUS" operation="profile_load" name="/usr/sbin/tcpdump" pid=875 comm="apparmor_parser"
Jun 11 00:00:02 mymachine kernel: [ 12.259133] postgres (1033): /proc/1033/oom_adj is deprecated, please use /proc/1033/oom_score_adj instead.
Jun 11 00:00:05 mymachine kernel: [ 13.592385] eth0: no IPv6 routers present
Jun 11 06:22:15 mymachine kernel: [22942.768233] init: tilemill main process (3167) killed by TERM signal
Jun 11 06:40:14 mymachine kernel: [24022.599001] init: tilemill main process (5640) killed by TERM signal
解決方法:
時序詳細信息/分辨率由在引導期間傳遞給內核的設置控制:
$grep PRINTK /boot/config-`uname -r`
CONFIG_PRINTK=y
CONFIG_SND_VERBOSE_PRINTK=y
CONFIG_PRINTK_TIME=y
CONFIG_BOOT_PRINTK_DELAY=y
CONFIG_EARLY_PRINTK=y
CONFIG_EARLY_PRINTK_DBGP=y
您可以在kernel.org git repo中閱讀有關這些選項的更多信息.
摘自上面的頁面
config PRINTK_TIME
06001
Selecting this option causes time stamps of the printk() messages to
be added to the output of the syslog() system call and at the console.
The timestamp is always recorded internally, and exported to /dev/kmsg.
This flag just specifies if the timestamp should be included, not that
the timestamp is recorded.
The behavior is also controlled by the kernel command line parameter
printk.time=1. See Documentation/kernel-parameters.txt
時間戳[0.000000]以系統引導后的秒數表示.
標簽:linux,kernel,boot,logs,timestamps
來源: https://codeday.me/bug/20190812/1642669.html
總結
以上是生活随笔為你收集整理的linux printk 时间戳,linux – kern.log中“00:00:00”时间戳的含义是什么?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 摩尔庄园手游黄金锦鲤怎么获得?
- 下一篇: 通输卵管多久可以要孩子