提交 d9a0a885 编写于 作者: N Nitesh Konkar 提交者: Ján Tomko

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=1249441Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 abf50874
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册