The User Guide documents the tools available in GridSAM for submitting, controlling and monitoring jobs submitted to a GridSAM Web Service. If you are a service administrator interested in deploying and configuring a GridSAM Web Service, please consult the Deployment Guide.
A job in GridSAM is defined as an executable entity (e.g. binary) described by a JSDL document. A job is an atomic unit to be executed and monitored through GridSAM. A job in GridSAM can undergo the following state transition.
usage: gridsam-submit (-s service-endpoint-address | -sn service-name) [-j path-to-jsdl] [-suspended] [-myproxy [-myproxypassword password] -myproxyhost hostname [-myproxyport port] [-myproxyuser user]] path-to-jsdl [path-to-jsdl..]
Command-line tool for submitting a JSDL document to a GridSAM Web Service. Upon successful submission, a Job Identifier would be written to the standard output. The Job Identifier can be used subsequently in other GridSAM commands for querying or monitoring the state of the job.
Upon successful submission, the command outputs a Job Identifier for each JSDL document specified in the parameters and exits with 0. Exit code other than 0 indicates an error. An error message would be printed to the standard error stream.
$> gridsam-submit -j path/to/myjob.jsdl -s "http://myhost:18080/gridsam/services/gridsam" $> gridsam-submit -sn myservice path/to/myjob.jsdl $> gridsam-submit -suspended path/to/myjob.jsdl another/job.jsdl
usage: gridsam-status (-s service-endpoint-address | -sn service-name) [-j job-id] [-file job-id-file] [-x] job-id [job-id..]
Command-line tool for query the status of a job previously submitted to a GridSAM Web Service. Upon successful submission, a job status report is written to the standard output for inspection. By default, the command will produce a human-readable output unless the -x parameter is present. The -x parameter instructs the command to produce a machine-parsable XML output.
<gridsam:JobStatus> <!-- stage of the job in chronological order --> <gridsam:Stage> + <!-- the state of the job --> <gridsam:State> pending|staging-in|staged-in|active|executed| staging-out|staged-out|done|failed|undefined </gridsam:State> <!-- human-readable description associated with the state --> <gridsam:Description>xsd:string</gridsam:Description> <!-- the date and time the state is reached --> <gridsam:Time>xsd:DateTime</gridsam:Time> </gridsam:Stage> <!-- properties associated with the job --> <gridsam:Property name="xsd:anyURI">? xsd:string </gridsam:Property>? </gridsam:JobStatus>
Upon successful submission, the command outputs the job status for each job ID to the standard output and exits with 0. Exit code other than 0 indicates an error. An error message would be printed to the standard error stream.
$> gridsam-status -s "http://myhost:18080/gridsam/services/gridsam" -x urn:gridsam:1231241241414
usage: gridsam-terminate (-s service-endpoint-address | -sn service-name) [-j job-id] [-file job-id-file] job-id [job-id..]
Command-line tool for terminating a job previously submitted to a GridSAM Web Service. Upon successful execution, the job will start to move to the terminating state, all subsequent stages of the job will be passed. Use the gridsam-status to determine whether the job has completely terminated.
Upon successful submission, the command exits with 0. Exit code other than 0 indicates an error. An error message would be printed to the standard error stream.
$> gridsam-terminate -sn myservice urn:gridsam:1231241241414
usage: gridsam-start (-s service-endpoint-address | -sn service-name) [-j job-id] [-file job-id-file] job-id [job-id..]
Command-line tool for starting jobs previously submitted as 'suspended'. Upon successful execution, the job will start to enter the execution pipeline.
Upon successful submission, the command exits with 0. Exit code other than 0 indicates an error. An error message would be printed to the standard error stream.
$> gridsam-start -sn myservice urn:gridsam:1231241241414
usage: gridsam-groovy (-s service-endpoint-address | -sn service-name) -groovy groovy-script-url [args..]
Command-line tool for scripting job submission using the Groovy Language. A variable of type org.icenigrid.gridsam.core.JobManager is made available through the variable "jobManager". This can be used to submit jobs to the GridSAM service identified by the -s or -sn parameters.
Upon successful submission, the command exits with 0. Exit code other than 0 indicates an error. An error message would be printed to the standard error stream.
$> more /home/myuser/myscript.groovy import java.io.File jsdl = (new File(args[0])).getText() job = jobManager.submitJob(jsdl) println(job.jobStages) while(true) { job = jobManager.findJobInstance(job.ID) println(job.jobStages) if(job.jobStages.reverse()[0].state.toString() == "done") break } println(job.jobStages[0].state)
$> gridsam-groovy -sn myservice -groovy file:///home/myuser/myscript.groovy data/examples/uname.jsdl
usage: gridsam-ftp-server -p <ftp-port> -d <root-directory> [-l]
Anonymous FTP server daemon. It exposes a chosen directory on the user's file system as a FTP file system. This can be used for anonymous FTP file staging.
$> gridsam-ftp-server -p 19245 -d /my/public/directory
usage: gridsam-file-transfer from-url to-url
Command-line tool for transferring file between remote servers.
$> gridsam-ftp-server gsiftp://gridftp.host.com/file.txt webdav://webdav.host.com/webdavfile.txt
usage: gridsam-stress-test (-s service-endpoint-address | -sn service-name) [-j path-to-jsdl] [-o omii-conf-dir] [-wssec on|off] [-users no-of-users] [-jobs repetition] [-delay milliseconds] path-to-jsdl
Performs a stress test on a GridSAM web service. It simulates a number of users submitting a series of jobs to a GridSAM web service concurrently.
The command will write a XML report to the standard output. The XML report conforms to the following pseudo-schema
<!-- concurrency: number of concurrent users jobs: number of jobs per user --> <test concurrency="xsd:integer" jobs="xsd:integer"> <!-- For each submission (i.e. GridSAM.submitJob() is successful) id: the GridSAM ID of the job responseTime: the time(ms) taken to invoke GridSAM.submitJob() to the time the ID is returned to the user. --> <submittedJob id="xsd:string" responseTime="xsd:integer" /> + <!-- For each successful submission (i.e. GridSAM.submitJob() is successful), a job that is completed successfully (i.e. job state = Done) id: the GridSAM ID of the job submittedAt: the time (ms since the epoch) the job is submitted by the user (client's clock) enteredAt: the time (ms since the epoch) the job is entered the GridSAM service (server's clock) submittedAt: the time (ms since the epoch) the job reached the done stage (server's clock) --> <completedJob id="xsd:string" submittedAt="xsd:integer" enteredAt="xsd:integer" completedAt="xsd:integer" > + <!-- For each successful submission (i.e. GridSAM.submitJob() is successful), a job that is failed (i.e. job state = Failed) id: the GridSAM ID of the job submittedAt: the time (ms since the epoch) the job is submitted by the user (client's clock) enteredAt: the time (ms since the epoch) the job is entered the GridSAM service (server's clock) submittedAt: the time (ms since the epoch) the job reached the failed | undefined stage (server's clock) content: the failure message --> <failedJob id="xsd:string" submittedAt="xsd:integer" enteredAt="xsd:integer" completedAt="xsd:integer" >+ xsd:string </failedJob> <!-- aggregated statistics --> <statistics> <!-- number of failed submissions (i.e. GridSAM.submitJob() failed to return an ID) --> <totalFailedSubmissions>xsd:integer</totalFailedSubmissions> <!-- number of failed job (i.e. job state = failed) --> <totalFailedJobs>xsd:integer</totalFailedJobs> <!-- the average response time (ms) of GridSAM.submitJob() for the number of successful samples --> <averageResponseTime samples="xsd:integer">xsd:float</averageResponseTime> <!-- the average turnaround time (ms) for the job to be completed (reached the done state) --> <averageTurnaroundTime samples="xsd:integer">xsd:float</averageTurnaroundTime> </statistics> </test>
$> gridsam-stress-test -sn localhost -users 10 -jobs 10 -delay 1000 data/examples/sleep.jsdl
usage: gridsam-version
Prints the GridSAM version number to the console
usage: myproxy [common options] command [command options]
Command-line tool for managing MyProxy credential on a MyProxy server.
Common Options: -help Displays usage -v | -version Displays version -h <host> | -host <host> Hostname of the myproxy-server -p <port> | -port <port> Port of the myproxy-server (default 7512) -s <subject> | -subject <subject> Performs subject authorization -l <username> | -username <username> Username for the delegated proxy -d | -dn_as_username Use the proxy certificate subject (DN) as the default username instead of the "user.name" system property. Commands: put - put proxy get - get proxy anonget - get proxy without local credentials destroy - remove proxy info - credential information pwd - change credential password Specify -help after a command name for command-specific help.
$> myproxy -l myusername -host myproxy.ncsa.uiuc.edu put