PROCBATCH(8)

πŸ’… PROCBATCH πŸ’…

ok so first things first: this is procbatch(8), part of the InterNetNews docs, and it's genuinely one of those little tools that saves your whole entire life at 3am. Let's get into it bestie 🫢


✨ NAME ✨

procbatch β€” the girl who processes your INN funnel file or your innfeed-dropped file. she splits, she sorts, she slays. no cap.


✨ SYNOPSIS ✨

procbatch [-hquv] [-c [-s spooldir]] [-d outdir] [-e peer] [-m [-t
backlogdir]] batchfile

that's it, that's the whole vibe check. one batchfile and a lil pile of flags πŸ’…


✨ DESCRIPTION ✨

okay so picture this 🌸 procbatch grabs an INN funnel file or an innfeed-dropped file and splits it up by host, so you can feed each chunk directly to innfeed or innxmit. it's giving personal assistant energy, honestly.

now, funnel files? those are usually only interesting after a crash. but innfeed-dropped files are messier β€” innfeed can drop articles for a whole bunch of reasons, and ngl not all of them mean something is fundamentally broken 😭 for example:

  • innfeed might drop articles when it's started and stopped in quick succession while INN is chewing through a huge number of control messages β€” that's just a temporary indisposition, she's fine, she just needs a minute.
  • or when INN feeds it articles for a site that isn't in innfeed.conf β€” that one's a misconfiguration, bestie, go fix your config πŸ™ˆ

every running innfeed opens a file named innfeed-dropped.<id>, and that file should normally always be zero length and get deleted on exit. so if you see non-zero length files? yeah, innfeed has dropped some articles, and those dropped-article files have to be processed or those articles will literally never be sent to peers πŸ”₯

news.daily does automatically process these files (it invokes procbatch), but you can absolutely do it manually too. just β€” and I mean this lovingly β€” first make sure the file doesn't correspond to a currently running innfeed. how? for example by calling ctlinnd flush innfeed! ✨

an INN funnel file, or an innfeed-dropped file, will usually look like this:

pathname message-id peer1 peer2 peer3 ...

where pathname can alternatively be a storage API token. flexible. we love her πŸ’œ

so procbatch breaks this file up into files named peer1.tmp, peer2.tmp, peer3.tmp, etc., and each one looks like:

pathname message-id

these tape files get sorted and stripped of duplicate entries πŸŽ€ then you simply rename them to peer1, peer2, peer3, etc. in a running innfeed's backlog directory, and innfeed will pick them up automatically every backlog-newfile-period seconds (as set in innfeed.conf). obsessed. OR β€” and this is the main character move β€” use the -m flag and have procbatch rename and move them into place for you automatically πŸ’…

after running procbatch, you may want to make sure every generated backlog file has a corresponding .lock file. if it doesn't, that means innfeed doesn't have that site configured as a peer, so your innfeed.conf probably needs fixing πŸ‘€

✨ OPTIONS ✨

  • -c β€” check that an article actually exists before writing references to it into the tape files. heads up though: currently this option can only be used with a tradspool article store 😭 use it with any other spool format and all your articles get dropped. like, all of them. not a vibe.
  • -d outdir β€” put the output file(s) into the directory outdir (defaults to pathtmp as set in inn.conf). and when you're also specifying -m, the temporary output files still get put here first before being moved into their final location πŸŽ€
  • -e peer β€” only process entries for peer. just the one. tunnel vision, iconic.
  • -h β€” display a short help screen 🫢
  • -m β€” directly append to tape files in innfeed's backlog directory. the automatic-girlie option ✨
  • -q β€” quiet mode: only display error messages. she's not here to chat.
  • -s spooldir β€” use spooldir as the location of the article spool (defaults to patharticles as set in inn.conf). this option only has an effect on a tradspool storage system when you're also specifying -c.
  • -t backlogdir β€” use backlogdir as the location of the innfeed backlog directory (the directory where the created tape files will be put). defaults to pathspool/innfeed. this option only has an effect when you're also specifying -m.
  • -u β€” unlink the input batchfile after processing. clean up after yourself, queen πŸ‘‘
  • -v β€” add verbosity. more talking. more lore. πŸ’¬

✨ EXAMPLES ✨

okay so scenario one: take innfeed-dropped.B012345, process its lines while appending to tapefiles in innfeed's backlog directory, and remove it when done. and be verbose about it, obviously:

procbatch -umv innfeed-dropped.B012345

scenario two: go through innfeed-dropped.B012345 and save entries for "peer1" in /tmp/peer1.tmp β€” but only if the articles are still available in the local tradspool 🌸

procbatch -e peer1 -d /tmp -c innfeed-dropped.B012345

✨ BUGS ✨

procbatch should be able to check for the existence of articles with any kind of article store β€” possibly using grephistory. right now it can't. it's giving "we'll get there eventually" πŸ’€


✨ HISTORY ✨

procbatch was written by James Brister and improved for speed by Clayton O'Neill πŸ”₯

this manual page was written by Florian Schlichting, with the help of a memo by Russ Allbery ✨


✨ SEE ALSO ✨

innfeed(8), innxmit(8), news.daily(8) πŸ¦‹


and that's the whole page, bestie πŸ’– this is procbatch from INN 2.7.4, dated 2024-05-19 β€” go process those batch files, you absolute icon πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from
  • arch rolling: inn 2.7.4-4 Β· ISC
  • epel 10: inn 2.7.4-5.el10_3 Β· ISC AND BSD-3-Clause AND BSD-4-Clause AND FSFAP AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND MIT AND NTP
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms