Did I find the right examples for you? yes no

All Samples(37)  |  Call(37)  |  Derive(0)  |  Import(0)
Return system disk I/O statistics as a namedtuple including
the following fields:

 - read_count:  number of reads
 - write_count: number of writes
 - read_bytes:  number of bytes read
 - write_bytes: number of bytes written
 - read_time:   time spent reading from disk (in milliseconds)
 - write_time:  time spent writing to disk (in milliseconds)
(more...)

        def disk_io_counters(perdisk=False):
    """Return system disk I/O statistics as a namedtuple including
    the following fields:

     - read_count:  number of reads
     - write_count: number of writes
     - read_bytes:  number of bytes read
     - write_bytes: number of bytes written
     - read_time:   time spent reading from disk (in milliseconds)
     - write_time:  time spent writing to disk (in milliseconds)

    If perdisk is True return the same information for every
    physical disk installed on the system as a dictionary
    with partition names as the keys and the namedutuple
    described above as the values.

    On recent Windows versions 'diskperf -y' command may need to be
    executed first otherwise this function won't find any disk.
    """
    rawdict = _psplatform.disk_io_counters()
    if not rawdict:
        raise RuntimeError("couldn't find any physical disk")
    if perdisk:
        for disk, fields in rawdict.items():
            rawdict[disk] = _nt_sys_diskio(*fields)
        return rawdict
    else:
        return _nt_sys_diskio(*[sum(x) for x in zip(*rawdict.values())])
        


src/p/s/psutil-2.1.1/examples/iotop.py   psutil(Download)
            procs.remove(p)
            continue
    disks_before = psutil.disk_io_counters()
 
    # sleep some time
        except psutil.NoSuchProcess:
            procs.remove(p)
    disks_after = psutil.disk_io_counters()
 
    # finally calculate results by comparing data before and

src/p/s/psutil-HEAD/examples/iotop.py   psutil(Download)
            procs.remove(p)
            continue
    disks_before = psutil.disk_io_counters()
 
    # sleep some time
        except psutil.NoSuchProcess:
            procs.remove(p)
    disks_after = psutil.disk_io_counters()
 
    # finally calculate results by comparing data before and

src/d/r/droned-HEAD/droned/lib/droned/models/systemstats.py   droned(Download)
    def counters_read(self,save):
        disk_stats = psutil.disk_io_counters(perdisk=True) 
        def _validate(datapoint):
            datapoint.meta_data['disk.counters.read'] = datapoint.value
            datapoint.meta_data['counters.read'] = datapoint.value
    def counters_write(self,save):
        disk_stats = psutil.disk_io_counters(perdisk=True) 
        def _validate(datapoint):
            datapoint.meta_data['disk.counters.write'] = datapoint.value
            datapoint.meta_data['counters.write'] = datapoint.value
    def bytes_read(self,save):
        disk_stats = psutil.disk_io_counters(perdisk=True) 
        def _validate(datapoint):
            datapoint.meta_data['disk.bytes.read'] = datapoint.value
            datapoint.meta_data['bytes.read'] = datapoint.value
    def bytes_write(self,save):
        disk_stats = psutil.disk_io_counters(perdisk=True) 
        def _validate(datapoint):
            datapoint.meta_data['disk.bytes.write'] = datapoint.value
            datapoint.meta_data['bytes.write'] = datapoint.value
    def time_read(self,save):
        disk_stats = psutil.disk_io_counters(perdisk=True) 
        def _validate(datapoint):
            datapoint.meta_data['disk.time.read'] = datapoint.value
            datapoint.meta_data['time.read'] = datapoint.value

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

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

src/g/l/Glances-1.7.6/glances/glances.py   Glances(Download)
            if not hasattr(self, 'diskio_old'):
                try:
                    self.diskio_old = psutil.disk_io_counters(perdisk=True)
                except IOError:
                    self.diskio_error_tag = True
            else:
                self.diskio_new = psutil.disk_io_counters(perdisk=True)

src/g/l/glances-HEAD/glances/glances.py   glances(Download)
            if not hasattr(self, 'diskio_old'):
                try:
                    self.diskio_old = psutil.disk_io_counters(perdisk=True)
                except IOError:
                    self.diskio_error_tag = True
            else:
                self.diskio_new = psutil.disk_io_counters(perdisk=True)

src/e/v/evalimine-HEAD/ivote-server/common/monitoring.py   evalimine(Download)
    vmem = psutil.virtmem_usage().percent
    disk = psutil.disk_usage("/").percent
    disk_io = psutil.disk_io_counters(perdisk=True)
    net_io = psutil.network_io_counters(pernic=True)
 

src/a/j/ajenti-1.2.21.2/ajenti/plugins/fstab/iops.py   ajenti(Download)
    def measure(self, device):
        try:
            v = psutil.disk_io_counters(perdisk=True)[device]
        except KeyError:
            return 0
    def measure(self, device):
        try:
            v = psutil.disk_io_counters(perdisk=True)[device]
        except KeyError:
            return 0

src/a/j/ajenti-HEAD/ajenti/plugins/fstab/iops.py   ajenti(Download)
    def measure(self, device):
        try:
            v = psutil.disk_io_counters(perdisk=True)[device]
        except KeyError:
            return 0
    def measure(self, device):
        try:
            v = psutil.disk_io_counters(perdisk=True)[device]
        except KeyError:
            return 0

  1 | 2  Next