From 90a0d852697788190f97e932d2bbd5ed4a3565c6 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Thu, 14 May 2015 17:13:34 +0200 Subject: [PATCH] webbuild-cgi: display live server stats in first line of jobs window --- webbuild/webbuild-cgi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/webbuild/webbuild-cgi b/webbuild/webbuild-cgi index f843dab..5ec405f 100755 --- a/webbuild/webbuild-cgi +++ b/webbuild/webbuild-cgi @@ -394,13 +394,15 @@ if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshjobs" ]; then PACKAGE_ENCODED=`cgi_encodevar $4` [ $numprocess -eq 1 ] && { # echo -n "
" - echo -n "Webbuild jobs: " + u="$(uptime)" + f="$(df / -k -h --output=avail,pcent|tail -n1)" + b=`ps ax|grep rpmbuild|grep spec|while read l; do basename "${l/.spec}"; done` + echo -n "Load: ${u/*: } | Disk: $f | Now building: $b | " if [ "$STATE_JOBSSHOWALL" != "1" ]; then - echo "[ Show all ]" + echo "My jobs: [Show all jobs]" else - echo "[ Show mine only ]" + echo "All jobs: [Only show my jobs]" fi - echo -n "(please click on [x] to clean your jobs when they are done)" echo -n "
" } [ "$STATE_JOBSSHOWALL" = "1" -o "$USER" = "$2" ] || continue