Add RAM usage to output.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
Keith Rothman 2019-02-08 14:25:48 -08:00
parent 51100d0ced
commit da244e36ac
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,9 +478,10 @@ 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{}\n{}",
*get_load(),
PsTree.get(p.pid),
get_memory(),
)
except (Exception, KeyboardInterrupt, SystemExit):
retcode = -1