eu.xtreemos.xati.API
Class XResourceMonitor

java.lang.Object
  extended by eu.xtreemos.xati.API.XResourceMonitor

public class XResourceMonitor
extends java.lang.Object

Author:
gregor.pipan@xlab.si

Field Summary
static java.lang.String servicename
           
 
Constructor Summary
XResourceMonitor()
           
 
Method Summary
static java.lang.Boolean addResAttribute(java.lang.String __attribute)
           
static java.util.ArrayList<java.lang.String> getResMetrics()
           
static java.util.Hashtable<java.lang.String,java.lang.Object> query()
          Queries the local monitor data provider for machine status, translates it into GLUE 1.2-compliant XML and transforms it into a Hashtable.
static java.util.Hashtable<java.lang.String,java.lang.String> queryResInfo()
          Queries the local monitor data provider for machine status and returns the values of the metrics being monitored on this node.
static java.util.ArrayList<ResourceDescriptorRecord> queryResourceDescriptor()
          Queries the local monitor data provider for machine status and returns a filled-in collection (that should at this point contain a single element) of resource descriptor records.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

servicename

public static java.lang.String servicename
Constructor Detail

XResourceMonitor

public XResourceMonitor()
Method Detail

queryResInfo

public static java.util.Hashtable<java.lang.String,java.lang.String> queryResInfo()
                                                                           throws java.lang.Exception
Queries the local monitor data provider for machine status and returns the values of the metrics being monitored on this node. The metrics returned are those listed by getResMetrics() and regulated by addResAttribute(String). If the monitorType entry in the configuration file is set to "ganglia", then the method obtains the information from the localhost ganglia daemon. If there is no monitoring system, the service will return a generic answer, contained in the file files/genericAnswer.xml . Alternatively, if the configuration is set to monitorType = "xmonitor", then the information is obtained from local kernel hooks which need to be pre-installed. The call is self-sustainable and does not invlove other services.

Returns:
A hashtable with metrics and their respective values, describing the details of this node.
Throws:
java.lang.Exception

query

public static java.util.Hashtable<java.lang.String,java.lang.Object> query()
                                                                    throws java.lang.Exception
Queries the local monitor data provider for machine status, translates it into GLUE 1.2-compliant XML and transforms it into a Hashtable. If the monitorType entry in the configuration file is set to "ganglia", then the method obtains the information from the localhost ganglia daemon. If there is no monitoring system, the service will return a generic answer, contained in the file files/genericAnswer.xml . Alternatively, if the configuration is set to monitorType = "xmonitor", then the information is obtained from local kernel hooks which need to be pre-installed. The call is self-sustainable and does not invlove other services.

Returns:
Hashtable with the node's hardware and load information, in a GLUE 1.2-compliant XML structure.
Throws:
java.lang.Exception

queryResourceDescriptor

public static java.util.ArrayList<ResourceDescriptorRecord> queryResourceDescriptor()
                                                                             throws java.lang.Exception
Queries the local monitor data provider for machine status and returns a filled-in collection (that should at this point contain a single element) of resource descriptor records. If the monitorType entry in the configuration file is set to "ganglia", then the method obtains the information from the localhost ganglia daemon. If there is no monitoring system, the service will return a generic answer, contained in the file files/genericAnswer.xml . Alternatively, if the configuration is set to monitorType = "xmonitor", then the information is obtained from local kernel hooks which need to be pre-installed. The call is self-sustainable and does not invlove other services.

Returns:
A collection of resource descriptors describing the node. At this point the collection should contain a single element.
Throws:
java.lang.Exception

getResMetrics

public static java.util.ArrayList<java.lang.String> getResMetrics()
                                                           throws java.lang.Exception
Throws:
java.lang.Exception

addResAttribute

public static java.lang.Boolean addResAttribute(java.lang.String __attribute)
                                         throws java.lang.Exception
Throws:
java.lang.Exception