From: Jan Pospíšil Date: Mon, 12 Jun 2006 13:12:47 +0000 (+0000) Subject: updated the format of output, print also 0 count if there are no jobs for that state X-Git-Tag: gridsite-core_R_1_3_2~122 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=9eac10e5dd2ce1b17a5c5bce86ae7e8b980bf730;p=jra1mw.git updated the format of output, print also 0 count if there are no jobs for that state --- diff --git a/org.glite.lb.utils/src/mon-db.c b/org.glite.lb.utils/src/mon-db.c index fee46cd..ae9770f 100644 --- a/org.glite.lb.utils/src/mon-db.c +++ b/org.glite.lb.utils/src/mon-db.c @@ -28,11 +28,12 @@ int main(int argc,char **argv) { int opt; char *dbstring = getenv("LBDB"); - int verbose = 0, rows = 0, fields = 0, jobs = 0, i; + int verbose = 0, rows = 0, fields = 0, njobs = 0, i; edg_wll_Context ctx; char *stmt = NULL, *status = NULL; char *str[2]; edg_wll_Stmt sh; + int jobs[EDG_WLL_NUMBER_OF_STATCODES]; me = strdup(argv[0]); @@ -43,6 +44,7 @@ int main(int argc,char **argv) } edg_wll_InitContext(&ctx); + for (i = 1; i