This appendix describes how to use the ARPAnet standard file transfer protocol (FTP) with the Network Queuing System (NQS) on UNICOS and UNICOS/mk systems. FTP is the file transfer program used by the Transmission Control Protocol/Internet Protocol (TCP/IP), which lets you transfer files to and from a remote network host.
By providing FTP access to NQS, computer systems that support FTP can access the NQS batch system on the UNICOS or UNICOS/mk operating system. The FTP interface to NQS lets you submit batch jobs to a UNICOS or UNICOS/mk system from any computer system that supports TCP/IP and lets you run batch jobs only on a UNICOS or UNICOS/mk system. You can run these batch jobs without logging in interactively to the UNICOS or UNICOS/mk system or running the Remote Queuing System (RQS) tool on your workstation. The FTP interface to NQS lets you display the status of batch mode, enable or disable batch mode, submit jobs to NQS, display a summary of the NQS job queues and a list of your NQS output files, delete NQS jobs, and retrieve NQS job output from a UNICOS or UNICOS/mk system. You can use the following FTP commands:
FTP command | Description |
del | Deletes a job or output file |
dir | Displays the job status |
get | Retrieves the job output |
put | Submits a job to NQS |
quote site batch or site batch | Displays the current state of batch mode and enables or disables batch mode |
To use the FTP interface to NQS, you must meet the following requirements:
Your system must be running FTP.
You must enter the quote site batch or site batch command to ensure that batch mode is enabled.
You must have a valid account name and home directory on the UNICOS or UNICOS/mk system.
The following sections describe the del, dir, get, put, quote site batch, and site batch FTP commands.
The del command has the following format:
del job-output | nqs-job |
The del command deletes NQS job output (job-output) or NQS jobs (nqs-job) when batch mode is on. You can delete the NQS jobs that are specified in a dir command display. If any output exists, it also is deleted. You also can delete the NQS output files from your $HOME/ftpnqs directory. When you specify the del command, it is assumed that the file to be deleted is an output file in the $HOME/ftpnqs directory. If the file name exists, it is deleted; if it does not exist, it is assumed to be an NQS job. If no valid NQS job has that name, an error message is displayed.
The dir command has the following format:
dir [name] |
The dir command displays NQS status information when batch mode is on. When you enter the dir command, it displays a summary of the NQS jobs and a list of your NQS output files. The summary display is the same as the NQS cqstatl -a -u username or qstat -a -u username command display. The output file list is a directory listing of $HOME/ftpnqs that is displayed by using the ls -l command. When you enter the dirname argument, a detailed display of a queue or request name is displayed; the detailed display is the same as the NQS cqstatl -f name or qstat -f name command display. When batch mode is active, the ls command is not an alias for the dir command.
The get command has the following format:
get job-output[local-file] |
When batch mode is on, the get command retrieves the NQS output files (job-output) from the $HOME/ftpnqs directory. The job output file names have the following formats:
jobname.eseq-number (Standard error file) |
jobname.oseq-number (Standard output file) |
The jobname is the name of the submitted file name, and seq-number is the NQS job sequence number assigned when the file was submitted. If you specify local-file, the job output is stored on the local system that uses that file name.
The put command has the following format:
put local-file [jobname] |
When batch mode is on, the put command transfers a job file from your system (local-file) to the UNICOS or UNICOS/mk system and submits the job to NQS. The jobname is the assigned job name; the default is the local file name. When the job is completed, the job output is spooled to a file in the ftpnqs directory in your home directory. When you submit a job, the ftpnqs directory is created in your UNICOS or UNICOS/mk home directory. If the directory already exists, it will be used as it currently exists. The job file can contain UNICOS or UNICOS/mk commands and, optionally, cqsub or qsub command options. The FTP interface uses the -r option to assign this job name.
The quote site batch and site batch commands have the following formats:
quote site batch [on|off] |
site batch [on|off] |
The FTP quote site batch command lets you enter commands at an FTP client that only the UNICOS or UNICOS/mk FTP server understands. The batch subcommand of FTP is implemented as an FTP site command. The site batch command displays the current state of batch mode, and it enables and disables batch mode. The remote user enters this command, and the UNICOS or UNICOS/mk FTP server interprets it.
If you do not specify an option on either command, the current state is displayed (enabled or disabled). If the batch on command is entered on either command, batch mode is enabled. If the batch off command is entered on either command, batch mode is disabled. You can transfer between file mode and batch mode within one FTP session; this lets you transfer files, switch to batch mode, transfer NQS jobs, and return to file mode without leaving the FTP session. The default at session startup is for the FTP interface to NQS to be disabled. If your site has disabled batch mode and you try to enable batch mode during an FTP session, you will receive the following message:
502 Batch command not supported |
The following examples represent a sample session that uses the FTP interface to NQS.
The FTP startup procedure does not change for NQS. You must pass standard user authentication, just as in standard FTP. To start up FTP, enter the ftp command. After the server is ready, you can log on to FTP.
/home/tree1/abc/nqs/ftp 20 >ftp big Connected to big.cray.com. 220 big FTP server (Version 5.2 Fri Jan 9 14:09:58 CST 1998) ready. Name (big:abc): abc 331 Password required for abc. Password: 230 User abc logged in. |
The following command sequence example shows how to enable and disable batch mode . If you enter the quote site batch command, the current state of batch mode is displayed. If you enter the quote site batch on command, you will enable batch mode. If you enter the quote site batch off command, you will disable batch mode. Batch mode remains enabled to allow the rest of the sample session to continue in batch mode.
ftp> quote site batch 200 Batch mode currently disabled ftp> quote site batch on 200 Batch mode enabled ftp> quote site batch 200 Batch mode currently enabled ftp> quote site batch off 200 Batch mode disabled ftp> quote site batch on 200 Batch mode enabled |
In the following example , a file named job1 on the local machine was submitted to the NQS batch system on the server system. The response shows that the job was submitted and is identified as request 191.big. The job is identified as job1 in a dir command display. The job output is in a file named job1.o191 in the $HOME/ftpnqs directory.
ftp> put job1 200 PORT command successful. 150 Opening ASCII mode data connection for job1. 226 Batch: nqs-181: Request <191.big>: Submitted to queue <batch> by <snow(123)>. 95 bytes sent in 0.006000 seconds (15.46 Kbytes/s) ftp> |
The following example submits the file named job1 with the job name testjob. The response shows that the job was submitted and is identified as request 205.big. Because a job name was specified, it will be identified as testjob in a dir command display. The job output is in a file named testjob.o205 in the $HOME/ftpnqs directory.
ftp> put job1 testjob 200 PORT command successful. 150 Opening ASCII mode data connection for testjob. 226 Batch: nqs-181: Request <205.big>: Submitted to queue <batch> by <snow(123)>. local: job1 remote: testjob 95 bytes sent in 0.022 seconds (4.3 Kbytes/s) |
The following example shows the dir command display when batch mode is enabled in FTP. The dir command displays the status of NQS jobs that you own. After the cqstatl -a -u username or qstat -a -u username command display is shown, an ls -l command display is shown to list the NQS job output files in the $HOME/ftpnqs directory.
ftp> dir 200 PORT command successful. 150 Opening ASCII mode data connection for (4096 bytes). -------------------------- NQS BATCH REQUEST SUMMARY -------------------------- IDENTIFIER NAME USER QUEUE JID PRTY REQMEM REQTIM ST ------------- ------- -------- --------------------- ---- ---- ------ ------ --- 205.big testjob abc [email protected] 240 23 172 59 R02 no pipe queue entries no device queue entries total 9 -rw-r--r-- 1 abc abc 2176 Nov 26 14:46 job1.o191 -rw-r--r-- 1 abc abc 2145 Nov 26 15:40 longqsu.o184 -rw-r--r-- 1 abc abc 77 Nov 26 15:40 longqsubname 226 Transfer complete. 1023 bytes received in 0.7 seconds (1.4 Kbytes/s) |
The following example shows a display generated by the dir request command when FTP enables batch mode. When a request name or queue named is specified, the dir command displays the full NQS status of the request or queue. To generate the status display, you can specify the cqstatl -f name or qstat -f name command.
ftp> dir 207.big 200 PORT command successful. 150 Opening ASCII mode data connection for 207.big (4096 bytes). ------------------------------- NQS BATCH REQUEST: testjob.big Status: RUNNING ------------------------------- 2 Processes Active NQE Task ID: -- NQS Identifier: 207.big Target User: abc Group: abc Account/Project: <snow> Priority: --- User Priority/URM Priority Increment: 1 Job Identifier: 610 Nice Value: 23 Local Scheduler: Requested = OS default, Using = OS default Created: Fri Jan 16 1998 Queued: Fri Jan 16 1998 11:14:46 CDT 11:14:47 CST <QUEUE> Name: [email protected] Priority: 55 <RESOURCES> PROCESS LIMIT REQUEST LIMIT REQUEST USED CPU Time Limit <55sec> <60sec> 0sec Memory Size <4mw> <1mw> 214kw Permanent File Space <1000gb> <unlimited> 1kw Quick File Space <0> <0> 0kw Type a Tape Drives <0> 0 Type b Tape Drives <0> 0 Type c Tape Drives <0> 0 Type d Tape Drives <0> 0 Type e Tape Drives <0> 0 Type f Tape Drives <0> 0 Type g Tape Drives <0> 0 Type h Tape Drives <0> 0 Nice Increment <3> Temporary File Space <0> <0> |
Core File Size <256mw> Data Size <256mw> Stack Size <256mw> Working Set Limit <256mw> MPP Processor Elements <0> 0 MPP Time Limit <0sec> <0sec> 0sec Shared Memory Limit <10mw> 0kw Shared Memory Segments <2> 0 MPP Memory Size <256mw> <256mw> 0 <FILES> MODE NAME Stdout: spool big:/w/abc/ftpnqs/testjob.o207 Stderr: spool big:/w/abc/ftpnqs/testjob.o207 Restart: <UNAVAILABLE> <MAIL> Address [email protected] When: <PERIODIC CHECKPOINT> System: off Request: System Default Cpu time: on / 60 Min Cpu time: def/<Default> Wall clock: off/ 180 Min Wall clock: def/<Default> Last checkpoint:None <SECURITY> Submission level: level0 Submission compartments: none Execution level: level0 Execution compartments: none <MISC> Rerunnable yes User Mask: 022 Restartable yes Exported Vars: all Shell: /bin/csh Orig. Owner: [email protected] 207.big: No such file or directory 226 Transfer complete. remote: 207.big 1455 bytes received in 1.1 seconds (1.3 Kbytes/s) |
The following example shows how to delete queued jobs and job output by using the FTP interface to NQS. The first example deletes a job output file. When you enter a del command, the $HOME/ftpnqs directory is searched for the existence of the file name. If the file name exists, it is deleted.
ftp> del job1.o191 250 Batch: Job output job1.o191 Deleted |
If no matching file name is found, it is assumed to be an NQS job, and a cqdel -k name or qdel -k name command is specified to delete the request from NQS.
ftp> del 192.big 250 Batch: nqs-98: Request <192.big>: Deleted by <snow(123)>. |
If the name specified is not an NQS job or an NQS output file, an error message is displayed; the specific message displayed depends on the form of the name entered in the del command. In the following examples, a job name that is not valid and a nonexistent job name, respectively, are trying to be deleted.
ftp> del job1.o203 250 Batch: nqs-391: Request <job1.o203>: Invalid syntax for request. |
ftp> del 203 250 Batch: nqs-447: Request <203>: does not exist or isn't running at local host. |
The following example retrieves an NQS job output file by using the get command, which searches for the file name in the NQS job output directory $HOME/ftpnqs.
ftp> get job1.o192 200 PORT command successful. 150 Opening ASCII mode data connection for job1.o192 (971 bytes). 226 Transfer complete. local: job1.o192 remote: job1.o192 1004 bytes received in 0.037 seconds (26 Kbytes/s) |