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 <otr...@employees.org>:

> 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 called periodically with the stats messages.
> VL_API_VNET_INTERFACE_COUNTERS, VL_API_VNET_IP6_FIB_COUNTERS and
> VL_API_VNET_IP4_FIB_COUNTERS if I remember correctly.
>
> Ping me if you need more help.
>
> Cheers,
> Ole
>
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to