From da244e36ac760ea8f93ae1473295dc6f54e804b5 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Fri, 8 Feb 2019 14:25:48 -0800 Subject: [PATCH] Add RAM usage to output. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- fuzzers/run_fuzzer.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fuzzers/run_fuzzer.py b/fuzzers/run_fuzzer.py index c1369cd8..378102be 100755 --- a/fuzzers/run_fuzzer.py +++ b/fuzzers/run_fuzzer.py @@ -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