Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have configured nfsen on Ubuntu. After that I configured PortTracker plugin but database files cannot be initialized.

 #cd /usr/local/src
 #wget http://sourceforge.net/projects/nfdump/files/stable/nfdump-1.6.1/nfdump-1.6.1.tar.gz
 #tar xzfv nfdump-1.6.1.tar.gz
 # cd nfdump-1.6.1
 #./configure --prefix /usr --enable-nfprofile --enable-nftrack
 #make
 #make install

Making a directory for the nftrack data

# mkdir -p /var/log/netflow/porttracker
# chown www-data /var/log/netflow/porttracker

Setting the nftrack data directory in the PortTracker.pm module:

#vi /usr/local/src/nfsen-1.3.5/etc/nfsen-dist.conf 

   my $PORTSDBDIR = "/data/ports-db";

and changed it to:

my $PORTSDBDIR = "/var/log/netflow/porttracker";

Installing the plugins into the NFSen distribution

Dell-System-Inspiron-N4110:/usr/local/src/nfsen-1.3.5# cp contrib/PortTracker/PortTracker.pm /data/nfsen/plugins/
Dell-System-Inspiron-N4110:/usr/local/src/nfsen-1.3.5# cp contrib/PortTracker/PortTracker.php /var/www/nfsen/plugins/

Adding the plugin definition to the nfsen-dist.conf configuration

# vi /usr/local/src/nfsen-1.3.5/etc/nfsen-dist.conf 

@plugins = (
[ 'live', 'PortTracker'],
);

Re-running the installation

#./install.pl etc/nfsen-dist.conf

Initializing portracker database files

# sudo -u www-data nftrack -I -d /var/log/netflow/porttracker

Output

sudo: nftrack: command not found

Log

Sep 20 13:30:15 Dell-System-Inspiron-N4110 nfsen[24723]: PortTracker run: Profile: live, Time: 201209201325
Sep 20 13:30:15 Dell-System-Inspiron-N4110 nfsen[24723]: /usr/local/bin/nftrack -M /data/nfsen/profiles-data/live/Router -r nfcapd.20120
9201325 -d /var/log/netflow/porttracker -A -t 201209201325 -s -p -w /var/log/netflow/porttracker/portstat.txt
Sep 20 13:30:15 Dell-System-Inspiron-N4110 nfsen[24723]: Failed to execute nftrack: No such file or directory
Sep 20 13:30:15 Dell-System-Inspiron-N4110 nfsen[24723]: /usr/local/bin/nftrack -d /var/log/netflow/porttracker -S -p -w /var/log/netflo
w/porttracker/portstat24.txt
Sep 20 13:30:15 Dell-System-Inspiron-N4110 nfsen[24723]: Failed to execute nftrack: No such file or directory
Sep 20 13:30:15 Dell-System-Inspiron-N4110 nfsen[24723]: PortTracker run: Done.
Sep 20 13:30:15 Dell-System-Inspiron-N4110 nfsen[24723]: Cmd Decode: quit
Sep 20 13:30:15 Dell-System-Inspiron-N4110 nfsen[3191]: Run plugins done.

What should I do?

share|improve this question

1 Answer 1

At last I have solved this problem. To run nftrack -I -d /var/log/netflow/porttracker command, you must go /path/to/nfsenx.x.x/bin. Then run this command and It should work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.