modificata mail con in vio errori
This commit is contained in:
@@ -53,6 +53,8 @@ my $G201_fcheck = 0;
|
||||
my $D2W_fcheck = 0;
|
||||
my $FtpToCustomerCmd = 'SendFtpElabData.pl';
|
||||
my ( $scriptname, $scriptpath );
|
||||
my $MatlabErrorFilename = "/tmp/";
|
||||
my $matlabOutputError = '';
|
||||
|
||||
sub getTimeStamp
|
||||
{ # parm [ts] => timestamp for filename; log => timestamp for log
|
||||
@@ -116,6 +118,7 @@ sub matlabCalc {
|
||||
. " - pid $$ >> $unit - $tool MatLab calc started...\n";
|
||||
if ( $matlab_cmd =~ /_lnx$/ ) {
|
||||
$matlab_cmd = './run_' . $matlab_cmd . '.sh';
|
||||
$MatlabErrorFilename .= "${unit}${tool}_output_error.txt";
|
||||
|
||||
#print $ENV{"HOME"} . "\n";
|
||||
$ENV{"HOME"} = "/" . $ENV{"HOME"};
|
||||
@@ -126,6 +129,14 @@ sub matlabCalc {
|
||||
my @args =
|
||||
( 'timeout', $matlab_timeout, $matlab_cmd, $matlab_rt, $unit, $tool );
|
||||
if ( system(@args) != 0 ) {
|
||||
open( my $fh, '<', $MatlabErrorFilename )
|
||||
or warn print getTimeStamp("log")
|
||||
. " - pid $$ >> Cannot open Matlab output error file: ${MatlabErrorFilename}\n";
|
||||
{
|
||||
local $/;
|
||||
$matlabOutputError = <$fh>;
|
||||
}
|
||||
close($fh);
|
||||
my $exit_value = $? >> 8;
|
||||
if ( $exit_value == 124 ) {
|
||||
print getTimeStamp("log")
|
||||
@@ -310,6 +321,7 @@ sub makeEmailMsg {
|
||||
<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>
|
||||
</tr>
|
||||
|
||||
@@ -124,7 +124,7 @@ sub trxelab {
|
||||
|
||||
while ( my ( $key, $value ) = each(%ftp_parms) ) {
|
||||
print getTimeStamp("log")
|
||||
. " - pid $$ >> $key = $ftp_parms{$key}\n";
|
||||
. " - pid $$ >> - $key = $ftp_parms{$key}\n";
|
||||
}
|
||||
|
||||
if ( !defined $duedate
|
||||
|
||||
Reference in New Issue
Block a user