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