Forum Discussion
Kevin_Stewart
Jun 25, 2014Employee
RULE_INIT is triggered for every CPU, so 4 tmm's = 4 RULE_INITs. You can get around this by "pinning" your code to a single tmm:
when RULE_INIT {
if { [TMM::cmp_unit] == 0 } {
set httphost "ie-ng-services-ConFiguRation.acme.com"
log local0. "bomb [string tolower [lindex [split [lindex [split $httphost "-"] end] "."] end-2]]"
}
}
I'd caution not to do this for anything other than local testing. The fact that RULE_INIT is triggered for every tmm means that any (global) variables assigned therein will be accessible to every tmm.