Hi
How can I show values of tx/rx rate in new terminal?
I need this for show values in api program.
thanks
Make a script
:global dload
:global uload
:set dload ([interface monitor-traffic ether1 once do= {get $“rx-bits-per-second”}] )
:set uload ([interface monitor-traffic ether1 once do= {get $“tx-bits-per-second”}] )
and then use dload and uload variables
If you need to use them continuously, don’t use the “once” parameter
Be careful, looking at a one-off snapshot of current traffic on interface is NOT at all precise.
For example, you take a snapshot every 10s, and both snapshots show 10kbps traffic.
But this is totally un-precise, what if in-between, the traffic was 5mbps?
Do it the same way SNMP does, take the counter (total bytes transmitted by interface) from before and now and calculate the delta.
This will give you average traffic on interface per collection period, which is much more precise then taking live traffic snapshots.