diff options
Diffstat (limited to 'Tools/portbuild/scripts/checkmachines')
-rwxr-xr-x | Tools/portbuild/scripts/checkmachines | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Tools/portbuild/scripts/checkmachines b/Tools/portbuild/scripts/checkmachines new file mode 100755 index 000000000000..e476778d4ce1 --- /dev/null +++ b/Tools/portbuild/scripts/checkmachines @@ -0,0 +1,25 @@ +#!/bin/sh + +buildroot=/a/asami/portbuild +mlist=${buildroot}/mlist + +unset DISPLAY + +while true; do + 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 [ $num -lt $min ]; then + mach=$m + min=$num + elif [ $num = $min ]; then + mach="$mach $m" + fi + shift 2 + done + echo "$mach" > ${buildroot}/ulist + sleep 5 +done |