Riformattata mail failed matlab exec
This commit is contained in:
@@ -137,17 +137,18 @@ sub matlabCalc {
|
||||
$matlabOutputError = <$fh>;
|
||||
}
|
||||
close($fh);
|
||||
$matlabOutputError =~ s/\n/<br>/g;
|
||||
my $exit_value = $? >> 8;
|
||||
if ( $exit_value == 124 ) {
|
||||
print getTimeStamp("log")
|
||||
. " - pid $$ >> system @args excessive duration: killed after $matlab_timeout seconds\n";
|
||||
$matlab_error =
|
||||
"Maltab elab excessive duration: killed after $matlab_timeout seconds";
|
||||
"Matlab elab excessive duration: killed after $matlab_timeout seconds";
|
||||
}
|
||||
else {
|
||||
print getTimeStamp("log")
|
||||
. " - pid $$ >> system @args failed: return code $exit_value - $?\n";
|
||||
$matlab_error = "Maltab elab failed: $exit_value - $?";
|
||||
$matlab_error = "Matlab elab failed: $exit_value - $?";
|
||||
}
|
||||
makeEmailMsg();
|
||||
emailSend();
|
||||
@@ -297,38 +298,39 @@ sub getMatlabCmd {
|
||||
|
||||
sub makeEmailMsg {
|
||||
$email_msg = <<"END_MSG";
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Alert from ASE</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
</head>
|
||||
<body style="margin: 0; padding: 0;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse;">
|
||||
<tr>
|
||||
<td align="center" bgcolor="#fff" style="padding: 10px 0 10px 0;">
|
||||
<td align="center">
|
||||
<img src="https://www2.aseltd.eu/img/logo_ASE_small.png" alt="ASE" style="display: block;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#ffffff" style="padding: 10px 10px 10px 10px;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<td align="center">
|
||||
<h1 style="margin: 5px;">Alert from ASE:</h1>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 10px 10px 10px 10px;">
|
||||
Alert from ASE: <BR>
|
||||
Matlab function $matlab_cmd failed on unit => $unit - tool => $tool <BR>
|
||||
$matlabOutputError <BR>
|
||||
$matlab_error
|
||||
<td align="center">
|
||||
<h3 style="margin: 5px;">Matlab function $matlab_cmd failed on unit => $unit - tool => $tool</h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4 style="margin: 5px;">$matlab_error</h4>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td style="padding: 20px;">
|
||||
$matlabOutputError
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user