CN105718340A - Crontab-based CPU stability test method - Google Patents

Crontab-based CPU stability test method Download PDF

Info

Publication number
CN105718340A
CN105718340A CN201610026941.1A CN201610026941A CN105718340A CN 105718340 A CN105718340 A CN 105718340A CN 201610026941 A CN201610026941 A CN 201610026941A CN 105718340 A CN105718340 A CN 105718340A
Authority
CN
China
Prior art keywords
cpu
test
cpucheck
log
under
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
Application number
CN201610026941.1A
Other languages
Chinese (zh)
Inventor
于勤伟
王守昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201610026941.1A priority Critical patent/CN105718340A/en
Publication of CN105718340A publication Critical patent/CN105718340A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection 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/2236Detection 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

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)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a CPU stability test method based on Crontab, which is characterized in that a script is used for periodically executing an instruction Crontab under linux, a/sbin/cPucheck instruction carried by a timing execution system is sent to a Crontab file, and a timing on-off test under the linux system is set for automatically starting crond service to run by starting; the method includes the steps that initial CPU information is captured as a reference at the beginning of script operation, current CPU information is compared with the CPU reference in each restart operation, the CPU in-place situation is compared with the previous in-place situation, and the CPU comparison fail time and content are recorded under the condition that the script runs the cpu.log and the CPU fail.log if the CPU capacity is inconsistent; the influence on the system after the restarting of the server in the actual environment is simulated through the CPU inspection test before and after the change of the system state.

Description

