Forum Discussion
Joel_Moses
Nimbostratus
Oct 07, 2009Any way to read current tcp idle measurement?
I have a need to read the state of the idle timer for a particular TCP connection from an iRule. It's easy to use PROFILE::tcp idle_timeout to get the value of the idle timer itself, but I'm not able to locate a function that allows me to read the current state of the idle timer for the current connection. I really don't want to set up a parallel timer (thanks, F5, for adding "after" in 10.x) if I don't have to do it.
I know the information is tracked:
[root@golgotha:Active] config b conn show all
VIRTUAL 10.10.20.101:https <-> NODE 65.2.15.193:https TYPE any 1/1
CLIENTSIDE 10.10.20.247:1912 <-> 10.10.20.101:https
(pkts,bits) in = (8, 2058) out = (7, 1511)
SERVERSIDE 10.10.20.5:1912 <-> 65.2.15.193:https
(pkts,bits) in = (7, 1507) out = (8, 2058)
PROTOCOL tcp UNIT 1 IDLE 58 (300) LASTHOP isp_att 00:15:c5:43:c6:d6
I'm looking for an iRule function that allows me to know, for example, that I'm 58 seconds into a 300-second idle timeout at the protocol level. I've check the devcentral docs and can't find what I'm looking for.
I'm attempting to get the F5 to force an interstitial screen and keepalive to an application that loves to keep a TCP connection idle for over 5-10 minutes with no user feedback and no easy way to modify the code to do one. Think backwards-ass legacy application. đ
- hoolio
Cirrostratus
I don't know of a way to get the idle time for the current TCP connection. I guess if you could it would always be 0 (or close to it) as most iRule events are triggered when some kind of data is received. And if you could get the idle time, you wouldn't necessarily have an event to trigger on at x number of idle seconds. - Joel_Moses
Nimbostratus
See, "after" would allow me to set a parallel clock on the session, but doesn't give me any idea where in the idle count I am at the connection table counter. I don't want to fire anything until I get into some sort of configurable danger-zone, and keeping a timer loop in addition to an execution loop is bound to be cpu-expensive.
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