[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTCondor-users] Does RemoteWallClockTime ever change while the job is running?

So I'm getting pretty close to nailing down a solid and efficient CPU utilization attribute:

+TotalExecutingTime = \
        (ifThenElse(! isUndefined(RemoteWallClockTime), RemoteWallClockTime, 0) - \
         ifThenElse(! isUndefined(CumulativeSuspensionTime), CumulativeSuspensionTime, 0)) + \
                ifThenElse(JobStatus == 2 && ! isUndefined(JobCurrentStartExecutingDate), \
                          (CurrentTime - JobCurrentStartDate), 0)

+RemoteCpuUtilizationPercent = ifThenElse(! isUndefined(TotalExecutingTime) && TotalExecutingTime > 0, \
        ((RemoteSysCpu + RemoteUserCpu) / RequestCpus) / TotalExecutingTime * 100, UNDEFINED)

As you can see, the total exec time for any past runs is derived from the RemoteWallclockTime minus the CumulativeSuspensionTime as described in the manual's description of the former attribute, and then this is added to the total time accumulated so far in the current run, if the job is actually running.It's necessary to use time from both the current and any prior runs because the RemoteSysCpu and RemoteUserCpu attributes do too.

However, this falls apart if the RemoteWallClockTime is updated before the job finishes running. From my testing so far, it doesn't appear to be, but if anyone knows for sure, or is familiar enough with the code to find it, I'd appreciate a tip.


Michael V. Pelletier
IT Program Execution
Principal Engineer
978.858.9681 (5-9681)
339.293.9149 cell