invoke runner without screen + add log file

This commit is contained in:
2026-04-18 11:36:47 +02:00
parent 959c9a8bee
commit b141ba1e38

View File

@ -34,6 +34,7 @@ my $remote_root = '/home/lab/smchurla/Documents/failnix';
my $remote_db_conf = "$remote_root/db.conf";
my $remote_builds_dir = "$remote_root/builds";
my $remote_runner = "$remote_root/scripts/runner.pl";
my $remote_log = "$remote_root/runner.log";
# The mars db is bound to local port 3306 over SSH.
# - This requires using the configured 'mars'
@ -111,15 +112,22 @@ foreach (@experiments) {
}
# Kill old screen session (don't check success as a session might not exist)
say "Killing previous screen session with name $screen_name";
$ssh->system( "screen", "-XS", $screen_name, "quit" );
# say "Killing previous screen session with name $screen_name";
# $ssh->system( "screen", "-XS", $screen_name, "quit" );
# Start new screen session
my $invoke_runner = "perl " . shell_quote($remote_runner);
say
"Starting new screen session with name $screen_name and command $invoke_runner";
remote( $ssh, "screen", "-dmS", $screen_name, "sh", "-lc",
"exec $invoke_runner" );
# my $invoke_runner =
# "cd " . shell_quote($remote_root) . " && perl " . shell_quote($remote_runner);
# say
# "Starting new screen session with name $screen_name and command $invoke_runner";
# remote( $ssh, "screen", "-dmS", $screen_name, "sh", "-lc",
# "exec $invoke_runner" );
remote( $ssh,
"nohup sh -c "
. shell_quote("cd $remote_root && perl $remote_runner") . " >"
. shell_quote($remote_log)
. " 2>&1 < /dev/null &" );
say "Started remote runner for ", scalar(@experiments), " experiments";