Skip to contentSkip to conversation

Retrieving the precise guest start time via libxc or similar?

DISCUSSION Razvan Cojocaru 1 participant 2 messages Feb 28, 2017

lore
Share & tools
lore
#0 lore raw

Hello,

xc_domain_getinfo() gets us info->cpu_time, which, if I understand correctly, is the guest uptime.

Is there an officially sanctioned way of retrieving the _exact_ guest start time? Obviously we can compute an approximation by doing now - info->cpu_time, but we'd like to be able to uniquely identify an OS boot -> shutdown cycle, and the difference method is not guaranteed to always yield the same result for the same running OS.

Thanks,
Razvan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#1 lore raw
Quoted 10 lines · Razvan Cojocaru

Hello,

xc_domain_getinfo() gets us info->cpu_time, which, if I understand correctly, is the guest uptime.

Is there an officially sanctioned way of retrieving the _exact_ guest start time? Obviously we can compute an approximation by doing now - info->cpu_time, but we'd like to be able to uniquely identify an OS boot -> shutdown cycle, and the difference method is not guaranteed to always yield the same result for the same running OS.

Nevermind, found /local/domain/<DOMAIN_ID>/vm/start_time. Seems to do the trick nicely.

Thanks,
Razvan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel