Did I find the right examples for you? yes no

All Samples(29)  |  Call(29)  |  Derive(0)  |  Import(0)
psutil.network_io_counters is deprecated; use psutil.net_io_counters() instead

                @wraps(fun)
        def inner(*args, **kwargs):
            warnings.warn(msg, category=DeprecationWarning, stacklevel=2)
            return fun(*args, **kwargs)
        


src/p/s/psutil-HEAD/examples/nettop.py   psutil(Download)
def poll(interval):
    """Retrieve raw stats within an interval window."""
    tot_before = psutil.network_io_counters()
    pnic_before = psutil.network_io_counters(pernic=True)
    # sleep some time
    time.sleep(interval)
    tot_after = psutil.network_io_counters()
    pnic_after = psutil.network_io_counters(pernic=True)

src/p/c/pcd8544-HEAD/examples/sys_info.py   pcd8544(Download)
def network(iface):
    stat = psutil.network_io_counters(pernic=True)[iface]
    return "%s:Tx%s,Rx%s" % \
           (iface, bytes2human(stat.bytes_sent), bytes2human(stat.bytes_recv))
 

src/g/l/Glances-1.7.6/glances/glances.py   Glances(Download)
                # psutil < 1.0.0
                try:
                    get_net_io_counters = psutil.network_io_counters(pernic=True)
                except IOError:
                    self.network_error_tag = True

src/g/l/glances-HEAD/glances/glances.py   glances(Download)
                # psutil < 1.0.0
                try:
                    get_net_io_counters = psutil.network_io_counters(pernic=True)
                except IOError:
                    self.network_error_tag = True

src/d/r/droned-HEAD/droned/lib/droned/models/systemstats.py   droned(Download)
        '''
        if not self.PER_INTERFACE and not self.INTERFACES:
            nic_counters = psutil.network_io_counters(pernic=False)
            try: 
                func("ALL",nic_counters)
                self.debug("")
        else:
            nic_counters = psutil.network_io_counters(pernic=True)
            for nic in nic_counters:
                nic_str = nic.split(":")[0]

src/p/o/powerline-status-0.0.1/powerline/segments/common.py   powerline-status(Download)
	def _get_bytes(interface):
		try:
			io_counters = psutil.net_io_counters(pernic=True)
		except AttributeError:
			io_counters = psutil.network_io_counters(pernic=True)
	def _get_interfaces():
		io_counters = psutil.network_io_counters(pernic=True)
		for interface, data in io_counters.items():
			if data:
				yield interface, data.bytes_recv, data.bytes_sent

src/p/o/powerline-HEAD/powerline/segments/common.py   powerline(Download)
	def _get_bytes(interface):
		try:
			io_counters = psutil.net_io_counters(pernic=True)
		except AttributeError:
			io_counters = psutil.network_io_counters(pernic=True)
	def _get_interfaces():
		io_counters = psutil.network_io_counters(pernic=True)
		for interface, data in io_counters.items():
			if data:
				yield interface, data.bytes_recv, data.bytes_sent

src/s/a/salt-HEAD/salt/modules/ps.py   salt(Download)
        return dict(psutil.network_io_counters()._asdict())
    else:
        stats = psutil.network_io_counters(pernic=True)
        if interface in stats:
            return dict(stats[interface]._asdict())

src/s/a/salt-thin-HEAD/salt/modules/ps.py   salt-thin(Download)
        return dict(psutil.network_io_counters()._asdict())
    else:
        stats = psutil.network_io_counters(pernic=True)
        if interface in stats:
            return dict(stats[interface]._asdict())

src/a/j/ajenti-1.2.21.2/ajenti/plugins/network/widget.py   ajenti(Download)
    def measure(self, device):
        try:
            v = psutil.network_io_counters(pernic=True)[device]
        except KeyError:
            return (0, 0)
    def measure(self, device):
        try:
            v = psutil.network_io_counters(pernic=True)[device]
        except KeyError:
            return 0
    def measure(self, device):
        try:
            v = psutil.network_io_counters(pernic=True)[device]
        except KeyError:
            return 0

  1 | 2  Next