Wednesday, March 18, 2009

Additional Teragrid resources for Bioinformatics Software(CAP3)

Last week, I found three additional teragrid sites working with Swarm. Please note that I have experinece some problem with ANL while I was stage out files before. And Marlon informed me that Pople doesn't support community certificate.

NCSA-Abe
(1) grid_resource: gt2 grid-abe.ncsa.teragrid.org:2119/jobmanager-pbs
(2) globusrsl: (jobtype=single)(count=1)
(3) Test cap3: success

Pople
(1) grid_resource: gt2 gram.pople.psc.teragrid.org:2119/jobmanager-pbs
(2) globusrsl: (jobtype=single)(count=1)
(3) Test cap3: success


ANL
(1) grid_resource: gt2 tg-grid.uc.teragrid.org:2119/jobmanager-pbs
(2) globusrsl: (jobtype=single)(count=1)
(3) Test cap3: success

Friday, March 6, 2009

Being a nice client of Inca service: monitoring Grid Resource

If you consider a monitoring mechanism for the TeraGrid resources, the Inca project from SDSC provides very useful information. (http://inca.sdsc.edu/) With access to Inca service, you can easily utilize monitoring information with light-weight software component. Thank you for hosting the service and very helpful supports from the Inca team! It was very pleasant experience.

If you are using the TeraGrid resources, you might be interested in the Inca's real time monitoring testbed (http://www.teragridforum.org/mediawiki/index.php?title=Inca_Real-Time_Monitoring_Testbed). Inca server runs the testing described in above document. Those information is available through RESTful URLs for the clients. The information is encoded either XML or HTML.

However, to use access the result, you have to create a query. There are pre-created query available for the particular projects including the TeraGrid Resource Monitoring page in the TeraGrid user portal. This query includes result of monitoring status of remote login to the TeraGrid cluster, pre-ws gatekeeper, and ws gatekeeper server. If you want to see the most recent result of the testing encoded in XML:
http://inca.teragrid.org/inca/XML/kit-status-v1/portal
Or, as a HTML page,
http://inca.teragrid.org/inca/HTML/kit-status-v1/portal

For more detail information,
http://inca.teragrid.org/inca/XML/kit-status-v1/portal/[clusterID]/prews-gram-batch
For example,
http://inca.teragrid.org/inca/XML/kit-status-v1/portal/sdsc-ia64/prews-gram-batch
You will see the more detail information about the SDSC IA64 clusters such as testing intervals.

To create a query for your own purpose, you have to contact the administrator of the Inca service. Inca provides nice user interface for the administrator to create new query. After you create new query, you can access your result through:
http://inca.teragrid.org/inca/[XML|HTML]/kit-status-v1//

This output can be easily integrated to your software though light-weight way such as HTTP client. After downloding the information, we used conventional Java DOM implementation. With customized query, the response size seems to be reasonable to run with DOM implementation.

Please note that if you access Inca service hosted by SDSC, the testing interval is not changable.


Here is my test code:

import java.net.*;
import java.io.*;
import javax.xml.parsers.*;
import org.w3c.dom.*;

public class Test{
public static void main(String[] args){
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document dom = db.parse("http://inca.teragrid.org/inca/XML/kit-status-v1/portal_summary");
Element docEle = dom.getDocumentElement();
NodeList nl = docEle.getElementsByTagName("row");

System.out.println("There are "+ nl.getLength()+ " elements.");
if(nl != null && nl.getLength() > 0) {
for(int i = 0 ; i < nl.getLength();i++) {

//get the employee element
Element el = (Element)nl.item(i);
NodeList sub1 = el.getElementsByTagName("reportSummary");
NodeList sub2 = ((Element)sub1.item(0)).getElementsByTagName("hostname");
String hostname = ((Element)sub2.item(0)).getFirstChild().getNodeValue();
System.out.println("HostName "+i+":"+hostname);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}