Use this API to fetch statistics of Interface_stats resource of given name .
976452
public static Interface_stats get(nitro_service service, String id) throws Exception{
		Interface_stats obj = new Interface_stats();
		obj.set_id(id);
		Interface_stats response = (Interface_stats) obj.stat_resource(service);
		return response;
	}
136995
public static host_interface[] get(nitro_service client) throws Exception
	{
		host_interface resource = new host_interface();
		resource.validate("get");
		return (host_interface[]) resource.get_resources(client);
	}
50450
public static rewritepolicy_stats get(nitro_service service, String name) throws Exception{
		rewritepolicy_stats obj = new rewritepolicy_stats();
		obj.set_name(name);
		rewritepolicy_stats response = (rewritepolicy_stats) obj.stat_resource(service);
		return response;
	}
335776
func (c *StatsConnection) GetInterfaceStats() (*api.InterfaceStats, error) {
	stats, err := c.statsClient.DumpStats(InterfaceStatsPrefix)
	if err != nil {
		return nil, err
	}

	ifStats := &api.InterfaceStats{}

	var setPerIf = func(perIf []uint64, fn func(c *api.InterfaceCounters, v uint64)) {
		if ifStats.Interfaces == nil {
			ifStats.Interfaces = make([]api.InterfaceCounters, len(perIf))
			for i := range perIf {
				ifStats.Interfaces[i].InterfaceIndex = uint32(i)
			}
		}
		for i, v := range perIf {
			if len(ifStats.Interfaces) <= i {
				break
			}
			ifCounters := ifStats.Interfaces[i]
			fn(&ifCounters, v)
			ifStats.Interfaces[i] = ifCounters
		}
	}

	for _, stat := range stats {
		switch stat.Name {
		case InterfaceStats_Names:
			if names, ok := stat.Data.(adapter.NameStat); !ok {
				return nil, fmt.Errorf("invalid stat type for %s", stat.Name)
			} else {
				if ifStats.Interfaces == nil {
					ifStats.Interfaces = make([]api.InterfaceCounters, len(names))
					for i := range names {
						ifStats.Interfaces[i].InterfaceIndex = uint32(i)
					}
				}
				for i, name := range names {
					ifStats.Interfaces[i].InterfaceName = string(name)
				}
			}
		case InterfaceStats_Drops:
			setPerIf(reduceSimpleCounterStat(stat.Data), func(c *api.InterfaceCounters, v uint64) {
				c.Drops = v
			})
		case InterfaceStats_Punt:
			setPerIf(reduceSimpleCounterStat(stat.Data), func(c *api.InterfaceCounters, v uint64) {
				c.Punts = v
			})
		case InterfaceStats_IP4:
			setPerIf(reduceSimpleCounterStat(stat.Data), func(c *api.InterfaceCounters, v uint64) {
				c.IP4 = v
			})
		case InterfaceStats_IP6:
			setPerIf(reduceSimpleCounterStat(stat.Data), func(c *api.InterfaceCounters, v uint64) {
				c.IP6 = v
			})
		case InterfaceStats_RxNoBuf:
			setPerIf(reduceSimpleCounterStat(stat.Data), func(c *api.InterfaceCounters, v uint64) {
				c.RxNoBuf = v
			})
		case InterfaceStats_RxMiss:
			setPerIf(reduceSimpleCounterStat(stat.Data), func(c *api.InterfaceCounters, v uint64) {
				c.RxMiss = v
			})
		case InterfaceStats_RxError:
			setPerIf(reduceSimpleCounterStat(stat.Data), func(c *api.InterfaceCounters, v uint64) {
				c.RxErrors = v
			})
		case InterfaceStats_TxError:
			setPerIf(reduceSimpleCounterStat(stat.Data), func(c *api.InterfaceCounters, v uint64) {
				c.TxErrors = v
			})
		case InterfaceStats_Rx:
			per := reduceCombinedCounterStat(stat.Data)
			setPerIf(per[0], func(c *api.InterfaceCounters, v uint64) {
				c.RxPackets = v
			})
			setPerIf(per[1], func(c *api.InterfaceCounters, v uint64) {
				c.RxBytes = v
			})
		case InterfaceStats_RxUnicast:
			per := reduceCombinedCounterStat(stat.Data)
			setPerIf(per[0], func(c *api.InterfaceCounters, v uint64) {
				c.RxUnicast[0] = v
			})
			setPerIf(per[1], func(c *api.InterfaceCounters, v uint64) {
				c.RxUnicast[1] = v
			})
		case InterfaceStats_RxMulticast:
			per := reduceCombinedCounterStat(stat.Data)
			setPerIf(per[0], func(c *api.InterfaceCounters, v uint64) {
				c.RxMulticast[0] = v
			})
			setPerIf(per[1], func(c *api.InterfaceCounters, v uint64) {
				c.RxMulticast[1] = v
			})
		case InterfaceStats_RxBroadcast:
			per := reduceCombinedCounterStat(stat.Data)
			setPerIf(per[0], func(c *api.InterfaceCounters, v uint64) {
				c.RxBroadcast[0] = v
			})
			setPerIf(per[1], func(c *api.InterfaceCounters, v uint64) {
				c.RxBroadcast[1] = v
			})
		case InterfaceStats_Tx:
			per := reduceCombinedCounterStat(stat.Data)
			setPerIf(per[0], func(c *api.InterfaceCounters, v uint64) {
				c.TxPackets = v
			})
			setPerIf(per[1], func(c *api.InterfaceCounters, v uint64) {
				c.TxBytes = v
			})
		case InterfaceStats_TxUnicastMiss:
			per := reduceCombinedCounterStat(stat.Data)
			setPerIf(per[0], func(c *api.InterfaceCounters, v uint64) {
				c.TxUnicastMiss[0] = v
			})
			setPerIf(per[1], func(c *api.InterfaceCounters, v uint64) {
				c.TxUnicastMiss[1] = v
			})
		case InterfaceStats_TxMulticast:
			per := reduceCombinedCounterStat(stat.Data)
			setPerIf(per[0], func(c *api.InterfaceCounters, v uint64) {
				c.TxMulticast[0] = v
			})
			setPerIf(per[1], func(c *api.InterfaceCounters, v uint64) {
				c.TxMulticast[1] = v
			})
		case InterfaceStats_TxBroadcast:
			per := reduceCombinedCounterStat(stat.Data)
			setPerIf(per[0], func(c *api.InterfaceCounters, v uint64) {
				c.TxBroadcast[0] = v
			})
			setPerIf(per[1], func(c *api.InterfaceCounters, v uint64) {
				c.TxBroadcast[1] = v
			})
		}
	}

	return ifStats, nil
}
277739
def get_stats(self, stat_name):
        

        return [self.get_stat(r, stat_name) for r in self.statistics.keys()]
