Send inn-committers mailing list submissions to inn-committers@lists.isc.org
To subscribe or unsubscribe via the World Wide Web, visit https://lists.isc.org/mailman/listinfo/inn-committers or, via email, send a message with subject or body 'help' to inn-committers-requ...@lists.isc.org You can reach the person managing the list at inn-committers-ow...@lists.isc.org When replying, please edit your Subject line so it is more specific than "Re: Contents of inn-committers digest..." Today's Topics: 1. INN commit: branches/2.5 (7 files) (INN Commit) 2. INN commit: branches/2.5 (3 files) (INN Commit) 3. INN commit: trunk/doc/pod (news.pod) (INN Commit) ---------------------------------------------------------------------- Message: 1 Date: Wed, 24 Sep 2014 11:05:04 -0700 (PDT) From: INN Commit <r...@isc.org> To: inn-committ...@isc.org Subject: INN commit: branches/2.5 (7 files) Message-ID: <20140924180504.d4ea867...@hope.eyrie.org> Date: Wednesday, September 24, 2014 @ 11:05:04 Author: iulius Revision: 9726 innwatch: add -i flag to specify how many seconds to sleep at startup - Also fix previous commit [9651] that did not totally fix the issue it was supposed to fix. - Fix the behaviour of the -f flag (it wasn't doing anything). - Fix how the -l flag was parsed (a space was required between -l and its argument, whils it should not have been required). - Add new POD documentation for innwatch, and update it at the same time: document new -i flag, and document already existing -f flag. Added: branches/2.5/doc/pod/innwatch.pod (from rev 9722, trunk/doc/pod/innwatch.pod) Modified: branches/2.5/MANIFEST branches/2.5/doc/man/ (properties) branches/2.5/doc/pod/Makefile branches/2.5/doc/pod/news.pod branches/2.5/scripts/innwatch.in Deleted: branches/2.5/doc/man/innwatch.8 ----------------------+ MANIFEST | 1 doc/man/innwatch.8 | 59 -------------------------------------------- doc/pod/Makefile | 3 +- doc/pod/innwatch.pod | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ doc/pod/news.pod | 5 +++ scripts/innwatch.in | 28 +++++++++++++++------ 6 files changed, 94 insertions(+), 67 deletions(-) Modified: MANIFEST =================================================================== --- MANIFEST 2014-09-24 18:01:11 UTC (rev 9725) +++ MANIFEST 2014-09-24 18:05:04 UTC (rev 9726) @@ -276,6 +276,7 @@ doc/pod/innfeed.pod Master file for innfeed.8 doc/pod/innmail.pod Master file for innmail.1 doc/pod/innupgrade.pod Master file for innupgrade.8 +doc/pod/innwatch.pod Master file for innwatch.8 doc/pod/innxmit.pod Master file for innxmit.8 doc/pod/install.pod Master file for INSTALL doc/pod/libauth.pod Master file for libauth.3 Property changes on: branches/2.5/doc/man ___________________________________________________________________ Modified: svn:ignore - active.5 active.times.5 actsync.8 archive.8 auth_krb5.8 batcher.8 buffchan.8 buffindexed.conf.5 ckpasswd.8 cnfsheadconf.8 cnfsstat.8 control.ctl.5 controlchan.8 convdate.1 ctlinnd.8 cvtbatch.8 cycbuff.conf.5 distrib.pats.5 distributions.5 docheckgroups.8 domain.8 expire.ctl.5 expire.8 expireover.8 expirerm.8 fastrm.1 getlist.1 grephistory.1 ident.8 incoming.conf.5 inews.1 inn-radius.conf.5 inn.conf.5 INN__Config.3pm INN__Utils__Shlock.3pm innbind.8 inncheck.8 innconfval.1 innd.8 inndf.8 innfeed.conf.5 innfeed.8 innmail.1 innupgrade.8 innxmit.8 libauth.3 libinnhist.3 libstorage.3 list.3 mailpost.8 makedbz.8 makehistory.8 mod-active.8 moderators.5 motd.news.5 newsfeeds.5 news.daily.8 news2mail.8 newslog.5 newsgroups.5 ninpaths.8 nnrpd.8 nntpsend.8 nntpsend.ctl.5 ovdb.5 ovdb_init.8 ovdb_monitor.8 ovdb_server.8 ovdb_stat.8 overchan.8 passwd.nntp.5 perl-nocem.8 pgpverify.1 procbatch.8 prunehistory.8 pullnews.1 qio.3 radius.8 rc.news.8 readers.conf.5 rnews.1 sasl.conf.5 scanlogs.8 scanspool.8 send-uucp.8 sendinpaths.8 shlock.1 simpleftp.1 sm.1 storage.conf.5 subscriptions.5 tally.control.8 tdx-util.8 tinyleaf.8 tst.3 uwildmat.3 + active.5 active.times.5 actsync.8 archive.8 auth_krb5.8 batcher.8 buffchan.8 buffindexed.conf.5 ckpasswd.8 cnfsheadconf.8 cnfsstat.8 control.ctl.5 controlchan.8 convdate.1 ctlinnd.8 cvtbatch.8 cycbuff.conf.5 distrib.pats.5 distributions.5 docheckgroups.8 domain.8 expire.ctl.5 expire.8 expireover.8 expirerm.8 fastrm.1 getlist.1 grephistory.1 ident.8 incoming.conf.5 inews.1 inn-radius.conf.5 inn.conf.5 INN__Config.3pm INN__Utils__Shlock.3pm innbind.8 inncheck.8 innconfval.1 innd.8 inndf.8 innfeed.conf.5 innfeed.8 innmail.1 innupgrade.8 innwatch.8 innxmit.8 libauth.3 libinnhist.3 libstorage.3 list.3 mailpost.8 makedbz.8 makehistory.8 mod-active.8 moderators.5 motd.news.5 newsfeeds.5 news.daily.8 news2mail.8 newslog.5 newsgroups.5 ninpaths.8 nnrpd.8 nntpsend.8 nntpsend.ctl.5 ovdb.5 ovdb_init.8 ovdb_monitor.8 ovdb_server.8 ovdb_stat.8 overchan.8 passwd.nntp.5 perl-nocem.8 pgpverify.1 procbatch.8 prunehistory.8 pullnews.1 qio.3 radius.8 rc.news.8 readers.conf.5 rnews.1 sasl.conf.5 scanlogs.8 scanspool.8 send-uucp.8 sendinpaths.8 shlock.1 simpleftp.1 sm.1 storage.conf.5 subscriptions.5 tally.control.8 tdx-util.8 tinyleaf.8 tst.3 uwildmat.3 Deleted: doc/man/innwatch.8 =================================================================== --- doc/man/innwatch.8 2014-09-24 18:01:11 UTC (rev 9725) +++ doc/man/innwatch.8 2014-09-24 18:05:04 UTC (rev 9726) @@ -1,59 +0,0 @@ -.TH INNWATCH 8 -.SH NAME -innwatch \- monitor innd. -.SH SYNOPSIS -.B innwatch -[ -.BI -l " logfile" -] -[ -.BI -t " seconds" -] -.SH DESCRIPTION -.I Innwatch -is normally started by -.IR rc.news . -It periodically \(em every -.I <innwatchsleeptime in inn.conf> -seconds \(em examines the load average, and the number of free blocks -and inodes on the spool partition, as described by its -control file, -.IR innwatch.ctl . -.PP -If the load gets too high, or the disk gets too full, it throttles the server. -When the condition restores, it unblocks the server. -In addition, on each pass through the loop it will check the -logfile -.I <pathlog in inn.conf>/news.crit -to see if it has been modified, and send mail to the news administrator -if so. -.PP -Upon receipt of an interrupt signal (SIGINT), -.IR innwatch -will report its status in the file -.IR <pathrun\ in\ inn.conf>/innwatch.status . -.SH OPTIONS -.TP -.B \-l logfile -To specify a log file to watch, other than the default of -.IR news.crit , -use the ``\fB\-l\fP'' flag. -.TP -.B \-t seconds -To change the period between checks from the default from -.I inn.conf , -use the ``\fB\-t\fP'' -flag. -.SH HISTORY -Written by Mike Cooper <mcoo...@usc.edu>, with modifications by -<k...@munnari.oz.au>, Steve Groom <st...@elroy.jpl.nasa.gov> and -Christophe Wolfhugel <w...@pasteur.fr>. -.de R$ -This is revision \\$3, dated \\$4. -.. -.R$ $Id$ -.SH "SEE ALSO" -ctlinnd(8), -inn.conf(5), -innwatch.ctl(5), -shlock(1). Modified: doc/pod/Makefile =================================================================== --- doc/pod/Makefile 2014-09-24 18:01:11 UTC (rev 9725) +++ doc/pod/Makefile 2014-09-24 18:05:04 UTC (rev 9726) @@ -35,7 +35,7 @@ ../man/domain.8 ../man/expire.8 ../man/expireover.8 \ ../man/expirerm.8 ../man/ident.8 \ ../man/innbind.8 ../man/inncheck.8 ../man/innd.8 ../man/inndf.8 \ - ../man/innfeed.8 ../man/innupgrade.8 \ + ../man/innfeed.8 ../man/innupgrade.8 ../man/innwatch.8 \ ../man/innxmit.8 \ ../man/makedbz.8 ../man/makehistory.8 ../man/mod-active.8 \ ../man/news.daily.8 ../man/news2mail.8 ../man/ninpaths.8 \ @@ -134,6 +134,7 @@ ../man/inndf.8: inndf.pod ; $(POD2MAN) -s 8 $? > $@ ../man/innfeed.8: innfeed.pod ; $(POD2MAN) -s 8 $? > $@ ../man/innupgrade.8: innupgrade.pod ; $(POD2MAN) -s 8 $? > $@ +../man/innwatch.8: innwatch.pod ; $(POD2MAN) -s 8 $? > $@ ../man/innxmit.8: innxmit.pod ; $(POD2MAN) -s 8 $? > $@ ../man/makedbz.8: makedbz.pod ; $(POD2MAN) -s 8 $? > $@ ../man/makehistory.8: makehistory.pod ; $(POD2MAN) -s 8 $? > $@ Copied: branches/2.5/doc/pod/innwatch.pod (from rev 9722, trunk/doc/pod/innwatch.pod) =================================================================== --- doc/pod/innwatch.pod (rev 0) +++ doc/pod/innwatch.pod 2014-09-24 18:05:04 UTC (rev 9726) @@ -0,0 +1,65 @@ +=head1 NAME + +innwatch - Monitor the state of INN and the system + +=head1 SYNOPSIS + +B<innwatch> [B<-f> I<ctlfile>] [B<-i> I<seconds>] [B<-l> I<logfile>] +[B<-t> I<seconds>] + +=head1 DESCRIPTION + +B<innwatch> is normally started by B<rc.news>. Every +I<innwatchsleeptime> seconds, as set in F<inn.conf>, it examines the load +average, and the number of free blocks and inodes on the spool partition, +as described by its control file, F<innwatch.ctl> in I<pathetc>. + +If the load gets too high, or the disk gets too full, it throttles +the server. When the condition restores, it unblocks the server. +In addition, on each pass through the loop, it will check the logfile +I<pathlog>/news.crit to see if it has been modified, and send mail to +the news administrator if so. + +Upon receipt of an interrupt signal (SIGINT), B<innwatch> will report +its status in the file F<innwatch.status> in I<pathrun>. + +=head1 OPTIONS + +=over 4 + +=item B<-f> I<file> + +Specify the control file to use, other than the default of +F<innwatch.ctl> in I<pathetc>. + +=item B<-i> I<seconds> + +With this option, B<innwatch> has an initial sleep of I<seconds> +seconds at startup. This is useful when B<innwatch> is started at +the same time as INN, so that it can wait a little before beginning +performing its checks. + +=item B<-l> I<logfile> + +Specify a log file to watch, other than the default of F<news.crit>. + +=item B<-t> I<seconds> + +Specify the period in seconds between checks, to override the value +set in F<inn.conf>. + +=back + +=head1 HISTORY + +Written by Mike Cooper <mcoo...@usc.edu>, with modifications by +<k...@munnari.oz.au>, Steve Groom <st...@elroy.jpl.nasa.gov> and +Christophe Wolfhugel <w...@pasteur.fr>. Converted to POD by Julien Elie. + +$Id$ + +=head1 SEE ALSO + +inn.conf(5), innwatch.ctl(5), newslog(5), rc.news(8). + +=cut Modified: doc/pod/news.pod =================================================================== --- doc/pod/news.pod 2014-09-24 18:01:11 UTC (rev 9725) +++ doc/pod/news.pod 2014-09-24 18:05:04 UTC (rev 9726) @@ -13,6 +13,11 @@ =item * +Add new B<-f> flag to C<innwatch> to specify the configuration file to +use, in case it is not the default F<innwatch.ctl> file. + +=item * + Fixed how B<innupgrade> is executed during an update of an INN installation; on a few systems like AIX, it fails to run because its taint mode was unproperly declared. Modified: scripts/innwatch.in =================================================================== --- scripts/innwatch.in 2014-09-24 18:01:11 UTC (rev 9725) +++ scripts/innwatch.in 2014-09-24 18:05:04 UTC (rev 9726) @@ -17,6 +17,9 @@ PROGNAME=innwatch LOCK=${LOCKS}/LOCK.${PROGNAME} DAILY=${LOCKS}/LOCK.news.daily +INNWATCHINITIALSLEEPTIME=1 +CHILDPID= + ## Where to put the timestamp file (directory and filename). TIMESTAMP=${LOCKS}/${PROGNAME}.time @@ -37,18 +40,25 @@ while [ $# -gt 0 ] ; do case X"$1" in X-f) - FILE=$2 + CTLWATCH=$2 shift ;; X-f*) - FILE=`expr "$1" : '-s\(.*\)'` + CTLWATCH=`expr "$1" : '-f\(.*\)'` ;; + X-i) + INNWATCHINITIALSLEEPTIME=$2 + shift + ;; + X-i*) + INNWATCHINITIALSLEEPTIME=`expr "$1" : '-i\(.*\)'` + ;; X-l) LOGFILE=$2 shift ;; X-l*) - LOGFILE=`expr "$1" : '-s\(.*\)'` + LOGFILE=`expr "$1" : '-l\(.*\)'` ;; X-t) INNWATCHSLEEPTIME=$2 @@ -74,7 +84,7 @@ ## Process arguments. if [ $# -ne 0 ] ; then - echo "Usage: ${PROGNAME} [flags]" 1>&2 + echo "Usage: ${PROGNAME} [-f ctlfile] [-i seconds] [-l logfile] [-t seconds]" 1>&2 exit 1 fi @@ -86,7 +96,7 @@ exit 0 } -trap 'rm -f ${LOCK} ${WATCHPID} ; exit 1' 1 3 15 +trap 'rm -f ${LOCK} ${WATCHPID} ; test -n "${CHILDPID}" && kill ${CHILDPID} ; exit 1' 1 3 15 echo "$$" > ${WATCHPID} ## The reason why we turned innd off, and its, and our current state. @@ -102,7 +112,9 @@ ## We need to remember the process ID of innd, in case one exits. ## But we need to wait for innd to start before we can do that. while PID=`cat ${SERVERPID} 2>/dev/null`; test -z "${PID}"; do - sleep ${INNWATCHSLEEPTIME} + sleep ${INNWATCHINITIALSLEEPTIME} & CHILDPID=$! + wait + CHILDPID= done trap '( @@ -126,8 +138,10 @@ NEXTSLEEP=1 HASEXITED=false -while sleep ${NEXTSLEEP} +while { sleep ${NEXTSLEEP} & CHILDPID=$! ; } do + wait + CHILDPID= NEXTSLEEP=${INNWATCHSLEEPTIME} ## If news.daily is running, idle: we don't want to change the ------------------------------ Message: 2 Date: Wed, 24 Sep 2014 11:06:24 -0700 (PDT) From: INN Commit <r...@isc.org> To: inn-committ...@isc.org Subject: INN commit: branches/2.5 (3 files) Message-ID: <20140924180624.4df7667...@hope.eyrie.org> Date: Wednesday, September 24, 2014 @ 11:06:23 Author: iulius Revision: 9727 rc.news: no longer explicitly sleep before starting innwatch and cnfsstat Instead, make these two scripts sleep by themselves. Also update documentation: improve the list of actions done by rc.news, and no longer mentions that innd should be throttled before being stopped (this is not true - the shutdown process already does the actions throttling does). Modified: branches/2.5/doc/pod/news.pod branches/2.5/doc/pod/rc.news.pod branches/2.5/scripts/rc.news.in ---------------------+ doc/pod/news.pod | 9 +++++++++ doc/pod/rc.news.pod | 26 +++++++++++++++++--------- scripts/rc.news.in | 8 ++++---- 3 files changed, 30 insertions(+), 13 deletions(-) Modified: doc/pod/news.pod =================================================================== --- doc/pod/news.pod 2014-09-24 18:05:04 UTC (rev 9726) +++ doc/pod/news.pod 2014-09-24 18:06:23 UTC (rev 9727) @@ -13,6 +13,15 @@ =item * +Add new B<-i> flag to both B<cnfsstat> and B<innwatch> to specify +how many seconds they should sleep at startup. It will especially be +useful in B<rc.news> so that these scripts are actually started and then +sleep by themselves, instead of being started a minute after B<innd> +and therefore not being properly stopped if C<rc.news stop> is invoked +during that minute. + +=item * + Add new B<-f> flag to C<innwatch> to specify the configuration file to use, in case it is not the default F<innwatch.ctl> file. Modified: doc/pod/rc.news.pod =================================================================== --- doc/pod/rc.news.pod 2014-09-24 18:05:04 UTC (rev 9726) +++ doc/pod/rc.news.pod 2014-09-24 18:06:23 UTC (rev 9727) @@ -4,7 +4,7 @@ =head1 SYNOPSIS -B<rc.news> [start | stop] +B<rc.news> [C<start> | C<stop>] =head1 DESCRIPTION @@ -45,6 +45,16 @@ argument C<start> or C<stop> (to perform site-specific startup or shutdown tasks). +=item * + +When started, if INN appears to have previously been shut down during +its expiry process, run B<expirerm> if there are articles to unlink. + +=item * + +When started, if overview data appears to have just been rebuilt and +F<active> needs to be renumbered, then actually renumber it. + =back =head1 OPTIONS @@ -58,8 +68,7 @@ =item C<stop> -If the first argument is C<stop>, B<rc.news> initiates INN shutdown. It -is recommended to throttle the server first as described in ctlinnd(8). +If the first argument is C<stop>, B<rc.news> initiates INN shutdown. =back @@ -67,16 +76,15 @@ To start INN and leave certain error messages going to the terminal: - su - news -s /bin/sh -c <pathbin in inn.conf>/rc.news + su news -s /bin/sh -c <pathbin in inn.conf>/rc.news To run INN at startup time from appropriate system boot scripts: - su - news -s /bin/sh -c <pathbin>/rc.news >/dev/console + su news -s /bin/sh -c <pathbin>/rc.news >> <pathlog>/rc.news 2>&1 -To stop INN (throttling first): +To stop INN: - <pathbin>/ctlinnd throttle reason - su - news -s /bin/sh -c '<pathbin>/rc.news stop' + su news -s /bin/sh -c '<pathbin>/rc.news stop' =head1 BUGS @@ -95,6 +103,6 @@ =head1 SEE ALSO -ctlinnd(8), cnfsstat(8), inn.conf(5), innwatch(8), ovdb(5). +ctlinnd(8), cnfsstat(8), expirerm(8), inn.conf(5), innwatch(8), ovdb(5). =cut Modified: scripts/rc.news.in =================================================================== --- scripts/rc.news.in 2014-09-24 18:05:04 UTC (rev 9726) +++ scripts/rc.news.in 2014-09-24 18:06:23 UTC (rev 9727) @@ -32,13 +32,13 @@ # Stop innwatch (if running) if [ -f $WATCHPID ]; then kill `cat $WATCHPID` - rm -f $WATCHPID + rm -f $WATCHPID ${LOCKS}/LOCK.innwatch fi printf "Stopping innd: " ${PATHBIN}/ctlinnd shutdown 'rc.news stop' - # wait for innd to exit (up to 60 sec) + # Wait for innd to exit (up to 60 sec) pid=`cat ${SERVERPID} 2>/dev/null` if [ "$pid" != "" ]; then waitforpid $pid @@ -163,12 +163,12 @@ # Gee, looks like lisp, doesn't it? ${DOINNWATCH} && { echo "Scheduled start of ${INNWATCH}." - ( sleep 60 ; ${INNWATCH} ) > /dev/null & + ${INNWATCH} -i 60 > /dev/null & } ${DOCNFSSTAT} && { echo "Scheduled start of cnfsstat." - ( sleep 60 ; ${PATHBIN}/cnfsstat -s -l -P ) > /dev/null & + ${PATHBIN}/cnfsstat -i 60 -s -l -P > /dev/null & } RMFILE=${MOST_LOGS}/expire.rm ------------------------------ Message: 3 Date: Wed, 24 Sep 2014 11:07:28 -0700 (PDT) From: INN Commit <r...@isc.org> To: inn-committ...@isc.org Subject: INN commit: trunk/doc/pod (news.pod) Message-ID: <20140924180728.33c0d67...@hope.eyrie.org> Date: Wednesday, September 24, 2014 @ 11:07:27 Author: iulius Revision: 9728 Update changelog to mention previous commit [9722] Modified: trunk/doc/pod/news.pod ----------+ news.pod | 5 +++++ 1 file changed, 5 insertions(+) Modified: news.pod =================================================================== --- news.pod 2014-09-24 18:06:23 UTC (rev 9727) +++ news.pod 2014-09-24 18:07:27 UTC (rev 9728) @@ -207,6 +207,11 @@ =item * +Add new B<-f> flag to C<innwatch> to specify the configuration file to +use, in case it is not the default F<innwatch.ctl> file. + +=item * + Fixed how B<innupgrade> is executed during an update of an INN installation; on a few systems like AIX, it fails to run because its taint mode was unproperly declared. ------------------------------ _______________________________________________ inn-committers mailing list inn-committers@lists.isc.org https://lists.isc.org/mailman/listinfo/inn-committers End of inn-committers Digest, Vol 67, Issue 21 **********************************************