Doing this will cause a log entry for every new connection while total connections is 100 or more. This is probably not desirable. You might want to include some additional logic to only log total connections once a minute while connections are 100 or more:
when RULE_INIT {
set ::curr_conns 0
}
when CLIENT_ACCEPTED {
incr curr_conns
if { $::curr_conns > 99 } {
if { [clock format [clock seconds] -format {%S}] equals "00" } {
log "Total Connections = $::curr_conns"
}
}
}
when CLIENT_CLOSED {
incr ::curr_conns -1
}
Standard disclaimer, not tested!