Results 1 to 40 of 48

Thread: Perl log analyser for pproxy stats

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Dungeon Master alpha's Avatar
    Join Date
    Mar 2002
    Location
    Norfolk, UK
    Posts
    1,700

    Perl log analyser for pproxy stats [UPDATED!]

    I've written a simple perl script to analyse your local pproxy log files and give you some stats like the largest and smallest stubs ever submitted to your pproxy.

    READ THIS PARAGRAPH BEFORE USAGE. All you need to know is to put the attached script in the same directory as all your pproxy log files, and run it with "perl csvparse_totals.txt", or I guess you can chmod +x it and execute it like an executable. It has the txt extension due to forum upload restrictions, so feel free to rename to pl. I developed it on FreeBSD, but it should work on practically any system with Perl.

    Here are my stats:

    Overall PProxy stats based on 1258 days and 57531 stubs:

    Smallest: 0.04 Gnodes, submitted on 14/12/2007
    Largest: 891.53 Gnodes, submitted on 03/09/2007
    Average: 38.61 Gnodes
    Total: 2221394.73 Gnodes
    I'm no perl guru, so the script is probably very inefficient and ugly. But it works! If anyone has any suggestions on how to make this better, or more informative, I'm all ears. Who doesn't love stats?

    Oh, and I have a slightly different script which I have running on an hourly cron job. It analyses only the log file for today's date to give you some stats. I can make that available as well if anyone is interested.

    Edit: updated thread title and attachment to new version.
    Attached Files Attached Files
    Last edited by alpha; 01-08-2008 at 05:30 AM.

  2. #2
    Stats God in Training Darkness Productions's Avatar
    Join Date
    Dec 2001
    Location
    The land of dp!
    Posts
    4,164
    2 questions

    1) Why does it need 'use Socket'? I don't see it doing anything with sockets.
    2) Why use Text::CSV? Since it's just comma separated, and doesn't have any other weird formatting, just my @columns = split(/,/, $_);, and if $columns != 8, then print your error...

  3. #3
    Dungeon Master alpha's Avatar
    Join Date
    Mar 2002
    Location
    Norfolk, UK
    Posts
    1,700
    Quote Originally Posted by Darkness Productions View Post
    1) Why does it need 'use Socket'? I don't see it doing anything with sockets.
    Hmm. I often copy and paste code from previous work as a starting point for new work. Looks like something got left behind that shouldn't have.

    2) Why use Text::CSV? Since it's just comma separated, and doesn't have any other weird formatting, just my @columns = split(/,/, $_);, and if $columns != 8, then print your error...
    I was just looking for an easy solution that would be quickest for me to do. I had forgotten about that dependency until I started this thread then realised how inconvenient it will be for others to have to install the module first. I'll take a look and see if I work without it.

    Thanks for the feedback!

  4. #4
    Dungeon Master alpha's Avatar
    Join Date
    Mar 2002
    Location
    Norfolk, UK
    Posts
    1,700
    OK, I've removed the use Socket line and the dependancy on Text::CSV as per DP's suggestions. The initial post in this thread has been updated with correct new info and the updated script attached.

    Also:
    perl csvparse_totals.pl 1.36s user 0.14s system 98% cpu 1.517 total
    perl csvparse_totals.pl.bak 61.33s user 0.16s system 98% cpu 1:02.38 total
    The new version is over 40 times faster. DP, you rock!

  5. #5
    Dungeon Master alpha's Avatar
    Join Date
    Mar 2002
    Location
    Norfolk, UK
    Posts
    1,700
    So... can anyone beat my pproxy's stats? Without scanning the rollin' thread, I seem to remember someone with a 0.01 Gnode stub and I know BlisteringSheep posted in the Ars TBR thread about a 1200+ Gnode stub.

    I know several of you run pproxys, so step up and post your stats.

  6. #6
    Administrator Bok's Avatar
    Join Date
    Oct 2003
    Location
    Wake Forest, North Carolina, United States
    Posts
    24,467
    Blog Entries
    13
    My personal Proxy..

    Overall PProxy stats based on 15 days and 33446 stubs:

    Smallest: 0.08 Gnodes, submitted on 11/01/2008
    Largest: 794.15 Gnodes, submitted on 16/01/2008
    Average: 41.89 Gnodes
    Total: 1401027.86 Gnodes

    Free-DC Proxy

    Overall PProxy stats based on 16 days and 240227 stubs:

    Smallest: 0.02 Gnodes, submitted on 04/01/2008
    Largest: 1024.03 Gnodes, submitted on 16/01/2008
    Average: 55.23 Gnodes
    Total: 13268826.16 Gnodes


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •