network.detectors
Class RunawayProcessEventDetector
java.lang.Object
network.detectors.EventDetector
network.detectors.RunawayProcessEventDetector
- All Implemented Interfaces:
- java.lang.Runnable, java.io.Serializable
- public class RunawayProcessEventDetector
- extends EventDetector
- implements java.io.Serializable
Detects if a user process has been running for too long. Will detect if the process is consuming to much of the CPU, or if it has too many threads, when implemented
jtucker
lwp = light weight process
Keeps track of how long a process has been running, what percentage of the CPU the process is using, and how many lwp's the process is running
Default maximum run time is 1 day, CPU threshold is 20%, and lwp threshold is 200
- See Also:
- Serialized Form
Method Summary |
java.util.Vector |
generateEvent(Event triggeredEvent)
Detects if a process has exceeded any threshold values for running time, CPU usage, or lwp count
This is accomplished by checking if the process contained in the triggeredEvent has exceeded the thresholds. |
java.lang.String |
getGeneratingEventClassName()
Returns the name of the event that this detector generates |
Methods inherited from class network.detectors.EventDetector |
getAlarmLevel, getAlertLevel, getLocalTriggeringEventClassNames, getRemoteTriggeringEventClassNames, getSynchronizer, InitializeFields, modifyDetector, populatePatterns, printRunningThreads, run, setAgentURN, setAlarmLevel, setAlertLevel, setDB, setEventIDGenerator, setEventTable, setLocalTriggeringEvents, setRemoteTriggeringEvents, setReportTable, stopDetector, switchOffPrintRunningThreads |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RunawayProcessEventDetector
public RunawayProcessEventDetector(ConfigObject configObj)
throws java.lang.Exception
- Instantiates the detector with default triggering events and default threshold information
RunawayProcessEventDetector
public RunawayProcessEventDetector(java.lang.String ignoreListFile,
ConfigObject configObj)
throws java.lang.Exception
getGeneratingEventClassName
public java.lang.String getGeneratingEventClassName()
- Returns the name of the event that this detector generates
- Specified by:
getGeneratingEventClassName
in class EventDetector
- Returns:
- A String containing the name of the event that this detector generates
generateEvent
public java.util.Vector generateEvent(Event triggeredEvent)
- Detects if a process has exceeded any threshold values for running time, CPU usage, or lwp count
This is accomplished by checking if the process contained in the triggeredEvent has exceeded the thresholds. This will ignore processes run by root.
Contains a a list of processes that have already triggered a runaway process event, and will ignore those events so they do not cause multiple events. This list of processes is cleared once per day.
- Specified by:
generateEvent
in class EventDetector
- Parameters:
triggeredEvent
- The event that triggers this detector. Should be an instance of ProcessMonitoringEvent
- Returns:
- A vector of events. Each entry corresponds to a runaway process.