[SAC] Fair projectsVM usage (esp. Openlayers)

Hamish hamish_b at yahoo.com
Sun Feb 12 07:58:03 EST 2012


christopher wrote:
> Since the job has been running every hour since that one
> started without failing, it seems unlikely, otherwise we'd have a
> whole stack of them. I've seen it fail in this way precisely twice
> in the two years since we moved to the projects server; to be
> honest, any software work at this point is probably overkill, but:
>   https://github.com/openlayers/openlayers/blob/master/tools/update_dev_dir.sh
> 
> patches welcome ;)

I'm all about the overkill...  ;-)

.
.
.

####

user="`whoami`"
command="update_dev_dir.sh"
email="you at example.com"
subj="$command running overtime on `hostname`"

NUM_ALREADY=`pgrep -c -U $user -f "$command"`
if [ "$NUM_ALREADY" -gt 0 ] ; then
   pkill -U $user -f "$command"
   echo -e "$command on `hostname` went bad, `date`.\n" | \
      mail -s "$subj" "$email"
fi


####

renice +19 -p $$

.
.
.


(untested)


regards,
Hamish


More information about the Sac mailing list