提交 13022ce4 编写于 作者: J John Ferlan

virsh: Add _length parameters to virsh output

https://bugzilla.redhat.com/show_bug.cgi?id=1349898

Add the duration parameters to the virsh input/output for blkdeviotune
command and describe them in the pod file.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 49d01f9e
......@@ -1263,6 +1263,54 @@ static const vshCmdOptDef opts_blkdeviotune[] = {
.type = VSH_OT_INT,
.help = N_("I/O size in bytes")
},
{.name = "total_bytes_sec_max_length",
.type = VSH_OT_ALIAS,
.help = "total-bytes-sec-max-length"
},
{.name = "total-bytes-sec-max-length",
.type = VSH_OT_INT,
.help = N_("duration in seconds to allow total max bytes")
},
{.name = "read_bytes_sec_max_length",
.type = VSH_OT_ALIAS,
.help = "read-bytes-sec-max-length"
},
{.name = "read-bytes-sec-max-length",
.type = VSH_OT_INT,
.help = N_("duration in seconds to allow read max bytes")
},
{.name = "write_bytes_sec_max_length",
.type = VSH_OT_ALIAS,
.help = "write-bytes-sec-max-length"
},
{.name = "write-bytes-sec-max-length",
.type = VSH_OT_INT,
.help = N_("duration in seconds to allow write max bytes")
},
{.name = "total_iops_sec_max_length",
.type = VSH_OT_ALIAS,
.help = "total-iops-sec-max-length"
},
{.name = "total-iops-sec-max-length",
.type = VSH_OT_INT,
.help = N_("duration in seconds to allow total I/O operations max")
},
{.name = "read_iops_sec_max_length",
.type = VSH_OT_ALIAS,
.help = "read-iops-sec-max-length"
},
{.name = "read-iops-sec-max-length",
.type = VSH_OT_INT,
.help = N_("duration in seconds to allow read I/O operations max")
},
{.name = "write_iops_sec_max_length",
.type = VSH_OT_ALIAS,
.help = "write-iops-sec-max-length"
},
{.name = "write-iops-sec-max-length",
.type = VSH_OT_INT,
.help = N_("duration in seconds to allow write I/O operations max")
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
VIRSH_COMMON_OPT_DOMAIN_CURRENT,
......@@ -1336,6 +1384,13 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
VSH_ADD_IOTUNE(read-iops-sec-max, READ_IOPS_SEC_MAX);
VSH_ADD_IOTUNE(write-iops-sec-max, WRITE_IOPS_SEC_MAX);
VSH_ADD_IOTUNE(size-iops-sec, SIZE_IOPS_SEC);
VSH_ADD_IOTUNE(total-bytes-sec-max-length, TOTAL_BYTES_SEC_MAX_LENGTH);
VSH_ADD_IOTUNE(read-bytes-sec-max-length, READ_BYTES_SEC_MAX_LENGTH);
VSH_ADD_IOTUNE(write-bytes-sec-max-length, WRITE_BYTES_SEC_MAX_LENGTH);
VSH_ADD_IOTUNE(total-iops-sec-max-length, TOTAL_IOPS_SEC_MAX_LENGTH);
VSH_ADD_IOTUNE(read-iops-sec-max-length, READ_IOPS_SEC_MAX_LENGTH);
VSH_ADD_IOTUNE(write-iops-sec-max-length, WRITE_IOPS_SEC_MAX_LENGTH);
#undef VSH_ADD_IOTUNE
if (nparams == 0) {
......
......@@ -1135,6 +1135,10 @@ command.
[[I<total-iops-sec>] | [I<read-iops-sec>] [I<write-iops-sec>]]
[[I<total-bytes-sec-max>] | [I<read-bytes-sec-max>] [I<write-bytes-sec-max>]]
[[I<total-iops-sec-max>] | [I<read-iops-sec-max>] [I<write-iops-sec-max>]]
[[I<total-bytes-sec-max-length>] |
[I<read-bytes-sec-max-length>] [I<write-bytes-sec-max-length>]]
[[I<total-iops-sec-max-length>] |
[I<read-iops-sec-max-length>] [I<write-iops-sec-max-length>]]
[I<size-iops-sec>]
Set or query the block disk io parameters for a block device of I<domain>.
......@@ -1162,6 +1166,18 @@ integer, the default being bytes per second if no suffix is specified.
I<--total-iops-sec-max> specifies maximum total I/O operations limit per second.
I<--read-iops-sec-max> specifies maximum read I/O operations limit per second.
I<--write-iops-sec-max> specifies maximum write I/O operations limit per second.
I<--total-bytes-sec-max-length> specifies duration in seconds to allow maximum
total throughput limit.
I<--read-bytes-sec-max-length> specifies duration in seconds to allow maximum
read throughput limit.
I<--write-bytes-sec-max-length> specifies duration in seconds to allow maximum
write throughput limit.
I<--total-iops-sec-max-length> specifies duration in seconds to allow maximum
total I/O operations limit.
I<--read-iops-sec-max-length> specifies duration in seconds to allow maximum
read I/O operations limit.
I<--write-iops-sec-max-length> specifies duration in seconds to allow maximum
write I/O operations limit.
I<--size-iops-sec> specifies size I/O operations limit per second.
Older versions of virsh only accepted these options with underscore
......@@ -1172,6 +1188,11 @@ as --read-bytes-sec) resets the other two in that category to unlimited.
An explicit 0 also clears any limit. A non-zero value for a given total
cannot be mixed with non-zero values for read or write.
It is up to the hypervisor to determine how to handle the length values.
For the qemu hypervisor, if an I/O limit value or maximum value is set,
then the default value of 1 second will be displayed. Supplying a 0 will
reset the value back to the default.
If I<--live> is specified, affect a running guest.
If I<--config> is specified, affect the next boot of a persistent guest.
If I<--current> is specified, affect the current guest state.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册