Skip to content

Instantly share code, notes, and snippets.

@romansavrulin
Last active March 6, 2024 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romansavrulin/a8f7864d3cd95d7ae17882f04215aa56 to your computer and use it in GitHub Desktop.
Save romansavrulin/a8f7864d3cd95d7ae17882f04215aa56 to your computer and use it in GitHub Desktop.
memtest.sh
#!/bin/bash
set -e
apt update
apt install -y sysbench build-essential nasm lshw jq git
rm -rf bandwidth-benchmark || true
git clone https://github.com/romansavrulin/bandwidth-benchmark.git
cd bandwidth-benchmark/
make
cd ..
rm -rf output || true
mkdir output
lscpu > output/test_info.txt
lshw >> output/test_info.txt
tail -f output/test_info.txt&
sysbench memory --memory-block-size=1G --memory-total-size=20G --memory-oper=write run >> output/test_info.txt
sysbench memory --memory-block-size=1G --memory-total-size=20G --memory-oper=read run >> output/test_info.txt
time ./bandwidth-benchmark/bandwidth64 --csv output/bandwidth.csv >> output/test_info.txt
mv bandwidth.bmp output || true
mv bandwidth-benchmark/bandwidth.bmp output || true
tar -czf test_info.tgz output/
curl -s -F "file=@test_info.tgz" https://file.io 2>&1 | jq '.link'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment