Brayan,

Yes you need stats { socket-name <file> }

Or something like it. (Out running)

Ole

> On 17 Sep 2018, at 13:49, brayan ortega <brayan.ortega6...@gmail.com> wrote:
> 
> Thanks for quick response, I tried latest vpp master version.
> Does it necessary to change vpp startup.conf? I faced with following error:
> 
> socket_config: unknown host `vpp_stats'
> Traceback (most recent call last):
>   File "/root/src/test.py", line 3, in <module>
>     stat = VPPStats('vpp_stats')
>   File "/usr/lib/python2.7/dist-packages/vpp_papi/vpp_stats.py", line 117, in 
> __init__
>     raise IOError()
> IOError
> 
> Best Regards,
> 
>> On Mon, Sep 17, 2018 at 3:30 PM Ole Troan <otr...@employees.org> wrote:
>> Brayan,
>> 
>>> 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. 
>> 
>> Cheers 
>> 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 (#10520): https://lists.fd.io/g/vpp-dev/message/10520
> 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 (#10521): https://lists.fd.io/g/vpp-dev/message/10521
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