Monday, October 24, 2011 11:37 AM
In my application I need to get the total net proccess time (of all the cores that run the job) for a specific job that the user chooses.
how can i get it using C#?
Thursday, October 27, 2011 10:05 PMISchedulerJobCounters.TotalCpuTime Property might be what you are looking for (http://msdn.microsoft.com/en-us/library/microsoft.hpc.scheduler.ischedulerjobcounters.totalcputime(VS.85).aspx).daryl
Sunday, October 30, 2011 2:27 PM
I would appreciate if I can get an example.
Tuesday, November 01, 2011 11:45 PM
Here is a quick fragment that will fetch the total cpu time for a given JobId:
using (IScheduler scheduler = new Scheduler())
int desiredJobId = 3;
IFilterCollection filter = scheduler.CreateFilterCollection();
filter.Add(new FilterProperty(FilterOperator.Equal, JobPropertyIds.Id, desiredJobId));
ISchedulerCollection jobs = scheduler.GetJobList(filter, null /* no sort order specified */);
ISchedulerJob job = jobs as ISchedulerJob;
ISchedulerJobCounters counters = job.GetCounters();
long totalCpuTime = counters.TotalCpuTime;