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

Re: [HTCondor-users] Using owner as a constraint



Hi Joe,

On Sat, 2023-06-17 at 13:33 -0700, Joseph Areeda wrote:

 I'm working  on a python program to find any jobs in a weird state. Long story irrelevant to the question. The point is my question is related to querying Schedd from python not running condor_q from the command line. But easier to demo there

The program will run on an AP with lots of users but I want to constrain the query to the current user.

Constrained with comparison. What am I missing?


$ condor_q -constraint owner=="areeda"


-- Schedd: george.home.areeda.com : <127.0.0.1:9618?... @ 06/17/23 10:36:03
OWNER BATCH_NAME      SUBMITTED   DONE   RUN    IDLE   HOLD  TOTAL JOB_IDS

Total for query: 0 jobs; 0 completed, 0 removed, 0 idle, 0 running, 0 held, 0 suspended
Total for areeda: 2 jobs; 0 completed, 0 removed, 0 idle, 2 running, 0 held, 0 suspended


I think you have to quote:

root@mq:~# condor_q 


-- Schedd: msched.mpifr-be.mkat.karoo.kat.ac.za : <10.98.76.53:9618?... @ 06/19/23 07:46:53
OWNER    BATCH_NAME    SUBMITTED   DONE   RUN    IDLE  TOTAL JOB_IDS
ebarr    ID: 360      6/16 13:51      _      1      _      1 360.0
jbehrend ID: 361      6/16 17:17      _      1      _      1 361.0

Total for query: 2 jobs; 0 completed, 0 removed, 0 idle, 2 running, 0 held, 0 suspended 
Total for all users: 2 jobs; 0 completed, 0 removed, 0 idle, 2 running, 0 held, 0 suspended

root@mq:~# condor_q -constraint 'owner=="jbehrend"'


-- Schedd: msched.mpifr-be.mkat.karoo.kat.ac.za : <10.98.76.53:9618?... @ 06/19/23 07:46:55
OWNER    BATCH_NAME    SUBMITTED   DONE   RUN    IDLE  TOTAL JOB_IDS
jbehrend ID: 361      6/16 17:17      _      1      _      1 361.0

Total for query: 1 jobs; 0 completed, 0 removed, 0 idle, 1 running, 0 held, 0 suspended 
Total for all users: 2 jobs; 0 completed, 0 removed, 0 idle, 2 running, 0 held, 0 suspended

root@mq:~# 

Cheers, Jan

-- 
MAX-PLANCK-INSTITUT fuer Radioastronomie
Jan Behrend - Backend Development Group
----------------------------------------
Auf dem Huegel 69, D-53121 Bonn                                  
Tel: +49 (228) 525 248
http://www.mpifr-bonn.mpg.de

Attachment: smime.p7s
Description: S/MIME cryptographic signature