JobMonitoringHandler

JobMonitoringHandler is the implementation of the JobMonitoring service in the DISET framework

The following methods are available in the Service interface

class DIRAC.WorkloadManagementSystem.Service.JobMonitoringHandler.JobMonitoringHandler(handlerInitDict, trid)

Bases: DIRAC.Core.DISET.RequestHandler.RequestHandler

__init__(handlerInitDict, trid)

Constructor

Parameters
  • handlerInitDict (dictionary) – Information vars for the service

  • trid (object) – Transport to use

auth_ping = ['all']
auth_refreshConfiguration = ['CSAdministrator']
auth_whoami = ['all']
static export_echo(data)

This method is used for testing performance of the service

Parameters

data (str) – data to be sent back to the caller

Returns

S_OK, Value is the input data

classmethod export_getApplicationStates(condDict=None, older=None, newer=None)

Return Distinct Values of ApplicationStatus job Attribute in WMS

classmethod export_getAtticJobParameters(jobID, parameters=None, rescheduleCycle=- 1)
classmethod export_getCounters(attrList, attrDict=None, cutDate='')

Retrieve list of distinct attributes values from attrList with attrDict as condition. For each set of distinct values, count number of occurences. Return a list. Each item is a list with 2 items, the list of distinct attribute values and the counter

classmethod export_getCurrentJobCounters(attrDict=None)

Get job counters per Status with attrDict selection. Final statuses are given for the last day.

classmethod export_getInputData(jobID)

Get input data for the specified jobs

classmethod export_getJobAttribute(jobID, attribute)
Parameters
  • jobID (int) – one single Job ID

  • attribute (str) – one single attribute name

classmethod export_getJobAttributes(jobID, attrList=None)
Parameters
  • jobID (int) – one single Job ID

  • attrList (list) – optional list of attributes

classmethod export_getJobGroups(condDict=None, older=None, cutDate=None)

Return Distinct Values of ProductionId job Attribute in WMS

classmethod export_getJobHeartBeatData(jobID)
classmethod export_getJobJDL(jobID, original)
classmethod export_getJobLoggingInfo(jobID)
classmethod export_getJobOptParameters(jobID)
classmethod export_getJobOwner(jobID)
export_getJobPageSummaryWeb(selectDict, sortList, startItem, maxItems, selectJobs=True)

Get the summary of the job information for a given page in the job monitor in a generic format

classmethod export_getJobParameter(jobID, parName)
Parameters
  • jobID (str/int) – one single Job ID

  • parName (str) – one single parameter name

classmethod export_getJobParameters(jobIDs, parName=None)
Parameters
  • jobIDs (str/int/list) – one single job ID or a list of them

  • parName (str) – one single parameter name, a list or None (meaning all of them)

classmethod export_getJobPrimarySummary(jobID)
classmethod export_getJobSite(jobID)
classmethod export_getJobStats(attribute, selectDict)

Get job statistics distribution per attribute value with a given selection

classmethod export_getJobStatus(jobID)
classmethod export_getJobSummary(jobID)
classmethod export_getJobTypes(condDict=None, older=None, newer=None)

Return Distinct Values of JobType job Attribute in WMS

classmethod export_getJobs(attrDict=None, cutDate=None)

Return list of JobIds matching the condition given in attrDict

classmethod export_getJobsApplicationStatus(jobIDs)
classmethod export_getJobsMinorStatus(jobIDs)
classmethod export_getJobsParameters(jobIDs, parameters)
classmethod export_getJobsPrimarySummary(jobIDs)
classmethod export_getJobsSites(jobIDs)
classmethod export_getJobsStatus(jobIDs)
classmethod export_getJobsSummary(jobIDs)
classmethod export_getMinorStates(condDict=None, older=None, newer=None)

Return Distinct Values of Minor Status job Attribute in WMS

classmethod export_getOwnerGroup()

Return Distinct Values of OwnerGroup from the JobsDB

classmethod export_getOwners(condDict=None, older=None, newer=None)

Return Distinct Values of Owner job Attribute in WMS

classmethod export_getProductionIds(condDict=None, older=None, newer=None)

Return Distinct Values of ProductionId job Attribute in WMS

classmethod export_getSiteSummary()
classmethod export_getSites(condDict=None, older=None, newer=None)

Return Distinct Values of Site job Attribute in WMS

classmethod export_getStates(condDict=None, older=None, newer=None)

Return Distinct Values of Status job Attribute in WMS

export_ping()
static export_refreshConfiguration(fromMaster)

Force refreshing the configuration data

Parameters

fromMaster (bool) – flag to refresh from the master configuration service

