ResourceUsage

Resource Usage

class DIRAC.Resources.Computing.BatchSystems.TimeLeft.ResourceUsage.ResourceUsage(batchSystemName, jobIdEnvVar)

Bases: object

Resource Usage is an abstract class that has to be implemented for every batch system used by DIRAC to get the resource usage of a given job. This information can then be processed by other modules (e.g. getting the time left in a Pilot)

__init__(batchSystemName, jobIdEnvVar)

Standard constructor

getResourceUsage()

Returns a dictionary containing CPUConsumed, CPULimit, WallClockConsumed and WallClockLimit for current slot. All values returned in seconds.

Returns:dict such as {cpuConsumed, cpuLimit, wallClockConsumed, wallClockLimit}