INN commit: trunk (7 files)

INN Commit rra at isc.org
Sun Jun 28 11:03:05 UTC 2009


    Date: Sunday, June 28, 2009 @ 04:03:05
  Author: iulius
Revision: 8540

* Add a "-v" flag to cnfsstat to see the output of consistency
  checks for article storage and history.

* Convert the cnfsstat man page into POD.

Added:
  trunk/doc/pod/cnfsstat.pod
Modified:
  trunk/MANIFEST
  trunk/doc/man/	(properties)
  trunk/doc/pod/Makefile
  trunk/doc/pod/news.pod
  trunk/frontends/cnfsstat.in
Deleted:
  trunk/doc/man/cnfsstat.8

-----------------------+
 MANIFEST              |    1 
 doc/man/cnfsstat.8    |  100 ------------------------------------------------
 doc/pod/Makefile      |    3 -
 doc/pod/cnfsstat.pod  |   73 +++++++++++++++++++++++++++++++++++
 doc/pod/news.pod      |    6 ++
 frontends/cnfsstat.in |   31 ++++++++------
 6 files changed, 100 insertions(+), 114 deletions(-)

Modified: MANIFEST
===================================================================
--- MANIFEST	2009-06-28 10:01:24 UTC (rev 8539)
+++ MANIFEST	2009-06-28 11:03:05 UTC (rev 8540)
@@ -236,6 +236,7 @@
 doc/pod/buffindexed.conf.pod          Master file for buffindexed.conf.5
 doc/pod/checklist.pod                 Master file for doc/checklist
 doc/pod/ckpasswd.pod                  Master file for ckpasswd.8
+doc/pod/cnfsstat.pod                  Master file for cnfsstat.8
 doc/pod/control.ctl.pod               Master file for control.ctl.5
 doc/pod/convdate.pod                  Master file for convdate.1
 doc/pod/ctlinnd.pod                   Master file for ctlinnd.8


Property changes on: trunk/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
control.ctl.5
convdate.1
ctlinnd.8
cycbuff.conf.5
distrib.pats.5
distributions.5
docheckgroups.8
domain.8
expire.ctl.5
expireover.8
fastrm.1
getlist.1
grephistory.1
ident.8
incoming.conf.5
inews.1
inn.conf.5
INN__Config.3pm
innbind.8
innconfval.1
innd.8
inndf.8
innmail.1
innupgrade.8
libauth.3
libinnhist.3
list.3
mailpost.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
ovdb.5
ovdb_init.8
ovdb_monitor.8
ovdb_server.8
ovdb_stat.8
overchan.8
passwd.nntp.5
perl-nocem.8
pgpverify.1
pullnews.1
qio.3
radius.8
radius.conf.5
rc.news.8
readers.conf.5
rnews.1
sasl.conf.5
scanlogs.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
cnfsstat.8
control.ctl.5
convdate.1
ctlinnd.8
cycbuff.conf.5
distrib.pats.5
distributions.5
docheckgroups.8
domain.8
expire.ctl.5
expireover.8
fastrm.1
getlist.1
grephistory.1
ident.8
incoming.conf.5
inews.1
inn.conf.5
INN__Config.3pm
innbind.8
innconfval.1
innd.8
inndf.8
innmail.1
innupgrade.8
libauth.3
libinnhist.3
list.3
mailpost.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
ovdb.5
ovdb_init.8
ovdb_monitor.8
ovdb_server.8
ovdb_stat.8
overchan.8
passwd.nntp.5
perl-nocem.8
pgpverify.1
pullnews.1
qio.3
radius.8
radius.conf.5
rc.news.8
readers.conf.5
rnews.1
sasl.conf.5
scanlogs.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/cnfsstat.8
===================================================================
--- doc/man/cnfsstat.8	2009-06-28 10:01:24 UTC (rev 8539)
+++ doc/man/cnfsstat.8	2009-06-28 11:03:05 UTC (rev 8540)
@@ -1,100 +0,0 @@
-.\" $Revision$
-.TH CNFSSTAT 8
-.SH NAME
-cnfsstat \- show usage of cycbuffs
-.SH SYNOPSIS
-.B cnfsstat
-[
-.B \-a
-]
-[
-.B \-c CLASS
-]
-[
-.B \-h
-]
-[
-.B \-l
-[
-seconds
-]
-]
-[
-.B \-m BUFFER
-]
-[
-.B \-P
-]
-[
-.B \-p
-]
-[
-.B \-s
-]
-.SH DESCRIPTION
-.I Cnfsstat
-reads
-.I <pathetc in inn.conf>/cycbuff.conf
-and
-.I <pathetc in inn.conf>/storage.conf
-to determine which cycbuffs are available, read the specified cycbuffs, and
-shows their usage status.
-.PP
-.I Cnfsstat
-can be invoked from
-.IR rc.news (8),
-if
-.I <docnfsstat in inn.conf>
-is ``true'', and the result is written to
-.IR syslog (3).
-.SH OPTIONS
-.TP
-.B \-a
-.I Cnfsstat
-prints also the age of the oldest article in the cycbuff.
-.TP
-.B \-c CLASS
-.I Cnfsstat
-prints information only for the specified class.
-.TP
-.B \-h
-.I Cnfsstat
-prints usage information.
-.TP
-.B \-l [ seconds ]
-.I Cnfsstat
-prints a status snapshot every
-.IR seconds ,
-and only exits if there is an error.
-The default interval is 600 seconds.
-.TP
-.B \-m BUFFER
-.I Cnfsstat
-prints information about the specified buffer in a format suitable
-for mrtg.
-.TP
-.B \-P
-.I Cnfsstat
-writes PID into
-.IR <pathrun\ in\ inn.conf>/cnfsstat.pid .
-.TP
-.B \-p
-.I Cnfsstat
-prints an mrtg config file.
-.TP
-.B \-s
-.I Cnfsstat
-writes output to
-.IR syslog (3)
-instead of standard output.
-.SH HISTORY
-Written by Katsuhiro Kondou <kondou at nec.co.jp> for InterNetNews.
-.de R$
-This is revision \\$3, dated \\$4.
-..
-.R$ $Id$
-.SH "SEE ALSO"
-cycbuff.conf(5),
-inn.conf(5),
-rc.news(8),
-storage.conf(5).

