next up previous contents
Next: status Up: exec Previous: Example   Contents

Interactive Mode

If exec command is used in interactive mode (with -I option), it establishes interactive connection between the terminal where the job is submitted from and the batch processes as soon as they start. If the submitted section has more than one process, (as specified with -n option), user can switch the connection from one running process to another. In order to switch to another process, user has to press control-] and then process number. Here is an example of interactive batch session:


fnpcb> fbs exec -I -n 3 -q IOQ /bin/tcsh
Job 2534

[Connected to process #1]
Exit from .cshrc
fnpcb> ps
  PID TTY          TIME CMD
21447 ttyp0    00:00:00 tcsh
21933 ttyp0    00:00:00 ps
fnpcb> 
# to switch to proc #, ? to list, q to quit, k to kill> 2

[Connected to process #2]
Exit from .cshrc
fnpcb> hostname
fnpcb
fnpcb>  
# to switch to proc #, ? to list, q to quit, k to kill> k
 
Section state is:  failed
fnpcb>

In this example, user submitted 3-process batch job to run 3 instances of interactive UNIX shell (/bin/tcsh). When the job started, user connected to process 1, then switched to process 2, then killed the job.



FBSNG Home