aboutsummaryrefslogtreecommitdiff
path: root/qga/qapi-schema.json
diff options
context:
space:
mode:
authorluzhipeng <luzhipeng@cestc.cn>2022-05-20 10:19:35 +0800
committerKonstantin Kostiuk <kkostiuk@redhat.com>2022-05-25 12:12:01 +0300
commit3569664ee9f08c94a5a2c69f778f0d023e5e882f (patch)
treefc45d9ba8f7a5af0ab02afef44ee404fe0f0812a /qga/qapi-schema.json
parent0cac736e73723850a99e5142e35d14d8f8efb232 (diff)
downloadqemu-3569664ee9f08c94a5a2c69f778f0d023e5e882f.zip
qemu-3569664ee9f08c94a5a2c69f778f0d023e5e882f.tar.gz
qemu-3569664ee9f08c94a5a2c69f778f0d023e5e882f.tar.bz2
qga: add guest-get-diskstats command for Linux guests
Add a new 'guest-get-diskstats' command for report disk io statistics for Linux guests. This can be useful for getting io flow or handling IO fault, no need to enter guests. Signed-off-by: luzhipeng <luzhipeng@cestc.cn> Message-Id: <20220520021935.676-1-luzhipeng@cestc.cn> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Diffstat (limited to 'qga/qapi-schema.json')
-rw-r--r--qga/qapi-schema.json86
1 files changed, 86 insertions, 0 deletions
diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
index f989597..9fa20e7 100644
--- a/qga/qapi-schema.json
+++ b/qga/qapi-schema.json
@@ -1490,3 +1490,89 @@
{ 'command': 'guest-ssh-remove-authorized-keys',
'data': { 'username': 'str', 'keys': ['str'] },
'if': 'CONFIG_POSIX' }
+
+##
+# @GuestDiskStats:
+#
+# @read-sectors: sectors read
+#
+# @read-ios: reads completed successfully
+#
+# @read-merges: read requests merged
+#
+# @write-sectors: sectors written
+#
+# @write-ios: writes completed
+#
+# @write-merges: write requests merged
+#
+# @discard-sectors: sectors discarded
+#
+# @discard-ios: discards completed successfully
+#
+# @discard-merges: discard requests merged
+#
+# @flush-ios: flush requests completed successfully
+#
+# @read-ticks: time spent reading(ms)
+#
+# @write-ticks: time spent writing(ms)
+#
+# @discard-ticks: time spent discarding(ms)
+#
+# @flush-ticks: time spent flushing(ms)
+#
+# @ios-pgr: number of I/Os currently in flight
+#
+# @total-ticks: time spent doing I/Os (ms)
+#
+# @weight-ticks: weighted time spent doing I/Os since the last update of this field(ms)
+#
+# Since: 7.1
+##
+{ 'struct': 'GuestDiskStats',
+ 'data': {'*read-sectors': 'uint64',
+ '*read-ios': 'uint64',
+ '*read-merges': 'uint64',
+ '*write-sectors': 'uint64',
+ '*write-ios': 'uint64',
+ '*write-merges': 'uint64',
+ '*discard-sectors': 'uint64',
+ '*discard-ios': 'uint64',
+ '*discard-merges': 'uint64',
+ '*flush-ios': 'uint64',
+ '*read-ticks': 'uint64',
+ '*write-ticks': 'uint64',
+ '*discard-ticks': 'uint64',
+ '*flush-ticks': 'uint64',
+ '*ios-pgr': 'uint64',
+ '*total-ticks': 'uint64',
+ '*weight-ticks': 'uint64'
+ } }
+
+##
+# @GuestDiskStatsInfo:
+#
+# @name disk name
+#
+# @major major device number of disk
+#
+# @minor minor device number of disk
+##
+{ 'struct': 'GuestDiskStatsInfo',
+ 'data': {'name': 'str',
+ 'major': 'uint64',
+ 'minor': 'uint64',
+ 'stats': 'GuestDiskStats' } }
+
+##
+# @guest-get-diskstats:
+#
+# Retrieve information about disk stats.
+# Returns: List of disk stats of guest.
+#
+# Since: 7.1
+##
+{ 'command': 'guest-get-diskstats',
+ 'returns': ['GuestDiskStatsInfo']
+}