diff options
author | Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> | 2011-11-08 13:00:31 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-12-05 14:51:35 +0100 |
commit | 727f005e6a5416ea903d0ccc2428cbdc663aa1d2 (patch) | |
tree | c09eae29e0a37eac7957642bf84cb5aa842cd2f8 /qmp-commands.hx | |
parent | 98f90dba5ee56f699b28509a6cc7a9a8a57636eb (diff) |
hmp/qmp: add block_set_io_throttle
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r-- | qmp-commands.hx | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx index 97975a520..94da2a8ef 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -851,6 +851,44 @@ Example: EQMP { + .name = "block_set_io_throttle", + .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l", + .params = "device bps bps_rd bps_wr iops iops_rd iops_wr", + .help = "change I/O throttle limits for a block drive", + .user_print = monitor_user_noop, + .mhandler.cmd_new = do_block_set_io_throttle, + }, + +SQMP +block_set_io_throttle +------------ + +Change I/O throttle limits for a block drive. + +Arguments: + +- "device": device name (json-string) +- "bps": total throughput limit in bytes per second(json-int) +- "bps_rd": read throughput limit in bytes per second(json-int) +- "bps_wr": read throughput limit in bytes per second(json-int) +- "iops": total I/O operations per second(json-int) +- "iops_rd": read I/O operations per second(json-int) +- "iops_wr": write I/O operations per second(json-int) + +Example: + +-> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0", + "bps": "1000000", + "bps_rd": "0", + "bps_wr": "0", + "iops": "0", + "iops_rd": "0", + "iops_wr": "0" } } +<- { "return": {} } + +EQMP + + { .name = "set_password", .args_type = "protocol:s,password:s,connected:s?", .params = "protocol password action-if-connected", @@ -1152,6 +1190,13 @@ Each json-object contain the following: "tftp", "vdi", "vmdk", "vpc", "vvfat" - "backing_file": backing file name (json-string, optional) - "encrypted": true if encrypted, false otherwise (json-bool) + - "bps": limit total bytes per second (json-int) + - "bps_rd": limit read bytes per second (json-int) + - "bps_wr": limit write bytes per second (json-int) + - "iops": limit total I/O operations per second (json-int) + - "iops_rd": limit read operations per second (json-int) + - "iops_wr": limit write operations per second (json-int) + - "io-status": I/O operation status, only present if the device supports it and the VM is configured to stop on errors. It's always reset to "ok" when the "cont" command is issued (json_string, optional) @@ -1171,7 +1216,13 @@ Example: "ro":false, "drv":"qcow2", "encrypted":false, - "file":"disks/test.img" + "file":"disks/test.img", + "bps":1000000, + "bps_rd":0, + "bps_wr":0, + "iops":1000000, + "iops_rd":0, + "iops_wr":0, }, "type":"unknown" }, |