🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
5 messages
5 total messages Started by Brad Knowles Mon, 08 Mar 1999 00:00
Modifications to feeder-stats.pl
#35842
Author: Brad Knowles
Date: Mon, 08 Mar 1999 00:00
84 lines
4653 bytes
Folks,

    I've made some modifications to Iain's feeder-stats.pl script that is
used with Diablo & Cyclone to produce web pages with various statistics on
them, but I haven't heard anything from him in the last few e-mail
messages I've sent.

    Therefore, I'd like to share with the folks on this newsgroup my
various changes, get your feedback, see if I've made any horrible
programming mistakes (which I haven't caught yet ;-), etc....


    Normally, I'd just include the context diff with my post, but given
that I've also done things like stripping trailing spaces throughout the
source, the diffs are actually pretty large now (the "real" changes are
pretty small, however).

    Anyway, you can find my latest context diffs at
<ftp://ftp.shub-internet.org/pub/shub/feeder-stats.pl.diff>.


    In summary, the major changes I made were:

        * Added a "-H <hour>" option, so that you could force it to fill
out the graphs up to a specific hour.  This is useful if you should happen
to be hacking on feeder-stats.pl and you manage to break it so that at
least one day's worth of stats end up being broken and/or missing.  ;-)

        * Changed the current "%Acc" column to be "%Tot", because it is
really a measure of how many articles you've accepted from that site (or
transmitted to that site) as a ratio of the total number of articles in or
out.

        * Added a new "%Acc" column that is a ratio of the total number of
articles accepted from/transmitted to only that one specific site (so, you
may be accepting nearly 100% of the articles offered by a particular site,
although this may be only a very small portion of the total number of
articles you accept overall).

        * Added new "outbound by time" table and graph, corresponding to
the previous "inbound by time" table/graph.  This required a slight
renumbering of the other sections of the report.

        * Added new "outbound" graphs that correspond to the previous
"inbound" graphs.  Note that outbound volume graph is kind of broken right
now, since the total volume is usually so much higher than any one
individual volume that the total is the only line that gets visibly
charted, while the rest basically just fall off the bottom of the chart. 
I'm awaiting a new version of chart.pm that I hope will add the ability to
apply logarithmic scaling to the vertical axis of a chart, so that
exceptionally large values don't down out the lower values.

        * Added a slight time delay after initial startup, with the intent
that the script will now be started via cron at fifty-nine minutes after
the hour, instead of on the hour.  The idea being that currently we're all
losing the stats between 11:00 PM and 12:00 AM, since when the script
starts up at exactly 12:00 Midnight, it's already the next day and the
chart gets minimal data written to it for the few minutes of time that
Diablo/Cyclone will have been running since the cut-over and while
feeder-stats.pl is chugging through the log files.


    You can see a sample of the kind of output provided by this new
version of feeder-stats.pl at
<http://feederbox.skynet.be/stats/index.html>.


    The next thing on my plate will be to add innreport-like per host bar
graphs of the various textual charts, so that you can see at a glance just
exactly how many articles are being offered by a particular site versus
how many are being accepted, etc....


    BTW, we're looking to add some more outbound feeds.  If you're looking
for a newsfeed from a site in the Freenix Top 200, see
<http://feederbox.skynet.be/newsbone-part.html#plans>.

-- 
Brad Knowles <brad@shub-internet.org> <http://www.shub-internet.org/brad/>
    <http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0xE38CCEF1>
        If you wouldn't take out a one-page ad in the Wall Street
        Journal to say something, then don't say it by email.

Re: Modifications to feeder-stats.pl
#35851
Author: Curt Welch
Date: Mon, 08 Mar 1999 00:00
17 lines
1340 bytes
brad@shub-internet.org (Brad Knowles) wrote:

> The idea being that currently
> we're all losing the stats between 11:00 PM and 12:00 AM, since when the
> script starts up at exactly 12:00 Midnight

Hey, I'm not losing data :)

To start with I run the script every 5 minutes - so I would only loose
5 minutes of data.  But I also just throw in an extra cron run at 11:59pm
to fix the problem you mention.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/

Re: Modifications to feeder-stats.pl
#35869
Author: Brad Knowles
Date: Mon, 08 Mar 1999 00:00
22 lines
1759 bytes
In article <19990308122332.330$Hs@newsreader.com>, curt@kcwc.com (Curt
Welch) wrote:

> To start with I run the script every 5 minutes - so I would only loose
> 5 minutes of data.  But I also just throw in an extra cron run at 11:59pm
> to fix the problem you mention.

    Well, it takes about twelve minutes to run over here, so I don't think
I could fire it off every five minutes.  If you fire it off only once an
hour (as we do, and I suspect we're pretty typical), then you'd want to
either go with the changes I made or fire an extra run off at 11:59 PM (as
you do).

    IMO, my changes are a cleaner solution, but then they are my changes.  ;-)

-- 
Brad Knowles <brad@shub-internet.org> <http://www.shub-internet.org/brad/>
    <http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0xE38CCEF1>
        If you wouldn't take out a one-page ad in the Wall Street
        Journal to say something, then don't say it by email.

Re: Modifications to feeder-stats.pl
#35879
Author: Iain Lea
Date: Tue, 09 Mar 1999 00:00
13 lines
1230 bytes
Brad Knowles <brad@shub-internet.org> wrote:
>     Well, it takes about twelve minutes to run over here, so I don't think
> I could fire it off every five minutes.  If you fire it off only once an
> hour (as we do, and I suspect we're pretty typical), then you'd want to
> either go with the changes I made or fire an extra run off at 11:59 PM (as
> you do).

I set it off at 59 past each hour. Let cron do the work for you.

-- 
Iain Lea    +49-9131-990622    +49-172-8275647    http://www.bricbrac.de/

Re: Modifications to feeder-stats.pl
#35880
Author: Brad Knowles
Date: Tue, 09 Mar 1999 00:00
23 lines
1779 bytes
In article <7c2p3g$lri$1@news.ecrc.de>, Iain Lea <iain@bricbrac.de> wrote:

> I set it off at 59 past each hour. Let cron do the work for you.

    Right.  And with my change, it should guarantee that the rest of that
hours data has been logged (and will be processed) by the script.

    However, I find that with my change, I still get a little bit of the
next hour's data in the tables, so I'm guessing that the "sleep 61;"
probably isn't necessary at all -- the script runs slowly enough that by
the time it gets to parsing the more recently logged data, the rest of the
hour's information has already been logged and will be picked up anyway.


    Oh well, it was a good idea, even if it wasn't strictly necessary.  ;-)

-- 
Brad Knowles <brad@shub-internet.org>  <http://www.shub-internet.org/brad/>
    <http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0xE38CCEF1>
        If you wouldn't take out a one-page ad in the Wall Street
        Journal to say something, then don't say it by email.

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads