


     NNNNEEEEWWWWSSSSMMMMAAAAIIIINNNNTTTT((((8888))))	 XXXXEEEENNNNIIIIXXXX 3333....0000 ((((11113333 AAAApppprrrriiiillll 1111999999992222))))	  NNNNEEEEWWWWSSSSMMMMAAAAIIIINNNNTTTT((((8888))))



     NNNNAAAAMMMMEEEE
	  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
	  addfeed - add a news feed
	  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

     SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
	  ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssssbbbbiiiinnnn////mmmmaaaaiiiinnnntttt////nnnneeeewwwwsssshhhhiiiisssstttt msgid	...
	  ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssssbbbbiiiinnnn////mmmmaaaaiiiinnnntttt////nnnneeeewwwwssssddddaaaaiiiillllyyyy [ guru ... ]
	  ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssssbbbbiiiinnnn////mmmmaaaaiiiinnnntttt////nnnneeeewwwwsssswwwwaaaattttcccchhhh [ spacemin [	inbatchmax ] ]
	  ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssssbbbbiiiinnnn////mmmmaaaaiiiinnnntttt////nnnneeeewwwwssssbbbbooooooootttt
	  ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssssbbbbiiiinnnn////mmmmaaaaiiiinnnntttt////lllloooocccckkkknnnneeeewwwwssss [ ----vvvv ]
	  ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssssbbbbiiiinnnn////mmmmaaaaiiiinnnntttt////aaaaddddddddggggrrrroooouuuupppp group	{yyyy|nnnn|mmmm|xxxx|====_r_e_a_l_g_r_o_u_p}
	  ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssssbbbbiiiinnnn////mmmmaaaaiiiinnnntttt////ddddeeeellllggggrrrroooouuuupppp group
	  ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssssbbbbiiiinnnn////mmmmaaaaiiiinnnntttt////aaaaddddddddddddiiiirrrrssss
	  ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssssbbbbiiiinnnn////mmmmaaaaiiiinnnntttt////aaaaddddddddffffeeeeeeeedddd [ ----LLLL ]	[ ----ffff flags ] site
	  groups
	  ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssssbbbbiiiinnnn////mmmmaaaaiiiinnnntttt////aaaacccctttt....ttttoooo....ttttiiiimmmmeeeessss activefile
	  ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssssbbbbiiiinnnn////mmmmaaaaiiiinnnntttt////hhhhiiiissssttttffffrrrroooommmm startdate [ enddate ]
	  ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssssbbbbiiiinnnn////mmmmaaaaiiiinnnntttt////nnnneeeewwwwssssffffrrrroooommmm startdate [ enddate ]
	  ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssssbbbbiiiinnnn////mmmmaaaaiiiinnnntttt////aaaaddddddddmmmmiiiissssssssiiiinnnngggg [ ----dddd ]

     DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
	  These	programs are utilities useful in maintaining a C News
	  system and diagnosing	problems in it.

	  _N_e_w_s_h_i_s_t prints the history line for each article identified
	  by a _m_s_g_i_d.

	  _N_e_w_s_d_a_i_l_y 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.	_N_e_w_s_d_a_i_l_y saves	one generation
	  of old _l_o_g files and three generations of old	_e_r_r_l_o_g and
	  _b_a_t_c_h_l_o_g files.  It reports problems to the named _g_u_r_us
	  (default:  `usenet').

	  _N_e_w_s_w_a_t_c_h looks for indications of news problems on a
	  shorter time scale than those	reported by _n_e_w_s_d_a_i_l_y, notably
	  strangely-persistent lock files that may indicate a news-
	  system failure.  If _s_p_a_c_e_m_i_n is specified, _n_e_w_s_w_a_t_c_h checks
	  the _i_n_c_o_m_i_n_g,	_a_r_t_i_c_l_e_s, _c_o_n_t_r_o_l, and _o_u_t_b_o_u_n_d	areas to
	  confirm that there are still at least	_s_p_a_c_e_m_i_n bytes



     Page 1					      (printed 6/4/94)






     NNNNEEEEWWWWSSSSMMMMAAAAIIIINNNNTTTT((((8888))))	 XXXXEEEENNNNIIIIXXXX 3333....0000 ((((11113333 AAAApppprrrriiiillll 1111999999992222))))	  NNNNEEEEWWWWSSSSMMMMAAAAIIIINNNNTTTT((((8888))))



	  available in each, and reports it if not.  If	_i_n_b_a_t_c_h_m_a_x is
	  specified, _n_e_w_s_w_a_t_c_h inspects	the incoming-news spooling
	  area and reports if more than	_i_n_b_a_t_c_h_m_a_x files are awaiting
	  processing.  _N_e_w_s_w_a_t_c_h delivers its report, if any, on
	  standard output; an empty report (zero bytes of output)
	  means	no problems.  It typically should be run a few times a
	  day with any non-empty output	mailed to someone suitable.

	  _N_e_w_s_b_o_o_t should be run from /_e_t_c/_r_c 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.

	  _L_o_c_k_n_e_w_s locks the news system (retrying until it succeeds),
	  starts up a shell ($$$$SSSSHHHHEEEELLLLLLLL if set, otherwise the system's
	  standard shell) with the PPPPSSSS1111 and pppprrrroooommmmpppptttt environment
	  variables prepended with executable reminders, and waits
	  around to unlock the news system when	that shell terminates.
	  This simplifies manual maintenance.  ----vvvv produces messages on
	  standard error upon successful locking and unlocking;	this
	  is only needed by users of shells that import	neither	PPPPSSSS1111
	  nor pppprrrroooommmmpppptttt to	set their prompts, notably C shells.

	  _A_d_d_g_r_o_u_p and _d_e_l_g_r_o_u_p	respectively add a newsgroup (with a
	  specified flags field	for the	_a_c_t_i_v_e file, normally `y' [see
	  _n_e_w_s(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.

	  _A_d_d_d_i_r_s sweeps through the _a_c_t_i_v_e file checking that
	  directories exist for	all newsgroups.	 (_R_e_l_a_y_n_e_w_s 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 _a_c_t_i_v_e file.

	  _A_d_d_f_e_e_d adds a line to the _s_y_s file specifying that the _s_i_t_e
	  should be fed	the _g_r_o_u_p_s, and	creates	a suitable outbound-
	  batching directory.  If the ----LLLL option	is given, the LLLL	flag
	  is included to restrict the feed to locally-generated
	  articles only.  If the ----ffff option is given, then the argument
	  following it is used as the flags field for the _s_y_s entry
	  instead of the default ffff.  If	_g_r_o_u_p_s does not	include	a
	  distribution list (separated from the	newsgroups by a	`/'),
	  the default distribution list	`/all' is appended.  If	_g_r_o_u_p_s
	  is of	the form ====_n_a_m_e,	this specifies the same	groups as
	  those	fed to site `_n_a_m_e', with the exception that `to._n_a_m_e'
	  is rewritten to `to._s_i_t_e'.

	  _A_c_t._t_o._t_i_m_e_s emits (on standard output) a new	_a_c_t_i_v_e._t_i_m_e_s
	  file (see _a_c_t_i_v_e._t_i_m_e_s(5)) based on the contents of
	  _a_c_t_i_v_e_f_i_l_e, which should normally be /_u_s_r/_l_i_b/_n_e_w_s/_a_c_t_i_v_e.



     Page 2					      (printed 6/4/94)






     NNNNEEEEWWWWSSSSMMMMAAAAIIIINNNNTTTT((((8888))))	 XXXXEEEENNNNIIIIXXXX 3333....0000 ((((11113333 AAAApppprrrriiiillll 1111999999992222))))	  NNNNEEEEWWWWSSSSMMMMAAAAIIIINNNNTTTT((((8888))))



	  _H_i_s_t_f_r_o_m emits (on standard output) all history lines	for
	  unexpired articles arriving between _s_t_a_r_t_d_a_t_e	and _e_n_d_d_a_t_e.
	  The dates must be acceptable to _g_e_t_d_a_t_e (see _n_e_w_s_a_u_x(8)).
	  The default _e_n_d_d_a_t_e is ``now''.

	  _N_e_w_s_f_r_o_m runs	_h_i_s_t_f_r_o_m and processes its output to produce a
	  list of absolute pathnames of	articles arriving between
	  _s_t_a_r_t_d_a_t_e and	_e_n_d_d_a_t_e	(default ``now'').

	  _A_d_d_m_i_s_s_i_n_g scans the _h_i_s_t_o_r_y file and	the news-article tree
	  to find articles that	are not	in the history file, and adds
	  them to the file and the _d_b_z database.  If the ----dddd option is
	  given, _a_d_d_m_i_s_s_i_n_g rebuilds the _d_b_z 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 _d_b_z database invalid.

     FFFFIIIILLLLEEEESSSS
	  /usr/lib/news/history	  history file
	  /usr/lib/news/history.pag_d_b_z database	for history file
	  /usr/lib/news/history.dir_d_b_z database	for history file
	  /usr/lib/news/log	  current news log
	  /usr/lib/news/log.o	  previous news	log
	  /usr/lib/news/errlog	  current news-error log
	  /usr/lib/news/errlog.o* old news-error logs
	  /usr/lib/news/batchlog  current news-batcher log
	  /usr/lib/news/batchlog.o*old news-batcher logs
	  /usr/spool/news/in.cominginput-spooling area
	  /usr/spool/news/out.goingoutput-batching area
	  /usr/lib/news/watchtime last time _n_e_w_s_w_a_t_c_h was run
	  /usr/lib/news/active	  list of current newsgroups
	  /usr/lib/news/active.oldbackup copy created by _a_d_d_g_r_o_u_p and _d_e_l_g_r_o_u_p
	  /bin/sh		  standard Unix	shell
	  /bin/rc		  standard Plan	9 shell

     SSSSEEEEEEEE AAAALLLLSSSSOOOO
	  df(1), uucp(1), ls(1), ctime(3), getdate(3), hostname(1),
	  grep(1), news(5), expire(8), newsbatch(8), rnews(8),
	  newsaux(8)

     DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
	  _L_o_c_k_n_e_w_s complains and exits if it is	unable to lock the
	  news system due to inadequate	permissions.

	  _A_d_d_f_e_e_d looks	for a ////ddddeeeeffffaaaauuuulllltttt////	line or	a line for _s_i_t_e	in the
	  _b_a_t_c_h_p_a_r_m_s file, and if none is found, warns the user	to
	  create one.

	  _A_d_d_m_i_s_s_i_n_g complains and exits if it is unable to lock the
	  news system, if _e_x_p_i_r_e appears to be running,	or if there is
	  not enough space for a temporary copy	of the _h_i_s_t_o_r_y file



     Page 3					      (printed 6/4/94)






     NNNNEEEEWWWWSSSSMMMMAAAAIIIINNNNTTTT((((8888))))	 XXXXEEEENNNNIIIIXXXX 3333....0000 ((((11113333 AAAApppprrrriiiillll 1111999999992222))))	  NNNNEEEEWWWWSSSSMMMMAAAAIIIINNNNTTTT((((8888))))



	  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.

     HHHHIIIISSSSTTTTOOOORRRRYYYY
	  Written at U of Toronto by Henry Spencer and Geoff Collyer.

     BBBBUUUUGGGGSSSS
	  _D_e_l_g_r_o_u_p does	not remove files or directories	from
	  /usr/spool/news, although it prints a	reminder to do so.

	  The ====_n_a_m_e form of _a_d_d_f_e_e_d cannot cope	with continued _s_y_s
	  lines.

	  _A_d_d_f_e_e_d assumes that attention to the	_b_a_t_c_h_p_a_r_m_s file
	  suffices to get batching going for a new feed, which is
	  naive	if you are running _s_e_n_d_b_a_t_c_h_e_s selectively, i.e. with
	  arguments.

	  _A_d_d_m_i_s_s_i_n_g balks at dealing with articles which are already
	  in history but with an incomplete list of pathnames.	This
	  is very hard to fix.

	  _A_d_d_m_i_s_s_i_n_g 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 _r_o_o_t rather than as the owner of the news
	  database.  It's difficult to defend against this.




















     Page 4					      (printed 6/4/94)



