Commit e2c71224 authored by Mac Newbold's avatar Mac Newbold

Include swap settings in the email when we start/swapin an expt.

parent 6c8103a1
......@@ -181,6 +181,24 @@ my $estate = $row{'state'};
my $expt_path = $row{'path'};
my $expt_name = $row{'expt_name'};
my $expt_created= $row{'expt_created'};
my $swappablebit= $row{'swappable'};
my $idleswapbit = $row{'idleswap'};
my $autoswapbit = $row{'autoswap'};
my $swappable = ( $row{'swappable'} ? "Yes" : "No" );
my $idleswap = ( $row{'idleswap'} ? "Yes" : "No" );
my $autoswap = ( $row{'autoswap'} ? "Yes" : "No" );
my $noswap = $row{'noswap_reason'};
my $noidleswap = $row{'noidleswap_reason'};
my $idleswaptime= $row{'idleswap_timeout'} / 60.0;
my $autoswaptime= $row{'autoswap_timeout'} / 60.0;
my $swapsettings =
#"Name: $expt_name\n" .
"Swappable: $swappable".($swappablebit ? "\n" : " (Reason: '$noswap')\n").
"Idle-Swap: $idleswap".
($idleswapbit ? ", at $idleswaptime hours\n" : " (Reason: '$noidleswap')\n").
"Auto-Swap: $autoswap".
($autoswapbit ? ", at $autoswaptime hours\n" : "\n");
if ($estate ne EXPTSTATE_NEW) {
die("*** $0:\n".
......@@ -334,13 +352,13 @@ $message .=
"PID: $pid\n" .
"GID: $gid\n" .
"Name: $expt_name\n" .
$swapsettings .
"Created: $expt_created\n" .
"Directory: $expt_path\n".
"\n".
"Appended at the end is the output of the experiment setup. If you\n" .
"have any questions or comments, please include the output below\n" .
"in your message to $TBOPS";
SENDMAIL("$user_name <$user_email>",
"New Experiment " . (($frontend == 0) ? "Created" : "Preloaded") .
......
......@@ -203,6 +203,25 @@ my $estate = $hashrow{'state'};
my $expt_path = $hashrow{'path'};
my $isbatchexpt = $hashrow{'batchmode'};
my $ebatchstate = $hashrow{'batchstate'};
my $swappablebit= $row{'swappable'};
my $idleswapbit = $row{'idleswap'};
my $autoswapbit = $row{'autoswap'};
my $swappablestr= ( $row{'swappable'} ? "Yes" : "No" );
my $idleswapstr = ( $row{'idleswap'} ? "Yes" : "No" );
my $autoswapstr = ( $row{'autoswap'} ? "Yes" : "No" );
my $noswap = $row{'noswap_reason'};
my $noidleswap = $row{'noidleswap_reason'};
my $idleswaptime= $row{'idleswap_timeout'} / 60.0;
my $autoswaptime= $row{'autoswap_timeout'} / 60.0;
my $swapsettings =
#"Name: $expt_name\n" .
"Swappable: $swappablestr".
($swappablebit ? "\n" : " (Reason: '$noswap')\n").
"Idle-Swap: $idleswapstr".
($idleswapbit ? ", at $idleswaptime hours\n" : " (Reason: '$noidleswap')\n").
"Auto-Swap: $autoswapstr".
($autoswapbit ? ", at $autoswaptime hours\n" : "\n");
if (! chdir($workdir)) {
die("*** $0:\n".
......@@ -565,6 +584,11 @@ else {
$message .= "$action.\n";
}
if ($inout eq "in") {
# Add the swap settings...
$message .="\nCurrent swap settings:\n$swapsettings";
}
$message .=
"\n".
"Appended below is the output. If you have any questions or comments,\n" .
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment