Skip to content

Commit

Permalink
Fix #5 CYCLETIME
Browse files Browse the repository at this point in the history
  • Loading branch information
phaag committed Feb 10, 2023
1 parent 2d9df0c commit 6e52f80
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2023-02-10
- Fix #5 - CYCLETIME.

2022-12-22
- Re-vitalize NfSen on github. Adapt for nfdump-1.7.x

2017-01-19
- Fix Security Vulenrability - which may execute arbitrary commands from the web interface.
- Support rrdtools 1.6
Expand Down
8 changes: 6 additions & 2 deletions libexec/NfSenRC.pm
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ sub StartCollector {
my $buffer_opts = $NfConf::BUFFLEN ? "-B $NfConf::BUFFLEN" : "";
my $subdirlayout = $NfConf::SUBDIRLAYOUT ? "-S $NfConf::SUBDIRLAYOUT" : "";
my $pidfile = "$NfConf::PIDDIR/p${port}.pid";
my $twin = "-t 300";
my $extensions = "";
if ( $nfdump_version == 6 ) {
$extensions = $NfConf::EXTENSIONS ? $NfConf::EXTENSIONS : "";
Expand All @@ -95,7 +96,10 @@ sub StartCollector {
}

my $ziparg = $NfConf::ZIPcollected ? '-y' : '';
my $common_args = "-D -p $port -u $uid -g $gid $buffer_opts $subdirlayout -P $pidfile $ziparg $extensions";
if ( defined $NfConf::CYCLETIME ) {}

This comment has been minimized.

Copy link
@thezoggy

thezoggy Feb 11, 2023

Contributor

looks like bogus } that broke this file

This comment has been minimized.

Copy link
@phaag

phaag Feb 11, 2023

Author Owner

Ohh - thanks! - Sometimes I hate IDEs :)

$twin = "-t " . $NfConf::CYCLETIME;
}
my $common_args = "-D -p $port -u $uid -g $gid $buffer_opts $subdirlayout -P $pidfile $ziparg $extensions $twin";
my $src_args;
my $optargs = '';
if ( scalar @SourceList > 1 ) {
Expand Down Expand Up @@ -221,7 +225,7 @@ sub NfSen_start {
NfSen::CleanOrphans();

# Decide how many collectors to start.
# nfcapd 1.6.x can handle several sources at the same port
# nfcapd can handle several sources at the same port
my %AllCollectors;
foreach my $source ( sort keys %NfConf::sources ) {
my $port = $NfConf::sources{$source}{'port'};
Expand Down

0 comments on commit 6e52f80

Please sign in to comment.