#332 CPU usage discrepancy with 5250 terminal

Jobs
closed-out-of-date
None
5
2014-07-22
2011-06-07
Anonymous
No

Using the class below, we fill an array of JobData objects with data from all active jobs on the system since I'm saving stats to several databases that need to be in sync.
Now the problem we are facing is, if we run our class, wait 30 minutes and run it again, cpuusage should be set to the CPU usage avg accumulated over the 30min time span(the same way 5250 works) but we can't correlate the values from our class below and the values available in $
The figures are generally significantly lower in 5250

public class JobData {
private String subsystem;
private String jobnumber;
private String jobname;
private String jobtype;
private String jobuser;
private String jobstatus;
private Date jobstarted;
private int cpuusage;
private int jobprio;
private int threadcount;
private int lockwaittime;

public JobData(Job j) throws AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException {
j.loadStatistics();
subsystem = j.getSubsystem();
jobnumber = j.getNumber();
jobname = j.getName();
jobtype = j.getType();
jobuser = j.getUser();
jobstatus = (String) j.getValue(Job.ACTIVE_JOB_STATUS);
jobstarted = j.getJobActiveDate();
jobprio = j.getRunPriority();
threadcount = ((Integer) j.getValue(Job.THREAD_COUNT)).intValue();
cpuusage = (Integer) j.getValue(Job.ELAPSED_CPU_PERCENT_USED);
j.resetStatistics();
}
}

Discussion

  • John Eberhard

    John Eberhard - 2011-09-30
    • assigned_to: nobody --> piguangming
     
  • John Eberhard

    John Eberhard - 2014-07-22
    • status: open --> closed-out-of-date
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks