SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Extending SCMSWeb 3 rd  PRAGMA Institute Hand-on Resources II Sugree Phatanapherom [email_address]
SCMSWeb in Short ,[object Object],[object Object],[object Object]
SCMSWeb in Long
Usage statistics
Probe
Bandwidth
GeoMap
Catalog
Behind graphs, charts and tables ,[object Object],[object Object]
Configurable ,[object Object],[object Object],[object Object]
General Configuration ,[object Object],[object Object]
Probe Configuration ,[object Object],[object Object],[object Object]
probe.conf [html] xmlpath = /usr/share/scmsweb/incoming/cluster/pragma.xml textpath = /usr/share/scmsweb/grid/PRAGMA/pragma.txt htmlpath = /usr/share/scmsweb/grid/PRAGMA/pragma.html [probe] name = PRAGMA smtp = localhost #email = cindy.pragma@gmail.com timestamp_path = /var/tmp/scmsweb timeout = 40 probe0 = DNS probe1 = Authentication probe2 = Mds probe3 = JobRun probe4 = GridFTPTo probe5 = GridFTPFrom probe6 = WSGRAM probe7 = Iperf probe8 = SWCat [globus] basedn = mds-vo-name=npaci,o=sdsc mdshost = rocks-67.sdsc.edu [Gfarm] command = /usr/share/scmsweb/gfarm/probe_gfhost %(target)s [WSGRAM] command = /usr/share/scmsweb/wsgram/probe_wsgram %(target)s [time] rerun_false = 1 SWCat = 720 Iperf = 720 Mds = 720 GridFTPTo = 360 GridFTPFrom = 360 JobRun = 120 WSGRAM = 120
target.conf #[USM-CS] [aurora] target = aurora.usmgrid.myren.net.my iperf_args = -p 15001 email = zhengc@sdsc.edu,keat@webmail.cs.usm.my,khuen@cs.usm.my,hychan@cs.usm.my #[IOIT-HCM] [VENUS] target = venus.ioit-hcm.ac.vn iperf_args = -p 15001 email = zhengc@sdsc.edu,han@vast-hcm.ac.vn #[MIMOS] [MIMOS-Nucleus] target = nucleus.mygridusbio.net.my iperf_args = -p 5001 email =  [email_address] ,jyluke@mimos.my #[SDSC_compute] [Rocks-52] target = rocks-52.sdsc.edu iperf_args = -p 15001 email = zhengc@sdsc.edu SWCat_target = rocks-52.sdsc.edu/jobmanager-fork #[BU] [popCluster] target = pop.cs.binghamton.edu GridFTPTo_probe = off GridFTPFrom_probe = off iperf_args = -p 15001 email = zhengc@sdsc.edu,john@jskro.org,kchiu@cs.binghamton.edu
Catalog Configuration ,[object Object],[object Object]
swcatalog.conf [autodock4] url=http://autodock.scripps.edu/ [namd] url=http://www.ks.uiuc.edu/Research/namd/ [amber] url=http://amber.scripps.edu/ [ninf-g] url=http://ninf.apgrid.org/ [intel_c_compiler] url=http://www.intel.com/cd/software/products/asmo-na/eng/219768.htm [intel_fortran_compiler] url=http://www.intel.com/cd/software/products/asmo-na/eng/219768.htm [apbs] url=http://apbs.sourceforge.net/
0-init.sh #!/bin/sh for file in /etc/profile.d/*.sh; do [ -f "$file" ] && . "$file" done
amber.sh #!/bin/sh amber_version() { # bad guess? VERSION=`echo "$1" | grep -q 9` if [ X"$VERSION" = X ]; then VERSION="9" else VERSION="unknown" fi echo -n "$VERSION" } SANDER_PATH=`which sander 2> /dev/null` if [ X"$AMBERHOME" != X ]; then # how can we decide version of amber? VERSION=`amber_version "$AMBERHOME"/exe` echo "amber:$VERSION:$AMBERHOME/exe" elif [ X"$SANDER_PATH" != X ]; then VERSION=`amber_version "$SANDER_PATH"` echo "amber:$VERSION:$SANDER_PATH" fi
ninf-g.sh #!/bin/sh NG_VERSION=`ng_version 2> /dev/null` if [ X"$NG_VERSION" != X ]; then VERSION=`echo $NG_VERSION | sed "s/.*:[[:space:]]*.*//g"` NG_PATH=`which ng_version` NG_PATH=`dirname "$NG_PATH"` echo "ninf-g:$VERSION:$NG_PATH" fi
GeoMap Configuration ,[object Object]
Configuration [Site:Universiti Sains Malaysia] parent = Grid:PRAGMA UniqueID = USM_MY Latitude = 5.356667 Longitude = 100.300833 Location = Malaysia Description = USM MY SecurityContact = mailto: noreply@noreply.com SysAdminContact = mailto: noreply@noreply.com UserSupportContact = mailto: noreply@noreply.com [Site:MIMOS] parent = Grid:PRAGMA Latitude = 5.356667 Longitude = 100.300833 Location = Malaysia Description = MIMOS MY SecurityContact = mailto: noreply@noreply.com SysAdminContact = mailto: noreply@noreply.com UserSupportContact = mailto: noreply@noreply.com [Grid:PRAGMA] Name = PRAGMA Description = PRAGMA [Site:TNGC_TH] parent = Grid:PRAGMA Location = Bangkok, Thailand Latitude = 13.84544 Longitude = 100.567802 Description = sunyata.thaigrid.or.th SecurityContact = mailto: noreply@noreply.com SysAdminContact = mailto: noreply@noreply.com UserSupportContact = mailto: noreply@noreply.com
Extensible ,[object Object],[object Object],[object Object],http://goc.pragma-grid.net/cgi-bin/scmsweb/xml_display.cgi?grid=on http://goc.pragma-grid.net/cgi-bin/scmsweb/glue.cgi?format=xml http://goc.pragma-grid.net/cgi-bin/scmsweb/glue.cgi?format=kml
Basic Usage curl http://goc.pragma-grid.net/cgi-bin/scmsweb/xml_display.cgi?grid=on curl http://goc.pragma-grid.net/cgi-bin/scmsweb/glue.cgi?format=xml curl http://goc.pragma-grid.net/cgi-bin/scmsweb/glue.cgi?format=kml
For developers ,[object Object]
Try it and feel it! ,[object Object],[object Object],[object Object]
conf.py scmsweb_xml = 'http://goc.pragma-grid.net/cgi-bin/scmsweb/xml_display.cgi?grid=on' map_xml = 'http://goc.pragma-grid.net/cgi-bin/scmsweb/glue.cgi?format=xml' map_kml = 'http://goc.pragma-grid.net/cgi-bin/scmsweb/glue.cgi?format=kml' nano conf.py cat conf.py python conf.py
fetch.py #!/usr/bin/python import conf from urllib import urlopen fi = urlopen(conf.scmsweb_xml) fo = open('scmsweb.xml', 'w') fo.write(fi.read()) fo.close() fi = urlopen(conf.map_xml) fo = open('map.xml', 'w') fo.write(fi.read()) fo.close() fi = urlopen(conf.map_kml) fo = open('map.kml', 'w') fo.write(fi.read()) fo.close() nano fetch.py python fetch.py ls -l
parse.py #!/usr/bin/python from xml.dom import minidom fi = open('scmsweb.xml') doc = minidom.parse(fi) print doc nano parse.py python parse.py
traverse.py #!/usr/bin/python from xml.dom import minidom fi = open('scmsweb.xml') doc = minidom.parse(fi) root = doc.documentElement for node in root.childNodes: if node.nodeType == doc.ELEMENT_NODE: print node.tagName, node.attributes.items()
x.py #!/usr/bin/python from xml.dom import minidom from xml import xpath fi = open('scmsweb.xml') doc = minidom.parse(fi) root = doc.documentElement nodes = xpath.Evaluate('cluster', root) for node in nodes: if node.nodeType == doc.ELEMENT_NODE: print node.tagName, node.attributes.items()
l.py #!/usr/bin/python from xml.dom import minidom from lxml import etree as ET fi = open('scmsweb.xml') root = ET.parse(fi) nodes = root.xpath('cluster') for node in nodes: print node.tag, node.attrib
Congratulation! You are python programmer now

Weitere ähnliche Inhalte

Ähnlich wie Hand-on Resources II: Extending SCMSWeb

Im-A-Hacker-Get-Me-Out-Of-Here-Breaking-Network-Segregation-Using-Esoteric-Co...
Im-A-Hacker-Get-Me-Out-Of-Here-Breaking-Network-Segregation-Using-Esoteric-Co...Im-A-Hacker-Get-Me-Out-Of-Here-Breaking-Network-Segregation-Using-Esoteric-Co...
Im-A-Hacker-Get-Me-Out-Of-Here-Breaking-Network-Segregation-Using-Esoteric-Co...
YuChianWu
 
Mitaka_IntroStarlink.pdf
Mitaka_IntroStarlink.pdfMitaka_IntroStarlink.pdf
Mitaka_IntroStarlink.pdf
robinsroy28
 
Ratpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web AppsRatpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web Apps
James Williams
 

Ähnlich wie Hand-on Resources II: Extending SCMSWeb (20)

2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
 
GE Predix 新手入门 赵锴 物联网_IoT
GE Predix 新手入门 赵锴 物联网_IoTGE Predix 新手入门 赵锴 物联网_IoT
GE Predix 新手入门 赵锴 物联网_IoT
 
Profiling and optimizing go programs
Profiling and optimizing go programsProfiling and optimizing go programs
Profiling and optimizing go programs
 
Im-A-Hacker-Get-Me-Out-Of-Here-Breaking-Network-Segregation-Using-Esoteric-Co...
Im-A-Hacker-Get-Me-Out-Of-Here-Breaking-Network-Segregation-Using-Esoteric-Co...Im-A-Hacker-Get-Me-Out-Of-Here-Breaking-Network-Segregation-Using-Esoteric-Co...
Im-A-Hacker-Get-Me-Out-Of-Here-Breaking-Network-Segregation-Using-Esoteric-Co...
 
Managing and Monitoring Application Performance
Managing and Monitoring Application PerformanceManaging and Monitoring Application Performance
Managing and Monitoring Application Performance
 
Mitaka_IntroStarlink.pdf
Mitaka_IntroStarlink.pdfMitaka_IntroStarlink.pdf
Mitaka_IntroStarlink.pdf
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
 
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
 
Sling IDE Tooling @ adaptTo 2013
Sling IDE Tooling @ adaptTo 2013Sling IDE Tooling @ adaptTo 2013
Sling IDE Tooling @ adaptTo 2013
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
 
Ganglia Monitoring Tool
Ganglia Monitoring ToolGanglia Monitoring Tool
Ganglia Monitoring Tool
 
IBCAST 2021: Observations and lessons learned from the APNIC Community Honeyn...
IBCAST 2021: Observations and lessons learned from the APNIC Community Honeyn...IBCAST 2021: Observations and lessons learned from the APNIC Community Honeyn...
IBCAST 2021: Observations and lessons learned from the APNIC Community Honeyn...
 
Stackato Presentation Techzone 2013
Stackato Presentation Techzone 2013Stackato Presentation Techzone 2013
Stackato Presentation Techzone 2013
 
Noah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku SecretsNoah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku Secrets
 
Pyramid Deployment and Maintenance
Pyramid Deployment and MaintenancePyramid Deployment and Maintenance
Pyramid Deployment and Maintenance
 
Velocity EU 2012 - Third party scripts and you
Velocity EU 2012 - Third party scripts and youVelocity EU 2012 - Third party scripts and you
Velocity EU 2012 - Third party scripts and you
 
How to improve ELK log pipeline performance
How to improve ELK log pipeline performanceHow to improve ELK log pipeline performance
How to improve ELK log pipeline performance
 
Ratpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web AppsRatpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web Apps
 
Kubernetes walkthrough
Kubernetes walkthroughKubernetes walkthrough
Kubernetes walkthrough
 
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
 

Mehr von Sugree Phatanapherom

Optimizing Drupal for Mobile Devices
Optimizing Drupal for Mobile DevicesOptimizing Drupal for Mobile Devices
Optimizing Drupal for Mobile Devices
Sugree Phatanapherom
 
Call for Students: Google Summer of Code 2008
Call for Students: Google Summer of Code 2008Call for Students: Google Summer of Code 2008
Call for Students: Google Summer of Code 2008
Sugree Phatanapherom
 

Mehr von Sugree Phatanapherom (16)

Twitter, Facebook and etc: Quick Startup Guide for Marketing
Twitter, Facebook and etc: Quick Startup Guide for MarketingTwitter, Facebook and etc: Quick Startup Guide for Marketing
Twitter, Facebook and etc: Quick Startup Guide for Marketing
 
@sugree and Twitter
@sugree and Twitter@sugree and Twitter
@sugree and Twitter
 
Behind the madness
Behind the madnessBehind the madness
Behind the madness
 
drupal.in.th
drupal.in.thdrupal.in.th
drupal.in.th
 
Twitter API and Startup Ideas
Twitter API and Startup IdeasTwitter API and Startup Ideas
Twitter API and Startup Ideas
 
Readme Read Sugree
Readme Read SugreeReadme Read Sugree
Readme Read Sugree
 
SCMSWeb and Condor-G Demonstration
SCMSWeb and Condor-G DemonstrationSCMSWeb and Condor-G Demonstration
SCMSWeb and Condor-G Demonstration
 
Drupal: blog and beyond
Drupal: blog and beyondDrupal: blog and beyond
Drupal: blog and beyond
 
