jcast
May 19, 2011, 3:10pm
1
I would like to check the stats value (packets or byte) of a special mangle rule identified by its id or comment.
The parameters will then be compared with 0 in a script.
I was woundering something like
:set packet [/ip firewall mangle get $j packets ]
But it seems not so easy.
Thanks for your help.
fewi
May 19, 2011, 3:18pm
2
[admin@router] /ip firewall mangle> pri where action="change-ttl"
Flags: X - disabled, I - invalid, D - dynamic
0 chain=postrouting action=change-ttl new-ttl=set:1 out-interface=Vlan4
[admin@router] /ip firewall mangle> set 0 comment="testComment"
[admin@router] /ip firewall mangle> pri stats where comment="testComment"
Flags: X - disabled, I - invalid, D - dynamic
# CHAIN ACTION BYTES PACKETS
0 ;;; testComment
postrouting change-ttl 139009918 117290
[admin@router] /ip firewall mangle> :local test [/ip firewall mangle { get [find comment="testComment"] bytes }]; :put $test;
139009918
[admin@router] /ip firewall mangle>
int21
September 5, 2017, 1:54pm
4
Amazing, but is there a way to get RATE intead bytes ??