From: xchaos Date: Sun, 20 Jan 2008 00:46:22 +0000 (+0000) Subject: just improved ERP formatting X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=ab85aff7bf367a49bb28e3e2be0abfbc7c7a0363;p=svn%2FPrometheus-QoS%2F.git just improved ERP formatting git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@55 251d49ef-1d17-4917-a970-b30cf55b089b --- diff --git a/prometheus.c b/prometheus.c index a22397c..282e0db 100644 --- a/prometheus.c +++ b/prometheus.c @@ -3,11 +3,11 @@ /* === Prometheus QoS - you can "steal fire" from your ISP === */ /* === "fair-per-IP" quality of service (QoS) utility === */ /* === requires Linux 2.4.x or 2.6.x with HTB support === */ -/* === Copyright(C) 2005-2007 Michael Polak (xChaos) === */ +/* === Copyright(C) 2005-2008 Michael Polak (xChaos) === */ /* === Credits: CZFree.Net, Martin Devera, Netdave, Aquarius === */ /* ============================================================= */ -/* Modified: xChaos, 20070502 +/* Modified: xChaos, 20080119 ludva, 20071227 Prometheus QoS is free software; you can redistribute it and/or @@ -639,7 +639,7 @@ program printf("\n\ Prometheus QoS - \"fair-per-IP\" Quality of Service setup utility.\n\ -Version %s - Copyright (C)2005-2007 Michael Polak (xChaos)\n\ +Version %s - Copyright (C)2005-2008 Michael Polak (xChaos)\n\ iptables-restore & burst tunning & classify modification 0.7d by Ludva\n\ Credits: CZFree.Net, Martin Devera, Netdave, Aquarius\n\n",version); @@ -1257,23 +1257,64 @@ Credits: CZFree.Net, Martin Devera, Netdave, Aquarius\n\n",version); fputs("\n\n",f); if(active_classes>10) - { - fputs("

\n",f); - fputs("\n",f); - find (sum,sums,sum->l>=total/4) - fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); - find (sum,sums,sum->i==10) - fprintf(f,"\n",(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); - find (sum,sums,sum->l>=total/2) - fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); - find (sum,sums,sum->i>=(active_classes+3)/4) - fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); - find (sum,sums,sum->i>=(active_classes+1)/2) - fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); - fprintf(f,"\n",active_classes,total); - fputs("
Enterprise Research and Planning (ERP)
Active ClassesData transfers
Top %d%d %%%Lu M%Ld %%
Top 10%d %%%Lu M%Ld %%
Top %d%d %%%Lu M%Ld %%
Top %d%d %%%Lu M%Ld %%
Top %d%d %%%Lu M%Ld %%
All %d100 %%%Lu M100 %%
\n",f); - } - fprintf(f,"Statistics generated by Prometheus QoS version %s
GPL+Copyright(C)2005 Michael Polak, Arachne Labs
\n",version); + { + fputs("

\n",f); + fputs("\n",f); + fputs("\n",f); + + find(sum,sums,sum->l>=total/4) + { + fprintf(f,"\n"); + fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); + } + + find(sum,sums,sum->i==10) + { + fprintf(f,"\n"); + fprintf(f,"\n",(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); + } + + find(sum,sums,sum->l>=total/2) + { + fprintf(f,"\n"); + fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); + } + + find(sum,sums,sum->l>=4*total/5) + { + fprintf(f,"\n"); + fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); + } + + find (sum,sums,sum->i>=(active_classes+1)/5) + { + fprintf(f,"\n"); + fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); + } + + find(sum,sums,sum->i>=(active_classes+1)/4) + { + fprintf(f,"\n"); + fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); + } + + find(sum,sums,sum->i>=(active_classes+1)/2) + { + fprintf(f,"\n"); + fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); + } + + find(sum,sums,sum->i>=4*(active_classes+1)/5) + { + fprintf(f,"\n"); + fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); + } + + fprintf(f,"\n"); + fprintf(f,"\n",active_classes,total); + fputs("
Enterprise Research and Planning (ERP)
Analytic categoryActive ClassesData transfers
Top 25%% of traffic%d%d %%%Lu M%Ld %%
Top 10 downloaders10%d %%%Lu M%Ld %%
Top 50%% of traffic%d%d %%%Lu M%Ld %%
Top 80%% of traffic%d%d %%%Lu M%Ld %%
Top 20%% downloaders%d%d %%%Lu M%Ld %%
Top 25%% downloaders%d%d %%%Lu M%Ld %%
Top 50%% downloaders%d%d %%%Lu M%Ld %%
Top 80%% downloaders%d%d %%%Lu M%Ld %%
All users, all traffic%d100 %%%Lu M100 %%
\n",f); + } + fprintf(f,"Statistics generated by Prometheus QoS version %s
GPL+Copyright(C)2005-2008 Michael Polak, Arachne Labs
\n",version); fclose(f); }