279532
def _get_base_interface_info(interface):
    '''
    
    '''
    blacklist = {
        'tcpip': {
            'name': [],
            'type': [],
            'additional_protocol': False
        },
        'disabled': {
            'name': ['eth0'],
            'type': ['gadget'],
            'additional_protocol': False
        },
        'ethercat': {
            'name': ['eth0'],
            'type': ['gadget', 'usb', 'wlan'],
            'additional_protocol': True
        },
        '_': {
            'usb': 'sys',
            'gadget': 'uevent',
            'wlan': 'uevent'
        }
    }
    return {
        'label': interface.name,
        'connectionid': interface.name,
        'supported_adapter_modes': _get_possible_adapter_modes(interface.name, blacklist),
        'adapter_mode': _get_adapter_mode_info(interface.name),
        'up': interface.flags & IFF_RUNNING != 0,
        'ipv4': {
            'supportedrequestmodes': ['dhcp_linklocal', 'dhcp_only', 'linklocal_only', 'static'],
            'requestmode': _get_request_mode_info(interface.name)
        },
        'hwaddr': interface.hwaddr[:-1]
    }
792944
public static systemmemory_stats get(nitro_service service) throws Exception{
		systemmemory_stats obj = new systemmemory_stats();
		systemmemory_stats[] response = (systemmemory_stats[])obj.stat_resources(service);
		return response[0];
	}
1303196
public static nspbr_stats get(nitro_service service, String name) throws Exception{
		nspbr_stats obj = new nspbr_stats();
		obj.set_name(name);
		nspbr_stats response = (nspbr_stats) obj.stat_resource(service);
		return response;
	}
1335478
public static dnsrecords_stats get(nitro_service service, String dnsrecordtype) throws Exception{
		dnsrecords_stats obj = new dnsrecords_stats();
		obj.set_dnsrecordtype(dnsrecordtype);
		dnsrecords_stats response = (dnsrecords_stats) obj.stat_resource(service);
		return response;
	}
1083780
public static cmppolicy_stats[] get(nitro_service service) throws Exception{
		cmppolicy_stats obj = new cmppolicy_stats();
		cmppolicy_stats[] response = (cmppolicy_stats[])obj.stat_resources(service);
		return response;
	}
505223
public static gslbdomain_stats get(nitro_service service, String name) throws Exception{
		gslbdomain_stats obj = new gslbdomain_stats();
		obj.set_name(name);
		gslbdomain_stats response = (gslbdomain_stats) obj.stat_resource(service);
		return response;
	}
1050729
def get_stats(self):
        
        sent = ctypes.c_uint32()
        recv = ctypes.c_uint32()
        send_errors = ctypes.c_uint32()
        recv_errors = ctypes.c_uint32()
        result = self.library.Par_GetStats(self.pointer, ctypes.byref(sent),
                                   ctypes.byref(recv),
                                   ctypes.byref(send_errors),
                                   ctypes.byref(recv_errors))
        check_error(result, "partner")
        return sent, recv, send_errors, recv_errors
399681
public static csvserver_stats get(nitro_service service, String name) throws Exception{
		csvserver_stats obj = new csvserver_stats();
		obj.set_name(name);
		csvserver_stats response = (csvserver_stats) obj.stat_resource(service);
		return response;
	}
645620
public static gslbsite_stats[] get(nitro_service service, options option) throws Exception{
		gslbsite_stats obj = new gslbsite_stats();
		gslbsite_stats[] response = (gslbsite_stats[])obj.stat_resources(service,option);
		return response;
	}
420010
def get_interface_by_instance_name(self, name):
        ''''''
        with self._mutex:
            for intf in self.interfaces:
                if intf.instance_name == name:
                    return intf
            return None
1100964
public static protocolicmp_stats get(nitro_service service) throws Exception{
		protocolicmp_stats obj = new protocolicmp_stats();
		protocolicmp_stats[] response = (protocolicmp_stats[])obj.stat_resources(service);
		return response[0];
	}
959656
def get_counter(self, name=None):
        '''
        '''
        return self.get_client(name=name, class_=statsd.Counter)