From 96fb4eab54b92755be9d58b3972fe955acc2b304 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Thu, 1 Mar 2007 11:54:42 +0000 Subject: [PATCH] support for PBS resource usage info --- org.glite.lb.client/examples/job_status.c | 2 ++ org.glite.lb.server/src/process_event_pbs.c | 5 +---- org.glite.lb/project/status.T | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/org.glite.lb.client/examples/job_status.c b/org.glite.lb.client/examples/job_status.c index a0e614a..0a6fd6b 100644 --- a/org.glite.lb.client/examples/job_status.c +++ b/org.glite.lb.client/examples/job_status.c @@ -291,6 +291,8 @@ static void printstat(edg_wll_JobStat stat, int level) printf("%spbs_scheduler : %s\n", ind, stat.pbs_scheduler); printf("%spbs_dest_host : %s\n", ind, stat.pbs_dest_host); printf("%spbs_pid : %d\n", ind, stat.pbs_pid); + printf("%spbs_resource_usage : %s%s\n", ind, + (stat.pbs_resource_usage) ? "\n" : "", stat.pbs_resource_usage); printf("%spbs_exit_status : %d\n", ind, stat.pbs_exit_status); printf("%spbs_error_desc : %s%s\n", ind, (stat.pbs_error_desc) ? "\n" : "", stat.pbs_error_desc); diff --git a/org.glite.lb.server/src/process_event_pbs.c b/org.glite.lb.server/src/process_event_pbs.c index 858d611..f3c6ae7 100644 --- a/org.glite.lb.server/src/process_event_pbs.c +++ b/org.glite.lb.server/src/process_event_pbs.c @@ -128,11 +128,9 @@ int processEvent_PBS(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, c rep(js->pub.pbs_state, "C"); } if (USABLE_DATA(res)) { - /* - XXX: do we want this info in status? char *new_resource_usage; - asprintf(&new_resource_usage,"%s%s%s = %d [%s]", + asprintf(&new_resource_usage,"%s%s\t%s = %d [%s]", (js->pub.pbs_resource_usage) ? js->pub.pbs_resource_usage : "", (js->pub.pbs_resource_usage) ? "\n": "", e->PBSResourceUsage.name, @@ -141,7 +139,6 @@ int processEvent_PBS(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, c if (js->pub.pbs_resource_usage) free(js->pub.pbs_resource_usage); js->pub.pbs_resource_usage = new_resource_usage; - */ } break; case EDG_WLL_EVENT_PBSERROR: diff --git a/org.glite.lb/project/status.T b/org.glite.lb/project/status.T index d4668ab..cae5f17 100644 --- a/org.glite.lb/project/status.T +++ b/org.glite.lb/project/status.T @@ -84,6 +84,7 @@ string pbs_reason Glued reasons/errors leading to pending events string pbs_scheduler Name of pbs scheduler string pbs_dest_host Hostname of node where job is running int pbs_pid PID of running job +string pbs_resource_usage Glued resource usage int pbs_exit_status Job exit status string pbs_error_desc Glued error descriptions from error events -- 1.8.2.3