Hi,
Im in a real muddle, and I hope someone can help me.
I have three simple queues, and I want to ready the value of total-bytes into three global variables, and then use the value of these global variables in subsequent calculations. I can set the variables, but cant see how to access the values of them.
The three queues are named a, b, and c
I have a script to set up the global variables which are, say
a-old
b-old
c-old
I have a foreach loop
:foreach i in [/queue simple find] do ={
:set ([/queue simple get $i name] . “-old”) [/queue simple get $i total-bytes]
}
This works OK, and if I do a env pr at a terminal window after each time I run the script, I can see the changes to the total-bytes of each queue as traffic flows through the router.
But when I try to log the values, eg put in the loop
:log info $([/queue simple get $i name] . “-old”)
The script will not run. If I leave out the dollar sign, the name of the variable appears in the log, not its value.
Any ideas would be very gratefully received. I’ve been puzzling over this all day !!
rgds
Jim Heck