aboutsummaryrefslogtreecommitdiff
path: root/Tools/portbuild/scripts/checkmachines
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/portbuild/scripts/checkmachines')
-rwxr-xr-xTools/portbuild/scripts/checkmachines12
1 files changed, 10 insertions, 2 deletions
diff --git a/Tools/portbuild/scripts/checkmachines b/Tools/portbuild/scripts/checkmachines
index e476778d4ce1..127086f7fcc0 100755
--- a/Tools/portbuild/scripts/checkmachines
+++ b/Tools/portbuild/scripts/checkmachines
@@ -2,16 +2,25 @@
buildroot=/a/asami/portbuild
mlist=${buildroot}/mlist
+stamp=${buildroot}/loads/.stamp
unset DISPLAY
while true; do
+ touch ${stamp}
+ sleep 15
min=99
set $(cat $mlist)
while [ $# -gt 1 ]; do
m=$1
l=$2
- num=$((($(echo $(ssh -n $m ls -1 ${buildroot}/*/chroot | wc -l)) - 3) * 10 / $l))
+ if [ -f ${buildroot}/loads/$m -a \
+ ! -z "$(find ${buildroot}/loads/$m -newer ${stamp})" ]; then
+ num=$(cat ${buildroot}/loads/$m)
+ else
+ num=99
+ fi
+ num=$(($num / $l))
if [ $num -lt $min ]; then
mach=$m
min=$num
@@ -21,5 +30,4 @@ while true; do
shift 2
done
echo "$mach" > ${buildroot}/ulist
- sleep 5
done