1BATCHER(8) System Manager's Manual BATCHER(8)
2
3
4
6 batcher - article-batching backend for InterNetNews
7
9 batcher [ -a arts ] [ -A total_arts ] [ -b size ] [ -B total_size ] [
10 -i string ] [ -N num_batches ] [ -p process ] [ -r ] [ -s separator ] [
11 -S alt_spool ] [ -v ] host [ input ]
12
14 Batcher reads uses a list of files to prepare news batches for the
15 specified host. It is normally invoked by a script run out of cron(8)
16 that uses shlock(1) to lock the host name, followed by a ctlinnd(8)
17 command to flush the batchfile.
18
19 Batcher reads the named input file, or standard input if no file is
20 given. Relative pathnames are interpreted from the <pathoutgoing in
21 inn.conf> directory. The input is taken as a sequence of lines; blank
22 lines and lines starting with a number sign (``#'') are ignored. All
23 other lines should consist of one or two fields separated by a single
24 space. The first field is either the storage token of an article or
25 the name of a file holding an article; if it is not an an absolute
26 pathname or storage token, it is taken relative to <patharti‐
27 cles in inn.conf>. The second field, if present, specifies the size of
28 the article in bytes.
29
31 -S alt_spool
32 The ``-S'' flag may be used to specify an alternate spool direc‐
33 tory to use if the article is not found; this would perhaps be
34 an NFS-mounted spool directory of a master server with longer
35 expiration times.
36
37 -r By default, the program reports errors to
38 <pathlog in inn.conf>/errlog. To suppress this redirection and
39 report errors to standard error, use the ``-r'' flag.
40
41 -v Upon exit, batcher reports statistics via syslog(3). If the
42 ``-v'' flag is used, they will also be printed on the standard
43 output.
44
45 -b size
46 Batcher collects the text of the named articles into batches.
47 To limit the size of each batch, use the ``-b'' flag. The
48 default size is 60 kilobytes. Using ``-b 0'' allows unlimited
49 batch sizes.
50
51 -a arts
52 To limit the number of articles in each batch, use the ``-a''
53 flag. The default is no limit. A new batch will be started
54 when either the byte count or number of articles written exceeds
55 the specified limits.
56
57 -B total_size
58 To limit the total number of bytes written for all batches, use
59 the ``-B'' flag.
60
61 -A total_arts
62 To limit the total number of articles that can be batched use
63 the ``-A'' flag.
64
65 -N num_batches
66 To limit the total number of batches that should be created use
67 the ``-N'' flag.
68
69 In all three of the above cases, the default is zero, that is,
70 no limit.
71
72 -i string
73 A batch starts with an identifying line to specify the unpacking
74 method to be used on the receiving end. When the ``-i'' flag is
75 used, the initial string, string, followed by a newline, will be
76 output at the start of every batch. The default is to have no
77 initial string.
78
79 -s separator
80 Each article starts with a separator line to indicate the size
81 of the article. To specify the separator use the ``-s'' flag.
82 This is a sprintf(3) format string which can have a single
83 ``%ld'' parameter which will be given the size of the article.
84 If the separator is not empty, then the string and a newline
85 will be output before every article. The default separator is
86 ``#! rnews %ld''.
87
88 -p process
89 By default, batches are written to standard output, which is not
90 useful when more than one output batch is created. Use the
91 ``-p'' flag to specify the shell command that should be created
92 (via popen(3)) whenever a new batch is started. The process is
93 a sprintf(3) format string which can have a single ``%s'' param‐
94 eter which will be given the host name. A common value is:
95
96 ( echo '#! cunbatch' ; exec compress ) | uux - -r -z %s!rnews
97
99 If the input is exhausted, batcher will exit with a zero status. If
100 any of the limits specified with the ``-B'', ``-A'', or ``-N'' flags is
101 reached, or if there is an error writing the batch, then batcher will
102 try to spool the remaining input, copying it to a file. If there was
103 no input filename, standard input will be copied to <pathoutgoing in
104 inn.conf>/host and the program will exit. If an input filename was
105 given, the input will be copied to a temporary file named input.bch (if
106 input is an absolute pathname) or <pathoutgoing in inn.conf>/input.bch
107 (if the filename does not begin with a slash). Once the input is
108 copied, batcher will try to rename this temporary file to be the name
109 of the input file, and then exit.
110
111 Upon receipt of an interrupt or termination signal, batcher will finish
112 sending the current article, close the batch, and then rewrite the
113 batchfile according as described in the previous paragraph.
114
116 Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is
117 revision 6491, dated 2003-10-18.
118
120 ctlinnd(8), inn.conf(5), newsfeeds(5), shlock(1).
121
122
123
124 BATCHER(8)