#!/bin/sh # configurable variables pb=/var/portbuild . ${pb}/portbuild.conf me=$(hostname -s) tmpfile=${pb}/${me} while true; do num=$(echo $(ls -1d ${pb}/*/chroot/*/used 2>/dev/null| wc -l)) echo -n "$num " > ${tmpfile} uptime >> ${tmpfile} scp -q ${tmpfile} $master:${pb}/loads/ rm -f ${tmpfile} sleep 5 done