3

I am submitting this simple job to SGE through qsub. How can I see the output of the job which is a simple echo in my terminal. I mean I want it directly on screen not diverting the output to a logfile or something.

So here is the job stored in Dummyjob:

#!/bin/sh
#$ -j y
#$ -S /bin/sh
#$ -q long.q

sleep 30
echo "I'm done!"

And this is the qsub command:

qsub -N job_1 -cwd./Dummyjob

Thank you!

user3708408
  • 59
  • 2
  • 5

2 Answers2

1

It doesn't do that. You're referring to a batch facility, e.g., How to submit a job using qsub.

Looking at the command-line options, these are the possibilities:

-o <output_logfile> name of the output log file
-e <error_logfile> name of the error log file
-m ea Will send email when job ends or aborts

You can ask it to send mail when the job is done (successfully or not). Or you might be able to make it write to a fifo, e.g., in one terminal you would do

mkfifo myFakeFile
tail -f myFakeFile

and then use

-o myFakeFile

when submitting (in that order, so that something is waiting). But if the program does any checking, it will not write to a fifo (because it is not a regular file).

Further reading:

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
1

The previous answer mentions that you are submitting a 'batch job script' and this is true, so you will not see the output on your terminal (tty) but the stdout/stderr will be sent to output files. However that doesn't mean you can't run an interactive job through Grid Engine. You can, just use 'qrsh' instead of using 'qsub' and the script will be run on a remote machine chosen by Grid Engine - the results will be displayed on your screen.

Note: You might have to configure qrsh in your Grid Engine Cluster for this to work.

Bll Bryce
  • 21
  • 2