Rita,
You don't need -global when you use -direct.
Regards, - Ian
With condor_q -global -direct schedd I am able to achieve this but I understand its not as efficient as querying the collector thus I am asking for a feature in the next release.
On Mon, Apr 18, 2011 at 3:04 AM, Santanu Das
<santanu@xxxxxxxxxxxxxxxxx > wrote:
On 16/04/2011 15:10, Rita wrote:
Is it possible to get the status of user's job
running/idle similar to condor_status -submitters?
condor_status -submitters shows by accounting group which is ok
but it would be more beneficial to have the Unix Username only
since some users use multiple accounting groups. A condor_status
-users would we much appreciated in 7.6.x
A quick (and dirty) fix could be:
condor_q -format "%s " Owner -format "%s\n" 'ifThenElse(JobStatus==1,"I",ifThenElse(JobStatus==2,"R",\
ifThenElse(JobStatus==5,"H",string(JobStatus)))' | sort | uniq -c
Or, maybe a script like this:
#!/usr/bin/env python
#
import re, commands, struct
q_users = "condor_q -format \"\%s \" Owner -format \"\%s\\n\" JobStatus"
cmdOut = commands.getoutput(q_users)
counts = {}
for i in cmdOut.split('\n'):
user, irh = i.split()
u = counts.setdefault(user, {})
u[irh] = u.setdefault(irh, 0) + 1
print "%-14s%10s%10s%10s" % ('User','Idel','Running','Held')
print "=" * 44
for user in counts:
stat = counts[user]
print "%-14s%10s%10s%10s" % \
(user, stat.get('1', 0), stat.get('2', 0), stat.get('5', 0))
The result is not sorted and there is no error-check in it.
-Santanu
--
--- Get your facts first, then you can distort them as you
please. --
_______________________________________________
Condor-users mailing list
To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/condor-users
The archives can be found at:
https://lists.cs.wisc.edu/archive/condor-users/
_______________________________________________
Condor-users mailing list
To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/condor-users
The archives can be found at:
https://lists.cs.wisc.edu/archive/condor-users/
--
---
Get your facts first, then you can distort them as you please. --