Update documentation.

- Fix clientstats doc (copied from hoststats).
- Add some more examples ro README.

Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
Thomas Hochstein 2025-06-01 16:39:25 +02:00
parent 0b87e81b08
commit 66890b68d8
11 changed files with 329 additions and 263 deletions

View file

@ -1,11 +1,12 @@
NewsStats (c) 2010-2013, 2025 Thomas Hochstein <thh@thh.name>
NewsStats is a software package used to gather statistical information
from a live Usenet feed and for its subsequent examination.
NewsStats is a software package that can be used to collect
statistical information from a live Usenet feed and then analyze it
to create statistical reports.
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.
This 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.
---------------------------------------------------------------------
@ -16,9 +17,10 @@ INSTALLATION INSTRUCTIONS
* Download the current version of NewsStats from
<https://th-h.de/net/software/newsstats/>.
* Untar it into a directory of your choice:
* Untar it into a directory of your choice, i.e. /srv/newsstats:
# tar -xzf newsstats-nn.tar.gz
$ cd /srv
$ tar -xzf newsstats-n.n.n.tar.gz
Scripts in this path - at least feedlog.pl - should be executable by the
news user.
@ -28,8 +30,8 @@ INSTALLATION INSTRUCTIONS
* Copy the sample configuration file newsstats.conf.sample to
newsstats.conf and modify it for your purposes:
# cp etc/newsstats.conf.sample etc/newsstats.conf
# vim etc/newsstats.conf
$ cp etc/newsstats.conf.sample etc/newsstats.conf
$ vim etc/newsstats.conf
a) Mandatory configuration options
@ -60,6 +62,9 @@ INSTALLATION INSTRUCTIONS
* DBTableHosts = hosts_de
Table holding data on postings per server.
* DBTableClnts = clients_de
Table holding data on postings per client.
b) Optional configuration options
* TLH = de.alt,news.admin
@ -68,19 +73,21 @@ INSTALLATION INSTRUCTIONS
3) Database (mysql) setup
* Setup your database server with a username, password and
database matching the NewsStats configuration (see 2 a).
* Setup your database server with an username, a password and
(optionally) a database matching the NewsStats configuration
(see 2 a).
* Start the database creation script:
# bin/dbcreate.pl
$ bin/dbcreate.pl
It will setup the necessary database tables and display some
information on the next steps.
It will create the database (if not already present), create the
necessary database tables and display some information on the
next steps.
4) Feed (INN) setup
You have to setup an INN feed to feedlog.pl.
You have to set up an INN feed to feedlog.pl.
* Edit your 'newsfeeds' file and insert something like
@ -90,39 +97,39 @@ INSTALLATION INSTRUCTIONS
: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.
feedlog.pl that you want to cover with your statistical analysis.
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
$ ctlinnd checkfile
* Reload 'newsfeeds':
# ctlinnd reload newsfeeds 'Adding newsstats! feed'
$ 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/news.notice
...
# tail -f /var/log/news/errlog
$ tail -f /var/log/news/errlog
Everything should be going smoothly now.
* If INN is spewing error messages to 'errlog' or reporting
continous respawns of feedlog.pl to 'news.notice', stop your feed:
# ctlinnd drop 'newsstats!'
$ ctlinnd drop 'newsstats!'
and investigate. 'errlog' may be helpful here.
* You can restart the feed with
# ctlinnd begin 'newsstats!'
$ ctlinnd begin 'newsstats!'
later.