From 9eac10e5dd2ce1b17a5c5bce86ae7e8b980bf730 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Posp=C3=AD=C5=A1il?= Date: Mon, 12 Jun 2006 13:12:47 +0000 Subject: [PATCH] updated the format of output, print also 0 count if there are no jobs for that state --- org.glite.lb.utils/src/mon-db.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) 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