The Spirit of Open Source
The Spirit of Open SourceThe Spirit of Open Source
The Spirit of Open Source
 
mbpurple - the replacement twitter im
mbpurple - the replacement twitter immbpurple - the replacement twitter im
mbpurple - the replacement twitter im
 
jibjib - ultimate twitter client for your phone
jibjib - ultimate twitter client for your phonejibjib - ultimate twitter client for your phone
jibjib - ultimate twitter client for your phone
 
Next Web Application - Brainstorm
Next Web Application - BrainstormNext Web Application - Brainstorm
Next Web Application - Brainstorm
 
Automatic Self-Tuning Architecture for Batch Scheduler on Large Scale Computi...
Automatic Self-Tuning Architecture for Batch Scheduler on Large Scale Computi...Automatic Self-Tuning Architecture for Batch Scheduler on Large Scale Computi...
Automatic Self-Tuning Architecture for Batch Scheduler on Large Scale Computi...
 
Optimizing Drupal for Mobile Devices
Optimizing Drupal for Mobile DevicesOptimizing Drupal for Mobile Devices
Optimizing Drupal for Mobile Devices
 
Call for Students: Google Summer of Code 2008
Call for Students: Google Summer of Code 2008Call for Students: Google Summer of Code 2008
Call for Students: Google Summer of Code 2008
 
Twitter Rules
Twitter RulesTwitter Rules
Twitter Rules
 

Kürzlich hochgeladen

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

