352 lines
5.9 KiB
HTML
352 lines
5.9 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Maintenance Tools and Tasks</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
|
|
REL="HOME"
|
|
TITLE="Linux Network Administrators Guide"
|
|
HREF="index.html"><LINK
|
|
REL="UP"
|
|
TITLE="C News"
|
|
HREF="x-087-2-cnews.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="C News in an NFS Environment"
|
|
HREF="x-087-2-cnews.nfs.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="NNTP and thenntpd Daemon"
|
|
HREF="x-087-2-nntp.html"></HEAD
|
|
><BODY
|
|
CLASS="SECT1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Linux Network Administrators Guide</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x-087-2-cnews.nfs.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
>Chapter 21. C News</TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x-087-2-nntp.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECT1"
|
|
><H1
|
|
CLASS="SECT1"
|
|
><A
|
|
NAME="X-087-2-CNEWS.MAINT"
|
|
>21.10. Maintenance Tools and Tasks</A
|
|
></H1
|
|
><P
|
|
>
|
|
Despite the complexity of C News, a news administrator's life can be fairly
|
|
easy; C News provides you with a wide variety of maintenance tools.
|
|
Some of these are intended to be run regularly from <B
|
|
CLASS="COMMAND"
|
|
>cron</B
|
|
>,
|
|
like <B
|
|
CLASS="COMMAND"
|
|
>newsdaily</B
|
|
>. Using these scripts greatly reduces
|
|
daily care and feeding requirements of your C News installation.</P
|
|
><P
|
|
>Unless stated otherwise, these commands are located in
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/usr/lib/news/maint</TT
|
|
>. (Note that you must become user
|
|
<SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>news</SPAN
|
|
> before invoking these commands.
|
|
Running them as a superuser may render critical newsfiles inaccessible to C News.):</P
|
|
><P
|
|
></P
|
|
><DIV
|
|
CLASS="VARIABLELIST"
|
|
><DL
|
|
><DT
|
|
><B
|
|
CLASS="COMMAND"
|
|
>newsdaily</B
|
|
></DT
|
|
><DD
|
|
><P
|
|
>The name already says it: run this once a day. It is an important script
|
|
that helps you keep log files small, retaining copies of each from the last
|
|
three runs. It also tries to sense anomalies, like stale batches in the
|
|
incoming and outgoing directories, postings to unknown or moderated newsgroups,
|
|
etc. Resulting error messages are mailed to the newsmaster.</P
|
|
></DD
|
|
><DT
|
|
><B
|
|
CLASS="COMMAND"
|
|
>newswatch</B
|
|
></DT
|
|
><DD
|
|
><P
|
|
>This script should be run regularly to look for anomalies in the
|
|
news system, once an hour or so. It is intended to detect problems that will
|
|
have an immediate effect on the operability of your news system, in which case it mails a trouble report to the newsmaster. Things checked include stale lock files
|
|
that don't get removed, unattended input batches, and disk space shortage.</P
|
|
></DD
|
|
><DT
|
|
><B
|
|
CLASS="COMMAND"
|
|
>addgroup</B
|
|
></DT
|
|
><DD
|
|
><P
|
|
>This script adds a group to your site locally. The proper invocation is:
|
|
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="90%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
>addgroup <TT
|
|
CLASS="REPLACEABLE"
|
|
><I
|
|
>groupname</I
|
|
></TT
|
|
> y|n|m|=<TT
|
|
CLASS="REPLACEABLE"
|
|
><I
|
|
>realgroup</I
|
|
></TT
|
|
></PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>The second argument has the same meaning as the flag in the
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>active</TT
|
|
> file, meaning that anyone may post to the group
|
|
(<SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>y</SPAN
|
|
>), that no one may post
|
|
(<SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>n</SPAN
|
|
>), that it is moderated
|
|
(<SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>m</SPAN
|
|
>), or that it is an alias for another
|
|
group (<SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>=</SPAN
|
|
><TT
|
|
CLASS="REPLACEABLE"
|
|
><I
|
|
>realgroup</I
|
|
></TT
|
|
>). You might also want to use <B
|
|
CLASS="COMMAND"
|
|
>addgroup</B
|
|
> when the
|
|
first articles in a newly created group arrive earlier than the
|
|
<SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>newgroup</SPAN
|
|
> control message that is
|
|
intended to create it.</P
|
|
></DD
|
|
><DT
|
|
><B
|
|
CLASS="COMMAND"
|
|
>delgroup</B
|
|
></DT
|
|
><DD
|
|
><P
|
|
>This script allows you to delete a group locally. Invoke it as:
|
|
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="90%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
>delgroup <TT
|
|
CLASS="REPLACEABLE"
|
|
><I
|
|
>groupname</I
|
|
></TT
|
|
></PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>You still have to delete the articles that remain in the newsgroup's spool
|
|
directory. Alternatively, you might leave it to the natural course of events
|
|
(i.e., expiration) to make them go away.</P
|
|
></DD
|
|
><DT
|
|
><B
|
|
CLASS="COMMAND"
|
|
>addmissing</B
|
|
></DT
|
|
><DD
|
|
><P
|
|
>This script adds missing articles to the <TT
|
|
CLASS="FILENAME"
|
|
>history</TT
|
|
>
|
|
file. Run it when there are articles that seem to hang around forever.</P
|
|
></DD
|
|
><DT
|
|
><B
|
|
CLASS="COMMAND"
|
|
>newsboot</B
|
|
></DT
|
|
><DD
|
|
><P
|
|
>This script should be run at system boot time. It removes any lock files
|
|
left over when news processes were killed at shutdown, and closes and executes
|
|
any batches left over from NNTP connections that were terminated when shutting
|
|
down the system.</P
|
|
></DD
|
|
><DT
|
|
><B
|
|
CLASS="COMMAND"
|
|
>newsrunning</B
|
|
></DT
|
|
><DD
|
|
><P
|
|
>This script resides in <TT
|
|
CLASS="FILENAME"
|
|
>/usr/lib/news/input</TT
|
|
> and may be used to disable unbatching of incoming news, for instance during work hours. You may turn off unbatching by invoking:
|
|
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="90%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
>/usr/lib/news/input/newsrunning off</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>It is turned on by using <SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>on</SPAN
|
|
> instead of
|
|
<SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>off</SPAN
|
|
>.</P
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-cnews.nfs.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-nntp.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>C News in an NFS Environment</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-cnews.html"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>NNTP and thenntpd Daemon</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |