INN commit: trunk (3 files)
INN Commit
rra at isc.org
Sat Jun 20 17:20:46 UTC 2015
Date: Saturday, June 20, 2015 @ 10:20:46
Author: iulius
Revision: 9903
scanlogs: Report the contents of the news.err file
Only errlog and news.crit were previously reported.
Also fix the documentation for the max_unknown parameter in
innreport.conf that applies to news.notice and not news.err.
Modified:
trunk/doc/pod/newslog.pod
trunk/doc/pod/scanlogs.pod
trunk/scripts/scanlogs.in
----------------------+
doc/pod/newslog.pod | 42 +++++++++++++++++++++++-------------------
doc/pod/scanlogs.pod | 9 +++++----
scripts/scanlogs.in | 18 +++++++++++++-----
3 files changed, 41 insertions(+), 28 deletions(-)
Modified: doc/pod/newslog.pod
===================================================================
--- doc/pod/newslog.pod 2015-06-20 14:10:08 UTC (rev 9902)
+++ doc/pod/newslog.pod 2015-06-20 17:20:46 UTC (rev 9903)
@@ -81,10 +81,11 @@
=item F<errlog>
This file contains the standard output and standard error of any program
-spawned by B<innd>, such as channel feeds configured in F<newsfeeds>. This
-file should normally be empty. B<scanlogs> will print the entire contents
-of this log file if it is non-empty so that it appears in daily Usenet reports
-generated by B<news.daily>. Then, B<scanlogs> rotates this log file.
+spawned by B<innd>, such as channel feeds configured in F<newsfeeds>.
+This file should normally be empty. B<scanlogs> will print the 50
+first lines of this log file if it is non-empty so that they appear
+in daily Usenet reports generated by B<news.daily>. Then, B<scanlogs>
+rotates this log file.
=item F<expire.log>
@@ -141,11 +142,11 @@
=item F<news.crit>
-All critical error messages issued by B<innd> are appended to this file via
-syslog. This log file should normally be empty. B<scanlogs> will print the
-entire contents of this log file if it is non-empty so that it appears in
-daily Usenet reports generated by B<news.daily>. Then, B<scanlogs> rotates
-this log file.
+All critical error messages issued by B<innd> are appended to this
+file via syslog. This log file should normally be empty. B<scanlogs>
+will print the first 50 lines of this log file if it is non-empty so
+that they appear in daily Usenet reports generated by B<news.daily>.
+Then, B<scanlogs> rotates this log file.
You should have the following line in your system F<syslog.conf> file, using
a tab character for the delimiter:
@@ -157,12 +158,11 @@
=item F<news.err>
-All major error messages issued by B<innd> are appended to this file via
-syslog. This log file should normally be empty. B<innreport> will print
-the first I<max_unknown> lines of this log file if it is non-empty so that
-they appear in daily Usenet reports generated by B<news.daily>. This
-parameter can be set in F<innreport.conf>. Then, B<scanlogs> rotates
-this log file.
+All major error messages issued by B<innd> are appended to this file
+via syslog. This log file should normally be empty. B<scanlogs>
+will print the first 50 lines of this log file if it is non-empty so
+that they appear in daily Usenet reports generated by B<news.daily>.
+Then, B<scanlogs> rotates this log file.
You should have the following line in your system F<syslog.conf> file, using
a tab character for the delimiter:
@@ -174,10 +174,14 @@
=item F<news.notice>
-All standard error messages and status messages issued by B<innd>, B<innfeed>,
-B<nnrpd> and some other programs are appended to this file via syslog.
-B<scanlogs> uses the Perl script B<innreport> to summarize this file. Then,
-B<scanlogs> rotates this log file.
+All standard error messages and status messages issued by B<innd>,
+B<innfeed>, B<nnrpd> and some other programs are appended to this file
+via syslog. B<scanlogs> uses the Perl script B<innreport> to summarize
+this file. B<innreport> will also print the first I<max_unknown>
+unknown lines of this log file if such unrecognized lines are found in
+F<news.notice> so that they appear in daily Usenet reports generated
+by B<news.daily>. This parameter can be set in F<innreport.conf>.
+Then, B<scanlogs> rotates this log file.
You should have the following line in your system F<syslog.conf> file, using
a tab character for the delimiter:
Modified: doc/pod/scanlogs.pod
===================================================================
--- doc/pod/scanlogs.pod 2015-06-20 14:10:08 UTC (rev 9902)
+++ doc/pod/scanlogs.pod 2015-06-20 17:20:46 UTC (rev 9903)
@@ -27,10 +27,11 @@
in I<pathlog> (see the F<control.log> entry of newslog(5) for more
information about that).
-B<scanlogs> displays the contents of F<errlog> and F<news.crit>, if non-empty,
-and runs B<innreport> to summarize the contents of F<news> and F<news.notice>,
-and to update the F<unwanted.log> file amongst other things (see more
-information about that in innreport(8)).
+B<scanlogs> displays the first 50 lines of F<errlog>, F<news.err>
+and F<news.crit>, if non-empty, and runs B<innreport> to summarize
+the contents of F<news> and F<news.notice>, and to update the
+F<unwanted.log> file amongst other things (see more information about
+that in innreport(8)).
=head1 OPTIONS
Modified: scripts/scanlogs.in
===================================================================
--- scripts/scanlogs.in 2015-06-20 14:10:08 UTC (rev 9902)
+++ scripts/scanlogs.in 2015-06-20 17:20:46 UTC (rev 9903)
@@ -185,7 +185,7 @@
BASE=`basename ${F}`
rm -f ${OLD}/${BASE}
case ${F} in
- ${SYSLOG_CRIT}|${ERRLOG}|${LOG}|${SYSLOG_NOTICE})
+ ${SYSLOG_CRIT}|${SYSLOG_ERR}|${ERRLOG}|${LOG}|${SYSLOG_NOTICE})
## Make a link that can be deleted (since if not rotating
## we delete the copy that is made in ${TMPDIR}).
mv ${F}.old ${OLD}/${BASE}
@@ -195,9 +195,6 @@
${ACTIVEFILE})
mv ${BASE}.old ${OLD}/${BASE}
;;
- ${SYSLOG_ERR})
- mv ${F}.old ${OLD}/${BASE}
- ;;
${UNWANTED_LOG})
## Rotate and compress the file.
BASE=`basename ${F}`
@@ -248,7 +245,7 @@
## Make a snapshot of what we need for below.
ctlinnd -s pause "Snapshot log and syslog files" 2>&1
- for F in ${SYSLOG_CRIT} ${ERRLOG} ${LOG} ${SYSLOG_NOTICE} ; do
+ for F in ${SYSLOG_CRIT} ${SYSLOG_ERR} ${ERRLOG} ${LOG} ${SYSLOG_NOTICE} ; do
BASE=`basename ${F}`
rm -f ${OLD}/${BASE}.0
cp ${F} ${OLD}/${BASE}.0
@@ -271,6 +268,17 @@
fi
rm -f ${OLD_SYSLOG}
+## Display syslog error messages.
+BASE=`basename ${SYSLOG_ERR}`
+OLD_SYSLOG=${OLD}/${BASE}.0
+if [ -s ${OLD_SYSLOG} ] ; then
+ echo Syslog error messages:
+ cat ${OLD_SYSLOG} | head -n ${MAXERRLINES}
+ echo ---------
+ echo ''
+fi
+rm -f ${OLD_SYSLOG}
+
## Display error log.
BASE=`basename ${ERRLOG}`
OLD_ERRLOG=${OLD}/${BASE}.0
More information about the inn-committers
mailing list