1NINPATHS(8)               InterNetNews Documentation               NINPATHS(8)
2
3
4

NAME

6       ninpaths - Report Usenet Path header field statistics (new inpaths)
7

SYNOPSIS

9       ninpaths -p -d dumpfile
10
11       ninpaths -r site -u dumpfile [-u dumpfile ...] -v level
12

DESCRIPTION

14       This is an efficient and space-saving inpaths reporting program.  It
15       works as follows: you feed it the Path header fields via an INN channel
16       feed or some other similar method, and from time to time the program
17       writes all its internal counters accumulated so far to a dump file.
18       Another instance of the program picks up all the dump files, adds them
19       up and formats them into the report.  The purpose of the final report
20       is to summarize the frequency of occurrence of sites in the Path header
21       fields of articles.
22
23       Some central sites accumulate the Path header field data from many news
24       servers running this program or one like it, and then report statistics
25       on the most frequently seen news servers in Usenet article Path header
26       fields.  The sendinpaths script can be run daily to mail the
27       accumulated statistics to such a site and remove the old dump files.
28
29       You can get a working setup by doing the following:
30
31       1.  Create a directory at pathlog/path (replacing pathlog here and in
32           all steps that follow with the full path to your INN log
33           directory).  Do not change the name of the "path" subdirectory
34           because it is used by sendinpaths.
35
36       2.  Set up a channel feed using a newsfeeds entry like:
37
38               inpaths!\
39                   :*\
40                   :Tc,WP:<pathbin>/ninpaths -p -d <pathlog>/path/inpaths.%d
41
42           if your version of INN supports "WP" (2.0 and later all do).
43           Replace <pathbin> with the full path to your INN binaries
44           directory, and <pathlog> with the full path to your INN log
45           directory.
46
47           Note that the naming convention of the generated inpaths dump files
48           should not be changed.  sendinpaths explicitly searches files whose
49           name starts with "inpaths." in the <pathlog>/path directory.
50
51       3.  Run the following command to start logging these statistics:
52
53               ctlinnd reload newsfeeds 'inpaths feed setup'
54
55       4.  Enter into your news user crontab these two lines:
56
57               6   6 * * *   <pathbin>/ctlinnd flush inpaths!
58               10  6 * * *   <pathbin>/sendinpaths
59
60           (the actual time doesn't matter).  This will force ninpaths to
61           generate a dump file once a day.  Then, a few minutes later,
62           sendinpaths collects the dumps, makes a report, sends the collected
63           statistics, and deletes the old dumps.
64
65           Note that you can manually generate a report without mailing it,
66           and without deleting processed dump files, with "sendinpaths -n".
67           Another useful command is "sendinpaths -c" so as to receive a copy
68           of the e-mail sent by sendinpaths and therefore make sure that
69           everything is properly set.
70
71       5.  In a couple of days, check that your daily statistics properly
72           appear in <http://top1000.anthologeek.net/>.
73

OPTIONS

75       -d dumpfile
76           Save dumps in dumpfile.  Any %d in dumpfile will be replaced with
77           the current system time when the dump is made.  This option should
78           be used with -p.
79
80           The format of these dump files is described below.
81
82       -p  Read Path header fields from standard input.
83
84       -r site
85           Generate a report for site.  Generally site should be the value of
86           pathhost from inn.conf.
87
88       -u dumpfile
89           Read data from dumpfile.  This option can be repeated to read data
90           from multiple dump files.
91
92       -v level
93           Set the verbosity level of the report.  Valid values for level are
94           0, 1, and 2, with 2 being the default.
95

DUMP FILE FORMAT

97       The format of the generated dump files is:
98
99          !!NINP <version> <start-time> <end-time> <nb-sites> <nb-articles>
100              <average-time>
101          <site_0> <count_0> <site_1> <count_1> <site_2> <count_2> ...
102          !!NLREC
103          :<site_a>!<site_b>,<count_ab>:<site_c>!<site_d>,<count_cd> ...
104          !!NEND <nb-relations>
105
106       where times are UNIX timestamps.  Then, nb-sites records follow.  Each
107       record is separated by a space or a new line, and consists of a host
108       name site_n followed by a number of appearances count_n.  The number of
109       processed Path header fields is nb-articles.
110
111       Afterwards, nb-relations relations follow.  In 3.0.x versions, the
112       relations are separated by a space or a new line, and their syntax is
113       "site_a!site_b!count_ab" where site_a and site_b are numbers of the
114       site records starting at 0.
115
116       In 3.1.x versions, the relations begin with a colon and are separated
117       by either nothing or a new line.  Their syntax is
118       ":site_a!site_b,count_ab" with the same meaning as in previous
119       versions.  The count can be omitted when it is 1.  More than two sites
120       can be specified in the relation (":site_a!site_b!site_c,count_abc").
121
122       For instance:
123
124           !!NINP 3.1.1 1302944821 1302944838 5 2 1302944826
125           newsgate.cistron.nl 1 news.trigofacile.com 2 news.ecp.fr 2
126               usenet.stanford.edu 1
127           bleachbot 1
128           !!NLREC
129           :3!2:2!1,2:4!0:0!2
130           !!NLEND 4
131
132       where the two processed Path header fields are:
133
134           Path: news.trigofacile.com!news.ecp.fr!usenet.stanford.edu
135               !not-for-mail
136           Path: news.trigofacile.com!news.ecp.fr!newsgate.cistron.nl
137               !bleachbot!not-for-mail
138

NOTES

140       If your INN doesn't have the "WP" feed flag (1.5 does not, 1.6 and 1.7
141       do, 2.0 and later all do), use the following newsfeeds entry:
142
143          inpaths!:*:Tc,WH:<pathbin>/ginpaths
144
145       where ginpaths is the following script:
146
147           #!/bin/sh
148           exec egrep '^Path: ' \
149               | <pathbin>/ninpaths -p -d <pathlog>/path/inpaths.%d
150
151       replacing <pathbin> and <pathlog> as above.
152

HISTORY

154       This is a slightly modified version of Olaf Titz's original ninpaths
155       program, which is posted to alt.sources and kept on his WWW archive
156       under <http://sites.inka.de/~bigred/sw/>.
157
158       The idea and some implementation details for ninpaths come from the
159       original inpaths program, but most of the code has been rewritten for
160       clarity.  This program is in the public domain.
161

SEE ALSO

163       newsfeeds(5), sendinpaths(8).
164
165
166
167INN 2.7.1                         2023-03-07                       NINPATHS(8)
Impressum