On 27 June 2013 13:22, Rémy Dernat <[email protected]> wrote:
> Hi,
>
> I would like to count the number of slots used for a specific user.
>
> I am doing something like this:
>
> nb_slots=`qstat -s r|grep -w $USER |awk 'BEGIN { ORS="+" } {print
> $9}'`;echo "$nb_slots 0"|bc
>
> However, I don't think it is working for jobs with many threads.
>
> Is there any possibility to check that in an easy way ?
>
> I can't get the above to work even for a bunch of simple single slot
single threaded jobs.
If I were trying something similar I would use:
echo $(qstat -s r -u ccaawih |tail -n +3| awk '{print $9}')|tr ' ' '+'|bc
With ccaawih being the name of the user.
We have a little script on our cluster that lists out slots per user but it
relies on the fact that we have job_is_first_task true for all PEs:
#!/bin/bash
qstat -u "*" -s r | tail -n +3|awk '{FOO=0;while ( FOO<$9){FOO =
FOO+1;print $4 }}'|sort|uniq -c|sort -n
William
> Thanks,
>
> Regards,
> Remy
>
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users