[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] condor's ClusterID

Hi Rene,

I think this is more of a shell question that a condor one.
In any case, here's how I grab the job number each time I issue condor_submit:
          set JobNo = `                                                                                                                    \
                       condor_submit -name ${submit_queue} ${Gridxyz}_${iGrid}.Condor           |& \
                       grep -E -v WARNING                                                                                      |  \
                       grep -E -o "cluster [0-9]+"                                                                              | \
                       sed -e "s/cluster //"                                                                                           \
                      `                                                                                                                      ;# Queue to Condor and record JobNo
This works with tcsh.  Note that |& pipes both stdout and errout from condor_submit.
The grep and sed parse what returns from condor_submit to capture the condor ID of the job.
Note that the ` s send the output of the whole pipeline into variable JobNo .

I hope this is helpful.

Best - Don

> -----Original Message-----
> From: HTCondor-users [mailto:htcondor-users-bounces@xxxxxxxxxxx] On Behalf
> Of René Labounek
> Sent: Tuesday, March 15, 2016 9:54 AM
> To: htcondor-users@xxxxxxxxxxx
> Subject: [HTCondor-users] condor's ClusterID
> Dear condor users,
> How can I catch ClusterID of the condor's job (actually submitted to the queue
> with condor_submit) into some output? I am trying to find it but I am not able.
> How to catch ClusterID's of all my jobs, I know:
> condor_q -submitter `echo $USER` -format "%d\n" ClusterID > output.txt
> I am planning to compare the 1st one output with the 2nd one for making a
> decision if some calculations are still running or they have been already
> finished. If they are finished I can perform some other shell scripts.
> Kind regards,
> Rene Labounek
> _______________________________________________
> HTCondor-users mailing list
> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/htcondor-users/