|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetwork.detectors.EventDetector
network.detectors.ProcessMonitoringEventDetector
Detects the processes that are currently running. This is accomplished by running the ps command
Field Summary |
Fields inherited from class network.detectors.EventDetector |
agentURN, cred, dbModule, eventIDGenerator, eventTable, host, localTriggeringEvents, remoteTriggeringEvents, reportTable |
Constructor Summary | |
ProcessMonitoringEventDetector(ConfigObject configObj)
Creates an instance of ProcessMonitoringEventDetector with the default triggering events |
Method Summary | |
java.util.Vector |
executeSystemCommand(java.lang.String command)
Executes a command. |
CPUMonitorEvent |
generateCPUMonitorEvent(Event triggeredEvent)
Executes the ps command, parses the output, and returns a CPUMonitorEvent based on the output of the ps command |
java.util.Vector |
generateEvent(Event triggeredEvent)
Runs the ps command and parses the output. |
java.util.Vector |
generateProcessMonitorEvent(Event triggeredEvent)
Generates a ProcessMonitoringEvent for each running process. |
java.lang.String |
getGeneratingEventClassName()
Returns the name of the event this detector triggers |
java.util.Vector |
parseCommandResults(java.util.Vector results)
This function parses the output from the command in this class' generateEvent method and returns a vector of Object arrays that represents the elements of the string seperated. |
static long |
stringTimeToMillis(java.lang.String date)
takes in the string date from the ps command and returns the millis this method expects commands in the following format 28-19:56:08 or 19:56:08 or 56:08 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProcessMonitoringEventDetector(ConfigObject configObj)
Method Detail |
public java.lang.String getGeneratingEventClassName()
getGeneratingEventClassName
in class EventDetector
public java.util.Vector executeSystemCommand(java.lang.String command)
command
- The command line to execute
public java.util.Vector parseCommandResults(java.util.Vector results)
results
- A vector of strings containing the results of running a ps command
public CPUMonitorEvent generateCPUMonitorEvent(Event triggeredEvent)
triggeredEvent
- The event that triggers this detector
public java.util.Vector generateEvent(Event triggeredEvent)
generateEvent
in class EventDetector
triggeredEvent
- The event that triggers this detector
public java.util.Vector generateProcessMonitorEvent(Event triggeredEvent)
triggeredEvent
- A CPUMonitorEvent that contains information about currently running processes
public static long stringTimeToMillis(java.lang.String date)
date
- The date string to parse
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |