Marco,

>>> Which version of vpp python api does include this stats api?
>>> I tried it at vpp stable/1807, but there was no VPPStats module in it!
>> 
>> Going in 18.10. I recommend latest master for now. 
> Great! Any chances to see it added to the wiki page for 18.10? 
> https://wiki.fd.io/view/Projects/vpp/Release_Plans/Release_Plan_18.10

Now there is a probability near 1 that you will see it on the wiki page! ;-)

Best regards,
Ole

>>> 
>>> On Mon, Sep 17, 2018 at 11:45 AM Ole Troan <otr...@employees.org> wrote:
>>>> Brayan,
>>>> 
>>>> > I would like to share my problem with you in order to find solution.
>>>> > As you can see in vppctl output file, "vppctl show hardware" command 
>>>> > result contains "rx broadcast packets" and "tx broadcast packets". 
>>>> > However, when I used vpp python api to extract these stats, the value of 
>>>> > VNET_INTERFACE_COUNTER_RX_BROADCAST and 
>>>> > VNET_INTERFACE_COUNTER_TX_BROADCAST are stuck on zero incorrectly. 
>>>> > attached you can see my python script and its output and vppctl command 
>>>> > output. This behavior exists in multicast stats.
>>>> > 
>>>> > Best Regards,
>>>> > 
>>>> > 
>>>> > vppctl output: https://pastebin.com/zXrArE4b
>>>> > Python Script: https://pastebin.com/gDJbH1if
>>>> > Python Script output: https://pastebin.com/q4dJ8VMs
>>>> 
>>>> Firstly these are not exactly the same counters. The first ones come 
>>>> directly from DPDK I believe, and the VNET_INTERFACE_COUNTER ones are from 
>>>> the stats_collect_rx_node, sitting as an input feature behind device-input.
>>>> I don’t know if they are different because the broadcasts are filtered out 
>>>> before reaching VPP or if there is a better explanation, Damjan?
>>>> 
>>>> With regards to Python and stats collection, or any stats collection in 
>>>> general. I would encourage you to try out the new stats segment.
>>>> 
>>>> In Python you basically do:
>>>> 
>>>> from vpp_papi.vpp_stats import VPPStats
>>>> stat = VPPStats(<name-of-stats-socket)
>>>> dir = stat.ls(['^/if’]) # For all interface counters use “show statistics 
>>>> segment” or vpp_get_stats ls to see all available counters
>>>> counters = stat.dump(dir)
>>>> 
>>>> Then counters[‘/if/tx'][thread index][sw_if_index] will give you the TX 
>>>> counter for a particular worker thread / software interface.
>>>> 
>>>> Cheers,
>>>> Ole
>>>> 
>>>> 
>>>> 
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>> Links: You receive all messages sent to this group.
>>> 
>>> View/Reply Online (#10515): https://lists.fd.io/g/vpp-dev/message/10515
>>> Mute This Topic: https://lists.fd.io/mt/25704565/675193
>>> Group Owner: vpp-dev+ow...@lists.fd.io
>>> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [otr...@employees.org]
>>> -=-=-=-=-=-=-=-=-=-=-=-
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> 
>> View/Reply Online (#10516): https://lists.fd.io/g/vpp-dev/message/10516
>> Mute This Topic: https://lists.fd.io/mt/25704565/675056
>> Group Owner: vpp-dev+ow...@lists.fd.io
>> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [mvarl...@suse.de]
>> -=-=-=-=-=-=-=-=-=-=-=-
>> 
> -- 
> Marco V
> 
> SUSE LINUX GmbH | GF: Felix Imendörffer, Jane Smithard, Graham Norton
> HRB 21284 (AG Nürnberg) Maxfeldstr. 5, D-90409, Nürnberg

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10527): https://lists.fd.io/g/vpp-dev/message/10527
Mute This Topic: https://lists.fd.io/mt/25704565/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to