G802
This commit is contained in:
@@ -28,10 +28,11 @@ my (
|
||||
$tool, $toolbatt, $tooltemp, $tooltype, @channels,
|
||||
@NewData, @ain, @din, @nodetype, $GDEventDate
|
||||
);
|
||||
my $matlab_ip = "160.78.21.71";
|
||||
my $matlab_cmd = "matlab.cmd";
|
||||
my $matlab_timestamp = "";
|
||||
my $ftp_send = 1;
|
||||
my $matlab_proxy_ssh = "80.211.107.201";
|
||||
my $matlab_proxy_ssh_port = 2222;
|
||||
my $matlab_cmd = "";
|
||||
my $matlab_timestamp = "";
|
||||
my $ftp_send = 1;
|
||||
my $ftp_addrs;
|
||||
my $ftp_user;
|
||||
my $ftp_passwd;
|
||||
@@ -133,12 +134,15 @@ sub matlabCalc {
|
||||
|
||||
#print $ENV{"HOME"} . "\n";
|
||||
$ENV{"HOME"} = "/" . $ENV{"HOME"};
|
||||
chdir($matlab_func_dir)
|
||||
or die "cannot change: $!\n";
|
||||
|
||||
#chdir($matlab_func_dir)
|
||||
# or die "cannot change: $!\n";
|
||||
print getTimeStamp("log")
|
||||
. " - pid $$ >> current dir: $matlab_func_dir\n";
|
||||
my @args =
|
||||
( 'timeout', $matlab_timeout, $matlab_cmd, $matlab_rt, $unit, $tool );
|
||||
my @args = (
|
||||
'cd', $matlab_func_dir, '; timeout', $matlab_timeout,
|
||||
$matlab_cmd, $matlab_rt, $unit, $tool
|
||||
);
|
||||
if ( system(@args) != 0 ) {
|
||||
open( my $fh, '<', $MatlabErrorFilename )
|
||||
or warn print getTimeStamp("log")
|
||||
@@ -171,18 +175,6 @@ sub matlabCalc {
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$matlab_cmd = 'matlab_' . uc $matlab_cmd . '.cmd';
|
||||
my @out_matlab = `ssh1 $matlab_ip 'cmd /c $matlab_cmd ' $tool`;
|
||||
if ( index( $out_matlab[-1], "Failure" ) != -1 ) {
|
||||
print getTimeStamp("log")
|
||||
. " - pid $$ >> $unit - $tool MatLab calc failed.\n";
|
||||
makeEmailMsg();
|
||||
emailSend();
|
||||
print getTimeStamp("log") . " - pid $$ >> Execution ended.\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
print getTimeStamp("log")
|
||||
. " - pid $$ >> $unit - $tool MatLab calc executed.\n";
|
||||
|
||||
@@ -461,6 +453,13 @@ while ( my $line = <FILE> ) {
|
||||
. " - pid $$ >> Found $tooltype tool name: $tool\n";
|
||||
getNodesType();
|
||||
}
|
||||
elsif ( defined $info[5] && $info[5] =~ m/^DT\d\d\d\d$/i ) {
|
||||
$tool = uc $info[5];
|
||||
$tooltype = uc $info[4];
|
||||
print getTimeStamp("log")
|
||||
. " - pid $$ >> Found $tooltype tool name: $tool\n";
|
||||
getNodesType();
|
||||
}
|
||||
elsif ( defined $info[2] && $info[2] =~ m/^LOC\d*$/i ) {
|
||||
$tool = uc $info[2];
|
||||
$tooltype = 'LOC';
|
||||
|
||||
Reference in New Issue
Block a user