|
|
|
@ -85,7 +85,7 @@ def kill_hogs(memory_threshold,
@@ -85,7 +85,7 @@ def kill_hogs(memory_threshold,
|
|
|
|
|
time.sleep(interval) |
|
|
|
|
for proc in procs: |
|
|
|
|
try: |
|
|
|
|
# First call t0 cpu_percent() without blocking interval is meaningless. |
|
|
|
|
# First call of cpu_percent() without blocking interval is meaningless. |
|
|
|
|
# see https://psutil.readthedocs.io/en/latest/ |
|
|
|
|
proc.cached_cpu_percent = proc.cpu_percent() |
|
|
|
|
proc.cached_memory_percent = proc.memory_percent() |
|
|
|
|