Modified: doc/pod/Makefile
===================================================================
--- doc/pod/Makefile	2009-06-28 10:01:24 UTC (rev 8539)
+++ doc/pod/Makefile	2009-06-28 11:03:05 UTC (rev 8540)
@@ -29,7 +29,7 @@
 
 MAN8	= ../man/actsync.8 ../man/archive.8 ../man/auth_krb5.8 \
 	../man/batcher.8 ../man/buffchan.8 \
-	../man/ckpasswd.8 ../man/ctlinnd.8 ../man/docheckgroups.8 \
+	../man/ckpasswd.8 ../man/cnfsstat.8 ../man/ctlinnd.8 ../man/docheckgroups.8 \
 	../man/domain.8 \
 	../man/expireover.8 ../man/ident.8 ../man/innd.8 ../man/inndf.8 \
 	../man/nnrpd.8 ../man/innbind.8 ../man/innupgrade.8 \
@@ -107,6 +107,7 @@
 ../man/batcher.8:	batcher.pod		; $(POD2MAN) -s 8 $? > $@
 ../man/buffchan.8:	buffchan.pod		; $(POD2MAN) -s 8 $? > $@
 ../man/ckpasswd.8:	ckpasswd.pod		; $(POD2MAN) -s 8 $? > $@
+../man/cnfsstat.8:	cnfsstat.pod		; $(POD2MAN) -s 8 $? > $@
 ../man/ctlinnd.8:	ctlinnd.pod		; $(POD2MAN) -s 8 $? > $@
 ../man/docheckgroups.8:	docheckgroups.pod	; $(POD2MAN) -s 8 $? > $@
 ../man/domain.8:	domain.pod		; $(POD2MAN) -s 8 $? > $@

