From: Ben Pfaff Date: Fri, 14 Jan 2005 08:23:43 +0000 (+0000) Subject: When a Pintos run times out, report the load average. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4742fa3312bdc0d43cd8a11775c7605a9f57eb5a;p=pintos-anon When a Pintos run times out, report the load average. --- diff --git a/grading/lib/Pintos/Grading.pm b/grading/lib/Pintos/Grading.pm index 860720c..bf6099f 100644 --- a/grading/lib/Pintos/Grading.pm +++ b/grading/lib/Pintos/Grading.pm @@ -401,7 +401,12 @@ sub run_pintos { my ($cmd_line, %args) = @_; my ($retval) = xsystem ($cmd_line, %args); return 'ok' if $retval eq 'ok'; - return "Timed out after $args{TIMEOUT} seconds" if $retval eq 'timeout'; + if ($retval eq 'timeout') { + my ($msg) = "Timed out after $args{TIMEOUT} seconds"; + my ($load_avg) = `uptime` =~ /(load average:.*)$/i; + $msg .= " - $load_avg" if defined $load_avg; + return $msg; + } return 'Error running Bochs' if $retval eq 'error'; die; }