1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-31 21:57:12 +00:00
freebsd-ports/Tools/portbuild/scripts/reportload
Satoshi Asami 8b817234de (1) Do not delete and recreate the chroot dir for every new package
that is built.  This saves a lot of time, especiall when the
    parallelism (the number of jobs per machine, not the number of
    machines) is low.

    However, the build script only blows away /usr/local and
    /usr/X11R6, so if there is a port that does some nasty things
    outside that area, all bets are off.

(2) Better load balancing.  Now, each machine reports its own
    load in a form of a text file, which the master merely aggregates
    to pick the lowest-loaded machine(s).  Other than generally
    running faster (and more up-to-date) under loaded conditions, the
    master script will no longer hold up until a timeout when a
    machine goes down.
1999-01-26 03:06:24 +00:00

14 lines
283 B
Bash
Executable File

#!/bin/sh
me=$(hostname -s)
master=bento
buildroot=/a/asami/portbuild
while true; do
num=$(echo $(ls -1d ${buildroot}/*/chroot/*/used 2>/dev/null| wc -l))
echo "$num" > /tmp/${me}
/usr/local/bin/scp -q /tmp/${me} $master:${buildroot}/loads/
rm -f /tmp/${me}
sleep 5
done