|
|
@@ -531,14 +531,14 @@ my $nmin = int($min/10)*10;
|
|
|
my $netflow_file_name = $netflow_file_path.sprintf "%04d%02d%02d-%02d%02d.csv",$year+1900,$month+1,$day,$hour,$nmin;
|
|
|
if ($saved_netflow{$dev_id} and scalar @{$saved_netflow{$dev_id}}) {
|
|
|
use File::Path;
|
|
|
- make_path($netflow_file_path);
|
|
|
+ File::Path::make_path($netflow_file_path);
|
|
|
if ( -e $netflow_file_name) {
|
|
|
open (ND,">>$netflow_file_name") || die("Error open file $netflow_file_name!!! die...");
|
|
|
binmode(ND,':utf8');
|
|
|
} else {
|
|
|
open (ND,">$netflow_file_name") || die("Error open file $netflow_file_name!!! die...");
|
|
|
binmode(ND,':utf8');
|
|
|
- print ND join(';',"time","device_id","proto","snmp_in","snmp_out","src_ip","dst_ip","xsrc_ip","xdst_ip","src_port","dst_port","octets","pkts")."\n";
|
|
|
+ print ND join(';',"time","proto","snmp_in","snmp_out","src_ip","dst_ip","xsrc_ip","xdst_ip","src_port","dst_port","octets","pkts")."\n";
|
|
|
}
|
|
|
foreach my $row (@{$saved_netflow{$dev_id}}) {
|
|
|
next if (!$row);
|