X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=prometheus.c;h=b290bf70d5977f521a8fb19fb5465c2f13c55b4a;hb=32c1649d2a23c7838890b2eb9f46b21295b56f04;hp=4731bcc2dac89bdaedcc9d37421c702066f65ad9;hpb=78884bad50568440ce643e5155b60fda9aa30262;p=svn%2FPrometheus-QoS%2F.git diff --git a/prometheus.c b/prometheus.c index 4731bcc..b290bf7 100644 --- a/prometheus.c +++ b/prometheus.c @@ -7,7 +7,7 @@ /* Credit: CZFree.Net,Martin Devera,Netdave,Aquarius,Gandalf */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ -/* Modified by: xChaos, 20110428 +/* Modified by: xChaos, 20111130 ludva, 20080415 Prometheus QoS is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ #include "cll1-0.6.2.h" -const char *version = "0.8.3"; +const char *version = "0.8.3-b"; /* Version numbers: 0.8.3 is development releases ("beta"), 0.8.4 will be "stable" */ /* Debian(RPM) package versions/patchlevels: 0.7.9-2, 0.8.0-1, 0.8.0-2, etc. */ @@ -1511,6 +1511,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); printf("Sorting data and generating statistics page %s ...\n",ptr); /*-----------------------------------------------------------------*/ + fputs("\n",f); fputs("\n\n",f); fprintf(f,"\n",keywordcount); fputs("\n",f); @@ -1554,12 +1555,12 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); { unsigned long long total_traffic=0, total_direct=0, total_proxy=0, total_upload=0, tmp_sum=0; int active_classes=0; - int colspan; + int colspan=11; FILE *iplog; struct Sum {unsigned long long l; int i; list(Sum);} *sum,*sums=NULL; int limit_count=0, prio_count=0; + int popup_button=0; - colspan=11; if(qos_proxy) { colspan++; @@ -1609,7 +1610,24 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); #ifdef DEBUG printf("%03d. %-22s %10Lu (%d/%d)\n",i ,ip->name, ip->traffic, ip->min, ip->max); #endif - fprintf(f,"\n", ip->name, i, log_url, ip->name, ip->name); + /* hostnames -------------------------------------- */ + fprintf(f,"\n",f); + /* ----------------------------------------------- */ + if(found_lmsid) { fputs("\n",f); + fputs("\n",f); } fprintf(f,"\n", ip->credit); fprintf(f,"", - ip->keyword->html_color, ip->credit+(ip->min*ip->keyword->data_limit+(ip->keyword->fixed_limit<<20))); - fprintf(f,"\n", f1, ip->traffic, f2, ip->direct); + ip->keyword->html_color, + ip->credit+(ip->min*ip->keyword->data_limit+(ip->keyword->fixed_limit<<20))); + fprintf(f,"\n",f); + /* ----------------------------------------------- */ + if(qos_proxy) { fprintf(f,"\n", ip->proxy); } - fprintf(f,"\n", ip->upload); + /* upload ---------------------------------------- */ + fprintf(f,"\n",f); + /* ----------------------------------------------- */ + fprintf(f,"\n", ip->min,ip->desired,f1,ip->max,f2,f1,ip->prio,f2); total_traffic+=ip->traffic; @@ -1664,8 +1703,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); } } fprintf(f,"\ - \n", total_traffic, total_direct); + fprintf(f,"\n", total_traffic, total_direct); if(qos_proxy) { fprintf(f,"\n", total_proxy); @@ -1747,8 +1785,8 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); if(iplog) { fprintf(iplog,"%ld\t%d\t%d %%\t%Lu M\t%Ld %%\tACTIVE %d\tTRAFFIC %Lu M\tCLASSES %d\tFUP-LIMIT %d\tLOW-PRIO %d\t%s", - time(NULL), top20_count, top20_perc1, top20_sum, top20_perc2, - active_classes, total_traffic, total, limit_count, prio_count, d); /* d = date*/ + time(NULL), top20_count, top20_perc1, top20_sum, top20_perc2, + active_classes, total_traffic, total, limit_count, prio_count, d); /* d = date*/ fclose(iplog); } }
#groupIPsrequesteddata limits
%d%s
%d%s\n", ip->name, i, log_url, ip->name, ip->name); + fprintf(f,"",i); + popup_button=0; + for_selected(sharedip,ips,eq(ip->name,sharedip->sharing)) + { + fprintf(f,"
%s\n", log_url, sharedip->name, sharedip->name); + popup_button=1; + } + fputs("
\n",f); + if(popup_button) + { + fprintf(f,"[+]", + i, i, i); + } + fputs("
",f); @@ -1622,17 +1640,38 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); { fputs("-------",f); } - fputs("%Lu M%Lu M%s%Lu M%s%Lu M%s%Lu M%s",f1, ip->traffic, f2); + + /* download --------------------------------------- */ + fprintf(f,"%Lu M", ip->direct); + fprintf(f,"",i); + for_selected(sharedip,ips,eq(ip->name,sharedip->sharing)) + { + fprintf(f,"
%Lu M", sharedip->direct); + } + fputs("
%Lu M%Lu M%Lu M", ip->upload); + fprintf(f,"",i); + for_selected(sharedip,ips,eq(ip->name,sharedip->sharing)) + { + fprintf(f,"
%Lu M", sharedip->upload); + } + fputs("
%d k%d k%s%d k%s%s%d%s
SUMMARY:",colspan-7); - fprintf(f,"%Lu M%Lu M%Lu M%Lu M%Lu M