Forum Discussion

Tyson_James's avatar
Tyson_James
Icon for Altostratus rankAltostratus
Jan 03, 2020

Delete/Show all connections to a pool member, and then reset-stat????

I saw a very good article ( that I can't find anymore ) that was describing how to delete all connections to a pool member using the following command syntax :

 tmsh delete /sys connection ss-server-addr <member IP address> ss-server-port <member server port>

That is what I want, but I also saw they used a command that would reset the connection count and then display the count so you could verify no more connections were being made. It was something like reset-stat with "cur". Basically, what I would like to see is the connection count to a given pool member that is being taken down for maintenance to ensure all connections are closed. It is extremely important that all connections are cleared from this server before it is taken down. Any ideas????

1 Reply

  • Hey  ,

    Here,

    To show connections table of any pool member (this you know already),

    tmsh show /sys connection ss-server-addr <member IP address> ss-server-port <member server port>

    Alternatively you can use the pool command as well to show the members stats with a show command.

    This will show you the complete stats of the pool and its members connections.

    tmsh show ltm pool <pool-name> members

    You can use the grep command to see if there's any current connections are not.

    tmsh show ltm pool <pool-name>  | grep "Current Connections"

    With the above you could get the current connections going to the complete pool. So if you want to go pool member specific, use members command and grep them,

    tmsh show ltm pool <pool-name> members | grep -E "Ltm|Current Connections"

    If you'd like to view of particular member IP:PORT, you can still put that too.

    Regarding the reset of stats, the command is,

    tmsh reset-stats ltm pool <pool-name>

    When you run that, the complete stats gets reset for that particular pool and its pool members. Then you can view if any connections are coming with the show sys connection or show ltm pool commands. There are many more ways too, one such is GUI too.

    Hope this helps.