TorrentFlux.com Hey, OppTupacShakur, you have 11 messages, 0 are new.
05-07-2007, 12:32:23
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 5 ... 8 Go Down Reply Notify of replies Send this topic Print
Author Topic: xfer bandwidth/transfer statistics hack 2.3.0  (Read 14712 times)
alanb
Newbie
*
Offline Offline

Posts: 8



View Profile Email Personal Message (Offline)
« Reply #30 on: 04-20-2006, 14:32:20 » Reply with quote

To re-add the Server Load Statistics edit your index.php file and add this code after this line:

Code:
echo _DRIVESPACE.': <strong>'.formatFreeSpace($cfg["free_space"]).'</strong><br>';

New code:

Code:
if ($cfg["show_server_load"])
            {
                if (isFile($cfg["loadavg_path"]))
                {
                    $loadavg_array = explode(" ", exec("cat ".$cfg["loadavg_path"]));
                    $loadavg = $loadavg_array[2];
                    echo _SERVERLOAD.': <strong>'.$loadavg.'</strong><br>';
                }
                elseif(exec("uname") === "FreeBSD")
                {
                    $uptime=preg_replace("/.*load averages:(.*)/", "$1", exec("uptime"));
                    echo _SERVERLOAD.': <strong>'.$uptime.'</strong><br>';
                }
            }
            else
            {
                echo _SERVERLOAD.': <strong>n/a</strong><br>';
            }

Hope that helps  Smiley
Report to moderator   Logged
PiForever
Full Member
***
Offline Offline

TF Base: Linux 2.x
Posts: 144





View Profile Personal Message (Offline)
« Reply #31 on: 04-20-2006, 14:38:26 » Reply with quote

Thnx....is this similar to what darknite already did ....page 2 of this thread
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
alanb
Newbie
*
Offline Offline

Posts: 8



View Profile Email Personal Message (Offline)
« Reply #32 on: 04-20-2006, 14:41:16 » Reply with quote

This also has the correct code for the FreeBSD users as well   Smiley

Report to moderator   Logged
PiForever
Full Member
***
Offline Offline

TF Base: Linux 2.x
Posts: 144





View Profile Personal Message (Offline)
« Reply #33 on: 04-20-2006, 14:45:33 » Reply with quote

great...thnx  Smiley
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
wobbles
Newbie
*
Offline Offline

Posts: 37



View Profile Email Personal Message (Offline)
« Reply #34 on: 04-21-2006, 05:55:29 » Reply with quote

Just added this mod to my tf box, looks sweet.

Not to be to hasty BLACKWIDOW. When u reckon the to-do list is ready, sound like exactly what i want for tf

Cheers!:>


wobbles

 Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin
Report to moderator   Logged
gringo
Full Member
***
Offline Offline

TF Base: Linux 1.x
Posts: 110





View Profile WWW Personal Message (Offline)
« Reply #35 on: 04-21-2006, 10:52:41 » Reply with quote

2nded!

The other to-do features sound great.  It'd be awesome to have the instructions with code to just update what you've already posted without having to patch anything, for us people with lots of hacks.
Report to moderator   Logged

P4 2.8 | CentOS-4.2 | 1024MB RAM | 10 mb/s Connect

Apache 2.0.52 | PHP 4.3.9 | MySQL 4.1.12 | Python 2.3.4

TF 2.1b4rt with cosmetic changes.
ariel
Newbie
*
Offline Offline

Posts: 2



View Profile Personal Message (Offline)
« Reply #36 on: 04-21-2006, 18:08:27 » Reply with quote

Thanks to alanb i have Server Load on my FreeBSD box!  Cheesy
Report to moderator   Logged

TorrentFlux 2.1 installed in a Jail - FreeBSD 6.0-STABLE | Dual Proc PIII 1.0GHz | 512MB RAM | Apache 1.3.34 | python-2.4.2 | php4-4.4.2_1
alanb
Newbie
*
Offline Offline

Posts: 8



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

glad to help  Smiley
Report to moderator   Logged
Igloo
Newbie
*
Offline Offline

Posts: 13



View Profile Personal Message (Offline)
« Reply #38 on: 04-26-2006, 05:07:02 » Reply with quote

Thank you ever so much  Grin

this is great!!  means that i can see at a glance wat im using Cheesy

- igloo

Report to moderator   Logged
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 918





View Profile Personal Message (Offline)
« Reply #39 on: 05-01-2006, 07:40:59 » Reply with quote

Just wondering has anyone being having problems with the daily stats on this one? For some reason my daily stats never show 0 anymore when I'm not transfering.
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
deags
Full Member
***
Offline Offline

Posts: 107



View Profile Personal Message (Offline)
« Reply #40 on: 05-01-2006, 10:47:25 » Reply with quote

no problems here Smiley
Report to moderator   Logged
blackwidow
Newbie
*
Offline Offline

Posts: 44



View Profile Personal Message (Offline)
« Reply #41 on: 05-01-2006, 15:04:43 » Reply with quote

For some reason my daily stats never show 0 anymore when I'm not transfering.

if anyone else is having this problem, please post it. I have noticed this in an old version of the script. if existant, the problem will show up when you have completed or running torrents at midnight. so check flux at 12:01am and see if your stats for the day are above zero. let me know.
Report to moderator   Logged
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 918





View Profile Personal Message (Offline)
« Reply #42 on: 05-01-2006, 15:44:46 » Reply with quote

Yeah will do. Looking at the previous stats, the only accurate stats are the total one's. Everything else is totally off now.
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
D_V
Newbie
*
Offline Offline

Posts: 9



View Profile Personal Message (Offline)
« Reply #43 on: 05-06-2006, 08:29:17 » Reply with quote

I have that problem too..

When i have torrents running for several days, it seems like daily stats are taken from the amount of the active torrents and not what have been uploaded today..
Report to moderator   Logged
incy2k
Newbie
*
Offline Offline

Posts: 7



View Profile Email Personal Message (Offline)
« Reply #44 on: 05-06-2006, 18:16:58 » Reply with quote

I'm also experiencing this same problem, the main reason i wanted the mod was too see my daily usage, yet this and the weekly usage both appear incorrect. Huh?
Report to moderator   Logged
Pages: 1 2 [3] 4 5 ... 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