mirror of https://github.com/xemu-project/xemu.git
qmp-commands: move 'query-blockstats' doc to schema
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
978cceab03
commit
f2eaea1884
|
@ -800,194 +800,6 @@ named schema entities. Entities are commands, events and various
|
||||||
types. See docs/qapi-code-gen.txt for information on their structure
|
types. See docs/qapi-code-gen.txt for information on their structure
|
||||||
and intended use.
|
and intended use.
|
||||||
|
|
||||||
query-blockstats
|
|
||||||
----------------
|
|
||||||
|
|
||||||
Show block device statistics.
|
|
||||||
|
|
||||||
Each device statistic information is stored in a json-object and the returned
|
|
||||||
value is a json-array of all devices.
|
|
||||||
|
|
||||||
Each json-object contain the following:
|
|
||||||
|
|
||||||
- "device": device name (json-string)
|
|
||||||
- "stats": A json-object with the statistics information, it contains:
|
|
||||||
- "rd_bytes": bytes read (json-int)
|
|
||||||
- "wr_bytes": bytes written (json-int)
|
|
||||||
- "rd_operations": read operations (json-int)
|
|
||||||
- "wr_operations": write operations (json-int)
|
|
||||||
- "flush_operations": cache flush operations (json-int)
|
|
||||||
- "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
|
|
||||||
- "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
|
|
||||||
- "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
|
|
||||||
- "wr_highest_offset": The offset after the greatest byte written to the
|
|
||||||
BlockDriverState since it has been opened (json-int)
|
|
||||||
- "rd_merged": number of read requests that have been merged into
|
|
||||||
another request (json-int)
|
|
||||||
- "wr_merged": number of write requests that have been merged into
|
|
||||||
another request (json-int)
|
|
||||||
- "idle_time_ns": time since the last I/O operation, in
|
|
||||||
nanoseconds. If the field is absent it means
|
|
||||||
that there haven't been any operations yet
|
|
||||||
(json-int, optional)
|
|
||||||
- "failed_rd_operations": number of failed read operations
|
|
||||||
(json-int)
|
|
||||||
- "failed_wr_operations": number of failed write operations
|
|
||||||
(json-int)
|
|
||||||
- "failed_flush_operations": number of failed flush operations
|
|
||||||
(json-int)
|
|
||||||
- "invalid_rd_operations": number of invalid read operations
|
|
||||||
(json-int)
|
|
||||||
- "invalid_wr_operations": number of invalid write operations
|
|
||||||
(json-int)
|
|
||||||
- "invalid_flush_operations": number of invalid flush operations
|
|
||||||
(json-int)
|
|
||||||
- "account_invalid": whether invalid operations are included in
|
|
||||||
the last access statistics (json-bool)
|
|
||||||
- "account_failed": whether failed operations are included in the
|
|
||||||
latency and last access statistics
|
|
||||||
(json-bool)
|
|
||||||
- "timed_stats": A json-array containing statistics collected in
|
|
||||||
specific intervals, with the following members:
|
|
||||||
- "interval_length": interval used for calculating the
|
|
||||||
statistics, in seconds (json-int)
|
|
||||||
- "min_rd_latency_ns": minimum latency of read operations in
|
|
||||||
the defined interval, in nanoseconds
|
|
||||||
(json-int)
|
|
||||||
- "min_wr_latency_ns": minimum latency of write operations in
|
|
||||||
the defined interval, in nanoseconds
|
|
||||||
(json-int)
|
|
||||||
- "min_flush_latency_ns": minimum latency of flush operations
|
|
||||||
in the defined interval, in
|
|
||||||
nanoseconds (json-int)
|
|
||||||
- "max_rd_latency_ns": maximum latency of read operations in
|
|
||||||
the defined interval, in nanoseconds
|
|
||||||
(json-int)
|
|
||||||
- "max_wr_latency_ns": maximum latency of write operations in
|
|
||||||
the defined interval, in nanoseconds
|
|
||||||
(json-int)
|
|
||||||
- "max_flush_latency_ns": maximum latency of flush operations
|
|
||||||
in the defined interval, in
|
|
||||||
nanoseconds (json-int)
|
|
||||||
- "avg_rd_latency_ns": average latency of read operations in
|
|
||||||
the defined interval, in nanoseconds
|
|
||||||
(json-int)
|
|
||||||
- "avg_wr_latency_ns": average latency of write operations in
|
|
||||||
the defined interval, in nanoseconds
|
|
||||||
(json-int)
|
|
||||||
- "avg_flush_latency_ns": average latency of flush operations
|
|
||||||
in the defined interval, in
|
|
||||||
nanoseconds (json-int)
|
|
||||||
- "avg_rd_queue_depth": average number of pending read
|
|
||||||
operations in the defined interval
|
|
||||||
(json-number)
|
|
||||||
- "avg_wr_queue_depth": average number of pending write
|
|
||||||
operations in the defined interval
|
|
||||||
(json-number).
|
|
||||||
- "parent": Contains recursively the statistics of the underlying
|
|
||||||
protocol (e.g. the host file for a qcow2 image). If there is
|
|
||||||
no underlying protocol, this field is omitted
|
|
||||||
(json-object, optional)
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
-> { "execute": "query-blockstats" }
|
|
||||||
<- {
|
|
||||||
"return":[
|
|
||||||
{
|
|
||||||
"device":"ide0-hd0",
|
|
||||||
"parent":{
|
|
||||||
"stats":{
|
|
||||||
"wr_highest_offset":3686448128,
|
|
||||||
"wr_bytes":9786368,
|
|
||||||
"wr_operations":751,
|
|
||||||
"rd_bytes":122567168,
|
|
||||||
"rd_operations":36772
|
|
||||||
"wr_total_times_ns":313253456
|
|
||||||
"rd_total_times_ns":3465673657
|
|
||||||
"flush_total_times_ns":49653
|
|
||||||
"flush_operations":61,
|
|
||||||
"rd_merged":0,
|
|
||||||
"wr_merged":0,
|
|
||||||
"idle_time_ns":2953431879,
|
|
||||||
"account_invalid":true,
|
|
||||||
"account_failed":false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"stats":{
|
|
||||||
"wr_highest_offset":2821110784,
|
|
||||||
"wr_bytes":9786368,
|
|
||||||
"wr_operations":692,
|
|
||||||
"rd_bytes":122739200,
|
|
||||||
"rd_operations":36604
|
|
||||||
"flush_operations":51,
|
|
||||||
"wr_total_times_ns":313253456
|
|
||||||
"rd_total_times_ns":3465673657
|
|
||||||
"flush_total_times_ns":49653,
|
|
||||||
"rd_merged":0,
|
|
||||||
"wr_merged":0,
|
|
||||||
"idle_time_ns":2953431879,
|
|
||||||
"account_invalid":true,
|
|
||||||
"account_failed":false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"device":"ide1-cd0",
|
|
||||||
"stats":{
|
|
||||||
"wr_highest_offset":0,
|
|
||||||
"wr_bytes":0,
|
|
||||||
"wr_operations":0,
|
|
||||||
"rd_bytes":0,
|
|
||||||
"rd_operations":0
|
|
||||||
"flush_operations":0,
|
|
||||||
"wr_total_times_ns":0
|
|
||||||
"rd_total_times_ns":0
|
|
||||||
"flush_total_times_ns":0,
|
|
||||||
"rd_merged":0,
|
|
||||||
"wr_merged":0,
|
|
||||||
"account_invalid":false,
|
|
||||||
"account_failed":false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"device":"floppy0",
|
|
||||||
"stats":{
|
|
||||||
"wr_highest_offset":0,
|
|
||||||
"wr_bytes":0,
|
|
||||||
"wr_operations":0,
|
|
||||||
"rd_bytes":0,
|
|
||||||
"rd_operations":0
|
|
||||||
"flush_operations":0,
|
|
||||||
"wr_total_times_ns":0
|
|
||||||
"rd_total_times_ns":0
|
|
||||||
"flush_total_times_ns":0,
|
|
||||||
"rd_merged":0,
|
|
||||||
"wr_merged":0,
|
|
||||||
"account_invalid":false,
|
|
||||||
"account_failed":false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"device":"sd0",
|
|
||||||
"stats":{
|
|
||||||
"wr_highest_offset":0,
|
|
||||||
"wr_bytes":0,
|
|
||||||
"wr_operations":0,
|
|
||||||
"rd_bytes":0,
|
|
||||||
"rd_operations":0
|
|
||||||
"flush_operations":0,
|
|
||||||
"wr_total_times_ns":0
|
|
||||||
"rd_total_times_ns":0
|
|
||||||
"flush_total_times_ns":0,
|
|
||||||
"rd_merged":0,
|
|
||||||
"wr_merged":0,
|
|
||||||
"account_invalid":false,
|
|
||||||
"account_failed":false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
blockdev-add
|
blockdev-add
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
|
|
@ -697,6 +697,9 @@
|
||||||
# @stats: A @BlockDeviceStats for the device.
|
# @stats: A @BlockDeviceStats for the device.
|
||||||
#
|
#
|
||||||
# @parent: #optional This describes the file block device if it has one.
|
# @parent: #optional This describes the file block device if it has one.
|
||||||
|
# Contains recursively the statistics of the underlying
|
||||||
|
# protocol (e.g. the host file for a qcow2 image). If there is
|
||||||
|
# no underlying protocol, this field is omitted
|
||||||
#
|
#
|
||||||
# @backing: #optional This describes the backing block device if it has one.
|
# @backing: #optional This describes the backing block device if it has one.
|
||||||
# (Since 2.0)
|
# (Since 2.0)
|
||||||
|
@ -724,6 +727,106 @@
|
||||||
# Returns: A list of @BlockStats for each virtual block devices.
|
# Returns: A list of @BlockStats for each virtual block devices.
|
||||||
#
|
#
|
||||||
# Since: 0.14.0
|
# Since: 0.14.0
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
#
|
||||||
|
# -> { "execute": "query-blockstats" }
|
||||||
|
# <- {
|
||||||
|
# "return":[
|
||||||
|
# {
|
||||||
|
# "device":"ide0-hd0",
|
||||||
|
# "parent":{
|
||||||
|
# "stats":{
|
||||||
|
# "wr_highest_offset":3686448128,
|
||||||
|
# "wr_bytes":9786368,
|
||||||
|
# "wr_operations":751,
|
||||||
|
# "rd_bytes":122567168,
|
||||||
|
# "rd_operations":36772
|
||||||
|
# "wr_total_times_ns":313253456
|
||||||
|
# "rd_total_times_ns":3465673657
|
||||||
|
# "flush_total_times_ns":49653
|
||||||
|
# "flush_operations":61,
|
||||||
|
# "rd_merged":0,
|
||||||
|
# "wr_merged":0,
|
||||||
|
# "idle_time_ns":2953431879,
|
||||||
|
# "account_invalid":true,
|
||||||
|
# "account_failed":false
|
||||||
|
# }
|
||||||
|
# },
|
||||||
|
# "stats":{
|
||||||
|
# "wr_highest_offset":2821110784,
|
||||||
|
# "wr_bytes":9786368,
|
||||||
|
# "wr_operations":692,
|
||||||
|
# "rd_bytes":122739200,
|
||||||
|
# "rd_operations":36604
|
||||||
|
# "flush_operations":51,
|
||||||
|
# "wr_total_times_ns":313253456
|
||||||
|
# "rd_total_times_ns":3465673657
|
||||||
|
# "flush_total_times_ns":49653,
|
||||||
|
# "rd_merged":0,
|
||||||
|
# "wr_merged":0,
|
||||||
|
# "idle_time_ns":2953431879,
|
||||||
|
# "account_invalid":true,
|
||||||
|
# "account_failed":false
|
||||||
|
# }
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# "device":"ide1-cd0",
|
||||||
|
# "stats":{
|
||||||
|
# "wr_highest_offset":0,
|
||||||
|
# "wr_bytes":0,
|
||||||
|
# "wr_operations":0,
|
||||||
|
# "rd_bytes":0,
|
||||||
|
# "rd_operations":0
|
||||||
|
# "flush_operations":0,
|
||||||
|
# "wr_total_times_ns":0
|
||||||
|
# "rd_total_times_ns":0
|
||||||
|
# "flush_total_times_ns":0,
|
||||||
|
# "rd_merged":0,
|
||||||
|
# "wr_merged":0,
|
||||||
|
# "account_invalid":false,
|
||||||
|
# "account_failed":false
|
||||||
|
# }
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# "device":"floppy0",
|
||||||
|
# "stats":{
|
||||||
|
# "wr_highest_offset":0,
|
||||||
|
# "wr_bytes":0,
|
||||||
|
# "wr_operations":0,
|
||||||
|
# "rd_bytes":0,
|
||||||
|
# "rd_operations":0
|
||||||
|
# "flush_operations":0,
|
||||||
|
# "wr_total_times_ns":0
|
||||||
|
# "rd_total_times_ns":0
|
||||||
|
# "flush_total_times_ns":0,
|
||||||
|
# "rd_merged":0,
|
||||||
|
# "wr_merged":0,
|
||||||
|
# "account_invalid":false,
|
||||||
|
# "account_failed":false
|
||||||
|
# }
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# "device":"sd0",
|
||||||
|
# "stats":{
|
||||||
|
# "wr_highest_offset":0,
|
||||||
|
# "wr_bytes":0,
|
||||||
|
# "wr_operations":0,
|
||||||
|
# "rd_bytes":0,
|
||||||
|
# "rd_operations":0
|
||||||
|
# "flush_operations":0,
|
||||||
|
# "wr_total_times_ns":0
|
||||||
|
# "rd_total_times_ns":0
|
||||||
|
# "flush_total_times_ns":0,
|
||||||
|
# "rd_merged":0,
|
||||||
|
# "wr_merged":0,
|
||||||
|
# "account_invalid":false,
|
||||||
|
# "account_failed":false
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
# ]
|
||||||
|
# }
|
||||||
|
#
|
||||||
##
|
##
|
||||||
{ 'command': 'query-blockstats',
|
{ 'command': 'query-blockstats',
|
||||||
'data': { '*query-nodes': 'bool' },
|
'data': { '*query-nodes': 'bool' },
|
||||||
|
|
Loading…
Reference in New Issue