Re: how to get vm uptime through libvirt api

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 7/26/22 09:48, Jiatong Shen wrote:
> Thank you very much for reply. Initially my thought of uptime is equal
> to executing to `uptime` inside a virtual machine. 
> as for the second case, where virtual machine is paused for a period,
> does libvirt expose an api to get how long qemu process
> has existed?

No, it doesn't. But that should be pretty easy to implement into
Alternatively, libvirt emits an event when a domain is started, so you
may use that to record the time when the domain was started.


[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux