Forum Discussion

bongso_102853's avatar
bongso_102853
Icon for Nimbostratus rankNimbostratus
Nov 20, 2013

How to log how many bytes/ packets are transferred/received within a connection

Dear all,

 

I have a user case that need to log the no. of packets/ bytes that are transmitted by the server within a connection (TCP/UDP).

 

Is there any irule command can gather this information? I want to use this command when event "client_closed"

 

Thanks

 

Bong So

 

1 Reply

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus

    Yeah... The IP::Stats command will give you the information you require. You can then just use HSL to send the info (Or save it to a table for later summarising etc) from the CLIENT_CLOSED event.

    e.g.

    when CLIENT_CLOSED {
      HSL::send $hsl_handle "[IP::stats packets in] [IP::stats packets out] [IP::stats bytes in] [IP::stats bytes out]"
    }
    

    Or similar... (Not checked for syntax obviously 🙂

    H