In a system running kernel version 2.6.38 I see this sysfs file which shows the current clock source (happens to be tsc) /sys/devices/system/clocksource/clocksource0/current_clocksource
But looks like this sysfs file was introduced recently. In 2.6.9 I don’t see this file. In versions that doesn’t have this sysfs is there an easy to see the clock source ? When I compare the clock_gettime() ouptputs in these versions 2.6.9 seems to be at microseconds granularity and 2.6.38 is at nanoseconds granularity. Hence wondering what the clock source in 2.6.9 is..
You could try grepping clocksource and TSC from dmesg output.
FWIW, the high-resolution timers (which enabled nanosecond resolution, among many other things) were introduced in the 2.6.21 kernel or thereabouts; older kernels don’t have that, as you have found out.