TorrentFlux.com Hey, OppTupacShakur, you have 11 messages, 0 are new.
05-07-2007, 12:29:39
Home Help Search Profile Logout donate chat
News:


+  TorrentFlux Forums
|-+  Code Hacks and Tools
| |-+  TorrentFlux 2.1 Hacks
| | |-+  xfer bandwidth/transfer statistics hack 2.3.0
« previous next »
Pages: 1 [2] 3 4 ... 8 Go Down Reply Notify of replies Send this topic Print
Author Topic: xfer bandwidth/transfer statistics hack 2.3.0  (Read 14711 times)
blackwidow
Newbie
*
Offline Offline

Posts: 44



View Profile Personal Message (Offline)
« Reply #15 on: 04-17-2006, 11:34:31 » Reply with quote

but I think if it is possible it would be neat to have a way to reset the stats at any time....
I'll make sure to add something like that in the next update. my todo list grows longer Smiley
Report to moderator   Logged
lord_nor
Full Member
***
Offline Offline

TF Base: Linux 2.x
Posts: 173




View Profile Personal Message (Offline)
« Reply #16 on: 04-17-2006, 12:18:14 » Reply with quote

can't you just drop all the entries out of the table?
Report to moderator   Logged

If they give you lined paper, write the other way.

Freebsd 6.1 | PHP 5.1.4 | MySql 5.1.9-beta | Apache 1.3.36
blackwidow
Newbie
*
Offline Offline

Posts: 44



View Profile Personal Message (Offline)
« Reply #17 on: 04-17-2006, 16:26:17 » Reply with quote

can't you just drop all the entries out of the table?

pretty much. and add a zero entry for today, which happens anyways at the beginning of functions.php if the database is empty. I suppose we could reset the .stat files, too. how about deleting data for specific days or users? I have not reset my data for two years now, so I don't know what we might want.
Report to moderator   Logged
PiForever
Full Member
***
Offline Offline

TF Base: Linux 2.x
Posts: 144





View Profile Personal Message (Offline)
« Reply #18 on: 04-17-2006, 18:01:32 » Reply with quote

>I have not reset my data for two years now, so I don't know what we might want.

WOW! can you give us your total ??  Grin
Report to moderator   Logged

Apache 2.0.54-MySQL 4.1.19-PHP 2.0.4-Perl 5.8.6-Fedora 4
TorrentFlux.2.1-b4rt
blackwidow
Newbie
*
Offline Offline

Posts: 44



View Profile Personal Message (Offline)
« Reply #19 on: 04-17-2006, 21:30:08 » Reply with quote

>I have not reset my data for two years now, so I don't know what we might want.

WOW! can you give us your total ??  Grin

on the screenshots
Report to moderator   Logged
3dfx
Newbie
*
Offline Offline

TF Base: Linux 2.x
Posts: 42



View Profile Personal Message (Offline)
« Reply #20 on: 04-17-2006, 23:27:44 » Reply with quote

Thanks blackwidow
But I'll wait for next version, cos I already applied nearly all new features except ADODB and double-read things

I really want features in your to do list Cheesy
Great work
Report to moderator   Logged

Apache 2.2.0 (migrating to lighttpd) + PHP 5.1.2 + MySQL 5.0.19 + Python 2.4.3 + RedHat 9.0

TF 2.1-b4rt-84
mb.Tab
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 534


Gotta love my Avatar !!

169560841 mb.Tab@web.de andreas11b



View Profile WWW Email Personal Message (Offline)
« Reply #21 on: 04-18-2006, 14:13:52 » Reply with quote

*w0w* great work....will get it in asap and report then !....Smiley

mb.Tab
Report to moderator   Logged

ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 918





View Profile Personal Message (Offline)
« Reply #22 on: 04-18-2006, 18:18:10 » Reply with quote

Installed the patched files last night as I finally gave up and did a clean upgrade to 2.1Final. Working pretty well I must say.
Report to moderator   Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
darknite
Newbie
*
Offline Offline

TF Base: Linux 2.x
Posts: 39






View Profile WWW Personal Message (Offline)
« Reply #23 on: 04-19-2006, 09:25:25 » Reply with quote

I'm tempted to think I screwed something up, but I did this on a clean install, so it's doubtful, but the numbers aren't adding up for me on this implementation..

I'm showing days in the negative, which means when I delete a .torrent, it's removing the stats as well..

I really haven't looked at the code, but I'm pretty sure the discrepency is from the .stat files being removed before they get written to the database.. I gather this from the fact that I couple old .stat files had me showing data transfer as soon as I had done a fresh install of everything, even tho I had zero torrents listed..

could just be me tho..
Report to moderator   Logged

SERVER: Slackware-current | AMD Athlon 1Ghz | 512MB | Apache 1.3 | PHP 4.4.1 | MySQL 4.1.14 | TF 2.1 | NAS: AMD AthlonXP 2800+ | 1024MB| 1.12TB Storage | TF: 2.1 Mod/Hacks: Realname Links/Multi-upload/multi-search/Transfer stats/Cookied Login/Ajax Details
blackwidow
Newbie
*
Offline Offline

