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

Re: [Condor-users] greedy users



See the attached wrapper to condor_submit. what I
do is to add an +AccountingGroup=group_<gid>.user
where <gid> is equivalent to the unix gid of the user.

I put this in place of condor_submit and move the real condor_submit
to condor_submit_real.

Steve timm


On Sun, 9 Aug 2009, Mag Gam wrote:

Is there a way I can do "accountinggroup = somegroup.user"
automatically and force users?



On 8/6/09, Mag Gam <magawake@xxxxxxxxx> wrote:
thanks. I will look into this.



On Thu, Aug 6, 2009 at 11:02 AM, Steven Timm<timm@xxxxxxxx> wrote:
You want to use group quotas.  Assign users to an accounting
group and then they can only use X slots.  It can be a user-by-user
group if necessary.

By itself group accounting is voluntary but what I do is
to put a wrapper around condor_submit to append the accountinggroup
automatically to the classad.

Steve Timm


On Thu, 6 Aug 2009, Mag Gam wrote:

We have several of our PHD candidates who submit massive amounts of
jobs that clog our modeling grid. They submit close 400+ jobs
overnight on a grid which has only 3000 slots. I would like to ban
them but I can't do that :-) I too am a student. But, how can I set a
hard limit of 50 slots for these users? Btw, fair scheduling is
enabled but I would still like to put a hard limit. Any thoughts? Did
anyone else go thru this scenario? What did you do to fix it?
_______________________________________________
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/


--
------------------------------------------------------------------
Steven C. Timm, Ph.D  (630) 840-8525
timm@xxxxxxxx  http://home.fnal.gov/~timm/
Fermilab Computing Division, Scientific Computing Facilities,
Grid Facilities Department, FermiGrid Services Group, Assistant Group
Leader.
_______________________________________________
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/


--
------------------------------------------------------------------
Steven C. Timm, Ph.D  (630) 840-8525
timm@xxxxxxxx  http://home.fnal.gov/~timm/
Fermilab Computing Division, Scientific Computing Facilities,
Grid Facilities Department, FermiGrid Services Group, Assistant Group Leader.

#!/bin/bash
# Goal is to add the group and user names as part of the AccountingGroup
# flag in all jobs, local and grid.
# get user name
COUSERNAME=`/usr/bin/id -un`
COGROUPNAME=`/usr/bin/id -gn`
#echo "`/bin/date` $COUSERNAME $COGROUPNAME $$" >> /tmp/condorsubmit.out
#Parse the arguments of the condor_submit, look 
#for the file name.
# From Condor submit help, these are the args:
#Usage: condor_submit_real [options] [cmdfile]
#       Valid options:
#       -verbose                verbose output
#       -name <name>            submit to the specified schedd
#       -remote <name>          submit to the specified remote schedd
#                               (implies -spool)
#       -append <line>          add line to submit file before processing
#                               (overrides submit file; multiple -a lines ok)
#       -disable                disable file permission checks
#       -spool                  spool all files to the schedd
#       -password <password>    specify password to MyProxy server
#       -pool <host>            Use host as the central manager to query
#
#       If [cmdfile] is omitted, input is read from stdin
#
#echo $* >> /tmp/condorsubmit.out
SUBARGS=$*
NEXTARG=0
VANILLA=""
#echo $# >> /tmp/condorsubmit.out
#echo "$@" >> /tmp/condorsubmit.out
if [ $# -gt 0 ] 
then
	for subarg in "$@"
	do
		case $subarg in 
			-v*)
				;;
                        -d*) 
                                ;;
                        -s*) 
                                ;;
                        -h*) 
                                ;;
                        -p*) 
                               NEXTARG=1
                                ;;
                        -a*)
			       NEXTARG=1
                                ;;
                        -r*)
			       NEXTARG=1
                                ;;
                        -n*) 
                               NEXTARG=1
                                ;;
                        *)
                            if [ $NEXTARG -ne 1 ] 
			    then
				SUBFILE="$subarg"
#                                echo "$SUBFILE" >> /tmp/condorsubmit.out
                                VANILLA=`grep -i vanilla $SUBFILE`
		            else
#                                echo "this argument skipped $subarg" >> /tmp/condorsubmit.out
                                NEXTARG=0
                            fi		    
                esac
	done
	if [ "$VANILLA" != "" ] 
        then 
		condor_submit_real -a "+Agroup = \"group_$COGROUPNAME\"" -a "+AccountingGroup = \"group_$COGROUPNAME.$COUSERNAME\"" "$@"
        else
		condor_submit_real "$@"
        fi
else
	condor_submit_real "$@"
fi
#echo "$VANILLA" >> /tmp/condorsubmit.out