Skip to content

Commit

Permalink
add machine cpu and ram to output. collapse output by default
Browse files Browse the repository at this point in the history
  • Loading branch information
joemiller committed Aug 17, 2024
1 parent 6d13b21 commit 63d8ad5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion hooks/post-command
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ set -eou pipefail

docker stop -t1 telemetry-plugin

echo "+++ :bar_chart: Telemetry:"
vcpus=$(lscpu | awk -F ":" '/Core/ { c=$2; }; /Socket/ { s=$2; }; END { print s*c }')
phys_cpus=$(lscpu | awk -F ":" '/Core/ { c=$2; }; /Socket/ { s=$2; }; END { print s*c }')
ram_gb=$(awk '/MemTotal/ {printf "%d", $2/1024/1024}' /proc/meminfo)

echo "--- :bar_chart: Telemetry. ${vcpus} vCPUS (${phys_cpus} physical CPUs), ${ram_gb} GB"

cat "$BUILDKITE_TELEMETRY_PLUGIN_OUTFILE"

rm -rf -- "$BUILDKITE_TELEMETRY_PLUGIN_TMPDIR"

0 comments on commit 63d8ad5

Please sign in to comment.