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


> 
> 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
> [email protected]
> https://gridengine.org/mailman/listinfo/users


_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to