|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.contrib.failmon.ShellParser org.apache.hadoop.contrib.failmon.SMARTParser
public class SMARTParser
Objects of this class parse the output of smartmontools to gather information about the state of disks in the system. The smartmontools utility reads the S.M.A.R.T. attributes from the disk devices and reports them to the user. Note that since running smartctl requires superuser provileges, one should grand sudo privileges to the running user for the command smartctl (without a password). Alternatively, one can set up a cron job that periodically dumps the output of smartctl into a user-readable file. See the configuration file for details.
Constructor Summary | |
---|---|
SMARTParser()
Constructs a SMARTParser and reads the list of disk devices to query |
Method Summary | |
---|---|
String |
getInfo()
Return a String with information about this class |
EventRecord[] |
monitor()
Invokes query() to do the parsing and handles parsing errors for each one of the disks specified in the configuration. |
EventRecord |
query(String device)
Reads and parses the output of smartctl for a specified disk and creates an appropriate EventRecord that holds the desirable information for it. |
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 |
---|
public SMARTParser()
Method Detail |
---|
public EventRecord query(String device) throws Exception
query
in class ShellParser
device
- the disk device name to query
Exception
public EventRecord[] monitor()
monitor
in interface Monitored
monitor
in class ShellParser
public String getInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |