Linux sync source

On a system using kernel version 2.6.38, I see this sysfs file that shows the current synchronization source (e.g. tsc) / sys / devices / system / clocksource / clocksource0 / current_clocksource

But it looks like this sysfs file was introduced recently. In 2.6.9 I do not see this file. In versions that do not have these sysfs, is there an easy way to see the source of synchronization? When I compare the output of clock_gettime () in these versions, 2.6.9 seems to be in microsecond granularity, and 2.6.38 seems to be in nanosecond granularity. Hence it is interesting that there is a synchronization source in 2.6.9.

+4
source share
1 answer

You can try grepping clocksource and TSC from dmesg output.

FWIW, high-resolution timers (which allowed nanosecond resolution, among many others) were introduced into the kernel 2.6.21 or so; with old kernels this is not how you found out.

+3
source

Source: https://habr.com/ru/post/1386255/


All Articles