A kind of method of testing of the CPU stability based on Crontab
Technical field
The present invention relates to cpu test technical field, be specifically related to the method for testing of a kind of CPU stability based on Crontab.
Background technology
Central processing unit (CPU, English: CentralProcessingUnit), is one of the capital equipment of electronic computer, the core part in computer.Its function is mainly interpretive machine instruction and processes the data in computer software.In computer, all operations all is responsible for reading instruction by CPU, to Instruction decoding the core component performing instruction.Development along with computer technology, the arithmetic speed of CPU is more and more faster, structure also becomes increasingly complex, the CPU stability worked is proposed very high requirement by the computing of substantial amounts, therefore, in the large-scale exigent place of server equistability, all the stability before machine on CPU is made strict test.
Current industry is in CPU stress test, and no matter windows or Linux is many in the stability verifying CPU self.And the exception of current most high-end server CPU and reporting an error occurs in server state change procedure.
Summary of the invention
The technical problem to be solved in the present invention is: the present invention proposes the method for testing of a kind of CPU stability based on Crontab, test program based on the complete machine CPU stability of Crontab changes as considering CPU stability using server on-off state, consider CPU and there will be frequency errors instability before restarting afterwards, reply normal after repeatedly restarting, consider big quantity left unguarded CPU stability frequency and CPU information record, the stability that whole system is run, assesses tested server stability of CPU continuous firing in the process that complete machine state changes with this.
The technical solution adopted in the present invention is:
A kind of method of testing of the CPU stability based on Crontab, described method of testing is performed instruction crontab by a script at linux periodical, timing execution system is carried /sbin/cpucheck instruction to crontab file, start is set and automatically starts timed power on/off test under crond service operation Linux system;
Described method runs at the beginning of operation under crawl/pro/cpuinfo initial CPU information as reference at script, restart operation by current CPU information and the contrast of CPU reference every time, CPU situation in place contrasts previously in position situation, and CPU capacity is not inconsistent and will record CPU under script runs cpucheck.log and cpufail.log and compare fail time and content;Test, simulation impact on system after Server Restart in actual environment is checked by CPU before and after system state change.Test consider CPU can cause before and after system switching machine identification infull, in persistent switch machine environment, it is ensured that the stability of CPU continuous firing.
It is as follows that described method of testing realizes process:
1) get out Linux test platform, including test host platform, on test main frame, (SuSE) Linux OS is installed;
2) power on start by test main frame, enters operating system, uses root user to log in;
3) cpucheck script is copied on linux system desktop;
4) under linux system, run terminal terminal program, under terminal, perform following operation:
#cd/root/Desktop carriage return
#shcpucheck-m-max500-time6 carriage return
Point out under Terminal
#creatingcrontabservice...
Stoppingcrond:[OK]
Startingcrond:[OK]
Systemwillrebootandcheckcpuin6minutes.
5) generation can be performed cpucheck mastery routine cpucheck.sh by/root/cpucheck/
6) system will capture under current system/pro/cpuinfo in CPU capacity deposit as under/root/cpucheck/conf as CPU reference value
7) now/root/Desktop/RebootResult file occurs restarting counting count file, cpucheck.log and cpufail.log file next time;
8) system will start to restart test in 6min;
9) restart cpucheck.sh after system for the first time automatically to run on backstage, counted restarting by reading/root/Desktop/RebootResult/count file;Capture CPU capacity under current/proc/cpuinfo to compare with benchmark CPU capacity simultaneously, and cpucheck.log and cpufail.log is filled in;
10) test machine continuous service restarts test n time;
11) restart n time after having tested, detection test record;
12) after the detection of test record completes, deletion/root/cpucheck/cpucheck.sh file.
Described detection test recording process is as follows: checking cpucheck.log file under/root/Desktop/RebootResult, record reboot time in file record, whether test result is Pass entirely;Cpufail.log file, if report an error record, and tester table whether stable operation in whole test process, either with or without occur CPU lose, crash, the abnormal phenomena such as power down or blue screen.
The invention have the benefit that
The inventive method based on the test program of the complete machine CPU stability of Crontab, adopts c program cycle count function that switching on and shutting down are counted, in combination with system-level CPU and benchmark CPU contrast mechanism in each system switching machine process to CPU capacity implementing monitoring.Assessment testing service applicator platform operation stability comes the CPU purpose at system start-up self-consistentency whereby.
The inventive method adds CPU before and after machine state change first in CPU stability test, has broken complete machine CPU and has deposited and itself do not detect CPU limitation whether in place, and next has filled up current industry can only carry out CPU pressure detection method under simple state;Last test result is also comparatively directly perceived, can directly judge complete machine CPU CPU capacity, information such as whether in place CPU is before and after machine state change;This kind of method of testing is applicable to currently a popular various Linux operation simultaneously.
Accompanying drawing explanation
Fig. 1 is script flowchart of the present invention;
Fig. 2 is test flow chart.
Detailed description of the invention
Below according to Figure of description, in conjunction with detailed description of the invention, the present invention is further described:
Embodiment 1:
As shown in Figure 1, a kind of method of testing of the CPU stability based on Crontab, described method of testing is performed instruction crontab by a script at linux periodical, timing execution system is carried /sbin/cpucheck instruction to crontab file, start is set and automatically starts timed power on/off test under crond service operation Linux system;
Described method runs at the beginning of operation under crawl/pro/cpuinfo initial CPU information as reference at script, restart operation by current CPU information and the contrast of CPU reference every time, CPU situation in place contrasts previously in position situation, and CPU capacity is not inconsistent and will record CPU under script runs cpucheck.log and cpufail.log and compare fail time and content;Test, simulation impact on system after Server Restart in actual environment is checked by CPU before and after system state change.Test consider CPU can cause before and after system switching machine identification infull, in persistent switch machine environment, it is ensured that the stability of CPU continuous firing.
Embodiment 2:
As in figure 2 it is shown, on the basis of embodiment 1, it is as follows that method of testing described in the present embodiment realizes process:
1) get out Linux test platform, including test host platform, on test main frame, (SuSE) Linux OS is installed;
2) power on start by test main frame, enters operating system, uses root user to log in;
3) cpucheck script is copied on linux system desktop;
4) under linux system, run terminal terminal program, under terminal, perform following operation:
#cd/root/Desktop carriage return
#shcpucheck-m-max500-time6 carriage return
Point out under Terminal
#creatingcrontabservice...
Stoppingcrond:[OK]
Startingcrond:[OK]
Systemwillrebootandcheckcpuin6minutes.
5) generation can be performed cpucheck mastery routine cpucheck.sh by/root/cpucheck/
6) system will capture under current system/pro/cpuinfo in CPU capacity deposit as under/root/cpucheck/conf as CPU reference value
7) now/root/Desktop/RebootResult file occurs restarting counting count file, cpucheck.log and cpufail.log file next time;
8) system will start to restart test in 6min;
9) restart cpucheck.sh after system for the first time automatically to run on backstage, counted restarting by reading/root/Desktop/RebootResult/count file;Capture CPU capacity under current/proc/cpuinfo to compare with benchmark CPU capacity simultaneously, and cpucheck.log and cpufail.log is filled in;
10) test machine continuous service restarts test 500 times;
11) restart 500 times after having tested, detection test record;
12) after the detection of test record completes, deletion/root/cpucheck/cpucheck.sh file.
Embodiment 3:
On the basis of embodiment 2, described in the present embodiment, detection test recording process is as follows: checking cpucheck.log file under/root/Desktop/RebootResult, record reboot time in file record, whether test result is Pass entirely;Cpufail.log file, if report an error record, and tester table whether stable operation in whole test process, either with or without occur CPU lose, crash, the abnormal phenomena such as power down or blue screen.
Embodiment of above is merely to illustrate the present invention; and it is not limitation of the present invention; those of ordinary skill about technical field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all equivalent technical schemes fall within scope of the invention, and the scope of patent protection of the present invention should be defined by the claims.

