主权项 |
一种服务器子系统并行压力测试方法,其特征在于本发明主要包括:1)、利用一台服务器安装操作系统CentOS6.4搭建环境;2)、利用一控制端控制服务器端,远程连接;3)、服务器配置各子系统测试软件;4)、编写耐压测试运行脚本; 5)、运行测试,等待测试结果; <b>具体步骤如下:</b>1)、 在服务器上安装操作系统操作系统CentOS6.4,选择基本服务器安装,安装完成,通过下面命令可以查看[root@localhost ~]# cat /etc/issueCentOS release 6.4 (Final) 2)、选择各个子系统施压工具,CPU测试选择cpuburn,内存测试选择mbw,硬盘读写测试工具选择fio 3)、上传上述工具至服务器根目录,安装; 4)、安装cpuburn:[root@localhost /]# tar xvf cpuburn‑in.tar.gz cpuburn‑inREADME[root@localhost /]# chmod 777 cpuburn‑in 5)、安装mbw[root@localhost /]# unzip mbw‑master.zip[root@localhost /]# cd mbw‑master[root@localhost mbw‑master]# make 6)、安装fio[root@localhost /]# tar xvf fio‑2.1.4.tar.bz2[root@localhost /]# cd fio‑2.1.4[root@localhost fio‑2.1.4]# ./configure[root@localhost fio‑2.1.4]# make[root@localhost fio‑2.1.4]# make install 7)、编写脚本stress.shwhile truedo killall ‑0 fio || fio ‑runtime=3600000 ‑name=mytest ‑filename=/dev/sdb ‑ioengine=psync ‑numjobs=16 ‑direct=1 ‑bs=64k ‑rw=rw & killall ‑0 mbw || ./mbw‑master/mbw 4096 & killall ‑0 cpuburn‑in || ./cpuburn‑in 100000 & echo Server Stress Test Please Donot Interrupt .......; sleep 1done 8)、运行脚本stress.sh[root@localhost /]# ./stress.sh 9)、在监控端打开2个shell,监控服务器各子系统使用率, A、第一个shell运行top命令,监控cpu和内存; B、第一个shell运行iotop命令,监控硬盘状况。 |