这里将告诉您Linux系统下的CPU、内存、IO、网络的压力测试,具体完成步骤:本文转载自:小豆芽博客
一、对CPU进行简单测试:
1、通过bc命令计算特别函数
例:计算圆周率
echo "scale=5000; 4*a(1)" | bc -l -q
MATHLIBRARYIfbcisinvokedwiththe-loption,amathlibraryispreloadedandthedefaultscaleissetto20.Themathfunctionswillcalculatetheirresultstothescalesetatthetimeoftheircall.Themathlibrarydefinesthefollowingfunctions: s(x)Thesineofx,xisinradians.正玄函数 c(x)Thecosineofx,xisinradians.余玄函数 a(x)Thearctangentofx,arctangentreturnsradians.反正切函数 l(x)Thenaturallogarithmofx.log函数(以2为底) e(x)Theexponentialfunctionofraisingetothevaluex.e的指数函数 j(n,x) Thebesselfunctionofintegerordernofx.贝塞尔函数
2、工具二:Super Pi for linux
Super PI是利用CPU的浮点运算能力来计算出π(圆周率),所以目前普遍被超频玩家用做测试系统稳定性和测试CPU计算完后特定位数圆周率所需的时间。http://www.super-/下载页:ftp://pi.super-/wgetftp://pi.super-/Linux/super_pi.tar.gztar -xzvf super_pi.tar.gz./supe