diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-06-23 14:00:14 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-01-16 09:19:45 +0100 |
commit | f2eaea1884c1e2abc226f8eae1d3cfc760de70f2 (patch) | |
tree | c558c43f367974b95462aa029e25ee3f0a5e3505 | |
parent | 978cceab03f86e5bce3d88c373209f0adcbc8afe (diff) | |
download | qemu-f2eaea1884c1e2abc226f8eae1d3cfc760de70f2.zip qemu-f2eaea1884c1e2abc226f8eae1d3cfc760de70f2.tar.gz qemu-f2eaea1884c1e2abc226f8eae1d3cfc760de70f2.tar.bz2 |
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>
-rw-r--r-- | docs/qmp-commands.txt | 188 | ||||
-rw-r--r-- | qapi/block-core.json | 103 |
2 files changed, 103 insertions, 188 deletions
diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 4b72f08..41797c8 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -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 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 ------------ diff --git a/qapi/block-core.json b/qapi/block-core.json index 642e81c..4a90df4 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -697,6 +697,9 @@ # @stats: A @BlockDeviceStats for the device. # # @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. # (Since 2.0) @@ -724,6 +727,106 @@ # Returns: A list of @BlockStats for each virtual block devices. # # 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', 'data': { '*query-nodes': 'bool' }, |