Did I find the right examples for you? yes no

All Samples(48)  |  Call(48)  |  Derive(0)  |  Import(0)
Return disk usage statistics about the given path as a namedtuple
including total, used and free space expressed in bytes plus the
percentage usage.

        def disk_usage(path):
    """Return disk usage statistics about the given path as a namedtuple
    including total, used and free space expressed in bytes plus the
    percentage usage.
    """
    return _psplatform.get_disk_usage(path)
        


src/p/y/pyriemann-HEAD/examples/riemann_health.py   pyriemann(Download)
def disk(warning=0.9, critical=0.95):
    for p in psutil.disk_partitions():
        u = psutil.disk_usage(p.mountpoint)
        perc = u.percent
        f = perc/100.0

src/p/s/psutil-2.1.1/examples/disk_usage.py   psutil(Download)
                # partition or just hang.
                continue
        usage = psutil.disk_usage(part.mountpoint)
        print_(templ % (
            part.device,

src/p/c/pcd8544-HEAD/examples/sys_info.py   pcd8544(Download)
def disk_usage(dir):
    usage = psutil.disk_usage(dir)
    return "SD:  %s %.0f%%" \
            % (bytes2human(usage.used), usage.percent)  
 

src/p/s/psutil-HEAD/examples/disk_usage.py   psutil(Download)
def main():
    templ = "%-17s %8s %8s %8s %5s%% %9s  %s"
    print_(templ % ("Device", "Total", "Used", "Free", "Use ", "Type", "Mount"))
    for part in psutil.disk_partitions(all=False):
        usage = psutil.disk_usage(part.mountpoint)

src/p/s/psdash-0.3.0/psdash/web.py   psdash(Download)
def get_disks(all_partitions=False):
    disks = [
        (dp, psutil.disk_usage(dp.mountpoint))
        for dp in psutil.disk_partitions(all_partitions)
    ]

src/p/s/psdash-HEAD/psdash/web.py   psdash(Download)
def get_disks(all_partitions=False):
    disks = [
        (dp, psutil.disk_usage(dp.mountpoint))
        for dp in psutil.disk_partitions(all_partitions)
    ]

src/s/l/slapos.core-HEAD/slapos/collect/snapshot.py   slapos.core(Download)
  def __init__(self, partition, mountpoint):
    self.partition = partition
    self.mountpoint_list = [ mountpoint ]
    disk = psutil.disk_usage(mountpoint)
    disk_io = psutil.disk_io_counters()
    for partition in psutil.disk_partitions():
      if partition.device not in partition_dict:
        usage = psutil.disk_usage(partition.mountpoint)
        partition_dict[partition.device] = usage.total
        self.disk_snapshot_list.append(

src/d/r/droned-HEAD/droned/lib/droned/models/systemstats.py   droned(Download)
        def _run(partition):
            pobj = psutil.disk_usage(partition)
            meta = {"variables": ["partition","disk.usage.percent","usage.percent"],
                    "partition":self.format_partition(partition),
                    "disk.usage.percent":pobj.percent,
        def _run(partition):
            pobj = psutil.disk_usage(partition)
            meta = {"variables": ["partition","disk.usage.free","usage.free"],
                    "partition":self.format_partition(partition),
                    "disk.usage.free":pobj.free,
        def _run(partition):
            pobj = psutil.disk_usage(partition)
            meta = {"variables": ["partition","disk.usage.total","usage.total"],
                    "partition":self.format_partition(partition),
                    "disk.usage.total":pobj.total,
        def _run(partition):
            pobj = psutil.disk_usage(partition)
            meta = {"variables": ["partition","disk.usage.used","usage.used"],
                    "partition":self.format_partition(partition),
                    "disk.usage.used":pobj.used,

src/n/e/newRHELic-HEAD/newrelic.py   newRHELic(Download)
            for p in disks:
                title = "Component/Disk/Utilization/%s[percent]" % p.mountpoint.replace('/','|')
                x = psutil.disk_usage(p.mountpoint)
                self.metric_data[title] = x.percent
        except Exception, e:

src/b/a/baruwa-2.0.1/baruwa/tasks/status.py   baruwa(Download)
    partitions = []
    for part in psutil.disk_partitions(all=False):
        usage = psutil.disk_usage(part.mountpoint)
        dpart = _obj2dict(part)
        dpart.update(_obj2dict(usage))

  1 | 2 | 3 | 4  Next