Hand-on Resources II: Extending SCMSWeb

  • 1. Extending SCMSWeb 3 rd PRAGMA Institute Hand-on Resources II Sugree Phatanapherom [email_address]
  • 2.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. probe.conf [html] xmlpath = /usr/share/scmsweb/incoming/cluster/pragma.xml textpath = /usr/share/scmsweb/grid/PRAGMA/pragma.txt htmlpath = /usr/share/scmsweb/grid/PRAGMA/pragma.html [probe] name = PRAGMA smtp = localhost #email = cindy.pragma@gmail.com timestamp_path = /var/tmp/scmsweb timeout = 40 probe0 = DNS probe1 = Authentication probe2 = Mds probe3 = JobRun probe4 = GridFTPTo probe5 = GridFTPFrom probe6 = WSGRAM probe7 = Iperf probe8 = SWCat [globus] basedn = mds-vo-name=npaci,o=sdsc mdshost = rocks-67.sdsc.edu [Gfarm] command = /usr/share/scmsweb/gfarm/probe_gfhost %(target)s [WSGRAM] command = /usr/share/scmsweb/wsgram/probe_wsgram %(target)s [time] rerun_false = 1 SWCat = 720 Iperf = 720 Mds = 720 GridFTPTo = 360 GridFTPFrom = 360 JobRun = 120 WSGRAM = 120
  • 14. target.conf #[USM-CS] [aurora] target = aurora.usmgrid.myren.net.my iperf_args = -p 15001 email = zhengc@sdsc.edu,keat@webmail.cs.usm.my,khuen@cs.usm.my,hychan@cs.usm.my #[IOIT-HCM] [VENUS] target = venus.ioit-hcm.ac.vn iperf_args = -p 15001 email = zhengc@sdsc.edu,han@vast-hcm.ac.vn #[MIMOS] [MIMOS-Nucleus] target = nucleus.mygridusbio.net.my iperf_args = -p 5001 email = [email_address] ,jyluke@mimos.my #[SDSC_compute] [Rocks-52] target = rocks-52.sdsc.edu iperf_args = -p 15001 email = zhengc@sdsc.edu SWCat_target = rocks-52.sdsc.edu/jobmanager-fork #[BU] [popCluster] target = pop.cs.binghamton.edu GridFTPTo_probe = off GridFTPFrom_probe = off iperf_args = -p 15001 email = zhengc@sdsc.edu,john@jskro.org,kchiu@cs.binghamton.edu
  • 15.
  • 16. swcatalog.conf [autodock4] url=http://autodock.scripps.edu/ [namd] url=http://www.ks.uiuc.edu/Research/namd/ [amber] url=http://amber.scripps.edu/ [ninf-g] url=http://ninf.apgrid.org/ [intel_c_compiler] url=http://www.intel.com/cd/software/products/asmo-na/eng/219768.htm [intel_fortran_compiler] url=http://www.intel.com/cd/software/products/asmo-na/eng/219768.htm [apbs] url=http://apbs.sourceforge.net/
  • 17. 0-init.sh #!/bin/sh for file in /etc/profile.d/*.sh; do [ -f "$file" ] && . "$file" done
  • 18. amber.sh #!/bin/sh amber_version() { # bad guess? VERSION=`echo "$1" | grep -q 9` if [ X"$VERSION" = X ]; then VERSION="9" else VERSION="unknown" fi echo -n "$VERSION" } SANDER_PATH=`which sander 2> /dev/null` if [ X"$AMBERHOME" != X ]; then # how can we decide version of amber? VERSION=`amber_version "$AMBERHOME"/exe` echo "amber:$VERSION:$AMBERHOME/exe" elif [ X"$SANDER_PATH" != X ]; then VERSION=`amber_version "$SANDER_PATH"` echo "amber:$VERSION:$SANDER_PATH" fi
  • 19. ninf-g.sh #!/bin/sh NG_VERSION=`ng_version 2> /dev/null` if [ X"$NG_VERSION" != X ]; then VERSION=`echo $NG_VERSION | sed "s/.*:[[:space:]]*.*//g"` NG_PATH=`which ng_version` NG_PATH=`dirname "$NG_PATH"` echo "ninf-g:$VERSION:$NG_PATH" fi
  • 20.
  • 21. Configuration [Site:Universiti Sains Malaysia] parent = Grid:PRAGMA UniqueID = USM_MY Latitude = 5.356667 Longitude = 100.300833 Location = Malaysia Description = USM MY SecurityContact = mailto: noreply@noreply.com SysAdminContact = mailto: noreply@noreply.com UserSupportContact = mailto: noreply@noreply.com [Site:MIMOS] parent = Grid:PRAGMA Latitude = 5.356667 Longitude = 100.300833 Location = Malaysia Description = MIMOS MY SecurityContact = mailto: noreply@noreply.com SysAdminContact = mailto: noreply@noreply.com UserSupportContact = mailto: noreply@noreply.com [Grid:PRAGMA] Name = PRAGMA Description = PRAGMA [Site:TNGC_TH] parent = Grid:PRAGMA Location = Bangkok, Thailand Latitude = 13.84544 Longitude = 100.567802 Description = sunyata.thaigrid.or.th SecurityContact = mailto: noreply@noreply.com SysAdminContact = mailto: noreply@noreply.com UserSupportContact = mailto: noreply@noreply.com
  • 22.
  • 23. Basic Usage curl http://goc.pragma-grid.net/cgi-bin/scmsweb/xml_display.cgi?grid=on curl http://goc.pragma-grid.net/cgi-bin/scmsweb/glue.cgi?format=xml curl http://goc.pragma-grid.net/cgi-bin/scmsweb/glue.cgi?format=kml
  • 24.
  • 25.
  • 26. conf.py scmsweb_xml = 'http://goc.pragma-grid.net/cgi-bin/scmsweb/xml_display.cgi?grid=on' map_xml = 'http://goc.pragma-grid.net/cgi-bin/scmsweb/glue.cgi?format=xml' map_kml = 'http://goc.pragma-grid.net/cgi-bin/scmsweb/glue.cgi?format=kml' nano conf.py cat conf.py python conf.py
  • 27. fetch.py #!/usr/bin/python import conf from urllib import urlopen fi = urlopen(conf.scmsweb_xml) fo = open('scmsweb.xml', 'w') fo.write(fi.read()) fo.close() fi = urlopen(conf.map_xml) fo = open('map.xml', 'w') fo.write(fi.read()) fo.close() fi = urlopen(conf.map_kml) fo = open('map.kml', 'w') fo.write(fi.read()) fo.close() nano fetch.py python fetch.py ls -l
  • 28. parse.py #!/usr/bin/python from xml.dom import minidom fi = open('scmsweb.xml') doc = minidom.parse(fi) print doc nano parse.py python parse.py
  • 29. traverse.py #!/usr/bin/python from xml.dom import minidom fi = open('scmsweb.xml') doc = minidom.parse(fi) root = doc.documentElement for node in root.childNodes: if node.nodeType == doc.ELEMENT_NODE: print node.tagName, node.attributes.items()
  • 30. x.py #!/usr/bin/python from xml.dom import minidom from xml import xpath fi = open('scmsweb.xml') doc = minidom.parse(fi) root = doc.documentElement nodes = xpath.Evaluate('cluster', root) for node in nodes: if node.nodeType == doc.ELEMENT_NODE: print node.tagName, node.attributes.items()
  • 31. l.py #!/usr/bin/python from xml.dom import minidom from lxml import etree as ET fi = open('scmsweb.xml') root = ET.parse(fi) nodes = root.xpath('cluster') for node in nodes: print node.tag, node.attrib
  • 32. Congratulation! You are python programmer now