Sunday, March 3, 2013

How To Kill A Bunch Of My LSF Jobs

I want to list out all my current jobs in lsf:-

%bjobs
JOBID USER STAT QUEUE FROM_HOST EXEC_HOST JOB_NAME SUBMIT_TIME
4883896 yltan RUN ice_arc_sm pg-yltan-l pg-iccf0082 *eep 11111 Mar 1 15:37
4883898 yltan RUN ice_arc_sm pg-yltan-l pg-iccf0039 *eep 11111 Mar 1 15:37
4883974 yltan RUN ice_arc_sm pg-yltan-l pg-iccf0079 *eep 11111 Mar 1 15:45
4883975 yltan RUN ice_arc_sm pg-yltan-l pg-iccf0082 *eep 11111 Mar 1 15:45
4883976 yltan PEND ice_arc_sm pg-yltan-l pg-iccf0035 *eep 11111 Mar 1 15:45
4883977 yltan PEND ice_arc_sm pg-yltan-l pg-iccf0039 *eep 11111 Mar 1 15:45




Killing All of the listed jobs 


%bjobs | awk '$1 ~ /^[0-9]/ {print $1}' | xargs bkill
Job <4883896> is being terminated
Job <4883898> is being terminated
Job <4883974> is being terminated
Job <4883975> is being terminated
Job <4883976> is being terminated
Job <4883977> is being terminated



Killing All of the listed jobs, with a few exceptions

%bjobs | awk '$1 ~ /^[0-9]/ && $1 !~ /(4883896|4883898)/ {print $1}' | xargs bkill
Job <4883974> is being terminated
Job <4883975> is being terminated
Job <4883976> is being terminated
Job <4883977> is being terminated

No comments:

Post a Comment

How To Bypass Kerberos(kinit) Authentication

Whenever you try to setuid and impersonate as someone else to run something, it is very likely that you will run into kerberos/kinit issues....