From ec57aaf3d5ace6c7457f96fbd4839cfc16fab0e8 Mon Sep 17 00:00:00 2001 From: Alessandro Battilani Date: Wed, 6 Jan 2021 10:39:50 +0100 Subject: [PATCH] Riformattata mail failed matlab exec --- LoadCSVData.pl | 70 ++++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/LoadCSVData.pl b/LoadCSVData.pl index 5cddb49..a4ef483 100755 --- a/LoadCSVData.pl +++ b/LoadCSVData.pl @@ -137,17 +137,18 @@ sub matlabCalc { $matlabOutputError = <$fh>; } close($fh); + $matlabOutputError =~ s/\n/
/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,41 +298,42 @@ sub getMatlabCmd { sub makeEmailMsg { $email_msg = <<"END_MSG"; - + - - - Alert from ASE - + + + Alert from ASE + - - - - -
- - - - - - - -
- ASE -
- - - - -
- Alert from ASE:
- Matlab function $matlab_cmd failed on unit => $unit - tool => $tool
- $matlabOutputError
- $matlab_error -
-
-
+ + + + + + + + + + + + + + + + +
+ ASE +
+

Alert from ASE:

+
+

Matlab function $matlab_cmd failed on unit => $unit - tool => $tool

+
+

$matlab_error

+
+ $matlabOutputError +
END_MSG