linux下给cpu加压

计算pi:

time (echo "scale=500;4*a(1)"|bc -l -q)

 

#!/bin/bash
for i in `seq 1 1000`
do
    (time echo "scale=5000; 4*a(1)" | bc -l -q |grep 'real') 2>> pi.log
done

posted @ 2017-09-13 22:00  遥远的绿洲  阅读(1027)  评论(1编辑  收藏  举报