Linux Network Administrators Guide - Article Batching
< Continued from page 1
To perform batching for a specific site, use the following command:
When invoked without arguments, sendbatches handles all batch queues. The interpretation of "all" depends on the presence of a default entry in batchparms . If one is found, all directories in /var/spool/news/out.going are checked; otherwise, sendbatches cycles through all entries in batchparms , processing just the sites found there. Note that sendbatches , when scanning the out.going directory, takes only those directories that contain no dots or at signs (@ ) as sitenames.
There are two commands that use uux to execute rnews on the remote system: viauux and viauuxz . The latter sets the –z flag for uux to keep older versions from returning success messages for each article delivered. Another command, viamail , sends article batches to the user rnews on the remote system via mail. Of course, this requires that the remote system somehow feeds all mail for rnews to its local news system. For a complete list of these transports, refer to the newsbatch manual page.
All commands from the last three fields must be located in either out.going/site or /usr/lib/news/batch . Most of them are scripts; you can easily tailor new tools for your personal needs. They are invoked through pipes. The list of articles is fed to the batcher on standard input, which produces the batch on standard output. This is piped into the muncher, and so on.
Here is a sample file:
[1]
As shipped with C News, compcun uses compress with the 12-bit option, since this is the lowest common denominator for most sites. You may produce a copy of the script, say compcun16 , for which you use 16-bit compression. The improvement is not too impressive,
- of articles in the togo file. For regular feeds, this is usually batcher . For other purposes, alternative batchers may be provided. For instance, the ihave/sendme protocol requires the article list to be turned into ihave or sendme control messages, which are posted to the newsgroup to.site . This is performed by batchih and batchsm .
- muncher
-
The muncher field specifies the compression command. Usually, this is compcun , a script that produces a compressed batch.[1] Alternatively, suppose you create a muncher that uses gzip , say gzipcun (note that you have to write it yourself?). You have to make sure that uncompress on the remote site is patched to recognize files compressed with gzip .
If the remote site does not have an uncompress command, you may specify nocomp , which does not do any compression.
- transport
-
The last field, transport , describes the transport to be used. A number of standard commands for different transports are available; their names begin with via . sendbatches passes them the destination sitename on the command line. If the batchparms entry is not /default/ , sendbatches derives the sitename from the site field by stripping it of anything after and including the first dot or slash. If the batchparms entry is /default/ , the directory names in out.going are used.
To perform batching for a specific site, use the following command:
# su news -c "/usr/lib/news/batch/sendbatches site"
When invoked without arguments, sendbatches handles all batch queues. The interpretation of "all" depends on the presence of a default entry in batchparms . If one is found, all directories in /var/spool/news/out.going are checked; otherwise, sendbatches cycles through all entries in batchparms , processing just the sites found there. Note that sendbatches , when scanning the out.going directory, takes only those directories that contain no dots or at signs (@ ) as sitenames.
There are two commands that use uux to execute rnews on the remote system: viauux and viauuxz . The latter sets the –z flag for uux to keep older versions from returning success messages for each article delivered. Another command, viamail , sends article batches to the user rnews on the remote system via mail. Of course, this requires that the remote system somehow feeds all mail for rnews to its local news system. For a complete list of these transports, refer to the newsbatch manual page.
All commands from the last three fields must be located in either out.going/site or /usr/lib/news/batch . Most of them are scripts; you can easily tailor new tools for your personal needs. They are invoked through pipes. The list of articles is fed to the batcher on standard input, which produces the batch on standard output. This is piped into the muncher, and so on.
Here is a sample file:
# batchparms file for the brewery # site | size |max |batcher |muncher |transport #-------------+--------+-------+---------+-----------+----------- /default/ 100000 22 batcher compcun viauux swim 10000 10 batcher nocomp viauux
Notes
[1]
As shipped with C News, compcun uses compress with the 12-bit option, since this is the lowest common denominator for most sites. You may produce a copy of the script, say compcun16 , for which you use 16-bit compression. The improvement is not too impressive,
Source...