Claims (3)

1. the method for testing based on the CPU stability of Crontab, it is characterized in that: described method of testing is performed instruction crontab by a script at linux periodical, timing execution system is carried /sbin/cpucheck instruction to crontab file, start is set and automatically starts timed power on/off test under crond service operation Linux system;
Described method runs at the beginning of operation under crawl/pro/cpuinfo initial CPU information as reference at script, restart operation by current CPU information and the contrast of CPU reference every time, CPU situation in place contrasts previously in position situation, and CPU capacity is not inconsistent and will record CPU under script runs cpucheck.log and cpufail.log and compare fail time and content;Test, simulation impact on system after Server Restart in actual environment is checked by CPU before and after system state change.
2. the method for testing of a kind of CPU stability based on Crontab according to claim 1, it is characterised in that it is as follows that described method of testing realizes process:
1) get out Linux test platform, including test host platform, on test main frame, (SuSE) Linux OS is installed;
2) power on start by test main frame, enters operating system, uses root user to log in;
3) cpucheck script is copied on linux system desktop;
4) under linux system, run terminal terminal program, under terminal, perform following operation:
#cd/root/Desktop carriage return
#shcpucheck-m-max500-time6 carriage return
Point out under Terminal
#creatingcrontabservice...
Stoppingcrond:[OK]
Startingcrond:[OK]
Systemwillrebootandcheckcpuin6minutes.
5) generation can be performed cpucheck mastery routine cpucheck.sh by/root/cpucheck/
6) system will capture under current system/pro/cpuinfo in CPU capacity deposit as under/root/cpucheck/conf as CPU reference value
7) now/root/Desktop/RebootResult file occurs restarting counting count file, cpucheck.log and cpufail.log file next time;
8) system will start to restart test in 6min;
9) restart cpucheck.sh after system for the first time automatically to run on backstage, counted restarting by reading/root/Desktop/RebootResult/count file;Capture CPU capacity under current/proc/cpuinfo to compare with benchmark CPU capacity simultaneously, and cpucheck.log and cpufail.log is filled in;
10) test machine continuous service restarts test n time;
11) restart n time after having tested, detection test record;
12) after the detection of test record completes, deletion/root/cpucheck/cpucheck.sh file.
3. the method for testing of a kind of CPU stability based on Crontab according to claim 2, it is characterized in that, described detection test recording process is as follows: check cpucheck.log file under/root/Desktop/RebootResult, recording reboot time in file record, whether test result is Pass entirely;Cpufail.log file, if report an error record, and tester table whether stable operation in whole test process, either with or without CPU abnormal phenomena occur.
CN201610026941.1A 2016-01-13 2016-01-13 Crontab-based CPU stability test method Pending CN105718340A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610026941.1A CN105718340A (en) 2016-01-13 2016-01-13 Crontab-based CPU stability test method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610026941.1A CN105718340A (en) 2016-01-13 2016-01-13 Crontab-based CPU stability test method

Publications (1)

Publication Number Publication Date
CN105718340A true CN105718340A (en) 2016-06-29

Family

ID=56147846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610026941.1A Pending CN105718340A (en) 2016-01-13 2016-01-13 Crontab-based CPU stability test method

Country Status (1)

