[Buildroot] time difference between kernel timestamp and uptime

Ran Shalit ranshalit at gmail.com
Mon Mar 19 07:42:40 UTC 2018


Hello,

I am facing a time difference, between kernel timestamp, and uptime
command as following:

# uptime;  echo "hello" > /dev/kmsg;
 00:04:20 up 4 min,  load average: 0.00, 0.00, 0.00
# dmesg -c
[  258.487438] hello

There is about ~2-3 seconds difference.

Is there a way to resolve this time difference ?
Seems that busybox uptime can't be used with millisecond resolution,
so the difference is in seconds resolution (instead of milliseconds,
which would have been preferred). Is there any alternative for getting
boot time in millisecond format ? Should use the kernel printing
instead, for a better resolution >

kernel version is 4.10:

uname -a
Linux buildroot 4.10.181 #1 SMP Sat Jan 13 21:06:19 MST 2018 i686 GNU/Linux

Thanks you,
ranran



More information about the buildroot mailing list