From 439f38bcff8a85695cb5f24d21bd7bbff16a4432 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Sat, 28 Dec 2019 22:49:32 +0000 Subject: [PATCH] config/functions: store config info in history --- config/functions | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/functions b/config/functions index e140e9b65d..d702ce7a67 100644 --- a/config/functions +++ b/config/functions @@ -1424,6 +1424,12 @@ pkg_lock_status() { ( flock --exclusive 94 + # Write the configured number of slots to history to improve accuracy of later analysis + if [ ! -f "${THREAD_CONTROL}/history" ]; then + printf "%s: <%06d> [%0*d/%0*d] %-7s %-7s %s %s\n" \ + "$(date +%Y-%m-%d\ %H:%M:%S.%N)" $$ ${idwidth} 0 ${#MTMAXJOBS} 0 "IDLE" "config" "info" "slots=${MTMAXSLOT};jobs=${MTMAXJOBS}" >>"${THREAD_CONTROL}/history" + fi + printf -v line "%s: <%06d> [%0*d/%0*d] %-7s %-7s %-35s" \ "$(date +%Y-%m-%d\ %H:%M:%S.%N)" $$ ${idwidth} ${this_job} ${#MTMAXJOBS} ${PARALLEL_SEQ:-0} "${status}" "${task}" "${pkg}" [ -n "${msg}" ] && line+=" (${msg})"