mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Add a new param 'vcpu_time' to virDomainGetCPUStats
Currently virDomainGetCPUStats gets total cpu usage, which consists
of:
1. vcpu usage: the physical cpu time consumed by virtual cpu(s) of
domain
2. hypervisor: `total cpu usage' - `vcpu usage'
The param 'vcpu_time' is for getting vcpu usages.
This commit is contained in:
@@ -1339,7 +1339,8 @@ int virDomainGetState (virDomainPtr domain,
|
||||
|
||||
/**
|
||||
* VIR_DOMAIN_CPU_STATS_CPUTIME:
|
||||
* cpu usage in nanoseconds, as a ullong
|
||||
* cpu usage (sum of both vcpu and hypervisor usage) in nanoseconds,
|
||||
* as a ullong
|
||||
*/
|
||||
#define VIR_DOMAIN_CPU_STATS_CPUTIME "cpu_time"
|
||||
|
||||
@@ -1355,6 +1356,13 @@ int virDomainGetState (virDomainPtr domain,
|
||||
*/
|
||||
#define VIR_DOMAIN_CPU_STATS_SYSTEMTIME "system_time"
|
||||
|
||||
/**
|
||||
* VIR_DOMAIN_CPU_STATS_VCPUTIME:
|
||||
* vcpu usage in nanoseconds (cpu_time excluding hypervisor time),
|
||||
* as a ullong
|
||||
*/
|
||||
#define VIR_DOMAIN_CPU_STATS_VCPUTIME "vcpu_time"
|
||||
|
||||
int virDomainGetCPUStats(virDomainPtr domain,
|
||||
virTypedParameterPtr params,
|
||||
unsigned int nparams,
|
||||
|
||||
Reference in New Issue
Block a user