[GE users] SGE-5.3: How to get Queuename of Running Job?

Erik Soyez soyez at science-computing.de
Thu Mar 3 07:18:25 GMT 2005


Good morning Kirk,

thanks for your email, but neither one does not work for me (SGE-5.3p2),
maybe I should at least upgrade to 5.3p6.

Erik.

On Wed, 2 Mar 2005, Kirk Patton wrote:

> There is the option of setting the environment variable
> SGE_LONG_QNAMES.  See (man qstat).
>
> The approach I used was to parse the output of qstat -ext -r which will
> show the full queue name even without the enviroment variable SGE_LONG_QNAMES
> being set.
>
> I have a script that already does this and produces LSF'ish output.  It was
> written for 5.3.  I have since ported it over to 6.x and now parse the xml output
> that 6.x can return.
>
> If you would like a copy of the script, let me know.
>
> Kirk
> On Wed, Mar 02, 2005 at 05:27:07PM +0100, Erik Soyez wrote:
> > Good evening Reuti,
> >
> > thanks for your reply, but changing to 6.0 is not an option.
> > Qmon isn't one either, because it's rather hard to read from within a
> > script.....
> >
> > What I did now is, well, dirty, but it works for me, because luckily
> > enough the first 10 bytes of my queuenames are still a unique identifier
> > though:
> >
> > ------------------------------------------------------------------------
> >   queuelist=`qstat -u $USER | grep $JOB_ID | awk '{print $8}'`
> >   for cutoffqueue in $queuelist
> >   do queue=`qconf -sql | awk '/^'"$cutoffqueue"'/ {print $1}'`
> >   			:
> >   			:
> >   			:
> > ------------------------------------------------------------------------
> >
> > Erik.
> >
> >
> > On Wed, 2 Mar 2005, Reuti wrote:
> >
> > > Hello,
> > >
> > > I always tried to have really short queue names in SGE 5.3, because it's
> > > easier to read. In 5.3 of course you have the problem, that you have to
> > > put the machine-identification somehow in these names. This will vanish,
> > > if you could change to 6.0, since there you have cluster queues, where
> > > you could simply look at the machine name.
> > >
> > > But anyway: did you tried the qmon interface?
> > >
> > > Cheers - Reuti
> > >
> > > Erik Soyez wrote:
> > > > Hi,
> > > >
> > > > I want to know in which queue a job with a given ID runs in.
> > > > Simple task, I though, did something like:
> > > >
> > > >   qstat -u $USER | grep $JOB_ID | awk '{print $8}'
> > > >
> > > > Well, the queuenames are cut off after 10 Bytes, but I need the FULL
> > > > Queuename.  Any simple solution?!
> > > >
> > > > Thanks, Erik.

--


---------------------------------------------------------------------
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