[torqueusers] how to get qsubid and other info in epilogue and prologue scripts?

Rick.Ingham at expeditors.com Rick.Ingham at expeditors.com
Mon Oct 17 14:26:01 MDT 2005


Would the qsub -n or -a options suffice?  The prolog or epilog script could
qstat -f the job ID and grep out the name and account strings.

Just a though.

--- Rick Ingham, Expeditors Int'l / IS
---- RICK.INGHAM at EXPEDITORS.COM  (206) 674-3400 x3284   FAX  246-3197


                                                                           
             Garrick Staples                                               
             <garrick at usc.edu>                                             
             Sent by:                                                   To 
             torqueusers-bounc         torqueusers                         
             es at supercluster.o         <torqueusers at supercluster.org>      
             rg                                                         cc 
                                                                           
                                                                   Subject 
             10/14/2005 07:35          Re: [torqueusers] how to get qsubid 
             PM                        and other info in epilogue and      
                                       prologue scripts?                   
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




On Wed, Oct 12, 2005 at 10:15:02AM +0800, ?????? alleged:
> hello everyone:
>
>      I want to get qsubid in epilogue and prologue scripts, but i don't
know how to get , can you help me ?

The jobid is passed as the first argument to pro/epilog scripts.



>      another question , when I use qsub, I want to send like this:
>      qsub job_name ......
>      and I want send a string for example "00000001" belong with qsub ,
and get this string in prologue and epilogue scripts, how can I trans this
string frome qsub command to epilogue and prologue scripts?
>

It is not currently possible to pass arbitrary arguments to submit
scripts.

This is kind of ugly, but if you put your argument inside of the job
script, you could grep for it in prologue:

mom_priv/prologue:
#!/bin/bash
JOBID=$1
JOBUSER=$2
JOBGROUP=$3
input=$(grep something jobs/${JOBID:0:11}.SC)
...do something with $input...

--
Garrick Staples, Linux/HPCC Administrator
University of Southern California
(See attached file: att0ao4x.dat)
_______________________________________________
torqueusers mailing list
torqueusers at supercluster.org
http://www.supercluster.org/mailman/listinfo/torqueusers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: att0ao4x.dat
Type: application/octet-stream
Size: 196 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torqueusers/attachments/20051017/f690fe95/att0ao4x.obj


More information about the torqueusers mailing list