FreeBSD Manual Pages
NEWSMAINT(8) System Manager's Manual NEWSMAINT(8) 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 /usr/local/libexec/cnews/maint/newshist msgid ... /usr/local/libexec/cnews/maint/newsdaily /usr/local/libexec/cnews/maint/newswatch [ spaceunit spacemin [ in- batchmax ] ] /usr/local/libexec/cnews/maint/newsboot /usr/local/libexec/cnews/maint/locknews [ -v ] /usr/local/libexec/cnews/maint/addgroup group {y|n|m|x|=realgroup} /usr/local/libexec/cnews/maint/delgroup group /usr/local/libexec/cnews/maint/adddirs /usr/local/libexec/cnews/maint/act.to.times activefile /usr/local/libexec/cnews/maint/histfrom startdate [ enddate ] /usr/local/libexec/cnews/maint/newsfrom startdate [ enddate ] /usr/local/libexec/cnews/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 ms- gid. 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 sug- gesting something is wrong, and cleaning out leftover files. Newsdaily saves one generation of old log files and three generations of old er- rlog 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, con- trol, 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 await- ing processing. Newswatch delivers its report, if any, via re- port(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 re- boot. 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 system's standard shell) with the PS1 and prompt environment variables prepended with executable re- minders, 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 /var/lib/news/active. Histfrom emits (on standard output) all history lines for unexpired ar- ticles arriving between startdate and enddate. The dates must be ac- ceptable 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 ar- ticles 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 his- tory file; this is a convenience for use in disaster-recovery situa- tions 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 /var/lib/news/history history file /var/lib/news/history.pagdbz database for history file /var/lib/news/history.dirdbz database for history file /var/lib/news/log current news log /var/lib/news/log.o previous news log /var/lib/news/errlog current news-error log /var/lib/news/errlog.o* old news-error logs /var/lib/news/batchlog current news-batcher log /var/lib/news/batchlog.o*old news-batcher logs /var/news/in.coming input-spooling area /var/news/out.going output-batching area /var/lib/news/watchtime last time newswatch was run /var/lib/news/active list of current newsgroups /var/lib/news/active.oldbackup 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(8CN), expire(8CN), newsbatch(8CN), report(8CN), rnews(8CN), newsaux(8CN) 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). Com- plaints 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 Col- lyer. BUGS Delgroup does not remove files or directories from /var/news, 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 char- acters 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. 17 Sept 1994 NEWSMAINT(8)
NAME | SYNOPSIS | DESCRIPTION | FILES | SEE ALSO | DIAGNOSTICS | HISTORY | BUGS
Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=newsmaint&sektion=8cn&manpath=FreeBSD+13.0-RELEASE+and+Ports>