mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
Pass the correct cpu count when calling virDomainGetCPUStats.
When using the --start option, the show_count should not be set to max_id as the --start <cpu> means we dont need those many initial cpu stats. Hence, show_count should be adjusted accordingly. https://bugzilla.redhat.com/show_bug.cgi?id=1249441 Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
abf50874d6
commit
d9a0a885e2
@ -7360,7 +7360,7 @@ cmdCPUStats(vshControl *ctl, const vshCmd *cmd)
|
||||
if (show_count < 0 || show_count > max_id) {
|
||||
if (show_count > max_id)
|
||||
vshPrint(ctl, _("Only %d CPUs available to show\n"), max_id);
|
||||
show_count = max_id;
|
||||
show_count = max_id - cpu;
|
||||
}
|
||||
|
||||
/* get percpu information */
|
||||
|
Loading…
x
Reference in New Issue
Block a user