formattato
This commit is contained in:
@@ -21,9 +21,9 @@ my $server = 'localhost';
|
|||||||
my $db_name = "ase_lar";
|
my $db_name = "ase_lar";
|
||||||
my $table = "RAWDATACOR";
|
my $table = "RAWDATACOR";
|
||||||
my ( @CSVData, @sql );
|
my ( @CSVData, @sql );
|
||||||
my $outcount = 0;
|
my $outcount = 0;
|
||||||
my $outfilenum = 0;
|
my $outfilenum = 0;
|
||||||
my $maxsqllines = 10000;
|
my $maxsqllines = 10000;
|
||||||
my (
|
my (
|
||||||
$tool, $toolbatt, $tooltemp, $tooltype, @channels,
|
$tool, $toolbatt, $tooltemp, $tooltype, @channels,
|
||||||
@NewData, @ain, @din, @nodetype, $GDEventDate
|
@NewData, @ain, @din, @nodetype, $GDEventDate
|
||||||
@@ -49,8 +49,8 @@ my $email_addr =
|
|||||||
'andrea.carri@aseltd.eu,edoardo.cavalca@aseltd.eu,alessandro.battilani@gmail.com,alessandro.valletta@aseltd.eu';
|
'andrea.carri@aseltd.eu,edoardo.cavalca@aseltd.eu,alessandro.battilani@gmail.com,alessandro.valletta@aseltd.eu';
|
||||||
my $from = 'ASE Alert System<alert@aseltd.eu>';
|
my $from = 'ASE Alert System<alert@aseltd.eu>';
|
||||||
my ( $email_msg, $email_obj );
|
my ( $email_msg, $email_obj );
|
||||||
my $G201_fcheck = 0;
|
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 );
|
||||||
|
|
||||||
@@ -162,12 +162,17 @@ sub matlabCalc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub trxelab {
|
sub trxelab {
|
||||||
my $user = getpwuid($>);
|
my $user = getpwuid($>);
|
||||||
my $ftpcmd = "$scriptpath$FtpToCustomerCmd -m \"$matlab_timestamp\" -u $unit -t $tool >> /home/$user/log/loadcsvdata.log 2>&1";
|
my $ftpcmd =
|
||||||
print getTimeStamp("log")
|
"$scriptpath$FtpToCustomerCmd -m \"$matlab_timestamp\" -u $unit -t $tool >> /home/$user/log/loadcsvdata.log 2>&1";
|
||||||
|
print getTimeStamp("log")
|
||||||
. " - pid $$ >> Fork FTP command to set GID mysql: $ftpcmd.\n";
|
. " - pid $$ >> Fork FTP command to set GID mysql: $ftpcmd.\n";
|
||||||
|
|
||||||
exec('/usr/bin/sg', 'mysql', "$ftpcmd");
|
unless ( fork() ) {
|
||||||
|
exec( '/usr/bin/sg', 'mysql', "$ftpcmd" );
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getNodesType {
|
sub getNodesType {
|
||||||
|
|||||||
Reference in New Issue
Block a user