org.apache.hadoop.contrib.failmon
Class SensorsParser

java.lang.Object
  extended by org.apache.hadoop.contrib.failmon.ShellParser
      extended by org.apache.hadoop.contrib.failmon.SensorsParser
All Implemented Interfaces:
Monitored

public class SensorsParser
extends ShellParser

Objects of this class parse the output of the lm-sensors utility to gather information about fan speed, temperatures for cpus and motherboard etc.


Constructor Summary
SensorsParser()
           
 
Method Summary
 String getInfo()
          Return a String with information about this class
 EventRecord[] monitor()
          Invokes query() to do the parsing and handles parsing errors.
 EventRecord query(String s)
          Reads and parses the output of the 'sensors' command and creates an appropriate EventRecord that holds the desirable information.
 
Methods inherited from class org.apache.hadoop.contrib.failmon.ShellParser
findAll, findPattern, monitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SensorsParser

public SensorsParser()
Method Detail

query

public EventRecord query(String s)
                  throws Exception
Reads and parses the output of the 'sensors' command and creates an appropriate EventRecord that holds the desirable information.

Specified by:
query in class ShellParser
Parameters:
s - unused parameter
Returns:
the EventRecord created
Throws:
Exception

monitor

public EventRecord[] monitor()
Invokes query() to do the parsing and handles parsing errors.

Specified by:
monitor in interface Monitored
Specified by:
monitor in class ShellParser
Returns:
an array of EventRecords that holds one element that represents the current state of the hardware sensors

getInfo

public String getInfo()
Return a String with information about this class

Returns:
A String describing this class


Copyright © 2009 The Apache Software Foundation