From 8c956c4b96b713f755e647d8aff2661fd1ab1ed9 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 12 Jan 2024 11:16:25 -0500 Subject: [PATCH] jjb: print hardware details Print the hardware details of the CI node at the beginning of the build. Change-Id: I675d950f687df72f90f89d296b1a68b9207d0f93 Signed-off-by: Michael Jeanson --- scripts/babeltrace/build.sh | 1 + scripts/binutils-gdb/build.sh | 2 ++ scripts/common/print.sh | 13 +++++++++++++ scripts/librseq/build.sh | 1 + scripts/liburcu/build.sh | 1 + scripts/lttng-tools/build.sh | 1 + scripts/lttng-ust/build.sh | 1 + 7 files changed, 20 insertions(+) diff --git a/scripts/babeltrace/build.sh b/scripts/babeltrace/build.sh index 6191ecc..d7c79fb 100755 --- a/scripts/babeltrace/build.sh +++ b/scripts/babeltrace/build.sh @@ -210,6 +210,7 @@ esac # Print build env details print_header "Build environment details" +print_hardware || true print_os || true print_tooling || true diff --git a/scripts/binutils-gdb/build.sh b/scripts/binutils-gdb/build.sh index 94bded9..e964220 100755 --- a/scripts/binutils-gdb/build.sh +++ b/scripts/binutils-gdb/build.sh @@ -200,6 +200,8 @@ macos-*) esac # Print build env details +print_header "Build environment details" +print_hardware || true print_os || true print_tooling || true diff --git a/scripts/common/print.sh b/scripts/common/print.sh index e13ddd0..e101a9c 100755 --- a/scripts/common/print.sh +++ b/scripts/common/print.sh @@ -12,6 +12,19 @@ print_blue() { echo -e "${COLOR_BLUE}$1${COLOR_NONE}" } +print_hardware() { + if command -v lscpu >/dev/null 2>&1; then + print_blue "CPU Details" + lscpu + fi + + print_blue "Memory Details" + free + + print_blue "Storage Details" + df -H -T +} + print_os() { set +ex diff --git a/scripts/librseq/build.sh b/scripts/librseq/build.sh index 981f30f..5a10c2e 100755 --- a/scripts/librseq/build.sh +++ b/scripts/librseq/build.sh @@ -180,6 +180,7 @@ esac # Print build env details print_header "Build environment details" +print_hardware || true print_os || true print_tooling || true diff --git a/scripts/liburcu/build.sh b/scripts/liburcu/build.sh index f72a419..cc4d15c 100755 --- a/scripts/liburcu/build.sh +++ b/scripts/liburcu/build.sh @@ -198,6 +198,7 @@ esac # Print build env details print_header "Build environment details" +print_hardware || true print_os || true print_tooling || true diff --git a/scripts/lttng-tools/build.sh b/scripts/lttng-tools/build.sh index f5cafe4..ceec4bb 100755 --- a/scripts/lttng-tools/build.sh +++ b/scripts/lttng-tools/build.sh @@ -285,6 +285,7 @@ fi # Print build env details print_header "Build environment details" +print_hardware || true print_os || true print_tooling || true diff --git a/scripts/lttng-ust/build.sh b/scripts/lttng-ust/build.sh index d9de73c..7c7bb35 100755 --- a/scripts/lttng-ust/build.sh +++ b/scripts/lttng-ust/build.sh @@ -201,6 +201,7 @@ esac # Print build env details print_header "Build environment details" +print_hardware || true print_os || true print_tooling || true -- 2.34.1