Forum Discussion
Find number of connection(tmsh command)
A Virtual IP (VIP) is an IP address that is used for one or more Virtual Servers (VSs). A VS, in turn, is the combination of an IP address (or netblock) and a port (or the wildcard port). I make the distinction here because the answer to your question is slightly (though only slightly) different depending on whether you mean a VIP or a VS. I'm going to assume you mean a VS.
There are two different ways you can get an answer to your question from tmsh. The first is to look at the VS statistics:
tmsh show ltm virtual vs-web-01
------------------------------------------------------------------
Ltm::Virtual Server: vs-web-01
------------------------------------------------------------------
Status
Availability : online
State : enabled
Reason : The virtual server is up
CMP : enabled
CMP Mode : all-cpus
Destination : 78.61.50.1:80
Traffic ClientSide Ephemeral General
Bits In 3.6G 0 -
Bits Out 3.2G 0 -
Packets In 478M 0 -
Packets Out 398M 0 -
Current Connections 0 0 -
Maximum Connections 2.4K 0 -
Total Connections 15.5M 0 -
Min Conn Duration/msec - - 0
Max Conn Duration/msec - - 0
Mean Conn Duration/msec - - 0
Total Requests - - 0
SYN Cookies
Status not-activated
Hardware SYN Cookie Instances 0
Software SYN Cookie Instances 0
Current SYN Cache 0
SYN Cache Overflow 0
Total Software 0
Total Software Accepted 0
Total Software Rejected 0
Total Hardware 0
Total Hardware Accepted 0
CPU Usage Ratio (%)
Last 5 Seconds 0
Last 1 Minute 5
Last 5 Minutes 22
Alternatively, you can see a snapshot of current connections by dumping part of the connection table with a selector:
tmsh show sys connection cs-server-addr 78.61.50.1 cs-server-port 80
There is already a DevCentral article that describes the output of this tmsh command in great detail.
For the record, if you really do want to see information about a Virtual IP, that is also possible:
tmsh show ltm virtual-ip 78.61.50.1
or
tmsh show sys connection cs-server-addr 78.61.50.1
- ha_34906Oct 07, 2015
Altostratus
Hello, the OP is asking which vip(s) or virtual servers are using the highest amount of CPU? What if you have 400 virtual servers and like to find which ones are consuming the highest amount. Is there a command to run that would display the top ten or twenty highest CPU consuming virtual servers vs. the command you suggested which targets specific vips. There are commands that will show you all of the properties for all 400 but is there a way to just get top 10 or 20 offenders in one command? thanks!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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