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

Re: [Condor-users] SetThreadExecutionState function implementation in Condor

On Jun 26, 2012, at 7:21 PM, Shahaan Ayyub wrote:

   I am managing a condor pool of Windows Machines with a Linux Head Node. Recently, the university's green computing facility have enforced new power settings  namely:

Screen power off: 10min

User log off: 55min

Sleep: 60min

Hibernate: Never

This means that regardless of whether the job running, the machines will go to sleep. 

Wake-On-Lan is not an option at the moment.

A way to circumvent this is that the application can call;


When it is done, it calls


To revert back to a state where the computer is allowed to sleep. 

Is it possible to enable this (if it exist) in condor? Please suggest any other option that can be enabled using the condor settings, or pointers to where I can change and recompile Condor to implement this. 

There are a couple ways you could do this without recompiling Condor.

One way is to use the USER_JOB_WRAPPER parameter. Any time Condor wanted to start a job, it would invoke a program you provide, supplying the job's executable and arguments. Your program would have to call SetThreadExecutionState(), then run the user's job, call SetThreadExecutionState() again, then exit in the same manner as the user's job.

Another option is to use Startd Cron to have the condor_startd run a program periodically. This feature is normally used to let you add attributes with dynamic values to the machine ad. But you could use it to periodically run a program that queries the startd and calls SetThreadExecutionState() if any of the slots are running a job.

You can find information about Startd Cron here:

Thanks and regards,
Jaime Frey
UW-Madison Condor Team