Country Link
CN (1) CN105718340A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776090A (en) * 2016-11-29 2017-05-31 郑州云海信息技术有限公司 A kind of method for collecting information when RHEL operating systems are without response
CN107168819A (en) * 2017-03-31 2017-09-15 北京奇艺世纪科技有限公司 A kind of operating system method for restarting and device
CN107203445A (en) * 2017-05-24 2017-09-26 郑州云海信息技术有限公司 A kind of automated testing method of timing cycle perform script
CN107451043A (en) * 2017-08-17 2017-12-08 郑州云海信息技术有限公司 A kind of detection method and device of server stability
CN107783885A (en) * 2017-11-03 2018-03-09 郑州云海信息技术有限公司 A kind of solaris system restarts lower CPU monitoring method
CN107832178A (en) * 2017-11-20 2018-03-23 郑州云海信息技术有限公司 A kind of automated testing method of server stability
CN107870840A (en) * 2016-09-27 2018-04-03 佛山市顺德区顺达电脑厂有限公司 The multiple test instruction automatic execution methods of server based on IPMI
CN109240850A (en) * 2018-08-21 2019-01-18 郑州云海信息技术有限公司 Server DC Reboot test method under a kind of linux system
CN109359001A (en) * 2018-12-13 2019-02-19 浪潮电子信息产业股份有限公司 Method, device and equipment for testing cold restart of solid-state disk
CN113687223A (en) * 2021-08-30 2021-11-23 广东睿住智能科技有限公司 Test method, test device, server and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019920A (en) * 2012-12-14 2013-04-03 浪潮电子信息产业股份有限公司 Complete machine non-power-off startup and shutdown method based on Linux system
CN103744764A (en) * 2013-12-26 2014-04-23 浪潮电子信息产业股份有限公司 Crontab based whole computer memory stability test method
CN103970660A (en) * 2014-05-19 2014-08-06 浪潮电子信息产业股份有限公司 Total system stability automatic test method based on crontab

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019920A (en) * 2012-12-14 2013-04-03 浪潮电子信息产业股份有限公司 Complete machine non-power-off startup and shutdown method based on Linux system
CN103744764A (en) * 2013-12-26 2014-04-23 浪潮电子信息产业股份有限公司 Crontab based whole computer memory stability test method
CN103970660A (en) * 2014-05-19 2014-08-06 浪潮电子信息产业股份有限公司 Total system stability automatic test method based on crontab

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107870840A (en) * 2016-09-27 2018-04-03 佛山市顺德区顺达电脑厂有限公司 The multiple test instruction automatic execution methods of server based on IPMI
CN107870840B (en) * 2016-09-27 2020-09-22 佛山市顺德区顺达电脑厂有限公司 IPMI-based server multi-test instruction automatic execution method
CN106776090A (en) * 2016-11-29 2017-05-31 郑州云海信息技术有限公司 A kind of method for collecting information when RHEL operating systems are without response
CN107168819A (en) * 2017-03-31 2017-09-15 北京奇艺世纪科技有限公司 A kind of operating system method for restarting and device
CN107203445A (en) * 2017-05-24 2017-09-26 郑州云海信息技术有限公司 A kind of automated testing method of timing cycle perform script
CN107451043A (en) * 2017-08-17 2017-12-08 郑州云海信息技术有限公司 A kind of detection method and device of server stability
CN107783885A (en) * 2017-11-03 2018-03-09 郑州云海信息技术有限公司 A kind of solaris system restarts lower CPU monitoring method
CN107832178A (en) * 2017-11-20 2018-03-23 郑州云海信息技术有限公司 A kind of automated testing method of server stability
CN109240850A (en) * 2018-08-21 2019-01-18 郑州云海信息技术有限公司 Server DC Reboot test method under a kind of linux system
CN109359001A (en) * 2018-12-13 2019-02-19 浪潮电子信息产业股份有限公司 Method, device and equipment for testing cold restart of solid-state disk
CN113687223A (en) * 2021-08-30 2021-11-23 广东睿住智能科技有限公司 Test method, test device, server and storage medium

Similar Documents

Publication Publication Date Title
CN105718340A (en) Crontab-based CPU stability test method
US10353763B2 (en) Fault processing method, related apparatus, and computer
Yin et al. An empirical study on configuration errors in commercial and open source systems
CN103744764A (en) Crontab based whole computer memory stability test method
CN104899119A (en) Method for automatically detecting hard disk abnormity
CN110750396B (en) Server operating system compatibility testing method and device and storage medium
Parrotta et al. New techniques for accelerating fault injection in VHDL descriptions
US20070079288A1 (en) System and method for capturing filtered execution history of executable program code
CN104572422A (en) Memory monitoring achievement method based on startup and shutdown of Linux system
CN109543417B (en) Vulnerability mining method and device based on Qemu platform
CN105528284A (en) Kernel fault injection method and electronic device
CN103593269A (en) Automatic cyclic test method of restart pressure of multiple PCIe devices
CN108572895B (en) Stability test method for automatically checking software and hardware configuration under Linux
CN111240980A (en) Automatic regression testing method based on cloud pipe platform
CN104899125A (en) Operation information acquisition method and operation information acquisition device for single-board system
JP7168833B2 (en) METHOD, APPARATUS, ELECTRONIC DEVICE, AND STORAGE MEDIUM FOR MEMORY FAILURE HANDLING
CN116909800B (en) Method and device for locating crash information and storage medium
CN111125990A (en) Method for judging result correctness of parasitic parameters
CN107168819B (en) Method and device for restarting operating system
CN102023916B (en) Computer system detection method
CN114910780A (en) Fault tolerance testing method and device, electronic equipment and storage medium
CN111858305B (en) Instrument fault online diagnosis method and device
Sun et al. Automatically capturing and reproducing Android application crashes
CN111966599A (en) Virtualization platform reliability testing method, system, terminal and storage medium
CN116382968B (en) Fault detection method and device for external equipment

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: 20160629