webbuild-cgi: add free space information from any chroot environment

This commit is contained in:
Silvan Calarco 2021-05-08 22:42:42 +02:00
parent acd4178c8b
commit f97c3c4598

View File

@ -376,6 +376,8 @@ if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshjobs" ]; then
# echo -n "<div align=left class=processes>" # echo -n "<div align=left class=processes>"
u="$(uptime)" u="$(uptime)"
f="$(df / -k -h --output=avail,pcent|tail -n1)" f="$(df / -k -h --output=avail,pcent|tail -n1)"
fap="$(df /var/autoport/* -k -h --output=avail,pcent|tail -n+2)"
[ "$fap" ] && f="$f | ${fap/$'\n'/ | }"
b=`ps ax|grep "rpmbuild .*\.spec$"|while read l; do basename "${l/.spec}"; done` b=`ps ax|grep "rpmbuild .*\.spec$"|while read l; do basename "${l/.spec}"; done`
echo -n "Load: <b>${u/*: }</b> | Disk: <b>$f</b> | " echo -n "Load: <b>${u/*: }</b> | Disk: <b>$f</b> | "
[ "$b" ] && echo -n "Building now: <b>$b</b> | " [ "$b" ] && echo -n "Building now: <b>$b</b> | "