projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab40756
)
When a Pintos run times out, report the load average.
author
Ben Pfaff
<blp@cs.stanford.edu>
Fri, 14 Jan 2005 08:23:43 +0000
(08:23 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Fri, 14 Jan 2005 08:23:43 +0000
(08:23 +0000)
grading/lib/Pintos/Grading.pm
patch
|
blob
|
history
diff --git
a/grading/lib/Pintos/Grading.pm
b/grading/lib/Pintos/Grading.pm
index 860720c0750e3bf5e6a526e431bbb9cad04c56c8..bf6099f74e9540eb8fe468ae2c44a099085b8ac2 100644
(file)
--- 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;
}