Use this API to fetch the statistics of all nsmemory_stats resources that are configured on netscaler.
191183
public static nsmemory_stats[] get(nitro_service service) throws Exception{
		nsmemory_stats obj = new nsmemory_stats();
		nsmemory_stats[] response = (nsmemory_stats[])obj.stat_resources(service);
		return response;
	}
1154502
public static protocolip_stats get(nitro_service service) throws Exception{
		protocolip_stats obj = new protocolip_stats();
		protocolip_stats[] response = (protocolip_stats[])obj.stat_resources(service);
		return response[0];
	}
1362357
public static appfwprofile_stats[] get(nitro_service service) throws Exception{
		appfwprofile_stats obj = new appfwprofile_stats();
		appfwprofile_stats[] response = (appfwprofile_stats[])obj.stat_resources(service);
		return response;
	}
1186107
def get_memory_banks_per_run(coreAssignment, cgroups):
    """"""
    try:
        # read list of available memory banks
        allMems = set(cgroups.read_allowed_memory_banks())

        result = []
        for cores in coreAssignment:
            mems = set()
            for core in cores:
                coreDir = '/sys/devices/system/cpu/cpu{0}/'.format(core)
                mems.update(_get_memory_banks_listed_in_dir(coreDir))
            allowedMems = sorted(mems.intersection(allMems))
            logging.debug("Memory banks for cores %s are %s, of which we can use %s.", cores, list(mems), allowedMems)

            result.append(allowedMems)

        assert len(result) == len(coreAssignment)

        if any(result) and os.path.isdir('/sys/devices/system/node/'):
            return result
        else:
            # All runs get the empty list of memory regions
            # because this system has no NUMA support
            return None
    except ValueError as e:
        sys.exit("Could not read memory information from kernel: {0}".format(e))
1331635
public static tunnelip6_stats[] get(nitro_service service) throws Exception{
		tunnelip6_stats obj = new tunnelip6_stats();
		tunnelip6_stats[] response = (tunnelip6_stats[])obj.stat_resources(service);
		return response;
	}
272084
@RequestMapping(value = MEMORY_URL, method = RequestMethod.GET)
    public ResponseEntity<List<MemoryMonitor>> memoryStats() {
        return new ResponseEntity<>(MemoryMonitor.getMemoryStats(), HttpStatus.OK);
    }
327195
public static autoscalepolicy_stats[] get(nitro_service service) throws Exception{
		autoscalepolicy_stats obj = new autoscalepolicy_stats();
		autoscalepolicy_stats[] response = (autoscalepolicy_stats[])obj.stat_resources(service);
		return response;
	}
843536
public static nsacl6_stats[] get(nitro_service service) throws Exception{
		nsacl6_stats obj = new nsacl6_stats();
		nsacl6_stats[] response = (nsacl6_stats[])obj.stat_resources(service);
		return response;
	}
1116512
public static protocolicmpv6_stats get(nitro_service service) throws Exception{
		protocolicmpv6_stats obj = new protocolicmpv6_stats();
		protocolicmpv6_stats[] response = (protocolicmpv6_stats[])obj.stat_resources(service);
		return response[0];
	}
1196036
public static nspbr6_stats get(nitro_service service, String name) throws Exception{
		nspbr6_stats obj = new nspbr6_stats();
		obj.set_name(name);
		nspbr6_stats response = (nspbr6_stats) obj.stat_resource(service);
		return response;
	}
1350304
public static service_stats[] get(nitro_service service) throws Exception{
		service_stats obj = new service_stats();
		service_stats[] response = (service_stats[])obj.stat_resources(service);
		return response;
	}
698350
public static dnspolicylabel_stats[] get(nitro_service service, options option) throws Exception{
		dnspolicylabel_stats obj = new dnspolicylabel_stats();
		dnspolicylabel_stats[] response = (dnspolicylabel_stats[])obj.stat_resources(service,option);
		return response;
	}
90684
public static service_stats get(nitro_service service, String name) throws Exception{
		service_stats obj = new service_stats();
		obj.set_name(name);
		service_stats response = (service_stats) obj.stat_resource(service);
		return response;
	}
73292
public static nat64_stats get(nitro_service service) throws Exception{
		nat64_stats obj = new nat64_stats();
		nat64_stats[] response = (nat64_stats[])obj.stat_resources(service);
		return response[0];
	}
23044
@ReadOperation
    public Map<String, Map> allMetrics() {

        Map<String, Map> results = new HashMap<>();
        // JVM stats
        results.put("jvm", this.jvmMemoryMetrics());
        // HTTP requests stats
        results.put("http.server.requests", this.httpRequestsMetrics());
        // Cache stats
        results.put("cache", this.cacheMetrics());
        // Service stats
        results.put("services", this.serviceMetrics());
        // Database stats
        results.put("databases", this.databaseMetrics());
        // Garbage collector
        results.put("garbageCollector", this.garbageCollectorMetrics());
        // Process stats
        results.put("processMetrics", this.processMetrics());

        return results;
    }
622115
def stats(self):
        
        ret = '{name}:\n' \
            '  sample_num={sample_num}, batch_num={batch_num}\n' \
            '  key={bucket_keys}\n' \
            '  cnt={bucket_counts}\n' \
            '  batch_size={bucket_batch_sizes}'\
            .format(name=self.__class__.__name__,
                    sample_num=len(self._lengths),
                    batch_num=len(self._batch_infos),
                    bucket_keys=self._bucket_keys,
                    bucket_counts=[len(sample_ids) for sample_ids in self._bucket_sample_ids],
                    bucket_batch_sizes=self._bucket_batch_sizes)
        return ret
250521
def get_stats(self, queue):
        
        uri = "/%s/%s/stats" % (self.uri_base, utils.get_id(queue))
        resp, resp_body = self.api.method_get(uri)
        return resp_body.get("messages")