PDA

View Full Version : XFERStats.itcl - # of downloads Stats


Mouton
11-18-2003, 11:26 PM
Little itcl script to compute stats using xferlog
Gives number of times each rls was download (or upladed!)

I parsed a 67K lines xferlog in a little over 60s.

You can output in html, text or csv (to play with it in excel)

Settings section at top is pretty straightforward.

You can either map it to a SITE command or run it using the Scheduler each night to get up to date stats that u can share or not with ur fellow users.

[Scripts]
xferstats = TCL ..\scripts\xferstats.itcl

or

[Scheduler]
xferstats = 0 0 * * TCL ..\scripts\xferstats.itcl

Download avail. in ioftpd.com/members for Foundation License owners.

Sample csv:

download,/games/Not.So.Fun-Game,3,heho someGuy potatos
download,/svcd/Wooo-Bananas,4,potatos twsite someGuy heho
download,/vcd/Cool.Movie-Something,3,heho someGuy potatos
download,/tvrips/Good.Eps-Me,2,micky Mouton
Sample html:

<table>
<tr><td>Not.So.Fun-Game</td><td>3</td><td>heho someGuy potatos</td></tr>
<tr><td>Cool.Movie-Something</td><td>4</td><td>potatos twsite someGuy heho</td></tr>
<tr><td>Good.Eps-Me</td><td>3</td><td>heho someGuy potatos</td></tr>
<tr><td>Wooo-Bananas</td><td>12</td><td>micky Mouton</td></tr>
</table>
Sample text:

/games/Not.So.Fun-Game was downloaded 1 times by 'Mouton'
/svcd/Wooo-Bananas was downloaded 5 times by 'Mouton potatos twsite someGuy heho'
/vcd/Cool.Movie-Something was downloaded 2 times by 'someGuy potatos'
/tvrips/Good.Eps-Me was downloaded 2 times by 'micky Mouton'


Enjoy.

rAWfOX
11-19-2003, 03:35 AM
awsome..... gr8 work...

Collectem
11-19-2003, 04:10 AM
Script Works Great, Nice Work Mouton :banana:

SomeoneWhoCares_2
11-19-2003, 06:15 AM
nice one been waiting for something like this, i think a great extension to this script would be something to show the top x leeched releases, and how much that is for each in mb etc, in a .message file :D

rAWfOX
11-19-2003, 10:25 AM
Originally posted by SomeoneWhoCares
nice one been waiting for something like this, i think a great extension to this script would be something to show the top x leeched releases, and how much that is for each in mb etc, in a .message file :D

word!

freak007
11-19-2003, 11:50 AM
Thx Mouton:
nice and usefull script

One question:
but whould it be possible so i can add a command to view all releases up or downloaded by a single user or sort the resultsfile by name or anything else.

Thx for answer !

Cya Freak007

wooolF[RM]
11-19-2003, 12:41 PM
Originally posted by SomeoneWhoCares
nice one been waiting for something like this, i think a great extension to this script would be something to show the top x leeched releases, and how much that is for each in mb etc, in a .message file :D w0rd too :D :D

Mouton
11-19-2003, 02:58 PM
It's an itcl script. Very easy to modify by anyone who know some about tcl.
Anyone is free to make mods and send to me to publish in Foundation section.

I won't do any of them until I personnaly want/need them.
Busy with other stuff, like maintaining this new Foundation stuff.

Mouton
11-19-2003, 09:33 PM
woolF[RM] made a mod with nicer html output
dubbed xferstats_nhtml
u can get it at same place.

wooolF[RM]
11-19-2003, 09:48 PM
it's wooolF[RM], not woolF[RM] :p
but thnx anyway for giving it a try :) and thnx for the nice script :)

wooolF[RM]
11-19-2003, 10:59 PM
damn... xferstats crash ioFTPD with 5.3.5r :x (tried like 7-8 times now)... checks half of the log or so, then server crashes :o

looked in systemerror.log, it's empty... damnit, worked nice on 5.2.15r :(

ybmomo
11-20-2003, 12:10 AM
keep up the good works :)

BTW Off topic

how to get that nice icon for foundation thx..

wooolF[RM]
11-20-2003, 12:12 AM
it's my avatar... made it in Photoshop... :rolleyes:
thanx for the comments tho' :D

wooolF[RM]
11-20-2003, 04:09 PM
can anyone confirm xferstats_nhtml crashing server on 5.3.5r (while parsing the log)? :confused:

Mouton
11-20-2003, 04:35 PM
[16:26:30] [L] site version
[16:26:30] [L] 200-ioFTPD version 5-3-5r
[16:26:30] [L] 200-ioBanana version M-19b
[16:26:30] [L] 200 Command successful.
[16:26:35] [L] site xferstats
[16:26:35] [L] 200-XFERStats started...
...
[16:27:39] [L] 200-734 releases found (upload and download)
[16:27:39] [L] 200-XFERStats done.
[16:27:39] [L] 200 Command successful.

Works here.
U probably got a funny xferlog.

u can send me if u want me to try here.

wooolF[RM]
11-20-2003, 06:55 PM
prolly u're right... I'll try to rename old one and then wait 1-2 days and then try to parse the new log once again.

will report the results later...

wooolF[RM]
11-21-2003, 02:05 AM
Worked flawessly with new xferlog, I think something made it "bad"... anyway, thnx again for this nice script :)

Pharaoh
11-22-2003, 01:18 AM
Originally posted by Mouton
woolF[RM] made a mod with nicer html output
dubbed xferstats_nhtml
u can get it at same place.

I can't seem to be able to run his xferstats_nhtml...
I keep getting:
site xferstats
550 Command failed.

