qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qemu-ga: add guest-network-get-interface-stat c


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] qemu-ga: add guest-network-get-interface-stat command
Date: Wed, 19 Apr 2017 08:34:50 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0

On 04/19/2017 11:57 AM, ZhiPeng Lu wrote:
> we can get the  network card statistics inside  a virtual machine by 
> guest-network-get-interface-stat command.
> it is very userful for us to monitor and analyze network traff.
> 
> Signed-off-by: ZhiPeng Lu <address@hidden>
> ---

> +++ b/qga/qapi-schema.json
> @@ -1042,3 +1042,37 @@
>    'data':    { 'path': 'str', '*arg': ['str'], '*env': ['str'],
>                 '*input-data': 'str', '*capture-output': 'bool' },
>    'returns': 'GuestExec' }
> +##
> +# @GuestNetworkInterfaceStat:
> +#
> +# @rx_bytes: received bytes of interface
> +#
> +# @rx_packets: received packets of interface
> +#
> +# @rx_errs: received error packets of interface
> +# @rx_drop: received drop packets of interface

New interfaces should favor the use of '-' rather than '_', as in
'rx-bytes', 'rx-packets'...

> +#
> +# Since: 2.10
> +##
> +{ 'struct': 'GuestNetworkInterfaceStat',
> +  'data': {'rx_bytes': 'uint64',
> +            'rx_packets': 'uint64',
> +            'rx_errs': 'uint64',
> +            'rx_drop': 'uint64',
> +            'tx_bytes': 'uint64',
> +            'tx_packets': 'uint64',
> +            'tx_errs': 'uint64',
> +            'tx_drop': 'uint64'

You only documented four fields, but have a lot more in the structure.

> +           } }
> +##
> +# @guest-network-get-interface-stat:
> +#
> +# Get list of interface stat
> +#
> +# Returns: List of GuestNetworkInterfaceStat on success.
> +#
> +# Since: 2.10
> +##
> +{ 'command': 'guest-network-get-interface-stat',
> +  'data':    {'bus': 'int64', 'slot': 'int64', 'function': 
> 'int64','netname':'str'},

Are all of these parameters requires on every invocation, or are they
optional for filtering the results but with an intent to allow them to
be omitted to get a full list at once?

Missing documentation.

> +  'returns': ['GuestNetworkInterfaceStat'] }
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]