Skip to content

Commit 63d8ad5

Browse files
committed
add machine cpu and ram to output. collapse output by default
1 parent 6d13b21 commit 63d8ad5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

hooks/post-command

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ set -eou pipefail
55

66
docker stop -t1 telemetry-plugin
77

8-
echo "+++ :bar_chart: Telemetry:"
8+
vcpus=$(lscpu | awk -F ":" '/Core/ { c=$2; }; /Socket/ { s=$2; }; END { print s*c }')
9+
phys_cpus=$(lscpu | awk -F ":" '/Core/ { c=$2; }; /Socket/ { s=$2; }; END { print s*c }')
10+
ram_gb=$(awk '/MemTotal/ {printf "%d", $2/1024/1024}' /proc/meminfo)
11+
12+
echo "--- :bar_chart: Telemetry. ${vcpus} vCPUS (${phys_cpus} physical CPUs), ${ram_gb} GB"
13+
914
cat "$BUILDKITE_TELEMETRY_PLUGIN_OUTFILE"
1015

1116
rm -rf -- "$BUILDKITE_TELEMETRY_PLUGIN_TMPDIR"

0 commit comments

Comments
 (0)