news.daily (8) Linux Manual Page
news.daily – Perform daily Usenet maintenance tasks
Synopsis
news.daily [delayrm] [expctl=path] [expdir=path] [expireover] [expireoverflags=args] [flags=args] [lowmark] [mailto=address] [noexpire] [noexpireover] [noexplog] [nologs] [nomail] [noprocbatch] [norenumber] [norm] [norotate] [nostat] [notdaily] [postexec=program] [procbatchdir=path] [tmpdir=path] [/path/to/a/program]
Description
news.daily performs a number of important Usenet administrative functions. This includes:
- •
- producing a status report with
innstat; - •
- removing old news articles (with
expirermif thedelayrmkeyword is specified); - •
- purging the overview database with
expireoverif the corresponding eponym keyword is specified; - •
- processing log files and rotating the archived log files with
scanlogs; - •
- processing
innfeeddropped files withprocbatch; - •
- renumbering the active file with
ctlinnd; - •
- rebuilding the history file with
expire; - •
- removing any old socket files found in the pathrun directory;
- •
- collecting all the output and mailing it.
Please note that this program should be run under the news administrator’s account (usually "news"), not as root. By default, news.daily performs all of its functions and mails the output to the news administrator, which is the user specified with –with-news-master at configure time (it is "usenet" by default). You can also change this behaviour with the mailto keyword.
By specifying keywords on the command line, it is possible to modify the functions performed, as well as change the arguments given to expire(8) and expireover(8). news.daily should be run once a day, typically out of cron(8). Since it will slow the server down while it is running, it should be run during periods of low server usage, such as in the middle of the night. To run it at 3am, for example, add the following entry to the news user’s crontab file:
0 3 * * * <pathbin in inn.conf>/news.daily expireover lowmark
If you’re using any non-CNFS storage methods, add the delayrm keyword to the above option list for news.daily.
It may be run more often, but such invocations should at least use the norotate keyword (or perhaps the notdaily keyword) to prevent the log files from being processed and rotated too fast. The shlock(1) program is used to prevent simultaneous executions.
The program specified by the given path /path/to/a/program is executed just before any expiration is done. A typical use is to specify an alternate expiration program and use the noexpire keyword. Multiple programs may be specified; they will be invoked in order.
Keywords
The following keywords may be used:
delayrm- This uses the
-zflag when invokingexpireandexpireover. The names of articles to be removed are written to a temporary file, and then renamed after expiration by callingexpirermwhich in turn callsfastrm. expctl=path- Specify the file to use as the expire.ctl file for
expire. expdir=path- By default,
expirebuilds the new history file and database in the same directory as the current files. Using this keyword specifies a different location to build the new files (by passing the-dflag toexpire), which will then be moved to the right location when finished. expireover- The
expireoverprogram is called after expiration to purge the overview database. If no overview data is created, theexpireoverkeyword is not needed. This is the case when the server runs only for feeders (no reader). By default,expireoveris not called bynews.daily. expireoverflags=args- If the
expireoverkeyword is used, this keyword may be used to specify the flags to be passed toexpireover. If thedelayrmkeyword is used, then the default value is-zand the list of deleted files; otherwise, the default value is-s. flags=args- By default,
expireis invoked with argument-v1. Using this keyword changes the arguments to those specified. Be careful to use quotes if multiple arguments are needed. This keyword has no effect if thenoexpirekeyword is used. lowmark- If the
lowmarkkeyword is used, "ctlinnd lowmark" is used for renumbering active. Normal "ctlinnd renumber" operation will take long time. With thelowmarkkeyword, this will take less time. If thelowmarkkeyword is used, thenorenumberkeyword is not needed sincenews.dailyspecifies it implicitly.If the
lowmarkkeyword is given tonews.daily, then theexpireoverkeyword must also be given; otherwise, that kind of renumbering will not be taken into account. mailto=address- By default,
news.dailymails the report to the newsmaster address specified with–with-news-masterat configure time. Themailtokeyword can specify a different address to which to mail the report. Note that using this keyword has no effect if thenomailkeyword is also specified. noexpire- By default,
expireis invoked to remove old news articles. Using this keyword disables this function. noexpireover- By default,
expireoveris invoked to remove old overview database if enableoverview is set in inn.conf. Using this keyword disables this function. noexplogexpirenormally appends information to pathlog/expire.log (see newslog(5)). Using this keyword causes theexpireoutput to be handled as part ofnews.daily‘s output. It has no effect if thenoexpirekeyword is used.nologs- After expiration,
scanlogsis invoked to process the log files. Using this keyword disables all log processing functions. nomailnews.dailynormally sends a mail message containing the results to the administrator. Using this keyword causes this message to be sent to stdout and stderr instead. Normally, all utilities invoked by the script have their stdout and stderr redirected into a file. If the file is empty, no message is sent.noprocbatch- This keyword disables the run of
procbatchoninnfeeddropped files generated in its spool directory. These files contain a list of articles which were not correctly sent to peers. By default, they will be processed and removed afterwards. norenumber- This keyword disables the "ctlinnd renumber" operation. Normally, the low water marks for all newsgroups are reset in the active file.
norm- By default, any
ctlinndsocket that has not been modified for two days will be removed. Using this keyword disables this function. norotate- By default, log processing includes rotating and cleaning out log files. Using this keyword disables the rotating and cleaning aspect of the log processing: the logs files are only scanned for information and no contents are altered. This keyword has no effect if the
nologskeyword is used. Thenorotatekeyword is passed on toscanlogsif it is invoked. nostat- This keyword disables the status report generated by
innstat. Without this keyword, the status report is the first function performed, just prior to obtaining thenews.dailylock. notdaily- By default,
news.dailyexpects to be run only once a day, and it does various things (like rotating logs) that normally should only be done on daily basis. Use this keyword any extra timesnews.dailyis run in the day and the normal log files processing (and rotation) will not be done. This keyword impliesnologs. postexec=program- The program specified by the given path program is executed just after all expiration is done. Multiple programs may be specified; they will be invoked in order.
procbatchdir=pathnews.dailytries to find the backlog directory ofinnfeedin innfeed.conf. In case several instances ofinnfeedare running or when its configuration file is not the default one, theprocbatchdirkeyword can be used to specify the path of the backlog directory. This keyword can be used more than once in the command-line.tmpdir=path- Overrides the pathtmp setting in inn.conf by setting the environment variable $TMPDIR to the specified path. Various parts of the expire process, such as sort, will then use this path as the directory for temporary files.
History
news.daily and this manual page were written by Landon Curt Noll <chongo [at] toad.com> and Rich $alz <rsalz [at] uunet.uu.net> for InterNetNews. It was converted to POD by Julien Elie.
$Id: news.daily.pod 9634 2014-05-14 18:05:41Z iulius $
See Also
active(5), ctlinnd(8), expire(8), expire.ctl(5), expireover(8), expirerm(8), fastrm(8), inn.conf(5), innstat(8), newslog(5), procbatch(8), scanlogs(8), shlock(1).
