Hello, Please use the new stats api. In Python that’s available in vpp_papi.vpp_stats.
The old stats api over the vpp binary api (stats.api) is deprecated. Let me know if you need help. Cheers Ole > On 23 Dec 2018, at 12:50, khers <s3m2e1.6s...@gmail.com> wrote: > > Hi Dear VPP > > I was testing interface stats in VPP 18.10. It seems that it is needed to use > collect_detailed_interface_stats API for every interface to register > collector node. As a result, all combined counters such as unicast and > broadcast start to work. My question is, why this collector is not enabled by > default? how does it affect throughput? > >> On Tue, Sep 18, 2018 at 1:44 AM Marco Varlese <mvarl...@suse.de> wrote: >> On Mon, 2018-09-17 at 20:33 +0200, Ole Troan wrote: >> > 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! >> > ;-) >> Thanks :) >> > >> > 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/unsubb >> > > > > [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/unsubb [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/675056 >> > Group Owner: vpp-dev+ow...@lists.fd.io >> > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsubb [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 (#10530): https://lists.fd.io/g/vpp-dev/message/10530 >> Mute This Topic: https://lists.fd.io/mt/25704565/675776 >> Group Owner: vpp-dev+ow...@lists.fd.io >> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [s3m2e1.6s...@gmail.com] >> -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11765): https://lists.fd.io/g/vpp-dev/message/11765 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] -=-=-=-=-=-=-=-=-=-=-=-