2013-09-02 13:14:33 +02:00
|
|
|
NewsStats 0.1 (c) 2010-2013 Thomas Hochstein <thh@inter.net>
|
2010-09-17 21:16:51 +02:00
|
|
|
|
2013-08-11 22:44:08 +02:00
|
|
|
NewsStats is a software package used to gather statistical information
|
|
|
|
from a live Usenet feed and for its subsequent examination.
|
2010-09-17 21:16:51 +02:00
|
|
|
|
|
|
|
This script package is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Public License as published by
|
|
|
|
the Free Software Foundation.
|
|
|
|
|
|
|
|
---------------------------------------------------------------------
|
|
|
|
|
|
|
|
INSTALLATION INSTRUCTIONS
|
|
|
|
|
|
|
|
1) Install the scripts
|
|
|
|
|
|
|
|
* Download the current version of NewsStats from
|
|
|
|
<http://th-h.de/download/scripts.php>.
|
|
|
|
|
|
|
|
* Untar it into a directory of your choice:
|
|
|
|
|
|
|
|
# tar -xzf newsstats-nn.tar.gz
|
|
|
|
|
2012-10-13 01:36:17 +02:00
|
|
|
Scripts in this path - at least feedlog.pl - should be executable by the
|
|
|
|
news user.
|
2010-09-17 21:16:51 +02:00
|
|
|
|
|
|
|
2) Configuration
|
|
|
|
|
|
|
|
* Copy the sample configuration file newsstats.conf.sample to
|
|
|
|
newsstats.conf and modify it for your purposes:
|
|
|
|
|
2013-09-04 11:25:02 +02:00
|
|
|
# cp etc/newsstats.conf.sample etc/newsstats.conf
|
|
|
|
# vim etc/newsstats.conf
|
2010-09-17 21:16:51 +02:00
|
|
|
|
|
|
|
a) Mandatory configuration options
|
|
|
|
|
|
|
|
* DBDriver = mysql
|
|
|
|
Database driver used; currently only mysql is supported.
|
2013-09-04 11:25:02 +02:00
|
|
|
|
2010-09-17 21:16:51 +02:00
|
|
|
* DBHost = localhost
|
|
|
|
The host your mysql server is running on.
|
|
|
|
|
|
|
|
* DBUser =
|
|
|
|
The username to connect to the database server.
|
|
|
|
|
2013-09-04 11:25:02 +02:00
|
|
|
* DBPw =
|
2010-09-17 21:16:51 +02:00
|
|
|
Matching password for your username.
|
|
|
|
|
|
|
|
* DBDatabase = newsstats
|
|
|
|
Database name.
|
|
|
|
|
|
|
|
NewsStats will use those credentials to connect to your mysql
|
|
|
|
installation.
|
|
|
|
|
|
|
|
* DBTableRaw = raw_de
|
|
|
|
Table holding raw statistical data.
|
|
|
|
|
|
|
|
* DBTableGrps = groups_de
|
|
|
|
Table holding data on postings per group.
|
|
|
|
|
|
|
|
b) Optional configuration options
|
|
|
|
|
|
|
|
* TLH = de
|
|
|
|
Limit examination to that top-level hierarchy.
|
2013-09-04 11:25:02 +02:00
|
|
|
|
2010-09-17 21:16:51 +02:00
|
|
|
3) Database (mysql) setup
|
|
|
|
|
|
|
|
* Setup your database server with a username, password and
|
|
|
|
database matching the NewsStats configuration (see 2 a).
|
|
|
|
|
|
|
|
* Start the installation script:
|
2013-09-04 11:25:02 +02:00
|
|
|
|
2010-09-17 21:16:51 +02:00
|
|
|
# install/install.pl
|
|
|
|
|
2013-09-04 11:25:02 +02:00
|
|
|
It will setup the necessary database tables and display some
|
2010-09-17 21:16:51 +02:00
|
|
|
information on the next steps.
|
|
|
|
|
|
|
|
4) Feed (INN) setup
|
|
|
|
|
|
|
|
You have to setup an INN feed to feedlog.pl.
|
|
|
|
|
|
|
|
* Edit your 'newsfeeds' file and insert something like
|
|
|
|
|
|
|
|
## gather statistics for NewsStats
|
2012-10-13 01:36:17 +02:00
|
|
|
newsstats!\
|
|
|
|
:!*,de.*\
|
2010-09-17 21:16:51 +02:00
|
|
|
:Tc,WmtfbsPNH,Ac:/path/to/feedlog.pl
|
|
|
|
|
|
|
|
* You should only feed that hierarchy (those hierarchies ...) to
|
|
|
|
feedlog.pl you'll want to cover with your statistical
|
|
|
|
examination. It may be a good idea to setup different feeds (to
|
|
|
|
different databases ...) for different hierarchies.
|
|
|
|
|
|
|
|
* Please double check that your path to feedlog.pl is correct and
|
|
|
|
feedlog.pl can be executed by the news user
|
|
|
|
|
|
|
|
* Check your 'newsfeeds' syntax:
|
|
|
|
|
|
|
|
# ctlinnd checkfile
|
|
|
|
|
|
|
|
* Reload 'newsfeeds':
|
|
|
|
|
|
|
|
# ctlinnd reload newsfeeds 'Adding newsstats! feed'
|
|
|
|
|
|
|
|
* Watch your 'news.notice' and 'errlog' files:
|
|
|
|
|
|
|
|
# tail -f /var/log/news/news.notice
|
|
|
|
...
|
|
|
|
# tail -f /var/log/news/errlog
|
|
|
|
|
|
|
|
Everything should be going smoothly now.
|
|
|
|
|
|
|
|
* If INN is spewing error messages to 'errlog' or reporting
|
2012-10-13 01:36:17 +02:00
|
|
|
continous respawns of feedlog.pl to 'news.notice', stop your feed:
|
2010-09-17 21:16:51 +02:00
|
|
|
|
|
|
|
# ctlinnd drop 'newsstats!'
|
|
|
|
|
|
|
|
and investigate. 'errlog' may be helpful here.
|
|
|
|
|
|
|
|
* You can restart the feed with
|
|
|
|
|
|
|
|
# ctlinnd begin 'newsstats!'
|
|
|
|
|
|
|
|
later.
|
|
|
|
|
|
|
|
You should be done now.
|
|
|
|
|
|
|
|
Just have a look at your raw data (DBTableRaw). It should now start to
|
|
|
|
fill up.
|
|
|
|
|