Posts: 44



View Profile Personal Message (Offline)
« Reply #24 on: 04-19-2006, 12:22:09 » Reply with quote

I'm showing days in the negative, which means when I delete a .torrent, it's removing the stats as well..

this is my guess on what has happened...when you deleted the old TorrentFlux install, you had some old torrents from at least a day prior still listed. this leaves the database with negative values for that day, and with the corresponding .stat files gone, those numbers never correct themselves. if this is the case, you will see one or more negative database entries with today's date. delete those.
Report to moderator   Logged
PiForever
Full Member
***
Offline Offline

TF Base: Linux 2.x
Posts: 144





View Profile Personal Message (Offline)
« Reply #25 on: 04-20-2006, 05:29:32 » Reply with quote

Guys my error_log files grew exponentially since i started using this hack....mainly due to those messages

Code:
PHP Notice:  Undefined index:  download in /var/www/html/tflux21/functions.php on line 120
PHP Notice:  Undefined index:  upload in /var/www/html/tflux21/functions.php on line 121
PHP Notice:  Undefined index:  total in /var/www/html/tflux21/functions.php on line 122
PHP Notice:  Undefined index:  month in /var/www/html/tflux21/functions.php on line 123
PHP Notice:  Undefined index:  download in /var/www/html/tflux21/functions.php on line 123
PHP Notice:  Undefined index:  upload in /var/www/html/tflux21/functions.php on line 124
PHP Notice:  Undefined index:  total in /var/www/html/tflux21/functions.php on line 125
PHP Notice:  Undefined index:  week in /var/www/html/tflux21/functions.php on line 120
PHP Notice:  Undefined index:  download in /var/www/html/tflux21/functions.php on line 120
PHP Notice:  Undefined index:  total in /var/www/html/tflux21/functions.php on line 122

How can I solve it???
Report to moderator   Logged

Apache 2.0.54-MySQL 4.1.19-PHP 2.0.4-Perl 5.8.6-Fedora 4
TorrentFlux.2.1-b4rt
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 918





View Profile Personal Message (Offline)
« Reply #26 on: 04-20-2006, 06:37:59 » Reply with quote

Guys my error_log files grew exponentially since i started using this hack....mainly due to those messages

Code:
PHP Notice:  Undefined index:  download in /var/www/html/tflux21/functions.php on line 120
PHP Notice:  Undefined index:  upload in /var/www/html/tflux21/functions.php on line 121
PHP Notice:  Undefined index:  total in /var/www/html/tflux21/functions.php on line 122
PHP Notice:  Undefined index:  month in /var/www/html/tflux21/functions.php on line 123
PHP Notice:  Undefined index:  download in /var/www/html/tflux21/functions.php on line 123
PHP Notice:  Undefined index:  upload in /var/www/html/tflux21/functions.php on line 124
PHP Notice:  Undefined index:  total in /var/www/html/tflux21/functions.php on line 125
PHP Notice:  Undefined index:  week in /var/www/html/tflux21/functions.php on line 120
PHP Notice:  Undefined index:  download in /var/www/html/tflux21/functions.php on line 120
PHP Notice:  Undefined index:  total in /var/www/html/tflux21/functions.php on line 122

How can I solve it???

Turn off php notices?
Report to moderator   Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
PiForever
Full Member
***
Offline Offline

TF Base: Linux 2.x
Posts: 144





View Profile Personal Message (Offline)
« Reply #27 on: 04-20-2006, 07:06:37 » Reply with quote

I looked in Google for a way to do that

so all i did was to open /etc/php.ini

i commented this line
Code:
;error_reporting  =  E_ALL

and uncommented this line
Code:
;   - Show all errors, except for notices
error_reporting = E_ALL & ~E_NOTICE

thnx
Report to moderator   Logged

Apache 2.0.54-MySQL 4.1.19-PHP 2.0.4-Perl 5.8.6-Fedora 4
TorrentFlux.2.1-b4rt
blackwidow
Newbie
*
Offline Offline

Posts: 44



View Profile Personal Message (Offline)
« Reply #28 on: 04-20-2006, 11:37:51 » Reply with quote

to fix this, should I turn off error messages for those lines using '@', or should the six lines have isset() if/then checking? that would be 18*USERS+6*TORRENTS extra if/thens each time the script loads. I'm not sure what the cost of using '@' is to the PHP engine.
Report to moderator   Logged
D_V
Newbie
*
Offline Offline

Posts: 9



View Profile Personal Message (Offline)
« Reply #29 on: 04-20-2006, 12:23:23 » Reply with quote

Using the '@', does nothing else than omitting the output.. so i don't think it would do anything at all.

But using the if's, solution will surely use significant extra process time...
Report to moderator   Logged
Pages: 1 [2] 3 4 ... 8 Go Up Reply Notify of replies Send this topic Print 
« previous next »
Jump to:  


Powered by MySQL Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC Powered by PHP