From: Miloš Mulač Date: Fri, 7 Mar 2008 14:21:58 +0000 (+0000) Subject: enable also Direct logging, bypassing LL and IL X-Git-Tag: merge_transactions_src~2 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=54bc7f29c449daeebfee635fea6d7c3e4f8abda1;p=jra1mw.git enable also Direct logging, bypassing LL and IL --- diff --git a/org.glite.lb.client/examples/stresslog.c b/org.glite.lb.client/examples/stresslog.c index efe45b6..9dc276c 100644 --- a/org.glite.lb.client/examples/stresslog.c +++ b/org.glite.lb.client/examples/stresslog.c @@ -16,19 +16,21 @@ extern int opterr,optind; extern int edg_wll_DoLogEvent(edg_wll_Context context, edg_wll_LogLine logline); extern int edg_wll_DoLogEventProxy(edg_wll_Context context, edg_wll_LogLine logline); +extern int edg_wll_DoLogEventDirect(edg_wll_Context context, edg_wll_LogLine logline); static const char *me; static void usage() { - fprintf(stderr,"usage: %s -m bkserver [-x] [-N numjobs] [-n subjobs (each)] -f file_name \n", me); + fprintf(stderr,"usage: %s -m bkserver [-x|-y] [-N numjobs] [-n subjobs (each)] -f file_name \n", me); + fprintf(stderr," - event file not containing DG.JOBID and without -x or -z not containing DG.USER\n"); } int main(int argc, char *argv[]) { char *job = NULL,*server = NULL,*seq = NULL,*filename = NULL; char buf[MAXMSGSIZE]; - int lbproxy = 0, num_subjobs = 0; + int lbproxy = 0, num_subjobs = 0, lbdirect = 0; int done = 0, njobs = 1,i,j; edg_wll_Context ctx; edg_wlc_JobId jobid,*subjobs; @@ -41,9 +43,10 @@ int main(int argc, char *argv[]) me = strdup(argv[0]); do { - switch (getopt(argc,argv,"m:xN:n:f:")) { + switch (getopt(argc,argv,"m:xyN:n:f:")) { case 'm': server = strdup(optarg); break; case 'x': lbproxy = 1; break; + case 'y': lbdirect = 1; break; case 'N': njobs = atoi(optarg); break; case 'n': num_subjobs = atoi(optarg); break; case 'f': filename = (char *) strdup(optarg); break; @@ -51,6 +54,12 @@ int main(int argc, char *argv[]) case -1: done = 1; break; } } while (!done); + + if (lbproxy && lbdirect) { + fprintf(stderr,"%s: only one of -x or -y options may be specified \n",me); + usage(); + exit(1); + } if (!server) { fprintf(stderr,"%s: -m required\n",me); @@ -134,6 +143,13 @@ for (i = 0; i