<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">We manage hypervisors (VMWare ESXi/vCenter, KVM, XEN, Hyper-V) by remote
Libvirt API, in our case we need to get the host uptime via the same
libvirt interface. Is there a way get this info now for all the
aforementioned hypervisor types?<br><br>The APIs virConnectGetSysinfo(), virNodeGetInfo() provide host info but it doesn't include the system uptime.<br><br>The
virNodeGetCPUStats() can returns CPU usage in nanosecond, can we add
the user + system + idle + iowait to calculate the system uptime? Looks
like the sum value has a huge gap with the real uptime value returned by
"uptime" CLI. <br><br>virsh # nodecpustats<br>user: 2985046540000000<br>system: 1368209710000000<br>idle: 388018933920000000<br><div>iowait: 43371960000000<br></div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>