Use qdel to delete all my jobs at once, not one at a time

前端 未结 9 1543
悲哀的现实
悲哀的现实 2020-12-22 18:42

This is a rather simple question but I haven\'t been able to find an answer.

I have a large number of jobs running in a cluster (>20) and I\'d like to delete them al

相关标签:
9条回答
  • 2020-12-22 19:14

    Try

    $ qdel {id1..id2}
    

    So for example:

    $ qdel {1148613..1148650}
    
    0 讨论(0)
  • 2020-12-22 19:16

    sometimes a simple grep/cut can help too: qstat | grep $USER | cut -d. -f1 | xargs qdel

    This way we can also grep on a particular keyword for the jobs and delete them.

    HTH

    0 讨论(0)
  • 2020-12-22 19:26
    qstat | cut -d. -f1 | sed "s;   \(.*\) 0;qdel \1;" | bash
    

    sed's power.

    0 讨论(0)
  • 2020-12-22 19:27

    For UGE:

    qstat -u | gawk '{print $1}' | xargs qdel

    0 讨论(0)
  • 2020-12-22 19:30

    Found the answer buried in an old supercluster.org thread:

    qselect -u <username> | xargs qdel
    

    Worked flawlessly.

    0 讨论(0)
  • 2020-12-22 19:31

    Building on what Gabriel answered:

    qselect -u <username> | xargs qdel
    
    qselect -u <username> -s <state> | xargs qdel
    

    <state> would be R for running jobs only.

    qselect will allow you to select job based on other criterias, like ressources asked (-l), destination queue (-q) ...

    qdel -u <username>
    

    will only work with SGE

    0 讨论(0)
提交回复
热议问题