Xybernaut Wearable PC
element14 presents | AirborneSurfer's VCP Profile | Project Videos
This bash script runs as sudo, installs the sysbench application as its only dependency, and loops through three benchmarking tests giving an elapsed time and processor temperature for each test.
#!/bin/bash [ "$(whoami)" == "root" ] || { echo "Must be run as sudo!"; exit 1; } # Install sysbench if needed if [ ! `which sysbench` ]; then apt-get install -y sysbench fi clear sync echo -e "element14 Presents 'Project Crucible'" echo -e "Raspberry Pi Benchmark Test" echo -e "CC-BY-SA AirborneSurfer Productions" # Show current hardware vcgencmd measure_temp vcgencmd get_config int | grep arm_freq vcgencmd get_config int | grep core_freq vcgencmd get_config int | grep sdram_freq vcgencmd get_config int | grep gpu_freq # Loop benchmark tests while true do echo -e "Running CPU test..." sysbench --num-threads=4 --validate=on --test=cpu --cpu-max-prime=1000 run | grep 'total time:\|min:\|avg:\|max:' | tr -s [:space:] vcgencmd measure_temp echo -e "" echo -e "Running THREADS test..." sysbench --num-threads=4 --validate=on --test=threads --thread-yields=1000 --thread-locks=6 run | grep 'total time:\|min:\|avg:\|max:' | tr -s [:space:] vcgencmd measure_temp echo -e "" echo -e "Running MEMORY test..." sysbench --num-threads=4 --validate=on --test=memory --memory-block-size=1K --memory-total-size=3G --memory-access-mode=seq run | grep 'Operations\|transferred\|total time:\|min:\|avg:\|max:' | tr -s [:space:] vcgencmd measure_temp echo -e "" done