traffic speed to a variable

How can I read (get) the value of the “send-bits-per-second” of an interface ?

if there wasn’t a 0 in the output of this command you could use this:

interface> print terse

this shows there is a tx-rate and rx-rate.

:put [/interface get [/interface find name=0-inside] tx-rate ]

The monitor command is realtime and can’t be queried that I know of

Sam

It writes “0” :frowning:

But the tx and rx rate is not what I wanted to use.
the tx rate is what I have set, but I would like to use the actual data transfering speed (if is it possible at all)..
(what YOU see when you are monitoring the actual interface)

Thank YOU!

/interface monitor-traffic ether1 do={ :local numBits $“sent-bits-per-second” } once

You can do it easily in v 3.0
:local numBits ( [/interface monitor-traffic ether1 as-value ]->“sent-bits-per-second”)

Hmm, it looks like logically…
But It restores to me nothing (the variable leaves empty)

Try using a global for your testing. It’s easier to see the resulting value. You can also add a “:log info ($var)” to get the variable value for debugging.