是否可以从用户空间读取PVclock?

是否可以从用户空间读取PVclock?

是否可以使用某些用户空间工具读取时钟源 xen 或 kvmclock?

参考/sys/devices/system/clocksource/clocksource0/current_clocksource.读取 pvclock 的实际值。

或者是否必须编写 C 程序或使用内存调试器之类的东西?

答案1

hwclock(8) 似乎读取虚拟机管理程序的时钟

# hwclock --show --debug
hwclock from util-linux 2.20.1
Using /dev interface to clock.
Last drift adjustment done at 0 seconds after 1969
Last calibration done at 0 seconds after 1969
Hardware clock is on unknown time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2015/08/10 15:07:13
Hw clock time : 2015/08/10 15:07:13 = 1439219233 seconds since 1969
Mon 10 Aug 2015 16:07:13 BST  -0.225494 seconds
#

# hwclock --show
Mon 10 Aug 2015 16:08:52 BST  -0.271426 seconds
mintvm ~ #

相关内容