chiark / gitweb /
Install innduct-stats-report
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Fri, 28 May 2010 21:28:51 +0000 (22:28 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Fri, 28 May 2010 21:28:51 +0000 (22:28 +0100)
Makefile.am
innduct-stats-report
innduct-stats-report.8 [new file with mode: 0644]

index f87a0690114c62bb2e1802e5621309f82396efb5..1e91beab3c5cb51be072264ee4607a0a02d0e9a2 100644 (file)
@@ -40,7 +40,8 @@ WARNINGS= \
 CFLAGS = @CFLAGS@ $(WARNINGS) $(WERROR) $(CMDLINE_CFLAGS)
 
 bin_PROGRAMS = innduct
 CFLAGS = @CFLAGS@ $(WARNINGS) $(WERROR) $(CMDLINE_CFLAGS)
 
 bin_PROGRAMS = innduct
-man_MANS = innduct.8
+bin_SCRIPTS = innduct-stats-report
+man_MANS = innduct.8 innduct-stats-report.8
 innduct_SOURCES = duct.c conn.c filemon.c infile.c recv.c xmit.c \
                cli.c defer.c help.c statemc.c __oop-read-copy.c
 
 innduct_SOURCES = duct.c conn.c filemon.c infile.c recv.c xmit.c \
                cli.c defer.c help.c statemc.c __oop-read-copy.c
 
index 391dac1b3806764b910ec1b71c54220bbb2065c2..62007edd97a67248bc79a65d3f36209fa7e75fb6 100755 (executable)
@@ -10,6 +10,10 @@ our %counts;
 # Input lines look like this:
 # May 23 19:00:02 chiark innduct[23236]: news.relativity.greenend.org.uk| info: completed feedfile read=76 (+bl=7,+err=0) missing=0 offered=76 (ch=76,nc=0) accepted=75 (ch=75,nc=0) unwanted=1 (id=1,bod=0,nc=0) rejected=0 (id=0,bod=0,nc=0) deferred=0 (id=0,bod=0,nc=0) missing=0 (id=0,bod=0,nc=0) connretry=0 (id=0,bod=0,nc=0)
 
 # Input lines look like this:
 # May 23 19:00:02 chiark innduct[23236]: news.relativity.greenend.org.uk| info: completed feedfile read=76 (+bl=7,+err=0) missing=0 offered=76 (ch=76,nc=0) accepted=75 (ch=75,nc=0) unwanted=1 (id=1,bod=0,nc=0) rejected=0 (id=0,bod=0,nc=0) deferred=0 (id=0,bod=0,nc=0) missing=0 (id=0,bod=0,nc=0) connretry=0 (id=0,bod=0,nc=0)
 
+if (@ARGV && $ARGV[0] =~ m/^\-/) {
+    die "$0: bad usage: no options supported\n";
+}
+
 while (<>) {
     next unless
        m/^ [:0-9A-Za-z ]+[ ]
 while (<>) {
     next unless
        m/^ [:0-9A-Za-z ]+[ ]
diff --git a/innduct-stats-report.8 b/innduct-stats-report.8
new file mode 100644 (file)
index 0000000..d0795ee
--- /dev/null
@@ -0,0 +1,20 @@
+'\" t
+.TH INNDUCT-STATS-REPORT 8
+.SH NAME
+innduct-stats-report \- summarise transfer statistics logged by innduct
+.SH SYNOPSIS
+.B innduct-stats-report
+.RI [logfile
+.IR ...]
+.SH DESCRIPTION
+.B innduct-stats-report
+reads logfiles mentioned on its command line, or a single logfile
+stream fed on stdin, and produces a summary listing of articles logged
+by innnduct instances, one line per site.
+.SH BUGS
+How to deal with long site names should be configurable.  In general
+more flexibility and functionality would be good.
+.SH HISTORY
+Written by Ian Jackson <ijackson@chiark.greenend.org.uk>
+.SH "SEE ALSO"
+innduct(8)