ltm rule command IP statsΒΆ

iRule(1)		      BIG-IP TMSH Manual		      iRule(1)



IP::stats
       Supplies information about the number of packets or bytes being sent or
       received in a given connection.

SYNOPSIS
       IP::stats ((pkts ('in' | 'out')?) | (bytes ('in' | 'out')?) | in | out
       | age)?

DESCRIPTION
       This command supplies information about the number of packets or bytes
       being sent or received in a given connection.

       IP::stats Returns a list with Packets In, Packets Out, Bytes In, Bytes
       Out & Age

       IP::stats pkts in Returns number of packets received

       IP::stats pkts out Returns number of packets sent

       IP::stats pkts Returns a Tcl list of packets in and packets out

       IP::stats bytes in Returns number of bytes received

       IP::stats bytes out Returns number of bytes sent

       IP::stats bytes Returns Tcl list of bytes in and bytes out

       IP::stats age Returns the age of the connection in milliseconds

RETURN VALUE
       number of packets or bytes being sent or received in a given connection

VALID DURING
       ANY_EVENT

EXAMPLES
	# The following example calculates and logs response time:
	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] - $reqAge}]
	    log local0. "Client at $reqClient requested $reqURI. \
	Server response was received $respTime milliseconds after the request was sent to the server."
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-9.0.0 --First introduced the command.



BIG-IP				  2017-01-31			      iRule(1)