Re: [vpp-dev] How to get interface stats using python api?

2017-06-13 Thread otroan
Weitao, > I noticed that in interface.api. > > manual_print manual_endian define vnet_interface_combined_counters > { > /* enums - plural - in vnet/interface.h */ > u8 vnet_counter_type; > u32 first_sw_if_index; > u32 count; > vl_api_vlib_counter_t data[count]; > }; > > > Should vl_ap

Re: [vpp-dev] How to get interface stats using python api?

2017-06-13 Thread Weitao Han
I noticed that in interface.api. manual_print manual_endian define vnet_interface_combined_counters { /* enums - plural - in vnet/interface.h */ u8 vnet_counter_type; u32 first_sw_if_index; u32 count; vl_api_vlib_counter_t data[count]; }; Should vl_api_vlib_counter_t be u64? Is that ri

Re: [vpp-dev] How to get interface stats using python api?

2017-06-13 Thread Weitao Han
I will try the latest version of vpp. Thank you very much! WT Han 2017-06-13 18:56 GMT+08:00 : > Hi again, > > > I tried the method you told me, but the data that I got is '\x00'. > > > > Like this, vnet_interface_counters(_0=49, vnet_counter_type=1, > is_combined=1, first_sw_if_index=0, count=

Re: [vpp-dev] How to get interface stats using python api?

2017-06-13 Thread otroan
Hi again, > I tried the method you told me, but the data that I got is '\x00'. > > Like this, vnet_interface_counters(_0=49, vnet_counter_type=1, is_combined=1, > first_sw_if_index=0, count=7, data='\x00\x00\x00\x00\x00\x00\x00') > > I don't why this happened. Ah, yes sorry. Forgot to tell you

Re: [vpp-dev] How to get interface stats using python api?

2017-06-13 Thread Weitao Han
Dear Ole I tried the method you told me, but the data that I got is '\x00'. Like this, vnet_interface_counters(_0=49, vnet_counter_type=1, is_combined=1, first_sw_if_index=0, count=7, data='\x00\x00\x00\x00\x00\x00\x00') I don't why this happened. Thanks WT Han 2017-06-13 18:02 GMT+08:00 : >

Re: [vpp-dev] How to get interface stats using python api?

2017-06-13 Thread otroan
Hello, > How to get interface stats using python api? > For example, I want to know "GigabitEthernete/0/1" rx packets, what shoud I > do? You register for stats with the want_stats call. Before that you must register an event handler with VPP.register_event_callback Then that callback will be c

[vpp-dev] How to get interface stats using python api?

2017-06-13 Thread Weitao Han
Hi! How to get interface stats using python api? For example, I want to know "GigabitEthernete/0/1" rx packets, what shoud I do? Thanks WT Han ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev