PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Linux Script To Test Performance & Benchmarking

Go down

Linux Script To Test Performance & Benchmarking Empty Linux Script To Test Performance & Benchmarking

Post by jamied_uk 6th July 2017, 13:27




Code


run.sh


Code:
#!/bin/bash
#
# jnet.forumotion.com/t1526-linux-script-to-test-performance-benchmarking#2278
#
# Example: ./run.sh
#
#
# Catch not installed error:
#
command -v perf >/dev/null 2>&1 || { echo >&2 "I Require Perf but it's not installed, So Now  Installing....";
sudo apt install -y linux-tools-common linux-tools-4.8.0-53-generic linux-cloud-tools-4.8.0-53-generic linux-tools-generic linux-cloud-tools-generic





exit 1; }
# sudo apt install linux-tools-common
# Now run
perf stat -e r530110 -e r531010 -e r532010 -e r534010 -e r538010  ./test.sh
#
# /proc/sys/kernel/perf_event_paranoid
#
echo "Change to a -1"
# sudo gedit /proc/sys/kernel/perf_event_paranoid
sudo echo "-1" /proc/sys/kernel/perf_event_paranoid
#
sudo perf stat -e r530110 -e r531010 -e r532010 -e r534010 -e r538010  ./test.sh
#
#
# a better perf monitor
# https://github.com/phoronix-test-suite/phoronix-test-suite/
#
# Check if exists and get if not...
if [  ! -e "phoronix-test-suite" ]; then
  # Control will enter here if $DIRECTORY exists.
git clone https://github.com/phoronix-test-suite/phoronix-test-suite.git
cd phoronix-test-suite
bash install-sh X
cd ..
fi
# finished installing...
#
# Running...
cd phoronix-test-suite
bash phoronix-test-suite gui
# recovery
# bash phoronix-test-suite phoronix-test-suite list-tests
# bash phoronix-test-suite finish-run test
# bash phoronix-test-suite pts/tiobench-1.1.0
# ctrl f2 to exit that loop
#
# dustymabe.com/2012/12/30/running-benchmarks-with-the-phoronix-test-suite/
bash phoronix-test-suite batch-setup
bash phoronix-test-suite run-random-tests
bash phoronix-test-suite run pts/tscp-1.2.1
bash phoronix-test-suite batch-benchmark
bash phoronix-test-suite batch-benchmark pts/iozone

# pts/compress-7zip   < is another test
#
#


test.sh


Code:
 #!/bin/bash
((e=5))
echo $e

(( e = e + 3000000000 ))
echo $e

(( e=e+4 ))  # -- spaces or no spaces, it doesn't matter
echo $e
(( e=e*9999999999999499000000 ))  # -- spaces or no spaces, it doesn't matter
echo $e





Code:
sudo chmod +x *.sh

Code:
./run.sh


Last edited by jamied_uk on 6th July 2017, 14:56; edited 1 time in total
jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Linux Script To Test Performance & Benchmarking Empty Re: Linux Script To Test Performance & Benchmarking

Post by jamied_uk 6th July 2017, 13:47

Notes



flops = Number of Cores∗Average frequency∗Operations per cycle




wiki.ubuntu.com/PhoronixTestSuite



scicomp.stackexchange.com/questions/11306/how-to-determine-the-amount-of-flops-my-computer-is-capable-of


encrypted.google.com/search?q=bash+script+to+measure+theretical+flops&ie=utf-8&oe=utf-8&aq=t


bnikolic.co.uk/blog/hpc-howto-measure-flops.html

unix.stackexchange.com/questions/15982/finding-mflops-using-linux


scicomp.stackexchange.com/questions/11306/how-to-determine-the-amount-of-flops-my-computer-is-capable-of



More

encrypted.google.com/search?q=measure+flops+in+linux+bash&ie=utf-8&oe=utf-8#q=flops+calculator+program
jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Linux Script To Test Performance & Benchmarking Empty Re: Linux Script To Test Performance & Benchmarking

Post by jamied_uk 6th July 2017, 16:06

Part 2



Code:
#!/bin/bash
# (c) J~Net 2017
#
# jnet.forumotion.com/t1526-linux-script-to-test-performance-benchmarking#2280
#
# Usage:    ./freq.sh
#
# flops = Number of Cores∗Average frequency∗Operations per cycle
#
echo "Getting Clock Speeds:"
#myvar=$("lscpu | grep MHz | grep MHz")
myvar=$(lscpu | grep MHz | grep MHz)
#
echo "$myvar"
# 3002.954
# lscpu | grep ""
#
echo "Show All Cores..."
cat /proc/cpuinfo | grep "MHz"
#
sleep 6
# Real Time Watch
watch -n1 "lscpu | grep 'MHz' | awk '{print $1}'"
jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Linux Script To Test Performance & Benchmarking Empty Re: Linux Script To Test Performance & Benchmarking

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum