aboutsummaryrefslogtreecommitdiff
path: root/qga/qapi-schema.json
diff options
context:
space:
mode:
authorZhiPeng Lu <lu.zhipeng@zte.com.cn>2017-09-12 16:54:26 +0800
committerMichael Roth <mdroth@linux.vnet.ibm.com>2017-10-25 19:54:11 -0500
commit53f9fcb263e40ff82b9fcbce8b8cba0f3649ac9b (patch)
treebcbb0e8989fc550b7098410a77a9ac251e677c1f /qga/qapi-schema.json
parent105fad6bb226ac3404874fe3fd7013ad6f86fc86 (diff)
qga: add network stats to guest-network-get-interfaces
we can get the network interface statistics inside a virtual machine by guest-network-get-interfaces command. it is very useful for us tomonitor and analyze network traffic. Signed-off-by: ZhiPeng Lu <lu.zhipeng@zte.com.cn> * don't rely on sizeof(wchar[]) for wchar[] indexing * avoid camelCase variable names * fix up getline() usage * condensed commit subject line Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qga/qapi-schema.json')
-rw-r--r--qga/qapi-schema.json38
1 files changed, 37 insertions, 1 deletions
diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
index 90a0c8602b..17884c7c70 100644
--- a/qga/qapi-schema.json
+++ b/qga/qapi-schema.json
@@ -643,6 +643,38 @@
'prefix': 'int'} }
##
+# @GuestNetworkInterfaceStat:
+#
+# @rx-bytes: total bytes received
+#
+# @rx-packets: total packets received
+#
+# @rx-errs: bad packets received
+#
+# @rx-dropped: receiver dropped packets
+#
+# @tx-bytes: total bytes transmitted
+#
+# @tx-packets: total packets transmitted
+#
+# @tx-errs: packet transmit problems
+#
+# @tx-dropped: dropped packets transmitted
+#
+# Since: 2.11
+##
+{ 'struct': 'GuestNetworkInterfaceStat',
+ 'data': {'rx-bytes': 'uint64',
+ 'rx-packets': 'uint64',
+ 'rx-errs': 'uint64',
+ 'rx-dropped': 'uint64',
+ 'tx-bytes': 'uint64',
+ 'tx-packets': 'uint64',
+ 'tx-errs': 'uint64',
+ 'tx-dropped': 'uint64'
+ } }
+
+##
# @GuestNetworkInterface:
#
# @name: The name of interface for which info are being delivered
@@ -651,12 +683,16 @@
#
# @ip-addresses: List of addresses assigned to @name
#
+# @statistics: various statistic counters related to @name
+# (since 2.11)
+#
# Since: 1.1
##
{ 'struct': 'GuestNetworkInterface',
'data': {'name': 'str',
'*hardware-address': 'str',
- '*ip-addresses': ['GuestIpAddress'] } }
+ '*ip-addresses': ['GuestIpAddress'],
+ '*statistics': 'GuestNetworkInterfaceStat' } }
##
# @guest-network-get-interfaces: