[PATCH 1/6] introspection: new 'Stats' property in the bearer object

Dan Williams dcbw at redhat.com
Mon Nov 30 08:21:20 PST 2015


On Fri, 2015-11-27 at 14:51 +0100, Aleksander Morgado wrote:
> The new property is a dictionary which may include different
> parameters,
> depending on what is actually supported by the underlying modem. For
> now,
> just bytes RX/TX.
> 
> Note that this object will expose the stats *as reported by the
> modem*. These
> values may differ from e.g. what is seen in the network interface
> stats.
> ---
>  .../org.freedesktop.ModemManager1.Bearer.xml       | 31
> ++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/introspection/org.freedesktop.ModemManager1.Bearer.xml
> b/introspection/org.freedesktop.ModemManager1.Bearer.xml
> index e1463a5..fe751cb 100644
> --- a/introspection/org.freedesktop.ModemManager1.Bearer.xml
> +++ b/introspection/org.freedesktop.ModemManager1.Bearer.xml
> @@ -242,6 +242,37 @@
>      <property name="Ip6Config" type="a{sv}" access="read" />
>  
>      <!--
> +        Stats:
> +
> +        If the modem supports it, this property will show statistics
> of the
> +        ongoing connection.
> +
> +        When the connection is disconnected automatically or
> explicitly by the
> +        user, the values in this property will show the last values
> cached.
> +        The statistics are reset
> +
> +        The following items may appear in the list of statistics:
> +        <variablelist>
> +          <varlistentry><term><literal>"bytes-rx"</literal></term>
> 

Any reason these are 'bytes-rx' instead of 'rx-bytes'?  If you add
packets later that would be 'packets-rx', but I think the more
interesting information there is RX vs. TX, not packets vs. bytes... 
 both ifconfig and ethtool -S show stats with leading rx/tx.

Dan

> +            <listitem>
> +              Number of bytes received without error, given as an
> unsigned 64-bit integer value (signature <literal>"t"</literal>).
> +            </listitem>
> +          </varlistentry>
> +          <varlistentry><term><literal>"bytes-tx"</literal></term>
> +            <listitem>
> +              Number bytes transmitted without error, given as an
> unsigned 64-bit integer value (signature <literal>"t"</literal>).
> +            </listitem>
> +            </varlistentry>
> +          <varlistentry><term><literal>"duration"</literal></term>
> +            <listitem>
> +              Duration of the connection, in seconds, given as an
> unsigned integer value (signature <literal>"u"</literal>).
> +            </listitem>
> +          </varlistentry>
> +        </variablelist>
> +    -->
> +    <property name="Stats" type="a{sv}" access="read" />
> +
> +    <!--
>          IpTimeout:
>  
>          Maximum time to wait for a successful IP establishment, when
> PPP is used.


More information about the ModemManager-devel mailing list