Mar 27, 2026 - For details about updated CVE-2025-53521 (BIG-IP APM vulnerability), refer to K000156741.

Forum Discussion

Zdenek's avatar
Zdenek
Icon for Cirrostratus rankCirrostratus
3 years ago
Solved

APM sesions count per partition

Hello, is it possible to get list or just count of APM sessions per policy or per partition? I found some snmp or tmsh commands, but they never return result for specific partition or specific APM ...
  • Kai_Wilke's avatar
    3 years ago

    Hi Zdnek,

    iControl REST-API does unfortunately not have an end-point to show statistical data for a given APM policy.

    But TMSH CLI has a command to display active sessions for a given APM policy. See the syntax below:

     

    itacs@(kw-f5-dev)(cfg-sync Standalone)(Active)(/Common)(tmos)# show apm profile access
    
    --------------------------------------------------------------
    ACCESS Profile: Radius_Policy                                 
    --------------------------------------------------------------
        User Session Statistics:                                  
    --------------------------------------------------------------
        total sessions: 7                                         
        total established sessions: 0                             
        current active sessions: 1                                
        current pending sessions: 1                               
        current established sessions: 0                           
        sessions terminated due to user logged out: 3             
        sessions terminated due to admin termination: 0           
        sessions terminated due to timeout in evaluation state: 3 
        sessions terminated due to timeout in established state: 0
        sessions terminated due to errors: 0                      
        sessions that resulted in an allow ending: 0              
        sessions resulted into deny ending: 0                     
        sessions resulted into redirect ending: 0                 
        sessions resulted into redirect ending with session: 0    
        requests allowed by ACL: 0                                
        requests denied by ACL: 0                                 
    --------------------------------------------------------------
        Apply Access Policy: Not-Required                         
    --------------------------------------------------------------
    
    --------------------------------------------------------------
    ACCESS Profile: access                                        
    --------------------------------------------------------------
        User Session Statistics:                                  
    --------------------------------------------------------------
        total sessions: 0                                         
        total established sessions: 0                             
        current active sessions: 0                                
        current pending sessions: 0                               
        current established sessions: 0                           
        sessions terminated due to user logged out: 0             
        sessions terminated due to admin termination: 0           
        sessions terminated due to timeout in evaluation state: 0 
        sessions terminated due to timeout in established state: 0
        sessions terminated due to errors: 0                      
        sessions that resulted in an allow ending: 0              
        sessions resulted into deny ending: 0                     
        sessions resulted into redirect ending: 0                 
        sessions resulted into redirect ending with session: 0    
        requests allowed by ACL: 0                                
        requests denied by ACL: 0                                 
    --------------------------------------------------------------
        Apply Access Policy: Not-Required                         
    --------------------------------------------------------------

     

     

    If REST is your prefered method to query such data, then you could access those information via:

     

    curl -sku 'admin:admin' -X POST -H "Content-type: application/json" -d "{\"command\":\"run\", \"utilCmdArgs\": \"-c 'tmsh show apm profile access'\"}" https://YOURBIGIP/mgmt/tm/util/bash

     

    You may also write a custom TMSH script to enumerate your partitions, enumerate the included APM Policies, query statistical information and finally output the enumerated infomation in a more compact format (e.g. CSV, JSON, XML, whatever...). The TMSH script may then be called via TMSH CLI or via REST API...

    Cheers, Kai