From: Aleš Křenek Date: Wed, 27 May 2009 11:02:40 +0000 (+0000) Subject: extended for any job state X-Git-Tag: glite-lb-server_R_2_0_2_2~13 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=fca6f3adcaa2e8a1758faa7a79411fc472feda7b;p=jra1mw.git extended for any job state --- diff --git a/org.glite.lb.client/examples/stats.c b/org.glite.lb.client/examples/stats.c index af6dcb1..3e68e4f 100644 --- a/org.glite.lb.client/examples/stats.c +++ b/org.glite.lb.client/examples/stats.c @@ -1,4 +1,5 @@ #include +#include #include #include @@ -17,8 +18,8 @@ int main(int argc,char **argv) edg_wll_InitContext(&ctx); - if (argc != 2) { - fprintf(stderr,"usage: %s \n",argv[0]); + if (argc < 3) { + fprintf(stderr,"usage: %s CE major [minor]\n",argv[0]); return 1; } @@ -58,7 +59,7 @@ int main(int argc,char **argv) to = now; from = now - 60; - if (edg_wll_StateRate(ctx,group,EDG_WLL_JOB_DONE,EDG_WLL_STAT_FAILED, + if (edg_wll_StateRate(ctx,group,atoi(argv[2]),argc >=4 ? atoi(argv[3]) : 0, &from,&to,&val,&from_res,&to_res)) { char *et,*ed;