代码拉取完成,页面将自动刷新
#!/bin/bash
## to burn all cpu cores with SuperPI.
## how to?
# timeout 5h bash pi.sh
# default for 5 hours.
# get CPU number
cpu_num=`cat /proc/cpuinfo | grep 'processor' | wc -l `
# export x=${cpu_num}
export x=$((${cpu_num}*5))
echo -e "I will start \033[1;31m ${x}\033[0;35m\033[0m threads to run SuperPI."
echo -e "\033[1;31mNeeds several hours, maybe. \033[0;35m\033[0m"
echo -e "\033[1;32mPress Enter to continue. \033[0;35m\033[0m"
echo -e "\033[1;33mReboot server to stop SuperPI, \033[0;35m\033[0m"
echo -e "Or run \033[1;34m pkill -9 bc \033[0;35m\033[0m as root user."
echo -e "\033[1;30mIf your server dies in the first 30 minutes, then ask the seller for money back.\033[0;35m\033[0m"
while [ ${x} -gt 0 ]
do
echo "scale = 80000 ; 4*a(1)" | bc -l -q > /dev/null 2>&1 &
x=$((${x}-1))
done
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。