on 18-Mar-2015 15:25
Problem this snippet solves:
What the rule does is looks at duration of the flow and evaluates the number of bytes the server has sent for the flow. If the flow meets the specified conditions it is pinned to a rate class.
This iRule has been used for internet bound traffic going through proxy servers.
Requirements:
This rule is not perfect and it makes some specific assumptions.
Assumptions are:
Code :
when SERVER_DATA { set srvAge [IP::stats age] set srvBytes [IP::stats bytes in] # change 10000ms/10s to your desired time if {$srvAge > 10000 } { # change the recieved bytes if needed if {$srvBytes > 3000000 } { # makesure you create the rate class rateclass bandHog #log local0. "Bandwidth Hog: [IP::client_addr] server bytes $srvBytes" } } #log local0. " [IP::client_addr]:[TCP::client_port] server age: $srvAge server bytes: $srvBytes" }