How to get real-time information of interface

Hi friends,

I would like to get real-time information of network interface via API. These information include real-time flow & datapackage.
Now I can get resule of total flow or datapackage from interface initialization via API. But I can’t get real-time resule of flow or datapackage.

Can you help me?

Thanks.

Robin Lu

the only way is to get for example full packets then after some time (for example 1 min) get this value once again and do the math :

second - first = your one minut packet flow

there is no other way

Thanks.

for me,

/interface/monitor-traffic
=interface=srv

works fine - no math required =)