The Watchdog class is used by the Job Wrapper to resolve and monitor the system resource consumption. The Watchdog can determine if a running job is stalled and indicate this to the Job Wrapper. Furthermore, the Watchdog will identify when the Job CPU limit has been exceeded and fail jobs meaningfully.

Information is returned to the WMS via the heart-beat mechanism. This also interprets control signals from the WMS e.g. to kill a running job.

  • Still to implement:
    • CPU normalization for correct comparison with job limit

class DIRAC.WorkloadManagementSystem.JobWrapper.Watchdog.Watchdog(pid, exeThread, spObject, jobCPUTime, memoryLimit=0, processors=1, jobArgs={})

Bases: object

__init__(pid, exeThread, spObject, jobCPUTime, memoryLimit=0, processors=1, jobArgs={})

Constructor, takes system flag as argument.


The calibrate method obtains the initial values for system memory and load and calculates the margin for error for the rest of the Watchdog cycle.


The main agent execution method of the Watchdog.


Obtains the available disk space.


Retrieves all static system information


Watchdog initialization.


The main watchdog execution method