From 9472f247e88074731ef7153e5ab858364ad9501d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Kr=C3=BCger?= Date: Fri, 5 Nov 2010 03:13:45 +0100 Subject: [PATCH] jobd: in progress output, show list of running jobs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Currently, progress will simply show the same thing over and over again if all running processes are busy for a long time. Instead, show which ones they are and for how long we've been running them. Signed-off-by: Jan Krüger --- jobd/jobd.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jobd/jobd.pl b/jobd/jobd.pl index b82d054..236b7cf 100755 --- a/jobd/jobd.pl +++ b/jobd/jobd.pl @@ -211,6 +211,13 @@ sub run_queue { $queue_steps++; unless (($quiet && !$progress) || ($queue_steps % 10)) { printf STDERR "STATUS: %d queued, %d running, %d finished, %d killed\n", scalar(@queue), scalar(@running), $jobs_executed, scalar(@jobs_killed); + if (@running) { + my @run_status; + for (@running) { + push @run_status, _jobname($_)." for ". (time - $_->{'started_at'}) ."s"; + } + error("STATUS: currently running: ". join(', ', @run_status)); + } } next; } -- 2.11.4.GIT