[gridengine users] State of jobs
Jesse Becker
beckerjes at mail.nih.gov
Thu Jun 21 21:03:38 UTC 2012
The qstat program won't report on jobs that are not either running ("r")
or queued ("qw" or "hqw"). If you run 'qstat -j <nonexistantjob>', you
don't get much output at all, and it's easy to tell that the job is no
longer (or not yet) in the system.
Or are you trying to specifically distinguish between running and queued
jobs? "qstat -s r" will show only the former, and "qstat -s p" will
show only the later.
On Thu, Jun 21, 2012 at 01:55:58PM -0400, Valerio Luccio wrote:
>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 ?"
>_______________________________________________
>users mailing list
>users at gridengine.org
>https://gridengine.org/mailman/listinfo/users
--
Jesse Becker
NHGRI Linux support (Digicon Contractor)
More information about the users
mailing list