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

Re: [Condor-users] How to run jobs ONLY when no users are logged in?



On Mon July 19 2004 11:13 am, Erik Paulson wrote:
> On Mon, Jul 19, 2004 at 12:06:27AM +0100, Bruce Beckles wrote:
> > Hi everyone -
> >
> > 	I would like to set up some 'execute-only' machines to run Condor
> > jobs ONLY when no users are logged in to the machines, i.e. -
> >
> > - Jobs should only start when there is no one logged into the machine,
> > NOT if someone is logged in but hasn't generated any keyboard or mouse
> > activity for a while.
> >
> > - As soon as a user logs out, the machine should be available for Condor
> >   jobs (i.e. it shouldn't wait around until a certain amount of
> >   KeyboardIdle time has passed).
> >
> > Is this possible?  I've looked at the manual and various example
> > configuration files, but I can't see how to do this.
>
> Which OS?
>
> The condor_startd doesn't automatically detect if anyone's logged in or
> not (though on a lot of them the code that detects if someone is using the
> keyboard also knows if someone is logged in, we just don't put that into
> the startd ad).
>
> You could also use the startd_cron functionality to write a script that
> decides if someone is logged in or not.

The hawkeye "w", "who" and "uptime" modules all publish a login count, which 
sounds exactly like what you're looking for.

They publish:
w:
  UptimeUsers = 27
who:
  Count = 27
uptime:
  Users = 27

-Nick

-- 
           <<< There is no spoon. >>>
 /`-_    Nicholas R. LeRoy               The Condor Project
{     }/ http://www.cs.wisc.edu/~nleroy  http://www.cs.wisc.edu/condor
 \    /  nleroy@xxxxxxxxxxx              The University of Wisconsin
 |_*_|   608-265-5761                    Department of Computer Sciences