Created
September 15, 2020 11:17
-
-
Save kwk/b1131488d5607ddb6df7f67259a4c0d6 to your computer and use it in GitHub Desktop.
Output formatted information about a worker (useful for CI workers)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"worker_information": [ | |
{"key":"System Information", "value":"Linux work 5.6.12-300.fc32.x86_64 #1 SMP Mon May 11 16:47:13 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux"}, | |
{"key":"CPU model", "value":"Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz"}, | |
{"key":"Number of Cores", "value":"8"}, | |
{"key":"Operating System", "value":"Fedora release 32 (Thirty Two)"}, | |
{"key":"Bash Version", "value":"GNU bash, version 5.0.11(1)-release (x86_64-redhat-linux-gnu)"}, | |
{"key":"GCC Version", "value":"gcc (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1)"}, | |
{"key":"Clang Version", "value":"clang version 10.0.0 (Fedora 10.0.0-1.fc32)"}, | |
{"key":"CCache Version", "value":"ccache version 3.7.7"}, | |
{"key":"GDB Version", "value":"GNU gdb (GDB) Fedora 9.1-5.fc32"}, | |
{"key":"GNU ld Version", "value":"GNU ld version 2.34-2.fc32"}, | |
{"key":"GNU gold Version", "value":"GNU gold (version 2.34-2.fc32) 1.16"}, | |
{"key":"Python Version", "value":"Python 3.8.3"}, | |
{"key":"Pip Version", "value":"pip 19.3.1 from /usr/lib/python3.8/site-packages/pip (python 3.8)"}, | |
{"key":"GNU autoconf", "value":"2.69"}, | |
{"key":"CMake Version", "value":"3.17.2"}, | |
{"key":"Vulkan Instance Version", "value":"1.2.135"}, | |
{"key":"NVIDIA Vulkan ICD Version", "value":"1.2.131"} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Key Value | |
System Information Linux work 5.6.12-300.fc32.x86_64 #1 SMP Mon May 11 16:47:13 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux | |
CPU model Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz | |
Number of Cores 8 | |
Operating System Fedora release 32 (Thirty Two) | |
Bash Version GNU bash, version 5.0.11(1)-release (x86_64-redhat-linux-gnu) | |
GCC Version gcc (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1) | |
Clang Version clang version 10.0.0 (Fedora 10.0.0-1.fc32) | |
CCache Version ccache version 3.7.7 | |
GDB Version GNU gdb (GDB) Fedora 9.1-5.fc32 | |
GNU ld Version GNU ld version 2.34-2.fc32 | |
GNU gold Version GNU gold (version 2.34-2.fc32) 1.16 | |
Python Version Python 3.8.3 | |
Pip Version pip 19.3.1 from /usr/lib/python3.8/site-packages/pip (python 3.8) | |
GNU autoconf 2.69 | |
CMake Version 3.17.2 | |
Vulkan Instance Version 1.2.135 | |
NVIDIA Vulkan ICD Version 1.2.131 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
( | |
# General | |
echo "System Information|$(uname -a)"; | |
echo "CPU model|$(cat /proc/cpuinfo | grep "model name" | head -n1 | cut -d " " -f 3-)"; | |
echo "Number of Cores|$(nproc)"; | |
echo "Operating System|$(cat /etc/fedora-release)"; | |
echo "Bash Version|$(bash --version | head -n1)"; | |
# Compilers | |
[ -x "$(command -v gcc)" ] && echo "GCC Version|$(gcc --version | head -n1)"; | |
[ -x "$(command -v clang)" ] && echo "Clang Version|$(clang --version | head -n1)"; | |
[ -x "$(command -v ccache)" ] && echo "CCache Version|$(ccache --version | head -n1)"; | |
# Debuggers | |
[ -x "$(command -v gdb)" ] && echo "GDB Version|$(gdb --version | head -n1)"; | |
# Linkers | |
echo "GNU ld Version|$(ld --version | head -n1)"; | |
[ -x "$(command -v lld)" ] && echo "GNU ldd Version|$(ldd --version | head -n1)"; | |
[ -x "$(command -v ld.gold)" ] && echo "GNU gold Version|$(ld.gold --version | head -n1)"; | |
# Python | |
echo "Python Version|$(python --version)"; | |
echo "Pip Version|$(pip --version)"; | |
# Configure/CMake | |
echo "GNU autoconf|$(autoconf --version | head -n1 | tr -c -d '[0-9.]')"; | |
echo "CMake Version|$(cmake --version | head -n1 | tr -d '[:alpha:][:blank:]')"; | |
# GPU stuff | |
[ -x "$(command -v vulkaninfo)" ] && echo "Vulkan Instance Version|$(vulkaninfo 2>/dev/null | grep "Vulkan Instance" | cut -d " " -f 4-)"; | |
[ -x "$(command -v vulkaninfo)" ] && echo "NVIDIA Vulkan ICD Version|$(vulkaninfo 2>/dev/null | grep "apiVersion" | cut -d= -f2 | awk '{printf $2}' | tr -d '()')"; | |
) | column -s '|' -t --table-name "worker_information" --table-columns "key,value" -o " " --json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was borrowed from here: https://github.com/llvm/llvm-zorg/blob/29eb67693d9ac60038068870cb44710d81073021/buildbot/google/docker/buildbot-mlir-nvidia/run.sh#L17