[gridengine users] State of jobs
Valerio Luccio
valerio.luccio at nyu.edu
Thu Jun 21 17:55:58 UTC 2012
On 06/21/2012 01:42 PM, Reuti wrote:
> Hi,
>
> Am 21.06.2012 um 19:17 schrieb Valerio Luccio:
>
>> Hi all,
>> when you do "qstat" or "qstat -r" you get a string representing the current job state ("r", or "qw", or ...). If you try to specify a specific job with the "-j" flag you get the long version where the state disappears (if you look hard enough you can figure out if a job is running by the i/o info, other states are not quite so obvious). Is there a way to get the same output of "qstat" or, even better, "qstat -r" for a specific job ?
> some AWK magic:
>
> $ qstat -r | awk -v job=123456 ' /^ *[0-9]+/ { if ($1 == job) { flag=1 } else { flag=0 }} flag {print}'
>
> Replace 123456 with the desired job number.
>
> -- Reuti
I know, I was hoping that qstat had an appropriate mode without having
to parse the whole output.
Thanks,
--
Valerio Luccio (212) 998-8736
Center for Brain Imaging 4 Washington Place, Room 158
New York University New York, NY 10003
"In an open world, who needs windows or gates ?"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gridengine.org/pipermail/users/attachments/20120621/b56ced09/attachment.html>
More information about the users
mailing list