summaryrefslogtreecommitdiff
path: root/stress-ng-tests.sh
blob: 200cce946768efbd3cf734d18287feaa34b7bb4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

stress-ng --help > /dev/null 2>&1
if [ $? -ne 0 ];then
    sudo apt-get update
    sudo apt-get -y install stress-ng
fi

# To run ${cpu_no} workers might cause hikey board
# overheat and result in system shutdown
cpu_no=`grep "^processor" /proc/cpuinfo | wc -l`
worker_no=$((${cpu_no}/2))

stress-ng --random ${worker_no} --timeout 6h