classmethod export_traceJobParameter(site, localID, parameter, date, until)
classmethod export_traceJobParameters(site, localID, parameterList, attributeList, date, until)
export_whoami()

A simple whoami, returns all credential dictionary, except certificate chain object.

classmethod getAttributesForJobList(*args, **kwargs)

Utility function for unpacking

classmethod getCSOption(optionName, defaultValue=False)

Get an option from the CS section of the services

Returns

Value for serviceSection/optionName in the CS being defaultValue the default

getRemoteAddress()

Get the address of the remote peer.

Returns

Address of remote peer.

getRemoteCredentials()

Get the credentials of the remote peer.

Returns

Credentials dictionary of remote peer.

initialize()

initialize jobPolicy

classmethod initializeHandler(svcInfoDict)

initialize DBs

classmethod parseSelectors(selectDict=None)

Parse selectors before DB query

Parameters

selectDict (dict) – selectors

Returns

str, str, dict – start/end date, selectors

srv_disconnect(trid=None)
classmethod srv_disconnectClient(trid)
srv_getActionTuple()
classmethod srv_getCSOption(optionName, defaultValue=False)

Get an option from the CS section of the services

Returns

Value for serviceSection/optionName in the CS being defaultValue the default

srv_getClientSetup()
srv_getClientVO()
srv_getClientVersion()
srv_getFormattedRemoteCredentials()
classmethod srv_getMonitor()
srv_getRemoteAddress()

Get the address of the remote peer.

Returns

Address of remote peer.

srv_getRemoteCredentials()

Get the credentials of the remote peer.

Returns

Credentials dictionary of remote peer.

classmethod srv_getServiceName()
srv_getTransportID()
classmethod srv_getURL()
classmethod srv_msgCreate(msgName)
srv_msgReply(msgObj)
classmethod srv_msgSend(trid, msgObj)
transfer_bulkFromClient(bulkId, token, bulkSize, fileHelper)
transfer_bulkToClient(bulkId, token, fileHelper)
transfer_fromClient(fileId, token, fileSize, fileHelper)
transfer_listBulk(bulkId, token, fileHelper)
transfer_toClient(fileId, token, fileHelper)
types_echo = [(<class 'str'>,)]
types_getApplicationStates = []
types_getAtticJobParameters = [[<class 'int'>]]
types_getCounters = [<class 'list'>]
types_getCurrentJobCounters = []
types_getInputData = [[<class 'int'>]]
types_getJobAttribute = [<class 'int'>, (<class 'str'>,)]
types_getJobAttributes = [<class 'int'>]
types_getJobGroups = []
types_getJobHeartBeatData = [<class 'int'>]
types_getJobJDL = [<class 'int'>, <class 'bool'>]
types_getJobLoggingInfo = [<class 'int'>]
types_getJobOptParameters = [<class 'int'>]
types_getJobOwner = [<class 'int'>]
types_getJobPageSummaryWeb = [<class 'dict'>, <class 'list'>, <class 'int'>, <class 'int'>]
types_getJobParameter = [(<class 'str'>, <class 'int'>), (<class 'str'>,)]
types_getJobParameters = [(<class 'str'>, <class 'int'>, <class 'list'>)]
types_getJobPrimarySummary = [<class 'int'>]
types_getJobSite = [<class 'int'>]
types_getJobStats = [(<class 'str'>,), <class 'dict'>]
types_getJobStatus = [<class 'int'>]
types_getJobSummary = [<class 'int'>]
types_getJobTypes = []
types_getJobs = []
types_getJobsApplicationStatus = [<class 'list'>]
types_getJobsMinorStatus = [<class 'list'>]
types_getJobsParameters = [<class 'list'>, <class 'list'>]
types_getJobsPrimarySummary = [<class 'list'>]
types_getJobsSites = [<class 'list'>]
types_getJobsStatus = [<class 'list'>]
types_getJobsSummary = [<class 'list'>]
types_getMinorStates = []
types_getOwnerGroup = []
types_getOwners = []
types_getProductionIds = []
types_getSiteSummary = []
types_getSites = []
types_getStates = []
types_ping = []
types_refreshConfiguration = [<class 'bool'>]
types_traceJobParameter = [(<class 'str'>,), (<class 'str'>, <class 'list'>, <class 'int'>), (<class 'str'>,), (<class 'str'>, None), (<class 'str'>, None)]
types_traceJobParameters = [(<class 'str'>,), (<class 'str'>, <class 'list'>, <class 'int'>), [<class 'list'>, None], [<class 'list'>, None], (<class 'str'>, None), (<class 'str'>, None)]
types_whoami = []