SummarizeLogsAgent

SummarizeLogsAgent module

This agents scans all the log tables ( SiteLog, ResourceLog and NodeLog ) on the ResourceStatusDB and summarizes them. The results are stored on the History tables (SiteHistory, ResourceHistory and NodeHistory) and the Log tables cleared.

In order to summarize the logs, all entries with no changes on the Status or TokenOwner column for a given ( Name, StatusType ) tuple are discarded.

The agent also adds a little prevention to avoid messing the summaries if the agent is restarted / killed abruptly. Please, please, please, DO NOT DO IT !

class DIRAC.ResourceStatusSystem.Agent.SummarizeLogsAgent.SummarizeLogsAgent(*args, **kwargs)

Bases: DIRAC.Core.Base.AgentModule.AgentModule

SummarizeLogsAgent as extension of AgentModule.

__init__(*args, **kwargs)

Constructor.

am_Enabled()
am_checkStopAgentFile()
am_createStopAgentFile()
am_disableMonitoring()
am_getBasePath()
am_getControlDirectory()
am_getCyclesDone()
am_getMaxCycles()
am_getModuleParam(optionName)
am_getOption(optionName, defaultValue=None)
am_getPollingTime()
am_getShifterProxyLocation()
am_getStopAgentFile()
am_getWatchdogTime()
am_getWorkDirectory()
am_go()
am_initialize(*initArgs)
am_monitoringEnabled()
am_removeStopAgentFile()
am_secureCall(functor, args=(), name=False)
am_setModuleParam(optionName, value)
am_setOption(optionName, value)
am_stopExecution()
beginExecution()
endExecution()
execute(main method)

The execute method runs over the three families of tables ( Site, Resource and Node ) performing identical operations. First, selects all logs for a given family ( and keeps track of which one is the last row ID ). It summarizes the logs and finally, deletes the logs from the database.

Returns:S_OK
finalize()
initialize()

Standard initialize.

Returns:S_OK