INNDUCT(8)
π innduct β INNDUCT(8) π
System Manager's Manual β¨ bestie edition, no cap β¨
πΈ NAME πΈ
innduct β stream Usenet articles to a remote site, fast and reliably, periodt π
π¦ SYNOPSIS π¦
innduct [options] site [fqdn]
β¨ DESCRIPTION β¨
okay so listen. innduct implements NNTP peer-to-peer news transmission including the streaming extensions, for sending news articles to a remote site. It's meant to be the glow-up replacement for innfeed or nntpsend and innxmit. π
You run one instance of innduct for each peer site. That's the whole vibe. Each instance manages its own interaction with innd, including flushing the feed as appropriate, etc., so that articles get transmitted quickly, and it also manages the retransmission of its own backlog. And yes bestie, innduct includes the locking necessary to avoid multiple simultaneous invocations β because two of them fighting over the same feed is not the move. π
By default, innduct reads the default feedfile corresponding to the site site (ie pathoutgoing/site) and feeds it via NNTP, streaming if possible, to the host fqdn. If fqdn is not specified, it defaults to site. Simple. Iconic. π«
innduct daemonises after argument parsing, and all logging (including error messages) are sent to syslog (facility news).
The best way to runinnductis probably to periodically invoke it for each feed (e.g. fromcron), passing the-qoption to arrange thatinnductsilently exits if an instance is already running for that site. πβ¨
π GENERAL OPTIONS π
-f,--feedfile=DIR/|PATHβ Specifies the feedfile to read, and indirectly specifies the paths to be used for various associated files (see FILES, below). If specified asDIR/it is taken as a directory to use, and the actual feed file used ispath/site. IfPATHorDIRdoes not start with a/, it is taken to be relative topathoutgoingfrominn.conf. The default issite. π-q,--quiet-multipleβ Makesinnductsilently exit (with status0) if anotherinnductholds the lock for the site. Without-q, this causes a fatal error to be logged and a nonzero exit. π€«--no-daemonβ Do not daemonise.innductruns in the foreground, but otherwise operates normally (logging to syslog, etc.). πΆβοΈ--interactiveβ Do not daemonise.innductruns in the foreground and all messages (including all debug messages) are written to stderr rather than syslog. A control command line is also available on stdin/stdout. ποΈ--no-streamingβ Do not try to use the streaming extensions to NNTP (for use eg if the peer can't cope when we sendMODE STREAM). π«π--no-filemonβ Do not try to use the file change monitoring support to watch for writes byinndto the feed file; poll it instead. (If file monitoring is not compiled in, this option just downgrades the log message which warns about this situation.) π-C,--inndconf=FILEβ ReadFILEinstead of the defaultinn.conf. π--port=PORTβ Connect to portPORTat the remote site rather than to the NNTP port (119). π--chdir=PATHRUNβ Change directory topathrunat startup. The default ispathrunfrominn.conf. π--cli=CLI-DIR/|CLI-PATH|noneβ Listen for control command line connections onCLI-DIR/site(if the value ends with a/) orCLI-PATH(if it doesn't). See CONTROLLING INNDUCT, below. Note that there is a fairly short limit on the lengths ofAF_UNIXsocket pathnames. If specified asCLI-DIR/, the directory will be created with mode700if necessary. The default isinnduct/which means to create that directory inPATHRUNand listen onPATHRUN/innduct/site. π--helpβ Just print a brief usage message and list of the options to stdout. π
See TUNING OPTIONS below for more options. π₯
π CONTROLLING INNDUCT π
If you tell innd to drop the feed, innduct will (when it notices, which will normally be the next time it decides to flush) finish up the articles it has in hand now, and then exit. It is harmless to cause innd to flush the feed (but innduct won't notice and flushing won't start a new feedfile; you have to leave that to innduct). π§Ή
If you want to stop innduct you can send it SIGTERM or SIGINT, or the stop control command, in which case it will report statistics so far and quickly exit. If innduct receives SIGKILL nothing will be broken or corrupted; you just won't see some of the article stats. π (not the scary kind of π, promise)
innduct listens on an AF_UNIX socket (by default, pathrun/innduct/site), and provides a command-line interface which can be used to trigger various events and for debugging. When a connection arrives, innduct writes a prompt, reads commands a line at a time, and writes any output back to the caller. (Everything uses unix line endings.) The cli can most easily be accessed with a program like netcat-openbsd (eg nc.openbsd -U /var/run/news/innduct/site) or socat. The prompt is site|. π«Ά
The following control commands are supported:
hβ Print a list of all the commands understood. This list includes undocumented commands which mess withinnduct's internal state and should only be used by a developer in conjuction with theinnductsource code. π§βοΈflushβ Start a new feed file and trigger a flush of the feed. (Or, cause theFLUSH-FINISH-PERIODto expire early, forcibly completing a previously started flush.) π½β¨stopβ Log statistics and exit. (Same effect asSIGTERMorSIGINT.) βlogstatsβ Log statistics so far and zero the stats counters. Stats are also logged periodically, when an input file is completed and just before tidy termination. πshowβ Writes summary information aboutinnduct's state to the current CLI connection. ποΈdump q|aβ Writes the same information aboutinnduct's state to a plain text filefeedfile_dump. This overwrites any previous dump.innductdoes not ever delete these dump files.dump qgives a summary including general state and a list of connections;dump aalso includes information about each articleinnductis dealing with. ποΈπnext blscanβ Requests thatinnductrescan for new backlog files at the nextPERIODpoll. Normallyinnductassumes that any backlog files dropped in by the administrator are not urgent, and it may not get around to noticing them forBACKLOG-SCAN-PERIOD. πnext connβ Resets the connection startup delay counter so thatinnductmay consider making a new connection to the peer right away, regardless of the setting ofRECONNECT-PERIOD. A connection attempt will still only be made ifinnductfeels that it needs one, andinnductmay wait up toPERIODbefore actually starting the attempt. π
β¨ to be continued, bestie β more parts incoming β¨
<h2>β¨ TUNING OPTIONS β¨</h2>
okay bestie real talk β you should not normally need to touch any of these. Like, they're here, they exist, they're gorgeous, but if you're fiddling with them you probably have a reason. π§
Time intervals can be written as plain seconds, or as a number followed by one of these units: s m h d, sec min hour day, das hs ks Ms. π
--max-connections=maxβ caps how many simultaneous NNTP connections you're allowed to have per peer atmax. There's no global limit on connections across all innducts, because each site's instances are completely independent from each other. The default is10.--max-queue-per-conn=per-conn-maxβ caps how many outstanding articles can be queued up on any single connection, atmax. (Heads up: non-streaming connections can literally only handle one article at a time, so yeah.) The default is200.--max-queue-per-file=maxβ caps how many articles get read into core from any one input file, atmax. The default is twiceper-conn-max.--feedfile-flush-size=bytesβ tells innduct to flush the feed and start a fresh feedfile once the current one goes overbytesin size. The vibe: innduct tries to keep all those batchfiles from growing way past this size. The default is100000.--period-interval=PERIOD-INTERVALβ sets the wakeup interval and the period granularity. innduct wakes up everyPERIOD-INTERVALto do its lil housekeeping checks π§Ή. Also, lots of the timeout and rescan intervals (the ones this manual callsPERIOD) get rounded up to the next multiple ofPERIOD-INTERVAL. The default is30s.--connection-timeout=TIMEβ how long a connection setup attempt gets before we give up on it. The default is200s.--stuck-flush-timeout=TIMEβ how long we wait for innd to respond to a flush request before we give up. The default is100s.--feedfile-poll=TIMEβ how often we poll the feedfile for new articles written by innd, if file monitoring (inotify or equivalent) isn't available. (When file monitoring is available, there's no need for periodic checks β we wake up immediately whenever the feedfile changes. β¨) The default is5s.--no-check-proportion=PERCENTβ if the moving average of the proportion of articles the peer is accepting (instead of declining) goes above this value, innduct flips into "no check mode" β meaning it just yeets the articles at the peer withTAKETHISinstead of checking first withCHECKwhether the article is even wanted. This only affects streaming connections, fyi. The default is95(that's 95%).--no-check-response-time=ARTICLESβ that moving average mentioned above is an alpha-smoothed value with a half-life ofARTICLES. The default is100.--reconnect-interval=RECONNECT-PERIODβ limits starting new connections to one perRECONNECT-PERIOD. This applies both to reconnections when the peer has been down, and to ramping up how many connections we're using after startup or in response to an article flood. π The default is1000s.--flush-retry-interval=PERIODβ if our attempt to flush the feed failed (usually because innd isn't running, oops), try again afterPERIOD. The default is1000s.--earliest-deferred-retry=PERIODβ when the peer answers our article offer with a431or436NNTP response code, which means the article's already been offered to it by another one of its peers and we should try again, we wait at leastPERIODbefore offering that article again. The default is100s.--backlog-rescan-interval=BACKLOG-SCAN-PERIODβ we scan the directory containing the feedfile for backlog files at least everyBACKLOG-SCAN-PERIOD, just in case the administrator manually dropped a file in there for processing. π The default is300s.--max-flush-interval=PERIODβ we flush the feed and start a new feedfile at least everyPERIOD, even if the current feedfile instance never hit the size threshold. The default is100000s.--flush-finish-timeout=FLUSH-FINISH-PERIODβ if we flushedFLUSH-FINISH-PERIODago and we're still trying to finish processing articles that were written to the old feed file, we forcibly and violently make sure we can finish that old feed file: we abandon and defer all the work. That includes unceremoniously dropping any connections where we sent some of those articles but never got replies back, because they're probably stuck somehow. π The default is2000s.--idle-timeout=PERIODβ connections with no activity forPERIODget closed. This includes connections where we've sent commands or articles but haven't gotten the responses yet, so this same value doubles as the timeout after which we decide the peer is unresponsive or the connection has gone broken. The default is1000s.--stats-log-interval=PERIODβ log statistics at least everyPERIOD. The default is2500s.--low-volume-thresh=WIN-THRESH --low-volume-window=PERIODβ if innduct has only one connection to the peer, and has processed fewer thanWIN-THRESHarticles in the lastPERIOD, and also zero articles in the lastPERIOD-INTERVAL, it'll close the connection quickly. So basically innduct switches into a mode where it opens a connection for each article (or, like, each handful of articles that arrive together π). The default is to close if fewer than3articles in the last1000s.--max-bad-input-data-ratio=PERCENTβ we tolerate up to this proportion of badly-formatted lines in the feedfile and other input files. Every badly-formatted line gets logged, but if there are too many, we conclude the corruption of our on-disk data is too severe and crash; to restart successfully after that, administrator intervention is required. This keeps the logs from getting flooded with warnings, and also makes it abort earlyish if someone tries to process a file in the wrong format. We need to tolerate a small proportion of broken lines, if for no other reason than a crash might leave a half-blanked-out entry. The default is1(that's 1%).--max-bad-input-data-init=LINESβ additionally, we tolerate this many extra badly-formatted lines, so that if the bad lines are only a few but they're right at the start of the file, we don't crash immediately. The default is30(which would be enough to ignore one whole corrupt4096-byte disk block filled with random data, or one corrupt1024-byte disk block filled with an inappropriate text file with a mean line length of at least35).
<h2>π INNDUCT VS INNFEED/NNTPSEND/INNXMIT π</h2>
innfeedβ does roughly the same thing as innduct. However, the way it receives info from innd can result in articles being lost (like, never offered to peers) if innfeed crashes for any reason. This is an inherent defect in the innd channel feed protocol, not an innfeed skill issue. innduct uses a file feed, constantly "tailing" the feed file, and where it's implemented it usesinotify(2)to cut down the latency you'd get from having to constantly poll the feed file. innduct is way smaller and simpler β under5klocversus innfeed's ~25kloc. innfeed needs a separate helper script or similar infrastructure (there's an example in its manpage), whereas innduct can just be run directly and doesn't need help from shell scripts. However, innfeed can feed multiple peers from a single innfeed instance, whereas each innduct process handles exactly one peer.nntpsendβ processes feed files in batch mode. Meaning: you have to periodically invoke nntpsend, and when you do, the feed gets flushed and the articles that arrived before the flush get sent to the peer. This introduces a batching delay, and it also means the NNTP connection to the peer has to be remade at every batch. nntpsend (which uses innxmit) cannot make use of multiple connections to a single peer site. However, nntpsend automatically figures out which sites need feeding by looking inpathoutgoing, whereas the administrator has to arrange to invoke innduct separately for each peer.innxmitβ is the actual NNTP feeder program used by nntpsend.
Here's the showdown π:
- realtime feed β
innfeed: Yes Β·innduct: Yes Β·nntpsend/innxmit: No - reliable β
innfeed: No Β·innduct: Yes Β·nntpsend/innxmit: Yes - source code size β
innfeed:24klocΒ·innduct:4.6klocΒ·nntpsend/innxmit:1.9kloc - invoke once for all sites β
innfeed: Yes Β·innduct: No Β·nntpsend/innxmit: Yes - number of processes β
innfeed: one Β·innduct:1/siteΒ·nntpsend/innxmit:2/site, intermittently
<h2>π EXIT STATUS π</h2>
0β An instance of innduct is already running for this feedfile and-qwas specified.4β The feed has been dropped by innd, and we (or previous innducts) have successfully offered all the old articles to the peer site. Our work is done. π8β innduct was invoked with bad options or command line arguments. The error message gets printed to stderr, and also (if any options or arguments were passed at all) to syslog with severitycrit.12β Things are going wrong. Hopefully it's a shortage of memory, or system file table entries; disk IO problems; disk full; etc. The specifics of the error get logged to syslog with severityerr(if syslog is working!).16β Things are going badly wrong in an unexpected way: system calls that aren't supposed to fail are failing, or the protocol for talking to innd is being violated, or some such. Details get logged with severitycrit(if syslog is working!).24-27β These exit statuses are used by children forked by innduct to talk to the parent. You should not see them. If you do, it is a bug. π
ποΈ FILES ποΈ
okay bestie, listen up, because this is the part where the β¨loreβ¨ gets real. innduct and innd do this whole elaborate little dance together β think ballroom, think choreo, think main character energy β just to make sure everything goes smoothly and there are no races. π©° (there are two whole ascii-art diagrams in README.states if you wanna see the protocol step by step, iykyk.)
π¨ do NOT touch the feedfile and its little friend group unless this page says you can. seriously. hands off. π ββοΈ
here's the whole cast, one by one:
pathrunβ the default current working directory forinnduct, and also the default grandparent directory for the command line socket. yes, grandparent. it's a whole family tree. π³pathoutgoing/siteβ the default feedfile. that's it, that's the vibe.feedfileβ the main feed file, exactly as specified innewsfeeds(5). this one and the other batchfilesinnductuses are made of lines that each look like this:
token messageid
where token is the inn storage API token. lines like that can be written by Tf,Wnm in a newsfeeds(5) entry. while it's processing, innduct overwrites lines in the batch files that correspond to articles it's already handled β each of those lines gets replaced with one containing only spaces. π and remember: only innd should create feedfile, and only innduct should remove it. periodt.
feedfile_lockβ the lockfile, and its whole job is preventing multipleinnductinvocations for the same feed. a process holds this lock once it has opened the lockfile, made anfcntl F_SETLKcall, and then checked withstatandfstatthat the file it now has open and has locked still has the namefeedfile_lock. (only) the lockholder is allowed to delete the lockfile. and for your convenience, once the lockfile is locked,innfeed's pid, the site, feedfile and fqdn are all written into it. π NB: stale lockfiles can contain stale data, so don't go trusting that info for anything other than troubleshooting, fr fr.feedfile_flushingβ a batch file: the main feedfile gets renamed to this filename byinnductbefore it asks inn to flush the feed. onlyinnductshould create, modify or remove this file.feedfile_deferβ a batch file holding details of articles whose transmission was very recently deferred at the request of the recipient site. created, written, read and removed (only) byinnduct. no one else. not even you. πfeedfile_backlog.time_t.inumβ a batch file with details of articles whose transmission was less recently deferred at the request of the recipient site. created byinnduct, and it'll also be read, updated and removed byinnduct. however β you, the administrator, may also safely remove backlog files. you get a lil permission slip for this one. π«Άfeedfile_backlogsomethingβ a batch file manually provided by the administrator.innductwill automatically find, read and process any file matching this pattern (blanking out entries for processed articles) and eventually remove it. just know thatsomethingmay not contain#,~or/.
π please please please finish writing the file before you rename it to match the patternfeedfile_backlog*. otherwiseinnductmight find and process the file β and even think it has finished it β before you've written the complete thing. the horror. you may also safely remove backlog files.
pathrun/innduct/siteβ the defaultAF_UNIXlistening socket for the control command line. see CONTROLLING INNDUCT, above. πfeedfile_dumpβ when you request it via a control connection,innductdumps a summary of its state into this text file. mostly a debugging thing. mostly. π/etc/news/inn.confβ used forpathoutgoing(to compute the default feedfile and its associated paths), forpathrun(to compute the defaultPATHRUNand therefore the effective defaultCLI-DIRandCLI-PATH), for figuring out how to communicate withinnd, and also forsourceaddressand/orsourceaddress6. it's giving utility player. β
π HISTORY π
written by Ian Jackson <ijackson@chiark.greenend.org.uk> ποΈβ¨
π SEE ALSO π
inn.conf(5), innd(8), newsfeeds(5)
and that's a wrap on the whole page, bestie!! ππ the footer down at the bottom is just the page's own name, INNDUCT(8) β no extra version or date gossip attached to this one, so that's your lot. go forth and not delete the lockfile, okay? mwah. π
ππ¦
π¦ where this page comes from
- debian trixie: innduct 2.2+b1
- ubuntu resolute: innduct 2.2
- ubuntu stonking: innduct 2.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms