Forum Discussion
Javier_95414
Apr 13, 2011Nimbostratus
how to see the active connections of a virtual server?
hi,
i want to see the connections of a virtual server. with this irules i can see all:
when LB_SELECTED { log "[IP::client_addr]:[TCP::client_port]-->[IP::local_addr]:[TCP::local_port] PoolMember [LB::server addr]:[LB::server port]" }
but i want see ONLY the active conn. how i could do it?
thanks!
- Michael_YatesNimbostratusDo you just want to log the client connections or additional information?
when CLIENT_ACCEPTED { Get time for start of TCP Connection in milliseconds set tcp_start_time [clock clicks -milliseconds] Log the start of a new HTTP Request set local0. "(TCP Connection - Start) [IP::client_addr]:[TCP::client_port] to [IP::local_addr]:[TCP::local_port]" } when HTTP_REQUEST { Get time for start of HTTP Request in milliseconds set http_request_time [clock clicks -milliseconds] Log the start of new HTTP Request with URI set LogString "Client [IP::client_addr]:[TCP::client_port] -> [HTTP::uri]" Log the start of new HTTP Request without URI set LogString "Client [IP::client_addr]:[TCP::client_port]" log local0. "(HTTP - Request) $LogString" } when HTTP_RESPONSE { Recieved the response headers from the server. Log the pool name, IP and port, status and time delta Detailed Log Output - Client Communication - Pool Information - Status Messages - and Communication Delta log local0. "(Response) $LogString - pool info: [LB::server] - status: [HTTP::status] (Request / Response Delta: [expr {[clock clicks -milliseconds] - $http_request_time}]ms)" Response and Communication Delta log local0. "(HTTP - Response) $LogString - (Request / Response Delta: [expr {[clock clicks -milliseconds] - $http_request_time}]ms)" } when CLIENT_CLOSED { Log the end time of the TCP Connection Detailed Connection Closed - Transaction can be located by using the Client IP Address and Port to Load Balancer IP Address and Port for additional matching parameters. log local0. "(TCP Connection - Close) Client [IP::client_addr]:[TCP::client_port] to [IP::local_addr]:[TCP::local_port] (Connection Open for: [expr {[clock clicks -milliseconds] - $tcp_start_time}]ms)" }
- hoolioCirrostratusYou can also use 'b conn' to see the active connections. See 'b conn help' for filtering options.
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