IP::stats¶
Description¶
This command supplies information about the number of packets or bytes
being sent or received in a given connection.
Syntax¶
IP::stats
IP::stats pkts in
IP::stats pkts out
IP::stats pkts
IP::stats bytes in
IP::stats bytes out
IP::stats bytes
IP::stats age
Note - In v10.0 - 10.2.0, IP::stats keywords not functioning
correctly. Reference cr136105 / BZ224422. The issue was resolved in
v10.2.1 and 11.0.
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."
}