Forum Discussion
Peter_Reilly
Nimbostratus
Feb 08, 2005how to log dropped sessions
I would like to be able to use an iRule to log whenever a tcp session is dropped due to it reaching the tcp timeout value specified in a profile. Is there a mechanism to do this within iRules?
Jeff_Silverman1
Nimbostratus
Apr 08, 2009I used the code:
when CLIENT_ACCEPTED {
set prev_age 0
}
when HTTP_REQUEST {
set prev_age [IP::stats age]
}
when HTTP_RESPONSE {
set prev_age [IP::stats age]
}
when CLIENT_CLOSED {
set timeout [expr { [IP::idle_timeout] * 1000 } ]
log "Stats age is [IP::stats age] prev age is $prev_age timeout is $timeout"
idle_timeout is in seconds, stats age is in milliseconds
if { [expr [IP::stats age] - $prev_age > $timeout ] } {
log "Client: [IP::remote_addr]:[TCP::remote_port] timed out"
}
}
and found that the timeout is 300000 milliseconds. However, in some cases, which seem to be related to ramcache, the timeout is 5000 milliseconds.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects