Did I find the right examples for you? yes no

All Samples(29)  |  Call(29)  |  Derive(0)  |  Import(0)
Return system swap memory statistics as a namedtuple including
the following fields:

 - total:   total swap memory in bytes
 - used:    used swap memory in bytes
 - free:    free swap memory in bytes
 - percent: the percentage usage
 - sin:     no. of bytes the system has swapped in from disk (cumulative)
 - sout:    no. of bytes the system has swapped out from disk (cumulative)
(more...)

        def swap_memory():
    """Return system swap memory statistics as a namedtuple including
    the following fields:

     - total:   total swap memory in bytes
     - used:    used swap memory in bytes
     - free:    free swap memory in bytes
     - percent: the percentage usage
     - sin:     no. of bytes the system has swapped in from disk (cumulative)
     - sout:    no. of bytes the system has swapped out from disk (cumulative)

    'sin' and 'sout' on Windows are meaningless and always set to 0.
    """
    return _psplatform.swap_memory()
        


src/p/s/psutil-2.1.1/examples/top.py   psutil(Download)
 
    # swap usage
    swap = psutil.swap_memory()
    dashes, empty_dashes = get_dashes(swap.percent)
    line = " Swap  [%s%s] %5s%% %6s/%s" % (

src/p/s/psutil-HEAD/examples/top.py   psutil(Download)
 
    # swap usage
    swap = psutil.swap_memory()
    dashes, empty_dashes = get_dashes(swap.percent)
    line = " Swap  [%s%s] %5s%% %6s/%s" % (

src/p/s/psutil-2.1.1/examples/meminfo.py   psutil(Download)
def main():
    print_('MEMORY\n------')
    pprint_ntuple(psutil.virtual_memory())
    print_('\nSWAP\n----')
    pprint_ntuple(psutil.swap_memory())

src/p/s/psutil-2.1.1/examples/free.py   psutil(Download)
def main():
    virt = psutil.virtual_memory()
    swap = psutil.swap_memory()
    templ = "%-7s %10s %10s %10s %10s %10s %10s"
    print_(templ % ('', 'total', 'used', 'free', 'shared', 'buffers', 'cache'))

src/p/s/psutil-HEAD/examples/meminfo.py   psutil(Download)
def main():
    print_('MEMORY\n------')
    pprint_ntuple(psutil.virtual_memory())
    print_('\nSWAP\n----')
    pprint_ntuple(psutil.swap_memory())

src/p/s/psutil-HEAD/examples/free.py   psutil(Download)
def main():
    virt = psutil.virtual_memory()
    swap = psutil.swap_memory()
    templ = "%-7s %10s %10s %10s %10s %10s %10s"
    print_(templ % ('', 'total', 'used', 'free', 'shared', 'buffers', 'cache'))

src/p/s/psdash-0.3.0/psdash/web.py   psdash(Download)
        "cpus": psutil.NUM_CPUS,
        "vmem": psutil.virtual_memory(),
        "swap": psutil.swap_memory(),
        "disks": disks,
        "cpu_percent": psutil.cpu_times_percent(0),

src/p/s/psdash-HEAD/psdash/web.py   psdash(Download)
        "cpus": psutil.NUM_CPUS,
        "vmem": psutil.virtual_memory(),
        "swap": psutil.swap_memory(),
        "disks": disks,
        "cpu_percent": psutil.cpu_times_percent(0),

src/n/e/newRHELic-HEAD/newrelic.py   newRHELic(Download)
    def _get_swap_stats(self):
        '''this will return swap information'''
        try:
            swap = psutil.swap_memory()
            for i in range(len(swap)):
                self.buffers[disk_io._fields[i]] = disk_io[i]
 
            swap_io = psutil.swap_memory()
            for i in range(len(swap_io)):
                if swap_io._fields[i] == 'sin' or swap_io._fields[i] == 'sout':

src/p/y/pysysbot-0.1.3/pysysbot/pysysbot.py   pysysbot(Download)
    def mem(self, mess, args):
        """Memory status of the system."""
        vmem = psutil.virtual_memory()
        swap = psutil.swap_memory()
        mem = "\nMemory status" + \

  1 | 2 | 3  Next