Forum Discussion
Should timing data be gathered for every iRule invocation?
I've got an iRule with "timing on" as the very first line. The CLIENT_ACCEPTED clause then handles incoming connections, either sending them to a snatpool or snat'ing them to a specific IP address. When looking at the statistics in tmsh or the web gui, it shows 744 total executions, even though the iRule has been in place for days, and we're seeing 40-50 new connections per second.
So, question is ... shouldn't my timing data have hundreds of thousands of data points by now? Why does it seem stuck at 744 total executions? I'll include a stripped down version of my iRule below.
Thanks
Norman
timing on
when RULE_INIT {
log local0. "Rule initialized with timing enabled"
}
when CLIENT_ACCEPTED {
set hsl [HSL::open -proto UDP -pool WM-SYSLOG-POOL]
if { bunch of logic here } {
HSL::send $hsl "<190> natipam-f5 $flow_info, Unknown user\n"
snatpool WM-SNAT-UNKNOWN-USERS
} else {
if { more logic here } {
HSL::send $hsl "<190> natipam-f5 $flow_info, Invalid user\n"
snatpool WM-SNAT-UNKNOWN-USERS
} else {
HSL::send $hsl "<190> natipam-f5 $flow_info, slot $slot/$position, NAT to $nat_ip\n"
snat $some_other_ip
}
}
}
- nitassEmployee
is the counter increasing after resetting stats?
tmsh reset-stats ltm rule (name)
- Norman_Elton_13Nimbostratus
It reset back to zero, and is now stuck there. My gut feeling is that, after an hour, it will increment to five or six invocations. Double checked that log messages within the iRule are firing multiple times per second, so the iRule is obviously being invoked.
- nitassEmployee
it seems okay here. you may open a support case to check.
root@(B6900-R69-S40)(cfg-sync Standalone)(Active)(/Common)(tmos) list ltm virtual bar ltm virtual bar { destination 100.100.100.41:80 ip-protocol tcp mask 255.255.255.255 pool foo profiles { http { } tcp { } } rules { qux } source 0.0.0.0/0 source-address-translation { type automap } vs-index 3 } root@(B6900-R69-S40)(cfg-sync Standalone)(Active)(/Common)(tmos) list ltm rule qux ltm rule qux { timing on when RULE_INIT { log local0. "" } when CLIENT_ACCEPTED { log local0. "" } } root@(B6900-R69-S40)(cfg-sync Standalone)(Active)(/Common)(tmos) show ltm rule qux ------------------------------------ Ltm::Rule Event: qux:CLIENT_ACCEPTED ------------------------------------ Priority 500 Executions Total 1000.0 Failures 0 Aborts 0 CPU Cycles on Executing Average 51.6K Maximum 170.9K Minimum 15.8K ------------------------------ Ltm::Rule Event: qux:RULE_INIT ------------------------------ Priority 500 Executions Total 0 Failures 0 Aborts 0 CPU Cycles on Executing Average 0 Maximum 0 Minimum 0
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com