From e0eb5d8734ab345ba90e32cc15739eb8044eaad7 Mon Sep 17 00:00:00 2001 From: Alessandro Battilani Date: Thu, 23 Dec 2021 18:15:02 +0100 Subject: [PATCH] tolta esecuzione remota - raccolta errori x mail --- LoadCSVData.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/LoadCSVData.pl b/LoadCSVData.pl index 3d1f12f..b7340e4 100755 --- a/LoadCSVData.pl +++ b/LoadCSVData.pl @@ -57,7 +57,8 @@ my $G301_fcheck = 0; my $CR1000X_fcheck = 0; my $FtpToCustomerCmd = 'SendFtpElabData.pl'; my ( $scriptname, $scriptpath ); -my $MatlabErrorFilename = "/tmp/"; +my $MatlabErrorPath = "/tmp/"; +my $MatlabErrorFilename = $MatlabErrorPath; my @matlabOutputErrorArray; my @errors; my @warnings; @@ -142,10 +143,13 @@ sub matlabCalc { #my $args = "sh -c \'cd $matlab_func_dir; pwd; $cmd_elab\'"; - my $args = -"ssh $matlab_exec_user\@$matlab_proxy_ssh -p $matlab_proxy_ssh_port \"sh -c \'cd $matlab_func_dir; $cmd_elab\'\""; + my $args = 'cd $matlab_func_dir; $cmd_elab'; if ( system($args) != 0 ) { + my $argscat = +"cd $MatlabErrorPath; cat _${unit}_${tool}*_\*_output_error.txt > ${unit}${tool}_output_error.txt"; + system($argscat); + open( my $fh, '<', $MatlabErrorFilename ) or warn print getTimeStamp("log") . " - pid $$ >> Cannot open Matlab output error file: ${MatlabErrorFilename}\n";