[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

On Wed, Sep 30, 2015 at 10:20 AM,  <greg.corbett@xxxxxxxxxx> wrote:
> Ideally, the clause wouldnât require the machine to be hibernating for a
> certain length of time to work. Any suggestions?

Would the DaemonStartTime attribute work for you?

DaemonStartTime:The time that this daemon was started, represented as
the number of second elapsed since the Unix epoch (00:00:00 UTC, Jan
1, 1970).

There are cases when it will be shorter than you want (i.e. if the
startd is restarted), but it should make for a reasonable substitution
in most cases. You'd use, e.g.:

HIBERNATE = $(HIBERNATE) && (CurrentTime - DaemonStartTime) > 3600

Another option would be to write a startd cron that checks the system
uptime and reports that as a classad attribute.


Ben Cotton
main: 888.292.5320

Cycle Computing
Better Answers. Faster.

twitter: @cyclecomputing