[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] condor_rm



On 5/25/2017 5:47 AM, Zach Miller wrote:
Hello,

You want to use a constraint on the remove operation.

There is an attribute called âJobStatusâ.
     1 == Idle
     2 == Running
     5 == Held

So, to remove all Idle jobs:
     condor_rm -constraint '(JobStatus==1)'


Folks reading the above may wonder "how did Zach know that attribute JobStatus existed, and what the various numeric values mean?"

Turns out that Appendix A of the HTCondor Manual documents many of the machine and job classad attribute values, including JobStatus and its numeric values.
  http://htcondor.org/manual/current/12_Appendix_A.html

Also a lesser known shortcut is enter "condor_q -help status", which will display the normal condor_q usage text plus append the following helpful table at the end:

JobStatus codes:
         1 I IDLE
         2 R RUNNING
         3 X REMOVED
         4 C COMPLETED
         5 H HELD
         6 > TRANSFERRING_OUTPUT
         7 S SUSPENDED

regards,
Todd