Interactive Jobs
Interactive jobs require attention as they run, whereas batch jobs are run unattended.
Interactive Job | Example | Option | Example |
---|---|---|---|
Job that requires a X display. | xterm -e vi abc | -Ix | % nc
run -Ix xterm -e vi abc |
Job that requires a TTY with remote control of signal dispatching by means of Ctrl–C and Ctrl–Z. | bash | -Ir | % nc
run -Ir bash |
Job that requires a TTY (stdin, stdout) but keep local control of signal dispatching by means of Ctrl-C and Ctrl-Z. These are jobs where you want redirect stdin to a file. | n/a | -Il | % date | nc run -Il tr '[a-z]' '[A-Z]' |
set VOV_JOB_DESC(interactive,limit) Limit:interactive
set VOV_JOB_DESC(interactive,limit) Limit:interactive_@USER@
The resource must exist prior to adding these lines to the file.
Use the -splitsderr Option
Use the -splitsderr option to write the stderr output of the interactive job to stderr. The default is to write the job's stderr output to stdout. Note that using this option will probably result in garbled terminal output due to intermingling of stdout and stderr outputs.
When to Use -Il and -Ir
If you use the option -Ir, then handling Ctrl-C and Ctrl-Z are done remotely on the remote host where the job is running. Use -Ir to interact with the job.
If you use the option -Il, then handling Ctrl-C and Ctrl-Z are done locally with the submission shell. Use -Il to redirect the stdout of the job to a file or a pipe.
Interactive Job Logs
% nc run -I -l mylog.txt – /bin/bash
Options to Use with Interactive Job Logging | Conditions |
---|---|
-I option | Only use for jobs that require attention as they run. -I should not be used in scripted jobs where the intent is to capture output. In general, each user should never have more than one or two interactive jobs running concurrently. |
-wl option | Intended for when the job is launched at a terminal and real time logging is required. -wl is preferred over -I when only output tailing is required. A pseudo terminal server is not employed (keyboard input is not processed) and the job is more robust over network and window glitches. |
-w option | Preferred method for blocking a job and capturing its output in a script. The job can be issued with a -w option. This blocks until the job completes. The log can then be accessed via nc info -l. |
For further information, please submit a support request at Altair Community.
Jobs That Require a DISPLAY: Option -Ix
- To use this option, the DISPLAY environment variable must be set for the display to refer to the host that you want to view.
- If DISPLAY does not contain a hostname component, such as "unix:0.0" or ":0.0", then nc run command substitutes the hostname of the submission host. You must set a nc run value containing a hostname component to display the windows on a host other than the submission host.
For most graphical tools , all interactions occur through the windows and no terminal
is needed. Batch jobs, and those started with only the -Ix
option,
do not have a pty allocated.
There are tools, such as Cadence NanoRoute and some simulators, which expect to have the regular streams connected to a pty, and will not operate properly (that is, just exit) unless there is a pty. For such jobs, use the -Ir or -Il option to ensure a pty is allocated.
% nc run -Ix xterm -e vsim -do ...