X-Git-Url: https://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=prometheus.c;h=4731bcc2dac89bdaedcc9d37421c702066f65ad9;hp=5420588d352e8d6550e0c430305926ea2e33bfc2;hb=78884bad50568440ce643e5155b60fda9aa30262;hpb=b014f18189d582cd408e0c488ef734a070500e5b
diff --git a/prometheus.c b/prometheus.c
index 5420588..4731bcc 100644
--- a/prometheus.c
+++ b/prometheus.c
@@ -1525,7 +1525,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
for_each(keyword,keywords)
{
- fprintf(f,"
%d M | ",keyword->html_color,group->min*keyword->data_limit);
+ fprintf(f,"%d M | ",keyword->html_color,group->min*keyword->data_limit);
}
i+=group->desired;
total+=group->count;
@@ -1557,6 +1557,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
int colspan;
FILE *iplog;
struct Sum {unsigned long long l; int i; list(Sum);} *sum,*sums=NULL;
+ int limit_count=0, prio_count=0;
colspan=11;
if(qos_proxy)
@@ -1594,13 +1595,15 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
char *f1="", *f2="";
if(ip->maxdesired)
{
- f1="";
- f2="";
+ f1="";
+ f2="";
+ limit_count++;
}
else if(ip->prio>highest_priority+1)
{
- f1="";
- f2="";
+ f1="";
+ f2="";
+ prio_count++;
}
#ifdef DEBUG
@@ -1622,7 +1625,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
fputs("\n",f);
}
fprintf(f,"%Lu M | \n", ip->credit);
- fprintf(f,"%Lu M | ",
+ fprintf(f,"%Lu M | ",
ip->keyword->html_color, ip->credit+(ip->min*ip->keyword->data_limit+(ip->keyword->fixed_limit<<20)));
fprintf(f,"%s%Lu M%s | %Lu M | \n", f1, ip->traffic, f2, ip->direct);
if(qos_proxy)
@@ -1668,7 +1671,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
fprintf(f,"%Lu M | \n", total_proxy);
}
fprintf(f,"%Lu M | ", total_upload);
- fputs(" | \n\n",f);
+ fprintf(f,"FUP-LIMIT %dx LOW-PRIO %dx | \n\n",limit_count,prio_count);
if(active_classes>10)
{
@@ -1743,8 +1746,9 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
iplog=fopen(str,"a");
if(iplog)
{
- fprintf(iplog,"%ld\t%d\t%d %%\t%Lu M\t%Ld %%\t%d\t%Lu M\t%d\t%s",
- time(NULL), top20_count, top20_perc1, top20_sum, top20_perc2, active_classes, total_traffic, total, d); /* d = date*/
+ 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*/
fclose(iplog);
}
}