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

Re: [HTCondor-users] hibernating an idle machine ONLY after it has been up for X seconds



Hi Greg,

You don't need to fiddle with the config files except to define the
hook/cron.

They're usually called Daemon Classad Hooks or Startd crons.

http://research.cs.wisc.edu/htcondor/manual/v8.3/4_4Hooks.html#SECTION00543000000000000000

We use a few of them. I see you're with the STFC. If you speak to your
colleagues at RAL they should be able to walk you through writing one.

If not, I can send you an annotated example.

Basically a hook can call out to a script/executable. In your case this
could just be a bash script that grabs seconds from /proc/uptime.

Then from the script your stdout is something like:

CronSystemUptime = 1229.64

HTCondor then feeds this into the classad of the concerned Daemon.

Cheers,

Iain

On Thu, Oct 01, 2015 at 08:53:47AM +0000, greg.corbett@xxxxxxxxxx wrote:
> Thanks for your reply Ben
> 
> > There are cases when it will be shorter than you want
> 
> Forgive me if I miss understand. Aren't those cases the same cases as using MonitorSelfAge? If the Daemon resets it works, but otherwise hibernates to quickly?
> 
> > Another option would be to write a startd cron that checks the system uptime and reports that as a classad attribute.
> 
> What would that look like? I currently have a script that passes the StartLog for signs of having woke up from Hibernation but I couldn't find a way to "feed" that info into the config file.
> 
> Thanks
> Greg
> 
> 

> _______________________________________________
> HTCondor-users mailing list
> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
> 
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/htcondor-users/