Merge pull request #636 from litghost/add_ram_usage_stats

Add RAM usage to output.
This commit is contained in:
litghost 2019-02-13 18:59:09 -08:00 committed by GitHub
commit 2a752de674
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -277,6 +277,10 @@ class PsTree:
return "{}\n{}".format(stdout, stderr)
def get_memory():
return subprocess.check_output('free -mh', shell=True).decode("utf-8")
def should_run_submake(make_flags):
"""Check if make_flags indicate that we should execute things.
@ -474,8 +478,9 @@ def run_fuzzer(fuzzer_name, fuzzer_dir, fuzzer_logdir, logger, will_retry):
if retcode is not None:
break
log(
"Still running (1m:{:0.2f}%, 5m:{:0.2f}%, 15m:{:0.2f}%).\n{}",
"Still running (1m:{:0.2f}%, 5m:{:0.2f}%, 15m:{:0.2f}%). {}\n{}",
*get_load(),
get_memory(),
PsTree.get(p.pid),
)
except (Exception, KeyboardInterrupt, SystemExit):