
= IPTV-collector daemon =

The IPTV-collector daemon is part of the IPTV-analyzer project.

The IPTV-collector daemon is written in Perl.  To follow through on
the Perl path, we use a Perl CPAN style MakeMaker setup.

The basic command to produce a makefile is:

 perl Makefile.PL


== INSTALLATION ==

To install this module type the following:

  perl Makefile.PL
  make
  make install

To install this software/module in a controllable fashion, I recommend
using 'stow'.  Using stow requires the ability to install the binaries
to an alternative path.   Use the following commands:

  perl Makefile.PL PREFIX=/usr/local/
  make
  make install PREFIX=/usr/local/stow/iptv-collector-0.3.x

The stow part:

  cd /usr/local/stow/
  stow iptv-collector-0.3.x


== DAEMON ==

The collector daemon is call 'iptv-collector'.

Its simply started by calling 'iptv-collector', which will
automatically spawn a daemon process.

The daemon can be restarted by simple starting another
'iptv-collector' process, which will detect and kill the other daemon
process.  The reason this is implemented, is because we cannot allow
two collector processes to operating at the same time, as they would
record drop count twice into the database.

TODO: Describe the pid file perms problem


=== CONFIG FILES ===

The iptv-collector daemon depends on two config files:

  /etc/iptv-analyzer/collector.conf

and

  /etc/log4perl.conf

Example/sample config files are available under "etc" directory.


== DEPENDENCIES ==

The dependencies will hopefully be detected for you when generating
the makefile.

=== Debian packages ===

The following Debian packages are needed by the collector daemon:

* libproc-daemon-perl
* libproc-pid-file-perl
* libconfig-file-perl
* libdata-compare-perl
   (libnumber-compare-perl libtext-glob-perl libfile-find-rule-perl)
* libdbi-perl
   (libnet-daemon-perl  libplrpc-perl)
* libdbd-mysql-perl
* liblog-log4perl-perl
   (libipc-shareable-perl liblog-dispatch-perl  libparams-validate-perl)
* mysql-client
* mysql-server
* liblog-dispatch-perl (for email extention to Log4perl)
* libnet-snmp-perl

== COPYRIGHT AND LICENCE ==

Copyright (C) 2009-2013 by Jesper Dangaard Brouer <netoptimizer@brouer.com>

This software is licensed under the terms of the GNU General Public
License 2.0. or newer. See <http://www.gnu.org/licenses/gpl-2.0.html>.
