[GE users] JOB_ID

Dmitry Zhukovski DZH at maerskoil.com
Wed Sep 26 08:13:14 BST 2007


Thank you guys,

  I have looked around a bit more. I have my own job scripts. So in that
script there is env var $JOB_ID defined. It's more than enough for me.

Thank you for help !
dmitry

-----Original Message-----
From: Olesen, Mark [mailto:Mark.Olesen at emcontechnologies.com] 
Sent: 26. september 2007 09:11
To: 'users at gridengine.sunsource.net'
Subject: RE: [GE users] JOB_ID

>  Another short question - I need to get job id after qsub. I can of 
> cause
parse output but is the any exit
> code and/or environment's variables?

In new versions you can thankfully just use the '-terse' option:

    jobId=$(qsub -terse ...)


In older versions you need to grab the job Id from the output and parse
it:

    jobId=$($SGE_BINARY_PATH/qsub ... | awk '{print $3}')

Of course, you then get the return code from awk and not from qsub.
You thus really need 

    info=$($SGE_BINARY_PATH/qsub ... 2>&1)
    exitcode=$?
    jobId=$(echo $info | awk '{print $3}')


The new '-terse' option is certainly makes it a bit more convenient.
/mark
This e-mail message and any attachments may contain legally privileged,
confidential or proprietary Information, or information otherwise
protected by law of EMCON Technologies, its affiliates, or third
parties. This notice serves as marking of its "Confidential" status as
defined in any confidentiality agreements concerning the sender and
recipient. If you are not the intended recipient(s), or the employee or
agent responsible for delivery of this message to the intended
recipient(s), you are hereby notified that any dissemination,
distribution or copying of this e-mail message is strictly prohibited.
If you have received this message in error, please immediately notify
the sender and delete this e-mail message from your computer.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net


**********************************************************************
This e-mail and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to which they 
are addressed. If you have received this e-mail in error please notify 
the system manager at helpdesk at maerskoil.com.

This e-mail and its contents do not constitute and shall not be 
considered as a financial commitment of Maersk Olie og Gas AS 
and its affiliates. 
Maersk Olie og Gas AS expressly disclaims any responsibility
as to the accuracy and use of this e-mail and its contents.
**********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list