-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Virtual machine CPU metrics | ||
|
||
Libvirt virtual machine (domain) has multiple CPU metrics: | ||
|
||
- `VIR_DOMAIN_CPU_STATS_CPUTIME`: cpu usage (sum of both vcpu and hypervisor usage) in nanoseconds, as a ullong. | ||
- `VIR_DOMAIN_CPU_STATS_SYSTEMTIME`: cpu time charged to system instructions in nanoseconds, as a ullong. | ||
- `VIR_DOMAIN_CPU_STATS_USERTIME`: cpu time charged to user instructions in nanoseconds, as a ullong. | ||
- `VIR_DOMAIN_CPU_STATS_VCPUTIME`: vcpu usage in nanoseconds (cpu_time excluding hypervisor time), as a ullong. | ||
|
||
If you want to visualize the CPU usage of the machine, you should use `VIR_DOMAIN_CPU_STATS_VCPUTIME` instead of `VIR_DOMAIN_CPU_STATS_CPUTIME` because `VIR_DOMAIN_CPU_STATS_CPUTIME` can be over 100%, it doesn't look right. |