1NINPATHS(8) InterNetNews Documentation NINPATHS(8)
2
3
4
6 ninpaths - Report Usenet Path: statistics (new inpaths)
7
9 ninpaths -p -d dumpfile
10
11 ninpaths -r site -u dumpfile [-u dumpfile ...] -v level
12
14 This is an efficient and space-saving inpaths reporting program. It
15 works as follows: you feed it the Path: lines via an INN channel feed
16 or some other similar method, and from time to time the program writes
17 all its internal counters accumulated so far to a dump file. Another
18 instance of the program picks up all the dump files, adds them up and
19 formats them into the report. The purpose of the final report is to
20 summarize the frequency of occurrence of sites in the Path: headers of
21 articles.
22
23 Some central sites accumulate the Path: data from many news servers
24 running this program or one like it, and then report statistics on the
25 most frequently seen news servers in Usenet article Path: lines. The
26 sendinpaths script can be run daily to mail the accumulated statistics
27 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 an entry like:
37
38 inpaths!:*:Tc,WP:<pathbin>/ninpaths -p -d <pathlog>/path/inpaths.%d
39
40 if your version of INN supports "WP" (2.0 and later all do).
41 Replace <pathbin> with the full path to your INN binaries
42 directory, and <pathlog> with the full path to your INN log
43 directory.
44
45 Note that the naming convention of the generated inpaths dump files
46 should not be changed. sendinpaths explicitly searches files whose
47 name starts with "inpaths." in the <pathlog>/path directory.
48
49 3. Run the following command to start logging these statistics:
50
51 ctlinnd reload newsfeeds 'inpaths feed setup'
52
53 4. Enter into your news user crontab these two lines:
54
55 6 6 * * * <pathbin>/ctlinnd flush inpaths!
56 10 6 * * * <pathbin>/sendinpaths
57
58 (the actual time doesn't matter). This will force ninpaths to
59 generate a dump file once a day. Then, a few minutes later,
60 sendinpaths collects the dumps, makes a report, sends the collected
61 statistics, and deletes the old dumps.
62
63 Note that you can manually generate a report without mailing it,
64 and without deleting processed dump files, with "sendinpaths -n".
65 Another useful command is "sendinpaths -c" so as to receive a copy
66 of the e-mail sent by sendinpaths and therefore make sure that
67 everything is properly set.
68
69 5. In a couple of days, check that your daily statistics properly
70 appear in <http://top1000.anthologeek.net/>.
71
73 -d dumpfile
74 Save dumps in dumpfile. Any %d in dumpfile will be replaced with
75 the current system time when the dump is made. This option should
76 be used with -p.
77
78 The format of these dump files is described below.
79
80 -p Read Path: lines from standard input.
81
82 -r site
83 Generate a report for site. Generally site should be the value of
84 pathhost from inn.conf.
85
86 -u dumpfile
87 Read data from dumpfile. This option can be repeated to read data
88 from multiple dump files.
89
90 -v level
91 Set the verbosity level of the report. Valid values for level are
92 0, 1, and 2, with 2 being the default.
93
95 The format of the generated dump files is:
96
97 !!NINP <version> <start-time> <end-time> <nb-sites> <nb-articles> <average-time>
98 <site_0> <count_0> <site_1> <count_1> <site_2> <count_2> ...
99 !!NLREC
100 :<site_a>!<site_b>,<count_ab>:<site_c>!<site_d>,<count_cd> ...
101 !!NEND <nb-relations>
102
103 where times are UNIX timestamps. Then, nb-sites records follow. Each
104 record is separated by a space or a new line, and consists of a host
105 name site_n followed by a number of appearances count_n. The number of
106 processed Path: header lines is nb-articles.
107
108 Afterwards, nb-relations relations follow. In 3.0.x versions, the
109 relations are separated by a space or a new line, and their syntax is
110 "site_a!site_b!count_ab" where site_a and site_b are numbers of the
111 site records starting at 0.
112
113 In 3.1.x versions, the relations begin with a colon and are separated
114 by either nothing or a new line. Their syntax is
115 ":site_a!site_b,count_ab" with the same meaning as in previous
116 versions. The count can be omitted when it is 1. More than two sites
117 can be specified in the relation (":site_a!site_b!site_c,count_abc").
118
119 For instance:
120
121 !!NINP 3.1.1 1302944821 1302944838 5 2 1302944826
122 newsgate.cistron.nl 1 news.trigofacile.com 2 news.ecp.fr 2 usenet.stanford.edu 1
123 bleachbot 1
124 !!NLREC
125 :3!2:2!1,2:4!0:0!2
126 !!NLEND 4
127
128 where the two processed Path: headers are:
129
130 Path: news.trigofacile.com!news.ecp.fr!usenet.stanford.edu!not-for-mail
131 Path: news.trigofacile.com!news.ecp.fr!newsgate.cistron.nl!bleachbot!not-for-mail
132
134 If your INN doesn't have the "WP" feed flag (1.5 does not, 1.6 and 1.7
135 do, 2.0 and later all do), use the following newsfeeds entry:
136
137 inpaths!:*:Tc,WH:<pathbin>/ginpaths
138
139 where ginpaths is the following script:
140
141 #!/bin/sh
142 exec egrep '^Path: ' | <pathbin>/ninpaths -p -d <pathlog>/path/inpaths.%d
143
144 replacing <pathbin> and <pathlog> as above.
145
147 This is a slightly modified version of Olaf Titz's original ninpaths
148 program, which is posted to alt.sources and kept on his WWW archive
149 under <http://sites.inka.de/~bigred/sw/>.
150
151 The idea and some implementation details for ninpaths come from the
152 original inpaths program, but most of the code has been rewritten for
153 clarity. This program is in the public domain.
154
155 $Id: ninpaths.pod 9383 2011-12-25 20:56:10Z iulius $
156
158 newsfeeds(5), sendinpaths(8).
159
160
161
162INN 2.6.3 2015-09-12 NINPATHS(8)