CN106055445A - 一种cpu压力自动测试方法 - Google Patents
一种cpu压力自动测试方法 Download PDFInfo
- Publication number
- CN106055445A CN106055445A CN201610413905.0A CN201610413905A CN106055445A CN 106055445 A CN106055445 A CN 106055445A CN 201610413905 A CN201610413905 A CN 201610413905A CN 106055445 A CN106055445 A CN 106055445A
- Authority
- CN
- China
- Prior art keywords
- cpu
- test
- testing
- ptu
- linux system
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2205—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
- G06F11/2236—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test CPU or processors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2273—Test methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2284—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by power-on test, e.g. power-on self test [POST]
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
本发明公开了一种CPU压力自动测试方法,属于服务器性能测试技术领域。本发明的CPU压力自动测试方法,基于Linux系统,使用shell语言调用Intel加压工具,以测试时间为参数,自动测试CPU的压力。该发明的CPU压力自动测试方法操作简单,自动化程度高,实用性强,为公司节省人力、时间、成本等资源,测试效率高,能有效确保服务器的开发周期,具有很好的推广应用价值。
Description
技术领域
本发明涉及服务器性能测试技术领域,具体提供一种CPU压力自动测试方法。
背景技术
随着社会的不断进步、经济的快速发展,计算机的应用领域越来越广泛。同时计算机具有存储信息量大、使用者获取信息方便快捷等优点,成为生活及工作中必不可少的工具。由于经济的飞速发展,各大型企业需要更高性能的计算机设备,以满足企业运行的需要。服务器具有良好的处理能力、稳定性、可靠性、安全性、可扩展性及可管理性等,能提供更可靠的服务,近年来,使用服务器的大型企业越来越多。随着互联网的飞速发展,服务器更新换代的速度也越来越快,对服务器的测试要求也越来越高,自动化测试变得势在必行。在过去对服务器CPU加压测试过程中,需要人为检查log,然后再执行测试工具,测试完成后再人为的去检查测试log,使用起来非常的繁琐,不仅降低了测试效率,还耗费大量的时间与人力,增加了企业成本。此外,人为的检查过程难免会出现误差,造成CPU的压力测试值不准确。
发明内容
本发明的技术任务是针对上述存在的问题,提供一种测试方法操作简单,自动化程度高,实用性强,能为公司节省人力、时间、成本等资源,并且测试效率高,能有效确保服务器的开发周期的CPU压力自动测试方法。
为实现上述目的,本发明提供了如下技术方案:
一种CPU压力自动测试方法,所述测试方法基于Linux系统,使用shell语言调用Intel加压工具,以测试时间为参数,自动测试CPU的压力。
所述测试方法基于Linux系统,使用shell语言调用Intel的加压工具,以测试时间为参数,测试过程中默认的测试时间为24h,自动进行CPU压力测试。在测试过程中自动检查测试log,节省了大量的测试时间与人力,提高了测试效率,节约了企业成本。
作为优选,所述测试方法的具体步骤为:
S1:安装Linux系统;
S2:下载测试程序,将自动测试程序加入到Linux系统启动文件中;
S3:设定测试时间为参数,输入测试时间;
S4:开机自动对CPU进行压力测试。
测试过程中,以测试时间为参数,设置的时间默认为24h,输入测试时间后自动测试CPU压力。
作为优选,S2所述Linux系统启动文件为/etc/rc.local。
与现有技术相比,本发明具有以下突出的有益效果:所述自动化测试方法,基于Linux系统,使用shell语言调用Intel的加压工具,设定测试时间为参数,实现自动对CPU进行压力测试,简化了繁琐的人为log检查及测试步骤,测试方法操作简单,自动化程度高,实用性强,为企业节省大量的人力、时间、成本等资源,并有效的确保了服务器的开发周期,节约企业的成本。
附图说明
图1是本发明所述CPU压力自动测试方法的过程示意图。
具体实施方式
下面将结合附图和实施例,对本发明的一种CPU压力自动测试方法作进一步详细说明。
实施例
如图1所示,本发明的CPU压力自动测试方法,基于Linux系统,使用shell语言调用Intel加压工具,设定测试时间为参数,测试过程中的默认时间为24h,输入测试时间,自动测试CPU的压力。具体步骤为:
S1:安装Linux系统;
S2:下载测试程序,将自动测试程序加入到Linux系统启动文件/etc/rc.local中;
S3:设定测试时间为参数,输入测试时间,默认为24h;
S4:开机自动对CPU进行压力测试。
CPU压力自动测试程序代码如下:
#!/bin/bash
DIR=$PWD
Test_PATH=/tmp/tools/stress/ptu
Log_PATH=$(cat /tmp/tools/name)
#Log1_PATH=/tmp/tools/shell
PTU_TEST=ptugen
PTU_CHECK=ptumon
if [ -e $Test_PATH/Func_PTU_TEST.log ]
then
rm -rf $Test_PATH/Func_PTU_TEST.log
fi
echo "******clear system log******"
echo >/var/log/messages
echo >/var/log/dmesg
echo >/var/log/mcelog
echo "******clear BMC log******"
service ipmi start
ipmitool sel clear
echo "******Start PTU Test******"
#echo -e "\033[32mPlease input PTU Test Runtime(s) \033[0m"
#read Runtime
cd $Test_PATH
chmod +x *
if [ -e $PTU_TEST ]&&[ -e $PTU_CHECK ]
then
if [ "$1" = '' ]
then
./$PTU_TEST -y -t 86400 &
sleep 1
else
./$PTU_TEST -y -t $1 &
sleep 1
fi
else
echo -e "\033[31mPTU Tool is not found \033[0m"
exit 1
fi
#******Confirm PTU Test Running******
#cores_num=$(cat /proc/cpuinfo |grep "cpu cores" |sort |uniq |awk '{print$4 }')
#cores_num=$(echo "$cores_num"*2 |bc)
cores_num=$(cat /proc/cpuinfo |grep process |wc -l)
ptu_num=$(ps -ef |grep ptugen |wc -l)
if [ $ptu_num -ge $cores_num ]
then
if [ "$1" = '' ]
then
./$PTU_CHECK -y -t 86400 |tee -a Func_PTU_TEST.log
else
./$PTU_CHECK -y -t $1 |tee -a Func_PTU_TEST.log
fi
else
echo -e "\033[31mPTU is not Running,Please confirm it \033[0m"
fi
killall -9 $PTU_TEST
killall -9 $PTU_CHECK
cd $Log_PATH
if [ -e ptu ]
then
cp -rf $Test_PATH/Func_PTU_TEST.log $Log_PATH/ptu
else
mkdir ptu
cp -rf $Test_PATH/Func_PTU_TEST.log $Log_PATH/ptu
fi
rm -rf $Test_PATH/Func_PTU_TEST.log
cd $DIR
以上所述的实施例,只是本发明较优选的具体实施方式,本领域的技术人员在本发明技术方案范围内进行的通常变化和替换都应包含在本发明的保护范围内。
Claims (3)
1.一种CPU压力自动测试方法,其特征在于:所述测试方法基于Linux系统,使用shell语言调用Intel加压工具,以测试时间为参数,自动测试CPU的压力。
2.根据权利要求1所述的CPU压力自动测试方法,其特征在于:所述测试方法的具体步骤为:
S1:安装Linux系统;
S2:下载测试程序,将自动测试程序加入到Linux系统启动文件中;
S3:设定测试时间为参数,输入测试时间;
S4:开机自动对CPU进行压力测试。
3.根据权利要求2所述的CPU压力自动测试方法,其特征在于:S2所述Linux系统启动文件为/etc/rc.local。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610413905.0A CN106055445A (zh) | 2016-06-14 | 2016-06-14 | 一种cpu压力自动测试方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610413905.0A CN106055445A (zh) | 2016-06-14 | 2016-06-14 | 一种cpu压力自动测试方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106055445A true CN106055445A (zh) | 2016-10-26 |
Family
ID=57169977
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610413905.0A Pending CN106055445A (zh) | 2016-06-14 | 2016-06-14 | 一种cpu压力自动测试方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106055445A (zh) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107179989A (zh) * | 2017-05-16 | 2017-09-19 | 郑州云海信息技术有限公司 | 一种cpu和dimm压力动态变化测试方法 |
CN108984358A (zh) * | 2018-07-18 | 2018-12-11 | 郑州云海信息技术有限公司 | 一种服务器cpu压力测试的方法及装置 |
CN109086184A (zh) * | 2018-07-18 | 2018-12-25 | 郑州云海信息技术有限公司 | 一种服务器linux系统下GPU压力测试的监控方法 |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833493A (zh) * | 2010-03-24 | 2010-09-15 | 浪潮电子信息产业股份有限公司 | 一种基于linux系统下服务器稳定性可靠性的测试方法 |
CN104407951A (zh) * | 2014-11-05 | 2015-03-11 | 浪潮电子信息产业股份有限公司 | 一种自动化进行服务器整机测试的方法 |
-
2016
- 2016-06-14 CN CN201610413905.0A patent/CN106055445A/zh active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833493A (zh) * | 2010-03-24 | 2010-09-15 | 浪潮电子信息产业股份有限公司 | 一种基于linux系统下服务器稳定性可靠性的测试方法 |
CN104407951A (zh) * | 2014-11-05 | 2015-03-11 | 浪潮电子信息产业股份有限公司 | 一种自动化进行服务器整机测试的方法 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107179989A (zh) * | 2017-05-16 | 2017-09-19 | 郑州云海信息技术有限公司 | 一种cpu和dimm压力动态变化测试方法 |
CN108984358A (zh) * | 2018-07-18 | 2018-12-11 | 郑州云海信息技术有限公司 | 一种服务器cpu压力测试的方法及装置 |
CN109086184A (zh) * | 2018-07-18 | 2018-12-25 | 郑州云海信息技术有限公司 | 一种服务器linux系统下GPU压力测试的监控方法 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6839892B2 (en) | Operating system debugger extensions for hypervisor debugging | |
CN104536875A (zh) | 一种基于ipmi的对服务器进行自动化重启测试的方法 | |
CN110750396B (zh) | 一种服务器操作系统兼容性测试方法、装置及存储介质 | |
US8839188B2 (en) | Automated build process and root-cause analysis | |
CN107508727B (zh) | 一种自动化网卡信息检查方法及装置 | |
CN110515795B (zh) | 一种大数据组件的监控方法、装置、电子设备 | |
CN106055445A (zh) | 一种cpu压力自动测试方法 | |
CN103186463B (zh) | 确定软件的测试范围的方法和系统 | |
CN115080398A (zh) | 一种接口自动化测试系统及方法 | |
CN112241360A (zh) | 一种测试用例生成方法、装置、设备及存储介质 | |
WO2023094931A1 (en) | Detecting vulnerabilities in configuration code of a cloud environment utilizing infrastructure as code | |
CN106021054A (zh) | 一种对bmc升降级稳定性进行测试的方法及装置 | |
CN106095680A (zh) | 一种应用于Linux的验证磁盘乱序自动化测试方法 | |
CN112269697B (zh) | 一种设备存储性能测试方法、系统及相关装置 | |
CN107168819B (zh) | 一种操作系统重启方法及装置 | |
CN113655846B (zh) | 一种OpenPOWER服务器时间同步方法及系统 | |
CN107168815B (zh) | 一种收集硬件错误信息的方法 | |
CN115757099A (zh) | 平台固件保护恢复功能自动测试方法和装置 | |
CN115437940A (zh) | 一种适用于金融级云平台的api接口测试方法 | |
CN115480970A (zh) | 一种性能测试方法、装置、设备及存储介质 | |
CN113282504A (zh) | 一种增量代码覆盖率检测方法及业务开发方法、装置 | |
CN113342660A (zh) | 文件测试方法、装置、系统、电子设备及可读存储介质 | |
CN111414287A (zh) | 一种芯片测试结果的分析方法、系统及装置 | |
Sundmark et al. | Monitored software components-a novel software engineering approach | |
Zhang | Research on software development and test environment automation based on android platform |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20161026 |