Bug 1196253 - update in-tree psutil to 3.1.1. r=gps
This commit is contained in:
@@ -14,15 +14,14 @@ Swap: 0 0 0
|
||||
"""
|
||||
|
||||
import psutil
|
||||
from psutil._compat import print_
|
||||
|
||||
|
||||
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'))
|
||||
print_(templ % (
|
||||
print(templ % ('', 'total', 'used', 'free', 'shared', 'buffers', 'cache'))
|
||||
print(templ % (
|
||||
'Mem:',
|
||||
int(virt.total / 1024),
|
||||
int(virt.used / 1024),
|
||||
@@ -30,7 +29,7 @@ def main():
|
||||
int(getattr(virt, 'shared', 0) / 1024),
|
||||
int(getattr(virt, 'buffers', 0) / 1024),
|
||||
int(getattr(virt, 'cached', 0) / 1024)))
|
||||
print_(templ % (
|
||||
print(templ % (
|
||||
'Swap:', int(swap.total / 1024),
|
||||
int(swap.used / 1024),
|
||||
int(swap.free / 1024),
|
||||
|
||||
Reference in New Issue
Block a user