man newsmaint () - extract history line for news article(s) newsdaily - maintain news log files and report problems newswatch - keep an eye on news system for difficulties newsboot - clean up news debris on reboot locknews - lock news system addgroup, delgroup - add and delete newsgroups, locally only adddirs - make any missing directories for active newsgroups act.to.times - create active.times file for news readers histfrom, newsfrom - list news arriving over specific time range addmissing - add missing news articles to history file
NAME
newshist - extract history line for news article(s)
newsdaily - maintain news log files and report problems
newswatch - keep an eye on news system for difficulties
newsboot - clean up news debris on reboot
locknews - lock news system
addgroup, delgroup - add and delete newsgroups, locally only
adddirs - make any missing directories for active newsgroups
act.to.times - create active.times file for news readers
histfrom, newsfrom - list news arriving over specific time range
addmissing - add missing news articles to history file
SYNOPSIS
b/maint/newshist
msgid ...
b/maint/newsdaily
b/maint/newswatch
[ spaceunit spacemin [ inbatchmax ] ]
b/maint/newsboot
b/maint/locknews
[
-v
]
b/maint/addgroup
group {y|n|m|x|=realgroup}
b/maint/delgroup
group
b/maint/adddirs
b/maint/act.to.times
activefile
b/maint/histfrom
startdate [ enddate ]
b/maint/newsfrom
startdate [ enddate ]
b/maint/addmissing
[
-d
]
[
-v
]
DESCRIPTION
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 report(8CN).
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. If spaceunit and spacemin are specified, newswatch checks the incoming, articles, control, and outbound areas to confirm that there is room for at least spacemin files, each of length spaceunit bytes, in each, and reports it if not. If 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 report(8CN). It typically should be run fairly frequently, perhaps once or twice an hour.
Newsboot should be run from /etc/rc or the system's 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 (c $SHELL if set, otherwise the system's standard shell) with the PS1 and 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 neither PS1 nor prompt to set their prompts, notably C shells.
Addgroup and 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 all newsgroups. (Relaynews will create directories as needed, but some user-interface software gets upset if a newsgroup exists but its directory does not.) This is mostly useful when adding groups in bulk, based on another site's active file.
Act.to.times emits (on standard output) a new active.times file (see newsdb(5)) based on the contents of activefile, which should normally be c/active.
Histfrom emits (on standard output) all history lines for unexpired articles arriving between startdate and enddate. The dates must be acceptable to getabsdate (see newsaux(8CN)). The default enddate is now.
Newsfrom runs histfrom and processes its output to produce a list of absolute pathnames of articles arriving between startdate and 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 and the dbz database. If the -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 and the dbz database invalid. If the -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.
FILES
c/history history file c/history.pag dbz database for history file c/history.dir dbz database for history file c/log current news log c/log.o previous news log c/errlog current news-error log c/errlog.o* old news-error logs c/batchlog current news-batcher log c/batchlog.o* old news-batcher logs a/in.coming input-spooling area a/out.going output-batching area c/watchtime last time newswatch was run c/active list of current newsgroups c/active.old backup copy created by addgroup and delgroup /bin/sh standard Unix shell /bin/rc standard Plan 9 shell
SEE ALSO
df(1), uucp(1), ls(1), ctime(3), getabsdate(3), grep(1), newsdb(5), cnewsdo(8), expire(8), newsbatch(8), report(8), rnews(8), newsaux(8)
DIAGNOSTICS
Locknews complains and exits if it is unable to lock the news system due to inadequate permissions.
Addmissing complains and exits if it is unable to lock the news system, if expire appears to be running, or if there is not enough space for a temporary copy of the history file and database. It also notes the presence of articles which did not have intelligible headers (which are placed into history with an entry specifying immediate expiry). Complaints from it about articles being ``already present'' indicate a corrupt history file rather than merely missing articles; a complete rebuild is indicated if the offending entries cannot be identified and removed manually.
HISTORY
Written as part of the C News project by Henry Spencer and Geoff Collyer.
BUGS
Delgroup does not remove files or directories from a, although it prints a reminder to do so.
Addmissing balks at dealing with articles which are already in history but with an incomplete list of pathnames. This is very hard to fix.
Addmissing will falsely think articles are missing-leading to the problem above-if a newsgroup name has a component longer than 14 characters on a system which limits directory entries to 14. This too is fairly hard to fix.
Various nuisances can result if the maintenance utilities are run as root rather than as the owner of the news database. It's difficult to defend against this.