Product Documentation

Feature Statistics APIs

Jun 14, 2016

The NetScaler appliance collects statistics about the usage of its features and the corresponding resources. You can retrieve these statistics by using NITRO API. The statistics APIs are available in different packages from the configuration APIs.

The APIs to retrieve statistics of NetScaler features are available in packages that have the following pattern: com.citrix.netscaler.nitro.resource.stat.<feature>.

For example, APIs to retrieve statistics of the load balancing virtual server are available in the com.citrix.netscaler.nitro.resource.stat.lb package.

The following sample code retrieves the statistics of a load balancing virtual server and displays some of the statistics returned:

lbvserver_stats stats = lbvserver_stats.get(ns_session,"MyFirstLbVServer"); 
System.out.println(stats.get_curclntconnections()); 
System.out.println(stats.get_deferredreqrate());
Note: Not all NetScaler features and resources have statistic objects associated with them.