IT技术博客大学习 共学习 共进步

在linux下常用的硬件测试软件

DBA Blog 2009-10-12 09:13:03 浏览 3,824 次
       A: Super π(Pi)是Windows底下很受欢迎的测试CPU的工具,因其只用到基础的浮点运算,而不涉及其他的系统库环境,所以,很适合用于排查CPU物理问题。而基于Linux环境,同样也有Super PI for linux套件。

    一、下载

    ftp://pi.super-computing.org/Linux/super_pi.tar.gz

    或者

    http://www.dbasky.net/tool/superpi_linux.tar.gz

    二、安装/运行

    解压后,运行即可:

    [root@dbasky tool]#tar xzvf superpi_linux.tar.gz

    [root@dbasky tool]# cd superpi

    [root@dbasky tool]# ./super_pi 20

    Version 2.0 of the super_pi for Linux OS

    Fortran source program was translated into C program with version 19981204 of

    f2c, then generated C source program was optimized manually.

    pgcc 3.2-3 with compile option of "-fast -tp px -Mbuiltin -Minline=size:1000 -M  noframe -Mnobounds -Mcache_align -Mdalign -Mnoreentrant" was used for the

    compilation.

    ------ Started super_pi run : 四 8月 6 11:33:32 CST 2009

    Start of PI calculation up to 1048576 decimal digits

    End of initialization. Time=       0.437 Sec.

    I= 1 L=       0        Time=       1.341 Sec.

    I= 2 L=       0        Time=       1.607 Sec.

    I= 3 L=       1        Time=       1.598 Sec.

    I= 4 L=       2        Time=       1.609 Sec.

    I= 5 L=       5        Time=       1.595 Sec.

    I= 6 L=      10        Time=       1.583 Sec.

    I= 7 L=      21        Time=       1.589 Sec.

    I= 8 L=      43        Time=       1.523 Sec.

    I= 9 L=      87        Time=       1.521 Sec.

    I=10 L=     174        Time=       1.524 Sec.

    I=11 L=     349        Time=       1.521 Sec.

    I=12 L=     698        Time=       1.516 Sec.

    I=13 L=    1396        Time=       1.521 Sec.

    I=14 L=    2794        Time=       1.574 Sec.

    I=15 L=    5588        Time=       1.510 Sec.

    I=16 L=   11176        Time=       1.507 Sec.

    I=17 L=   22353        Time=       1.461 Sec.

    I=18 L=   44707        Time=       1.408 Sec.

    I=19 L=   89415        Time=       1.345 Sec.

    End of main loop

    End of calculation.    Time=      30.470 Sec.

    End of data output.    Time=       0.180 Sec.

    Total calculation(I/O) time=      30.650(       1.282) Sec.

    ------ Ended super_pi run : 四 8月 6 11:34:03 CST 2009

    ※说明

    1、命令运行中使用的参数m,是指位数,表示要算2的多少次方位,如通常要算小数点后1M位(2^20次方);

    2、m最大到25次方,若设置再大的值,会自动缩小到该值

    Specified M(=30) is too large.  M is set to 25.

    Start of PI calculation up to 33554432 decimal digits

    3、因算法不同,该程序不能用于和Windows平台上的Super PI进行性能对比(实际上,快很多);

    4、该程序在SMP环境中,只能让CPU满载运行,所以,对于多CPU的环境,可同时用多个程序并发运行。

      B:利用memtester和cpuburn进行简单的CPU和内存负载测试   

    一:下载

    http://www.dbasky.net/tool/memtester-4.0.5.tar.gz

    http://www.dbasky.net/tool/cpuburn-in.tar.gz

    二:使用

    1、Memtester

    先解压到某个目录,然后进去make all,会生成一个memtester文件的,然后运行:

     例:

    [root@dbasky tool]#tar zxvf memtester-4.0.5.tar.gz

    [root@dbasky tool]#cd memtester-4.0.5

    [root@dbasky tool]#./memtester 2048 1

    2048表示测试的内存大小,单位是M,1表示次数。

    如果2048不接受的,把它缩小就可以了。先运行一次,如果没有问题就把次数增加即可。

    监控:vmstat、top都可以看到。

    2、cpuburn-in

    这是测试cpu的,解压后,直接运行:

     例:

    [root@dbasky tool]#tar zxvf cpuburn-in.tar.gz

    [root@dbasky tool]#cd cpuburn-in

    [root@dbasky tool]#./cpuburn-in 1

    1表示1分钟,没有问题的话,就运行30分钟或1440分钟(24小时)。

     C:查看硬件信息的工具HardInfo和进行简单的压力测试

    具体的介绍可以查看HardInfo官方,HardInfo提供了查看系统配置的图形界面,也提供了系统配置报告生成工具,如果没有安装 "X windows"环境也可以使用命令生成报告:

    一:下载

    http://www.dbasky.net/tool/hardinfo-0.5.1.tar.bz2

    二:安装和使用

    [root@dbasky tool]#tar xjvf hardinfo-0.5.1.tar.bz2

    [root@dbasky tool]#cd hardinfo-0.5.1

    [root@dbasky tool]#./configure

    [root@dbasky tool]#make & make install

    [root@dbasky tool]#hardinfo -r -f *.text/*.html   #生成text或者html报告

    如果安装"X windows"环境,还可以用lshw-gtk查找硬件信息.

建议继续学习

  1. Xvfb+YSlow+ShowSlow搭建前端性能测试框架 (阅读 55,344)
  2. 安全测试与渗透测试区别 (阅读 24,825)
  3. 使用Fiddler对手机应用进行抓包测试 (阅读 8,463)
  4. 服务器性能测试工具推荐 (阅读 7,903)
  5. 给Apache做压力测试时遇到的问题 (阅读 7,183)
  6. WEB性能测试工具推荐 (阅读 6,945)
  7. 可用性测试好助手——Morae软件的应用 (阅读 6,683)
  8. 12款很棒的浏览器兼容性测试工具推荐 (阅读 6,146)
  9. 性能测试工具sysbench简介 (阅读 5,905)
  10. 可用性测试的权衡之道(二) (阅读 5,721)