aboutsummaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2008-07-26 21:42:14 +0800
committerkris <kris@FreeBSD.org>2008-07-26 21:42:14 +0800
commit01897154a5b34e619ba7b8c8e3ce900b56174f6d (patch)
tree8b43a2ad5b5065b110a4026268c715e78b04b2ef /Tools
parent0e7399e594fecd86108a0fb786e85e32ee89a96a (diff)
downloadfreebsd-ports-gnome-01897154a5b34e619ba7b8c8e3ce900b56174f6d.tar.gz
freebsd-ports-gnome-01897154a5b34e619ba7b8c8e3ce900b56174f6d.tar.zst
freebsd-ports-gnome-01897154a5b34e619ba7b8c8e3ce900b56174f6d.zip
More verbose status reporting using key=value format. We now also
report error status, architecture and OS version, and available build environments, as well as load and number of running jobs
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/portbuild/scripts/reportload26
1 files changed, 18 insertions, 8 deletions
diff --git a/Tools/portbuild/scripts/reportload b/Tools/portbuild/scripts/reportload
index 4da964b1b7bc..130348eceb5c 100755
--- a/Tools/portbuild/scripts/reportload
+++ b/Tools/portbuild/scripts/reportload
@@ -5,6 +5,7 @@
# configurable variables
pb=/var/portbuild
arch=$(uname -m)
+osver=$(sysctl -n kern.osreldate)
. ${pb}/${arch}/portbuild.conf
if [ -f ${pb}/${arch}/portbuild.$(hostname) ]; then
@@ -12,18 +13,27 @@ if [ -f ${pb}/${arch}/portbuild.$(hostname) ]; then
fi
# Look for exceptional conditions
-error=0
+error=
for i in squid disk; do
if [ -f ${scratchdir}/.${i} ]; then
- error=1
+ error=${i} "${error}"
fi
done
-if [ ${error} = 0 ]; then
- num=$(echo $(ls -1d ${scratchdir}/*/*/used ${scratchdir}/*/chroot/*/used 2>/dev/null| wc -l))
-else
- num=ERR
-fi
+num=$(echo $(ls -1d ${scratchdir}/*/*/*/used ${scratchdir}/*/*/chroot/*/used 2>/dev/null| wc -l))
+
+echo "arch=${arch}"
+echo "osversion=${osver}"
+echo "jobs=${num}"
-echo -n "$num "
+cd /var/portbuild/${arch}
+for i in */builds/*; do
+ buildenv=${arch}/${i%%/*}/${i##*/}
+ if [ -f ${i}/.ready ]; then
+ buildenvs="${buildenv} ${buildenvs}"
+ fi
+done
+echo "buildenvs=${buildenvs}"
+echo -n "load="
uptime
+echo "error=${error}" \ No newline at end of file