1CTLINND(8) InterNetNews Documentation CTLINND(8)
2
3
4
6 ctlinnd - Control the main InterNetNews daemon
7
9 ctlinnd [-hs] [-t timeout] [command [argument ...]]
10
12 ctlinnd sends a message to the control channel of innd(8), the main
13 InterNetNews daemon.
14
15 In the normal mode of behavior, the message is sent to the server,
16 which then performs the requested action and sends back a reply with a
17 text message and an exit code for ctlinnd. If the server successfully
18 performed the command, ctlinnd will print the reply on standard output
19 and exit with a status of zero. If the server could not perform the
20 command, it will direct ctlinnd to exit with a status of one. By
21 default, ctlinnd will wait forever for a response from innd; this can
22 be changed with the -t flag.
23
24 The "shutdown", "xabort", and "xexec" commands do not generate a reply,
25 since they cause innd to exit. After these commands, ctlinnd will
26 always exit silently with a status of zero.
27
29 -h Prints a command summary. If a command is given along with the -h
30 flag, only the usage for that command will be given.
31
32 -s If the command was successful, don't print the output from innd.
33
34 -t timeout
35 Specifies how long to wait for the reply from the server, for
36 commands other than "shutdown", "xabort", and "xexec". timeout is
37 the number of seconds to wait. A value of zero says to wait
38 forever, and a value less than zero says not to wait at all but
39 just exit immediately with status zero. When waiting for a reply,
40 ctlinnd will check every two minutes to be sure the server is still
41 running, to make it less likely that ctlinnd will just hang.
42
43 The default is zero, indicating that ctlinnd should wait forever.
44
46 Here is the complete list of supported commands. Note that nearly all
47 commands have a fixed number of arguments. If a parameter may be an
48 empty string, it is still necessary to pass the empty string to ctlinnd
49 as an argument (specified in the shell as two adjacent quotes, like
50 '').
51
52 addhist message-id arrival expires posted token
53 Add an entry to the history database for message-id. The angle
54 brackets around the message-ID are optional. It should normally be
55 protected from the shell with single quotes.
56
57 arrival, expires, and posted should be the number of seconds since
58 epoch and indicate when the article arrived, when it expires (via
59 the Expires: header), and when it was posted (given in the Date:
60 header), respectively. expires should be 0 if the article doesn't
61 have an Expires: header. token is the storage API token for the
62 article, and may be empty.
63
64 This command can only be used while the server is running, and will
65 be rejected if the server is paused or throttled.
66
67 allow reason
68 Allow remote connections, reversing a prior "reject" command.
69 reason must be the same text given to the "reject" command, or the
70 empty string (which matches any reason).
71
72 begin site
73 Begin feeding site. The server will rescan the newsfeeds file to
74 find the specified site and set up a newsfeed for it. If the site
75 already existed, a "drop" for that site is done first. This
76 command is forwarded; see NOTES below.
77
78 cancel message-id
79 Remove the article with the specified message-ID from the local
80 system. This does not generate a cancel control message; it only
81 affects the local system. The angle brackets around the message-ID
82 are optional. It should normally be protected from the shell with
83 single quotes (and not double quotes). For instance:
84
85 ctlinnd cancel 'test@foo.bar'
86
87 Note that the history database is updated with the specified
88 message-ID so if an article with the same message-ID is afterwards
89 received, it will be rejected; it is useful for rejecting spam
90 before it arrives.
91
92 If the server is throttled manually, this command causes it to
93 briefly open the history database. If the server is paused or
94 throttled for any other reason, this command is rejected.
95
96 changegroup group status
97 The newsgroup group is changed so that its status (the fourth field
98 in the active file) becomes status. This may be used to make an
99 existing group moderated or unmoderated, for example.
100
101 This command, unlike "newgroup" or "rmgroup", can only be used
102 while the server is running, and will be rejected if the server is
103 paused or throttled.
104
105 checkfile
106 Check the syntax of the newsfeeds file and display a message if any
107 errors are found. The details of the errors are reported to
108 syslog.
109
110 drop site
111 Flush and drop site from the server's list of active feeds. This
112 command is forwarded; see NOTES below.
113
114 feedinfo site
115 Print detailed information about the state of the feed to site, or
116 brief status about all feeds if site is the empty string.
117
118 flush site
119 Flush the buffer for the specified site. The action taken depends
120 on the type of feed the site receives; see newsfeeds(5) for more
121 information. This is useful when the site is being fed by a file
122 and batching is about to start, or to cleanly shut down and respawn
123 a channel feed. If site is an empty string, all sites are flushed
124 and the active file and history database are also flushed to disk.
125 This command is forwarded; see NOTES below.
126
127 Flushing the innfeed channel feed is the recommended method of
128 restarting innfeed to pick up new configuration. innd will spawn a
129 new innfeed process while the old process shuts down cleanly.
130
131 flushlogs
132 Close the news and error log files and rename them to add ".old" to
133 the file name, then open fresh news and error logs. The active
134 file and history database are also flushed to disk.
135
136 go reason
137 Re-open the history database and start accepting articles again,
138 reversing a previous "pause" or "throttle" command. reason must be
139 either the empty string or match the text that was given to the
140 earlier "pause" or "throttle" command.
141
142 If a "reject" command is in effect, this will also reverse it by
143 doing the equivalent of an "allow" command if the reason matches
144 reason. Likewise, if a "reserve" command had been given, this will
145 clear the reservation if reason matches the text that was given to
146 "reserve".
147
148 The history database is automatically closed on "throttle" or
149 "pause" and reopened on "go", so the history database can be
150 replaced during the pause or throttle without requiring an explicit
151 "reload" command. If any other configuration files or the active
152 file were modified, a "reload" command should be given to force the
153 server to re-read those files.
154
155 If the server throttled itself because it accumulated too many I/O
156 errors, this command will reset the error count.
157
158 If innd was not started with the -n y flag, this command also does
159 the equivalent of a "readers" command with "yes" as the flag and
160 reason as the text.
161
162 hangup channel
163 Close the socket for the specified incoming channel. This may be
164 useful when an incoming connection appears to be hung (although
165 innd will close idle connections automatically after a timeout).
166
167 help [command]
168 Print a command summary for all commands, or just command if one is
169 specified. This is equivalent to the -h option.
170
171 kill signal site
172 Signal signal is sent to the process underlying the specified site,
173 which must be a channel or exploder feed. signal may be a numeric
174 signal number or one of "hup", "int", or "term"; case is not
175 significant.
176
177 logmode
178 Cause the server to log its current operating mode to syslog.
179
180 lowmark file
181 Reset the low water marks in the active file based on the contents
182 of file. Each line in file must be of the form:
183
184 group low-value
185
186 For example:
187
188 comp.lang.c++ 243
189
190 This command is mostly used by news.daily to update the active file
191 after nightly expiration.
192
193 mode
194 Print the server's operating mode as a multi-line summary of the
195 parameters and the operating state. The parameters in the output
196 correspond to command-line flags to innd and give the current
197 settings of those parameters that can be overridden by command-line
198 flags.
199
200 name channel
201 Print the name and relevant information for the given incoming or
202 outgoing channel, or for all channels if channel is an empty
203 string. The response is formatted as:
204
205 <name>:<number>:<type>:<idle>:<status>
206
207 where <name> is the name of the channel, <number> is its number
208 (generally the same as the file descriptor assigned to it), <idle>
209 is the idle time for an NNTP channel or the process ID for a
210 process channel, and <status> is the status for NNTP channels.
211
212 The type is one of the following values:
213
214 control Control channel for ctlinnd
215 file An outgoing file feed
216 localconn Local channel used by nnrpd and rnews for posting
217 nntp NNTP channel for remote connections
218 proc The process for a process feed
219 remconn The channel that accepts new remote connections
220
221 Channel status indicates whether the channel is paused or not.
222 Nothing is shown unless the channel is paused, in which case
223 "paused" is shown. A channel will be paused automatically if the
224 number of remote connections for that label in incoming.conf is
225 greater than max-connections within hold-time seconds.
226
227 newgroup group [status [creator]]
228 Create the specified newsgroup. The status parameter is the fourth
229 field of the active file entry, as described in active(5). If it
230 is not an equal sign, only the first character is used. creator
231 should be the identity of the person creating the group. If the
232 newsgroup already exists, this is equivalent to the "changegroup"
233 command.
234
235 creator, encoded in UTF-8 if given, may be omitted; if so, it will
236 default to the newsmaster (as specified at configure time, normally
237 "usenet"). status may also be omitted; if so, it will default to
238 "y" (a normal, unmoderated group). The combination of defaults
239 make it possible to use the text of the Control: header directly
240 (although don't do this without checking the syntactic validity of
241 the header first).
242
243 This command can only be done while the server is running or
244 throttled manually. It will update its internal state when a "go"
245 command is sent. This command updates the active.times file as
246 well. This command is forwarded; see NOTES below.
247
248 param letter value
249 Change the specified server parameter. letter is the innd command-
250 line option to set and value is the new value. For example:
251
252 ctlinnd param i 5
253
254 would direct the server to allow only five incoming connections.
255 To enable or disable the action of the -n flag, use "n" for the
256 letter and "y" or "n", respectively, for the value.
257
258 The supported values for letter are "a", "c", "H", "i", "l", "n",
259 "o", "T", "t", and "X".
260
261 pause reason
262 Pause the server so that no incoming articles are accepted. No
263 existing connections are closed, but the history database is
264 closed. This should be used for short-term locks, such as when
265 replacing the history database. If the server was not started with
266 the -n y flag, this command also does the equivalent of a "readers"
267 command with "no" as the flag and reason as the text, encoded in
268 UTF-8.
269
270 perl flag
271 Enable or disable Perl filtering. This command is only available
272 if INN was built with Perl filtering support. If flag starts with
273 "y", filtering is enabled; if it starts with "n", filtering is
274 disabled.
275
276 python flag
277 Enable or disable Python filtering. This command is only available
278 if INN was built with Python filtering support. If flag starts
279 with "y", filtering is enabled; if it starts with "n", filtering is
280 disabled.
281
282 readers flag text
283 Allow or disallow readers. If flag starts with the letter "n",
284 then reading is disallowed by causing the server to pass text as
285 the value of the -r flag to nnrpd. If flag starts with the letter
286 "y" and text is either an empty string or the same string, encoded
287 in UTF-8, that was used when reading was disabled, reading will be
288 re-enabled.
289
290 This command has no effect if nnrpd is being run separately rather
291 than spawned by innd.
292
293 reject reason
294 Remote connections (those that would not be handed off to nnrpd)
295 are rejected with reason given as the explanation, encoded in
296 UTF-8. Existing connections are not closed.
297
298 reload what reason
299 Update the in-memory copy of server configuration files. what
300 identifies what should be reloaded, and reason is reported to
301 syslog in the message noting the reload.
302
303 There is no way to reload inn.conf, storage.conf, or other
304 configuration files for the storage or overview backends. To pick
305 up changes to those files, use "ctlinnd xexec innd" to restart
306 innd.
307
308 If what is the empty string or the word "all", everything is
309 reloaded. If it is the word "history", the history database is
310 closed and re-opened. If it is the word "incoming.conf", the
311 corresponding file is reloaded. If it is the word "active" or
312 "newsfeeds", both the active and newsfeeds files are reloaded,
313 which will also cause all outgoing feeds to be flushed and
314 restarted.
315
316 If what is the word "filter.perl", the filter_innd.pl file is
317 reloaded. If the Perl filter defined a function
318 "filter_before_reload", it will be called prior to re-reading
319 filter_innd.pl. If the Perl function "filter_after_reload" is
320 defined, it will be called after filter_innd.pl has been reloaded.
321 Reloading the Perl filter does not enable filtering if it has been
322 disabled; use "perl y" to do this instead. startup_innd.pl cannot
323 be reloaded. This file is not available for reloading unless INN
324 was compiled with Perl filtering support.
325
326 If what is the word "filter.python", the filter_innd.py file is
327 reloaded. If a Python method named "filter_before_reload" exists,
328 it will be called prior to re-reading filter_innd.py. If a Python
329 method named "__init__" exists, it will be called after
330 filter_innd.py has been reloaded. Reloading the Python filter does
331 not enable filtering if it has been disabled; use "python y" to do
332 this. This file is not available for reloading unless INN was
333 compiled with Python filtering support.
334
335 renumber group
336 Update the low water and high water marks for group in the active
337 file based on the information in the overview database. Regardless
338 of the contents of the overview database, the high water mark will
339 not be decreased. (Decreasing it may cause duplicate article
340 numbers to be assigned after a crash, which can cause serious
341 problems with the tradspool storage method.) If group is the empty
342 string, all newsgroups are renumbered. Renumber only works if
343 overview data has been created (if enableoverview is set to true in
344 inn.conf).
345
346 renumberlow file
347 Identical to the "lowmark" command.
348
349 reserve reason
350 Require the next "pause" or "throttle" command to use reason as its
351 reason, encoded in UTF-8. This reservation is cleared by giving an
352 empty string for the reason. This is used by programs like expire
353 to coordinate pauses and throttles of the server and avoid
354 trampling on other instances of themselves.
355
356 rmgroup group
357 Remove the specified newsgroup. The group is removed from the
358 active file and its overview information is purged, making it
359 immediately unavailable to readers. Unlike the "newgroup" command,
360 this command does not update the active.times file.
361
362 This command can only be done while the server is running or
363 throttled manually. This command is forwarded; see NOTES below.
364
365 send feed text
366 The specified text is sent as a control line to the exploder feed.
367
368 shutdown reason
369 The server is shut down, with the specified reason recorded in the
370 log and sent to all open connections. It is a good idea to send a
371 "throttle" command first so that feeds can be shut down more
372 gracefully.
373
374 If Perl or Python filtering is compiled in and enabled, certain
375 functions are called at "throttle" or "shutdown" (to save filter
376 state to disk, for example). Consult the embedded filter
377 documentation for details.
378
379 stathist (off | filename)
380 Enable or disable generation of history performance statistics. If
381 the parameter is "off", no statistics are gathered. Otherwise,
382 statistics are written to the specified file. A parser for this
383 file is provided in the contrib tree of the INN distribution.
384
385 status (off | interval)
386 Adjust the frequency with which innd reports status information to
387 syslog. Status reporting is turned off if "off" or 0 is given as
388 the argument. Otherwise, status will be reported every interval
389 seconds. See status in inn.conf(5) for information on how to set
390 the default.
391
392 throttle reason
393 Close all existing incoming connections and outgoing feeds and
394 reject new connections. Close the history database. This should
395 be used for long-term locks or for running a large number of
396 "newgroup" and "rmgroup" commands without restarting all outgoing
397 feeds between each one. (Note that changing the status of existing
398 newsgroups when the server is throttled cannot be done.)
399
400 If the server was not started with the -n y flag, then this command
401 also does the equivalent of a "readers" command with "no" as the
402 flag and reason as the text, encoded in UTF-8.
403
404 timer (off | interval)
405 Adjust the frequency with which innd reports performance
406 information to syslog. Performance monitoring is turned off if
407 "off" or 0 is given as the argument. Otherwise, statistics will be
408 reported every interval seconds to syslog. See timer in
409 inn.conf(5) for information on how to set the default.
410
411 trace item flag
412 Turn tracing on or off for the specified item. flag should start
413 with the letter "y" or "n" to turn tracing on or off, respectively.
414 If item starts with a number, tracing is set up for the specified
415 innd channel, which must be an incoming NNTP feed. If it starts
416 with the letter "i", general innd tracing is turned on or off. If
417 it starts with the letter "n", future nnrpd processes spawned by
418 "innd" will or will not be passed the -t flag, as appropriate.
419 This will not affect any nnrpd processes already running, or nnrpd
420 processes started by some means other than innd.
421
422 xabort reason
423 Log the specified reason and then abort. On most systems, this
424 will cause innd to dump a core file. This is only useful for
425 debugging.
426
427 xexec path
428 Shut down the server, but then rather than exiting, exec innd with
429 all of its original arguments except for -r. path may be either
430 "innd" or an empty string, both of which are equivalent. Any other
431 value is an error.
432
433 This is the easiest way to start a new copy of innd after upgrading
434 or reload configuration files that can't be reloaded via the
435 "reload" command.
436
438 In addition to being acted on by the server, certain commands can be
439 forwarded to an appropriate child process. If the site receiving the
440 command is an exploder (such as buffchan) or a funnel that feeds into
441 an exploder, the command can be forwarded. In this case, the server
442 will send a command line to the exploder that consists of the ctlinnd
443 command name. If the site funnels into an exploder that has an
444 asterisk ("*") in its "W" flag (see newsfeeds(5) for more information
445 on feed specifications), the site name will be appended to the command;
446 otherwise, no argument is appended.
447
449 ctlinnd uses Unix domain sockets on most systems to communicate with
450 innd and is therefore limited by whatever maximum packet size the
451 operating system imposes on Unix domain datagrams. This may mean that
452 server replies are limited to 4 KB on some systems.
453
455 Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. Rewritten
456 in POD by Russ Allbery <rra@stanford.edu>.
457
458 $Id: ctlinnd.pod 8804 2009-11-15 09:29:51Z iulius $
459
461 active(5), active.times(5), buffchan(8), incoming.conf(5), innd(8),
462 inndcomm(3), inn.conf(5), newsfeeds(5), nnrpd(8).
463
464
465
466INN 2.5.2 2010-08-11 CTLINND(8)