Added: doc/pod/cnfsstat.pod
===================================================================
--- doc/pod/cnfsstat.pod	                        (rev 0)
+++ doc/pod/cnfsstat.pod	2009-06-28 11:03:05 UTC (rev 8540)
@@ -0,0 +1,73 @@
+=head1 NAME
+
+cnfsstat - Show usage of CNFS buffers
+
+=head1 SYNOPSIS
+
+B<cnfsstat> [B<-ahpPsv>] [B<-c> I<class>] [B<-l> [I<seconds>]] [B<-m> I<buffer>]
+
+=head1 DESCRIPTION
+
+I<cnfsstat> reads I<pathetc>/cycbuff.conf and I<pathetc>/storage.conf
+to determine which CNFS buffers are available.  It then reads the specified
+cyclic buffers and shows their usage status.  I<cnfsstat> can be invoked from
+B<rc.news> if I<docnfsstat> is set to true in F<inn.conf>, and the result is
+written to syslog(3).
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-a>
+
+Besides its usual output, I<cnfsstat> prints the age of the oldest article
+in the cycbuff.  You may also want to use the B<-v> flag to see extended
+consistency checks.
+
+=item B<-c> I<class>
+
+Only information for the specified class is printed.
+
+=item B<-h>
+
+Print usage information and exit.
+
+=item B<-l> [I<seconds>]
+
+With this option, I<cnfsstat> prints a status snapshot every I<seconds>,
+and only exits if an error occurs.  When unspecified, the default interval
+is C<600> seconds.
+
+=item B<-m> I<buffer>
+
+Print information about the specified buffer in a format suitable for MRTG.
+
+=item B<-p>
+
+Print an MRTG config file.
+
+=item B<-P>
+
+Write PID into I<pathrun>/cnfsstat.pid.
+
+=item B<-s>
+
+Write output to syslog(3) instead of standard output.
+
+=item B<-v>
+
+Write additional information, especially about consistency checks for article
+storage and the F<history> file.
+
+=head1 HISTORY
+
+Written by Katsuhiro Kondou <kondou at nec.co.jp> for InterNetNews.  Rewritten
+into POD by Julien Elie.
+
+$Id$
+
+=head1 SEE ALSO
+
+cycbuff.conf(5), history(5), inn.conf(5), rc.news(8), storage.conf(5).
+
+=cut


Property changes on: trunk/doc/pod/cnfsstat.pod
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod	2009-06-28 10:01:24 UTC (rev 8539)
+++ doc/pod/news.pod	2009-06-28 11:03:05 UTC (rev 8540)
@@ -37,6 +37,12 @@
 
 =item *
 
+The output of consistency checks for article storage and the F<history>
+file no longer appears by default when C<cnfsstat -a> is used.  A new B<-v>
+flag has been added to B<cnfsstat> so as to see it.
+
+=item *
+
 The default path for TLS certificates has changed from I<pathnews>/lib
 to I<pathetc>.  It only affects new INN installations or generations of
 certificates with C<make cert>.  Besides, a default value has been

Modified: frontends/cnfsstat.in
===================================================================
--- frontends/cnfsstat.in	2009-06-28 10:01:24 UTC (rev 8539)
+++ frontends/cnfsstat.in	2009-06-28 11:03:05 UTC (rev 8540)
@@ -14,7 +14,7 @@
 # 
 #  bigint support added by Duane Currie (sandman at hub.org) 1998
 
-use vars qw($opt_l $opt_h $opt_a $opt_s $opt_p $opt_P);
+use vars qw($opt_a $opt_h $opt_l $opt_p $opt_P $opt_s $opt_v);
 use Getopt::Long;
 use Math::BigInt;
 use Math::BigFloat;
@@ -28,17 +28,18 @@
 Summary tool for CNFS
 
 Usage:
-	$0 [-c CLASS] [-l [seconds]]
+	$0 [-ahpPsv] [-c class] [-l [seconds]] [-m buffer]
 
 	If called without args, does a one-time status of all CNFS buffers
-	-a:          print the age of the oldest article in the cycbuff
-	-c <CLASS>:  prints out status of CNFS buffers in class CLASS
-	-l seconds:  loops like vmstat, default seconds = 600
-	-s:          logs through syslog
-	-h:          this information
-	-m <BUFFER>: prints out information suitable for MRTG
-	-p:	     prints out an MRTG config file
-	-P:          write PID into $INN::Config::pathrun/cnfsstat.pid
+	-a:           print the age of the oldest article in the cycbuff
+	-c class:     print out status of CNFS buffers in that class
+	-h:           this information
+	-l [seconds]: loop like vmstat, default seconds = 600
+	-m buffer:    print out information suitable for MRTG
+	-p:           print out an MRTG config file
+	-P:           write PID into $INN::Config::pathrun/cnfsstat.pid
+	-s:           log through syslog
+	-v:           do consistency checks and print the result
 _end_
     exit(1);
 }
@@ -49,8 +50,8 @@
 my $use_syslog = 0;
 
 Getopt::Long::config('no_ignore_case');
-GetOptions("-a", "-c=s", \$oclass, "-h", "-l:i", "-s", "-m=s", \$obuffer,
-           "-p", "-P");
+GetOptions("-a", "-c=s", \$oclass, "-h", "-l:i", "-m=s", \$obuffer,
+           "-p", "-P", "-s", "-v");
 
 &usage if $opt_h;
 
@@ -497,7 +498,11 @@
     if ($history =~ /\t(\d+)~/) {
 	return $1;
     }
-    print "  (Missing $msgid)\n";
+
+    if ($opt_v) {
+        print "   (Missing $msgid)\n";
+    }
+
     return 0;
 }
 




More information about the inn-committers mailing list