printk and kernel log

Kevin Wilson wkevils at gmail.com
Tue Jun 25 05:04:08 EDT 2013


Hi,
You are right, thanks!
disabling CONFIG_PRINTK_TIME prevented this timestamps.

I believe they should have provide some sysfs entry for this, sorry
they did not do so

regards,
Kevin






On Tue, Jun 25, 2013 at 10:05 AM, Mulyadi Santosa
<mulyadi.santosa at gmail.com> wrote:
> On Mon, Jun 24, 2013 at 4:49 PM, Kevin Wilson <wkevils at gmail.com> wrote:
>> Hi,
>> When I add printk messages, and then try
>> to read /var/log/messages,
>> I see this:
>>
>> Jun 24 03:43:06 localhost kernel: [ 1858.148661] in my_func1
>> Jun 24 03:44:03 localhost kernel: [ 1915.150953] in my_func2
>>
>> What are the numbers is square brackets  ?  like [ 1858.148661]
>> or [ 1915.150953] ?
>
> IIRC, they are jiffies a.k.a timer clock. It is incremented every 1/HZ
> second. Major distros usually use HZ=1000 these days.
>
> Looking at kernel config, I believe this parameter is the one that
> toggle that timestamp:
> CONFIG_PRINTK_TIME=y
>
> So changing it to N and recompile the kernel should get rid of it.
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com



More information about the Kernelnewbies mailing list