Connecting Infrastructure, Connecting Research

Part 2 - Working with multiple NGS hosts

From this page onward, we'll be working with two instances of the GSI-SSHTerm applets in the right window. While we still keep the first one connected to RAL, let's now login to Leeds in the second one.

Choose menu File -> New connection, and click Advanced button. input ngs.leeds.ac.uk as the host name, port 2222, no username, select publickey, and click the Connect button, and then enter your passphrase and press OK. You'll be connected to the Leeds host, and you may notice the prompt [ngs0208@ngs ~]$ is different from that of the RAL host (0208 is my account ID, and you'll have a different number).

[ngs0208@ngs ~]$ hostname -f
ngs.leeds.ac.uk

To show removal of files between these two hosts, let's grab some files from the Web. We can do this using wget command:

[ngs0208@ngs ~]$ wget http://www.nesc.ac.uk/
--14:37:50-- http://www.nesc.ac.uk/
=> `index.html'
... ...
100%[======================================>] 12,816 --.--K/s

14:37:50 (280.46 MB/s) - `index.html' saved [12816/12816]

We have file 'index.html' saved in our working directory on Leeds host, and let's copy it over to RAL. To do this, we need to use gsiscp which supports GSI authentication with our certificates.

Before using gsiscp, we need to know the exact directory of our copying target. So focus on the upper window and type pwd command to show where we are on RAL host.

-bash-3.00 $ pwd
/home/ngs0383

ngs0383 is my directory, yours will be different. Remeber to replace it with yours in gsiscp command line below. Now focus on the lower window, and type the command. Note that the argument -P is in uppercase (if you're not using copy-paste :).

[ngs0208@ngs ~]$ gsiscp -P 2222 index.html ngs.rl.ac.uk:/home/ngs0383
index.html 100% 13KB 12.5KB/s 00:00

You can now check wether it is there using ls command in the upper window.

Finally, let's come back to the job submission practice again. This time, we try to submit a job from one host to the other using globus-job-submit instead of globus-job-run. The difference is that the former submits the job to the queue as a batch while the latter submits to run immediately which is more suitable for short jobs. The job we're going to submit here is /bin/egrep with arguments to sort out email address in the 'index.html' file we have downloaded from the NeSC website. So enter the following command in the upper window to submit the job to Leeds host. (You need scroll to the right to see the whole long command string.)

-bash-3.00$ globus-job-submit ngs.leeds.ac.uk/jobmanager-pbs /bin/egrep -o '(mailto:\w+@[^"?]+)' index.html
https://ngs.leeds.ac.uk:64003/27810/1226503505/

Instead of straight output from egrep, we've got a URI: https://ngs.leeds.ac.uk:64003/27810/1226503505/. This is the identity of this job to be executed, and we'll need it to query the running status and output. Let's query the job status with this job ID:


-bash-3.00$ globus-job-status https://ngs.leeds.ac.uk:64003/27810/1226503505/
DONE

That returned word DONE means the job is finished while you might also get PENDING or ACTIVE before DONE, and now we can get the output using globus-job-get-output command:

-bash-3.00$ globus-job-get-output https://ngs.leeds.ac.uk:64003/27810/1226503505/
mailto:manager@nesc.ac.uk
mailto:ros@dcs.gla.ac.uk
mailto:adminteam@nesc.ac.uk