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

Re: [HTCondor-users] delaying job starts on execute node boot up



Hi All,

Thanks for the advise, the startd cron looks like the thing I need, both to set a boottime variable and also could do some continuous monitoring to allow other triggers to stop a node taking jobs.


Thanks,

Andrew

On 05/11/2025 17:00, Greg Thain via HTCondor-users wrote:
On 11/5/25 07:57, Andrew Pickford wrote:
Hi All,

I'd like some advise on the best way to automatically stop an execute node from running jobs for say 5 minutes after the machine has booted up.


HTCondor doesn't advertise the system boot time by default. However, with STARTD_CRON, it is straightforward to add the system boot time to the slot ad. If you are on linux, the startd cron script can grep the btime out of /proc/stat, and advertise that. A script that looks something like this:

#!/bin/sh

awk '/^btime/ { print "BootTime =", $2} END {print "- update:true"}' < /proc/stat


will generate the proper classad snippet, and setting up the startd cron in the startd config would look like this:

STARTD_CRON_JOBLIST = BOOTTIME $(STARTD_CRON_JOBLIST)
STARTD_CRON_BOOTTIME_MODE = OneShot
STARTD_CRON_BOOTTIME_EXECUTABLE = /tmp/boot.sh


After that, you can use "BootTime" in your start expression. Season to taste.


-greg

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe

The archives can be found at: https://www-auth.cs.wisc.edu/lists/htcondor-users/