For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

5 Replies

  • 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_34906's avatar
      ha_34906
      Icon for Altostratus rankAltostratus
      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!
  • Vernon_97235's avatar
    Vernon_97235
    Historic F5 Account

    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_34906's avatar
      ha_34906
      Icon for Altostratus rankAltostratus
      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!
  • try using the following command

     

    tmsh show ltm virtual | grep -e Ltm::Virtual -e "Last 5 Minutes"