| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
  |
  +--network.detectors.EventDetector
        |
        +--network.detectors.DiskFullEventDetector
This detector watches a number of disk volumes and warns (generates a DiskFullEvent) 
 if the space used is above X percent.
 
 A sample file might be:
 /usr               20
 /tmp               80
 /export/scratch    50
 where the lvalues are paths, and the rvalues are usage thresholds 
 (percent of volume used).
| Field Summary | |
private  java.lang.String[] | 
defaultLocalTriggeringEvents
 | 
private  java.util.Hashtable | 
usageThresholds
 | 
| Fields inherited from class network.detectors.EventDetector | 
agentURN, attempts, cred, dbModule, eventIDGenerator, eventTable, host, localTriggeringEvents, printRunningThreadsFlag, remoteTriggeringEvents, reportTable | 
| Constructor Summary | |
DiskFullEventDetector(ConfigObject configObj)
The default constructor.  | 
|
DiskFullEventDetector(java.lang.String diskUsageFile,
                      ConfigObject configObj)
This constructor takes as argument a diskUsageFile, an example of which is shown above.  | 
|
| Method Summary | |
 java.util.Vector | 
executeSystemCommand(java.lang.String command)
Executes the given command and returns a vector of lines of output.  | 
 java.util.Vector | 
generateEvent(network.events.Event triggeredEvent)
 | 
 java.lang.String | 
getGeneratingEventClassName()
Returns the fully-qualified classname of the event that this detector may generate.  | 
 java.util.Vector | 
parseCommandResults(java.util.Vector results)
Parses a vector of command results into a vector of Object arrays that represent the elements of each line (separated by spaces).  | 
static void | 
parseDiskUsagesFile(java.lang.String diskUsageFile,
                    java.util.Hashtable usageThresholds)
This method parses a diskUsageFile.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
private java.util.Hashtable usageThresholds
private java.lang.String[] defaultLocalTriggeringEvents
| Constructor Detail | 
public DiskFullEventDetector(ConfigObject configObj)
public DiskFullEventDetector(java.lang.String diskUsageFile,
                             ConfigObject configObj)
diskUsageFile - | Method Detail | 
public java.lang.String getGeneratingEventClassName()
getGeneratingEventClassName in class EventDetectorpublic java.util.Vector executeSystemCommand(java.lang.String command)
command - a command to be executed in a new process.
public java.util.Vector parseCommandResults(java.util.Vector results)
results - the vector of results generated by executeSystemCommand().
public java.util.Vector generateEvent(network.events.Event triggeredEvent)
generateEvent in class EventDetectortriggeredEvent - 
public static void parseDiskUsagesFile(java.lang.String diskUsageFile,
                                       java.util.Hashtable usageThresholds)
diskUsageFile - path to the diskUsageFileusageThresholds - a Hashtable to be filled with config pairs.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||