Hi Neha,

Can you share your code?
Alternatively look around in the test/ directory for examples. 

Cheers 
Ole


> On 9 Jul 2018, at 08:37, Neha <[email protected]> wrote:
> 
> Hi Ole,
>  
> If that is correct, why I am not able to see the stats? ( I am waiting for 60 
> sec for getting the stats)
>  
>  
> Regards,
> Neha
>  
> From: Ole Troan [mailto:[email protected]] 
> Sent: Monday, July 9, 2018 12:03 PM
> To: Vadnere, Neha R <[email protected]>
> Cc: [email protected]
> Subject: Re: [vpp-dev] VPP python binding for getting interface stats in VPP 
> 18.07
>  
> Neha,
> 
> On 9 Jul 2018, at 07:26, Neha <[email protected]> wrote:
> 
> Hi,
>  
> I want to get stats from vpp python api. I am following instructions as 
> specified in https://wiki.fd.io/view/VPP/Python_API. I am able to get other 
> info as interface details etc. which uses dump and req/rep messages.
>  
> vpp_papi.register_event_callback(papi_event_handler) does not call the 
> callback function specified, when want_stats is called.
>  
>  
> In https://www.mail-archive.com/[email protected]/msg03819.html it is 
> mentioned
> 1.) client -> want_stats -> vpp
> 2.) vpp -> want_stats_reply -> client (confirms subscription)
> 3.) vpp -> <various stats messages> -> client (when timer fires)
>  
> in step 3.), client needs to read the shared memory queue in the
> vpp->client direction (or use the appropriate XXX_read() function). Note
> that stats take a few seconds to arrive (the test programs require
> 10-15 seconds of runtime to get some stats).
>  
> But not sure where these read_from_shared_mem functions are. I assumed that 
> want_stats will send the stats when enabled.
> Please guide on this.
>  
> That’s correct, the Python language binding takes care of reading from shared 
> memory. 
> Sounds like you have done everything right. 
>  
> Cheers 
> Ole
>  
>  
>  
>  
> Regards,
> Neha
>  
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#9801): https://lists.fd.io/g/vpp-dev/message/9801
> Mute This Topic: https://lists.fd.io/mt/23196484/675193
> Group Owner: [email protected]
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
> -=-=-=-=-=-=-=-=-=-=-=-
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#9803): https://lists.fd.io/g/vpp-dev/message/9803
> Mute This Topic: https://lists.fd.io/mt/23196484/675193
> Group Owner: [email protected]
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
> -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9804): https://lists.fd.io/g/vpp-dev/message/9804
Mute This Topic: https://lists.fd.io/mt/23196484/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to