support for PBS resource usage info
authorMiloš Mulač <mulac@civ.zcu.cz>
Thu, 1 Mar 2007 11:54:42 +0000 (11:54 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Thu, 1 Mar 2007 11:54:42 +0000 (11:54 +0000)
org.glite.lb.client/examples/job_status.c
org.glite.lb.server/src/process_event_pbs.c
org.glite.lb/project/status.T

index a0e614a..0a6fd6b 100644 (file)
@@ -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);
index 858d611..f3c6ae7 100644 (file)
@@ -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:
index d4668ab..cae5f17 100644 (file)
@@ -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