#!/bin/bash


STRESS_CPU_TIME=86400

which stress-ng

if [ $? -ne 0 ];then
   apt install -y stress-ng

   if [ $? -ne 0 ];then
      echo "stress-ng 安装失败"
      exit

   fi
fi


echo  "stress-ng --cpu 0 --cpu-method matrixprod --vm 4 --vm-bytes 95% --vm-method all --verify --timeout ${STRESS_CPU_TIME}s"

sudo nohup stress-ng --cpu 0 --cpu-method matrixprod --vm 4 --vm-bytes 95% --vm-method all --verify --timeout ${STRESS_CPU_TIME}s &
