Mailing List Archives
Authenticated access
|
|
|
[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
- Date: Thu, 01 Oct 2015 09:18:13 +0000
- From: andrew.lahiff@xxxxxxxxxx
- Subject: Re: [HTCondor-users] hibernating an idle machine ONLY after it has been up for X seconds
Hi Greg,
To put the system uptime into the machine classad you could add something like this to the condor config:
STARTD_CRON_JOBLIST = $(STARTD_CRON_JOBLIST) WN_UPTIME
STARTD_CRON_WN_UPTIME_EXECUTABLE = /usr/local/bin/condor_uptime
STARTD_CRON_WN_UPTIME_PERIOD = 5m
STARTD_CRON_WN_UPTIME_MODE = periodic
STARTD_CRON_WN_UPTIME_RECONFIG = false
STARTD_CRON_WN_UPTIME_KILL = true
where /usr/local/bin/condor_uptime contains:
#!/bin/sh
awk '{print "SystemUptime = " $1}' /proc/uptime
The attribute SystemUptime would then contain the system uptime.
Regards,
Andrew.
________________________________
From: HTCondor-users [htcondor-users-bounces@xxxxxxxxxxx] on behalf of greg.corbett@xxxxxxxxxx [greg.corbett@xxxxxxxxxx]
Sent: Thursday, October 01, 2015 9:53 AM
To: htcondor-users@xxxxxxxxxxx
Subject: Re: [HTCondor-users] hibernating an idle machine ONLY after it has been up for X seconds
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