Yours working great tho...
Is there anything special I need to do to make xferstats_nhtml work, or is there anything wrong in the script maybe?

(by the way, I did change the INI [script] line to point to the right script and I also set the site command permissions to * for this command to see if it make any difference, but to no avail).

neoxed
11-22-2003, 01:23 AM
Pharaoh Check in ../logs/SystemError.log for ITCL errors.

Pharaoh
11-22-2003, 01:32 AM
thanks NeoXed, I found the problem there...I wrote my site name in 2 words and the script didn't like it
(ie. for example -
# site name
set xfs(site) Bubble Bobble

should have been
# site name
set xfs(site) Bubble-Bobble)

neoxed
11-22-2003, 01:50 AM
Originally posted by Pharaoh
set xfs(site) Bubble Bobble

should have been
# site name
set xfs(site) Bubble-Bobble)

If its more then one word, just add it in quotations.

Example: set xfs(site) "Bubble Bobble"

wooolF[RM]
11-22-2003, 06:48 AM
uhm... I would apreciatte any comments on my HTML layout... :p :D

Pharaoh
11-22-2003, 08:29 AM
Originally posted by wooolF[RM]
uhm... I would apreciatte any comments on my HTML layout... :p :D

cool layout mate! :D

wooolF[RM]
11-23-2003, 09:08 AM
oh, finally lol :D :p thnx ;) just wanted to be sure that it was not just me who thought that html output could be a bit nicer :D

laShan
02-12-2004, 04:09 AM
I did a silly little leechstats.tcl script for those of you who want a !mostleeched command in your sitechans. It's available for download as a foundation script. Btw, I haven't tested it with any large xferstats files, could take forever to process a request, I have no clue. If someone is willing to provide a large xferstats.results file I could try it out.

Oh, and the code probably sucks too, but it works for me and seems to get the job done. I pretty much just threw it together.

MidasKing
02-17-2004, 06:57 PM
Thanks for the nice script IaShan... but I found a problem:


!mostleeched in channel not work

and the the 3rd party returns:

Tcl error [leecherstats]: expected integer but got "<table>"

What is happening???


.

laShan
02-18-2004, 03:24 AM
It seems like you have the output format set to html. You need to make sure that you have set the output format in xferstats.itcl as mentioned in the readme file for leechstats. The correct line looks like this:

set xfs(output) "csv"

Also be sure that the other settings mentioned in the readme is correctly set.

MidasKing
02-18-2004, 09:52 AM
.

Sorry IaShan... my error....

It's works flawessly now...

Thanks...:)

Ne6O
03-13-2004, 07:57 PM
i have an error on leechstats script i have installed correctly (in my mind :p) but i have this error :

Tcl error [leecherstats]: can't read "alldir": no such variable

Anyone can help me ?

laShan
03-16-2004, 02:31 AM
I would guess that the path to xferlog.results is wrong, or that the file does not exist.

InsinX
04-05-2004, 03:28 PM
would it be posible to do by section as well?
!mostleeched section #

SomeoneWhoCares_2
04-05-2004, 10:43 PM
hmm leechstats.tcl is screwed up..
if i do !mostleeched 10 but there is only 1 entry in xferlog it spams empty lines.
it also repeats the same rls,
once i fixed that sorta and tested with a 400kb xferlog
it output 2 rls per numbers
[1] .... leeched 1 times
[1] .... leeched 4 times
[2] ....
[2] ....

shouldnt it output one rls per # and also be in order of most leeched ?

also doing !mostleeched 11 even though limit was 10 spammed about 50-60 lines =/

help~ :D

laShan
04-06-2004, 03:46 AM
The first one, if there's only one entry, is definetly a bug and I will fix that in the next release. The other issues are a bit more strange though, since you're the only one who has reported them. Sounds like it could be a bad setup, but I will take a look at it.

InsinX, will look into it.

leeson
04-15-2004, 04:54 AM
Hui my first Post ..
First of all Great Work with html Output :D
But have a Problem ...

If I transfer a Folder "Test Folder" for example.
The Stats only shows "Test"

There seems to be a Problem with Spaces at Directory Names. Any Ideas how to fix it ?

Mouton
04-15-2004, 10:37 AM
the xferlog is a space-delimited-values file...
which means each field is separated by a space. so to know when the field ends, the script looks for a space. it could be fixed using regular-expressions logic, but it would make the script much MUCH slower i'd guess.

leeson
04-15-2004, 10:46 AM
Originally posted by Mouton
the xferlog is a space-delimited-values file...
which means each field is separated by a space. so to know when the field ends, the script looks for a space. it could be fixed using regular-expressions logic, but it would make the script much MUCH slower i'd guess.

Are you able to modify the Script ? Would be great :D
For me doesn't mater if needs 2 or 20 sec to make the html :P

icios
06-08-2004, 08:42 AM
Hi there!

i do site xferstats and got:
200-XFERStats started...
200-2 releases found (upload and download)
200 Command successful.

but xferlog.results got 0byte and is empty.
I tryed to swicth from csv to html to text, but same result.

Can somebody help?!?

biggysmlz
12-15-2012, 06:24 AM
Hi guys, is it possible to download this script still somewhere?

Dahlia
02-17-2013, 05:02 AM
XFERStats.rar (http://www.sendspace.com/file/0cb43b)

enjoy

Hans_
09-19-2013, 05:52 AM
could some1 pls reupload this script somewhere ^^`?

Yil
09-24-2013, 06:25 PM
Dug around an old script backup and I think this is the right script. At least it's got the same name :)

Hans_
09-30-2013, 03:34 AM
thank you sir