Forum Discussion
The difference between "NEW connections" and "Active connections"?
Hello,everyone: AS a new I want to konw the difference between "NEW connections" and "Active connections"? and at the same time,which command can show these iterms or how to calculate them?
6 Replies
- Vijith_182946
Cirrostratus
Active Connections are that already exists and currently active
(tmos) show sys connection ?
- Wendell_Huang
Nimbostratus
This command is just show the active connections ,but how to check the new connections?
- Michele_Jetz
Nimbostratus
how do you want to get "new" connections via any show command. at the moment where you enter the command, the system is just available to check the number of current active connections. so any connection that is established till you enter the command is converted from new to active :)
if you have any requirement to report how many connections are build in a time to any vs you could create an iRule which will log a statement to /var/log/ltm each time, a client connects to the vs
then just grep and count the number of results in the respective time out of the logfile.
Then you will see in the last hour for example were 50 connections created
Best Regards
- jaikumar_f5
Noctilucent
The difference can be found out by comparing the (client IP address, client TCP port, server IP address, server TCP port) parameters, existing connections will retain this. New connections changes the port.
Command
tmsh show /sys connection
- Vijith_182946
Cirrostratus
OK, i think there is an easy way to find out. Try just
and narrow down with more optionsshow sys performance
- Wendell_Huang
Nimbostratus
Thanks,I get it. In the older version through 9.0.0 to 10.2.4, I edit a shell script for calculating these new connections or active connections. This is the shell:
!/bin/bash function ACT_Conn() { h="localhost" cmd="snmpwalk -cpublic -v2c" sysStatClientCurConns=".1.3.6.1.4.1.3375.2.1.1.2.1.8" act_swap=$($cmd $h $sysStatClientCurConns) act_conn=${act_swapF5-BIGIP-SYSTEM-MIB::sysStatClientCurConns.0 = Counter64: } echo "Active connestions are:$act_conn" } function NEW_conn() { h="localhost" cmd="snmpwalk -cpublic -v2c" sysTcpStatAccepts=".1.3.6.1.4.1.3375.2.1.1.2.12.6" sysStatServerTotConns=".1.3.6.1.4.1.3375.2.1.1.2.1.14" cli_acc_swap1=$($cmd $h $sysTcpStatAccepts) cli_accept1=${cli_acc_swap1F5-BIGIP-SYSTEM-MIB::sysTcpStatAccepts.0 = Counter64: } ser_conn_swap1=$($cmd $h $sysStatServerTotConns) ser_conn1=${ser_conn_swap1F5-BIGIP-SYSTEM-MIB::sysStatServerTotConns.0 = Counter64: } sleep 10s cli_acc_swap2=$($cmd $h $sysTcpStatAccepts) cli_accept2=${cli_acc_swap2F5-BIGIP-SYSTEM-MIB::sysTcpStatAccepts.0 = Counter64: } ser_conn_swap2=$($cmd $h $sysStatServerTotConns) ser_conn2=${ser_conn_swap2F5-BIGIP-SYSTEM-MIB::sysStatServerTotConns.0 = Counter64: } delta_c_a=$(($cli_accept2-$cli_accept1)) delta_s_conn=$(($ser_conn2-$ser_conn1)) echo "$delta_c_a $delta_s_conn" |awk '{printf "ClientSideCon:%.1f\tSerSideCon:%.1f\n",$1/10,$2/10}' } ACT_Conn NEW_conn
Recent Discussions
Related Content
* 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