We can enable and disable printk timestamps at runtime, by writing to /sys/module/printk/parameters/time.
By default printk timestamp is disable :
[root@localhost ~]# cat /sys/module/printk/parameters/time
N
In order to enable the printk timestamp execute the below command:
[root@localhost ~]# echo "1" > /sys/module/printk/parameters/time
[root@localhost ~]# cat /sys/module/printk/parameters/time
Y
[root@localhost ~]# dmesg
[11320.847977] Hello World..
After that will able to see the timestamp.
In order to disable to printk timestamp execute the below command
[root@localhost ~]# echo "0" > /sys/module/printk/parameters/time
[root@localhost ~]# cat /sys/module/printk/parameters/time
N
No comments:
Post a Comment