Forum Discussion

Sammo_Li_81151's avatar
Sammo_Li_81151
Icon for Nimbostratus rankNimbostratus
Sep 21, 2010

IP::stats age problem

I am using an iRules pretty much the same as the following to calculate the response time of a HTTP request and respond. 
when HTTP_REQUEST {
    set reqAge [IP::stats age]
    set reqURI [HTTP::uri]
    set reqClient [IP::remote_addr]:[TCP::remote_port]
 }
 when HTTP_RESPONSE {
    set respTime [expr {[IP::stats age] - $req_age}]
    log local0. "Client at $reqClient requested $reqURI. \
Server response was received $respTime milliseconds after the request was sent to the server."
 }

But when I looked into the log. There are negative number in the Response Time field(TCP_AC = CLIENT_ACCEPT, HTTP_RQ = HTTP_REQUEST, HTTP_RP = HTTP_RESPONSE, RT = Response Time)

TCP_AC,2010-09-20 18:28:54,12849785341334,8,00000, Age:130

.

.

.

HTTP_RQ,2010-09-20 18:29:00,12849785341334,8,00017, GET,www.nownews.com,{| http://www.nownews.com/common/ticker.htm |},{| mozilla/5.0 (windows; u; windows nt 5.1; en-us) applewebkit/534.3 (khtml, like gecko) chrome/6.0.472.59 safari/534.3 |}, LR:-52, Age:5882

HTTP_RP,2010-09-20 18:29:00,12849785341334,8,00018, ST:200, CT:text/html, CL:1973, RT:-23, Age:5859

And I saw some connection age were reset when response:

HTTP_RP,2010-09-20 18:20:46,12849780461284,8,00002, ST:200, CT:text/plain, CL:10, RT:-119, Age:2

HTTP_RP,2010-09-20 18:20:46,12849780461285,8,00002, ST:200, CT:text/plain, CL:10, RT:-138, Age:2

HTTP_RP,2010-09-20 18:20:46,12849780461286,8,00002, ST:200, CT:text/plain, CL:10, RT:-138, Age:2

HTTP_RP,2010-09-20 18:20:47,12849780471287,8,00002, ST:200, CT:text/plain, CL:10, RT:-157, Age:2

HTTP_RP,2010-09-20 18:20:48,12849780481290,8,00002, ST:200, CT:text/plain, CL:10, RT:-159, Age:2

Could anyone explain this? Many thanks.

2 Replies

  • Are you running 10.x? I see from the wiki page where that iRule is posted that there's an issue with IP::stats on v10

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/IP__stats.html

     

     

    Also - are you using OneConnect or anything that would mess with age?
  • Oh yes I forgot to mention that it is running on 10.x

     

    Let me check on ask.f5.com to see if there are issue

     

     

    The virtual server have no other profile except HTTP and TCP