These programs are utilities useful in maintaining a C News
system and diagnosing problems in it.
Newshist prints the history line for each article identified by a msgid.
Newsdaily performs minor maintenance chores
that typically should be done once a day for the news system:
saving copies of log files and truncating them,
reporting logged errors, checking for anomalies suggesting something
is wrong, and cleaning out leftover files.
Newsdaily saves one generation of old log files and three
generations of old errlog and batchlog files.
It reports problems via
Newswatch looks for indications of news problems on a shorter time scale than those
reported by newsdaily, notably strangely-persistent lock files that
may indicate a news-system failure.
spacemin are specified,
newswatch checks the
outbound areas to confirm that there is room for at least
spacemin files, each of length
in each, and reports it if not.
inbatchmax is specified,
newswatch inspects the incoming-news spooling area and reports if more than
inbatchmax files are awaiting processing.
Newswatch delivers its report, if any, via
It typically should be run fairly frequently, perhaps once or twice an hour.
Newsboot should be run from /etc/rc or the systems equivalent on reboot.
It cleans up files that the news system might have left lying about
if the system crashed while news was being processed,
notably old lock files.
Locknews locks the news system
(retrying until it succeeds),
starts up a shell
$SHELL if set,
otherwise the systems standard shell)
prompt environment variables prepended with executable reminders,
and waits around to
unlock the news system when that shell terminates.
This simplifies manual maintenance.
-v produces messages on standard error
upon successful locking and unlocking;
this is only needed by users of shells that import
prompt to set their prompts,
notably C shells.
delgroup respectively add a newsgroup (with a specified flags field for the
active file, normally y [see newsdb(5)]) and delete a
newsgroup manually, with proper locking.
The effect is purely local; no control message (to propagate the
change to other machines) is sent.
Adddirs sweeps through the active file checking that directories exist for
will create directories as needed, but some
user-interface software gets upset if a newsgroup exists but its directory
This is mostly useful when adding groups in bulk, based on another sites
Act.to.times emits (on standard output) a new
active.times file (see
based on the contents of
activefile, which should normally be
Histfrom emits (on standard output) all history lines for unexpired articles
enddate. The dates must be acceptable to
enddate is now.
histfrom and processes its output to produce a list of absolute pathnames of
articles arriving between
enddate (default now).
Addmissing scans the
history file and the news-article tree to find articles that are not in the history
file, and adds them to the file
-d option is given,
addmissing rebuilds the
dbz database from scratch after adding the missing articles to the history file;
this is a convenience for use in disaster-recovery situations where
manual repairs to the history file have rendered the file incomplete
dbz database invalid.
-v option is given,
addmissing reports how many missing articles were found (and shows the resulting
history lines, if there are not too many)
on standard output.