mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
qmp/hmp: Add throttle ratio to query-migrate and info migrate
Report throttle percentage in info migrate and query-migrate responses when cpu throttling is active. Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
070afca258
commit
4782893e09
3 changed files with 16 additions and 1 deletions
|
@ -447,6 +447,11 @@ MigrationInfo *qmp_query_migrate(Error **errp)
|
|||
info->disk->total = blk_mig_bytes_total();
|
||||
}
|
||||
|
||||
if (cpu_throttle_active()) {
|
||||
info->has_x_cpu_throttle_percentage = true;
|
||||
info->x_cpu_throttle_percentage = cpu_throttle_get_percentage();
|
||||
}
|
||||
|
||||
get_xbzrle_cache_stats(info);
|
||||
break;
|
||||
case MIGRATION_STATUS_COMPLETED:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue