Article View: news.software.nntp
Article #7276Re: News monitoring/statistics programs for INN
From: USENET news
Date: Mon, 06 May 1996 00:00
Date: Mon, 06 May 1996 00:00
57 lines
3198 bytes
3198 bytes
In article <4m36fa$f29@tsc.cs.unc.edu>, Todd D. Taft <taft@cs.unc.edu> wrote:
>Are there any programs that can monitor various aspects of news usage?
>I'm interested in factors like: which newsgroups use up the most disk
>space on my server, which newsgroups get the most traffic (measured in
>number of articles), which newsgroups are consistently read by my
>users, etc.
For incoming news flow, see my flowstats (perl) scripts, available from
ftp://ftp.math.psu.edu/pub/INN/contrib/flowstats-1.5.1.tar.gz. I'd also
recommend Dave Barr's INN web page (http://www.math.psu.edu/barr/INN.html),
which has a link to the flowstats kit and much, much more. Flowstats uses a
perl script running as an INN channel feed to save data which can then be
used to generate e.g. daily, weekly, monthly, annual summaries of incoming
news volume by article count and MB for each group and hierarchy.
To find which groups/hierarchies are using the space, I have a cron job
which runs du over the spool, and then summarises the groups using most
space. Extracting the relevant bit from the shell script (assumes du output
(in KB, i.e. du -k on Solaris 2) is in news.du, and that the spool directory
(used to locate the total line) is "/news2/spool". These days I'd write it
in perl, but this is ancient...
=====
total="`nawk '/\/news2\/spool$/ {print \$1}' ${1:-news.du}`"
# NB variable substitution is enabled for the in-stream script to allow
# substitution of $total... so beware un-escaped $'s elsewhere...
nawk -f - $2 $3 <<end ${1:-news.du}
BEGIN {if (minpct == 0) minpct = 0.5
print "Newsgroup directory sizes as percentage of spool use."
print
print "NB At each level, all subdirectories are included."
print
print "Total spool use = " $total " KB"
print "Groups occupying less than " minpct "% of spool omitted."
print
}
/\/news2\/spool/ {
pct = (\$1 * 100) / $total
level = (split(\$2,junk,"/")-3)*2 # indent level
if (pct >= minpct) printf("%7.1f%" level "s%s\n",pct," ",\$2)
}
end
=====
Remember that totals from different sources of information may not match for
good reasons, e.g. totals from data volumes versus totals from the spool
files (where the latter are rounded up to a multiple of the disc block or
fragment size).
John Line
--
Cambridge University Computing Service - USENET news manager. Usually John Line
newsmaster@ucs.cam.ac.uk (alias {newsmaster,news,usenet}@news.cam.ac.uk)
Technical Details
Message-ID:
<4mkl7t$eqe@lyra.csx.cam.ac.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<4m36fa$f29@tsc.cs.unc.edu>Show Full Headers
Complete Article Headers
Message-ID: <4mkl7t$eqe@lyra.csx.cam.ac.uk> Subject: Re: News monitoring/statistics programs for INN Date: Mon, 06 May 1996 00:00:00 +0000 From: news@news.cam.ac.uk (USENET news) References: <4m36fa$f29@tsc.cs.unc.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 153255197 Organization: Computing Service, Cambridge University, England Keywords: inn, solaris, statistics Newsgroups: news.software.nntp