delete oldest netflow current files

This commit is contained in:
alejandro.campos@artica.es 2024-03-15 14:19:46 +01:00
parent a31f96314f
commit 41b5cb3aa3
1 changed files with 4 additions and 0 deletions

View File

@ -1493,4 +1493,8 @@ if (defined($history_dbh)) {
db_disconnect ($history_dbh) if defined ($history_dbh); db_disconnect ($history_dbh) if defined ($history_dbh);
db_disconnect ($dbh); db_disconnect ($dbh);
# Delete netflow's .current junk files.
my $command = 'ls -t /var/spool/pandora/data_in/netflow/*.current* | head -n -1 | xargs rm -f';
system($command) == 0 or die " [ERROR] Failed to clean .current junk files: $!\n";
exit 0; exit 0;