CN114138578B - Server testing method and device - Google Patents

Server testing method and device Download PDF

Info

Publication number
CN114138578B
CN114138578B CN202111432937.2A CN202111432937A CN114138578B CN 114138578 B CN114138578 B CN 114138578B CN 202111432937 A CN202111432937 A CN 202111432937A CN 114138578 B CN114138578 B CN 114138578B
Authority
CN
China
Prior art keywords
test
module
self
configuration file
server
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.)
Active
Application number
CN202111432937.2A
Other languages
Chinese (zh)
Other versions
CN114138578A (en
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111432937.2A priority Critical patent/CN114138578B/en
Publication of CN114138578A publication Critical patent/CN114138578A/en
Application granted granted Critical
Publication of CN114138578B publication Critical patent/CN114138578B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/2273Test methods
    • 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/2247Verification or detection of system hardware configuration
    • 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/2268Logging of test results
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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 server testing method, and belongs to the technical field of servers. Comprising the following steps: performing self-checking, and checking connection of a test system to obtain test hardware parameters; synchronizing configuration files; sending a test instruction to a test machine, and monitoring a process and a log file generated by the process; if the process and the log file generated by the process are abnormal, checking a self-optimization failure parameter F; if the self-optimization failure parameter F=0, increasing a pressure value parameter, and then repeatedly executing from the synchronous start of the configuration file; and if the self-optimization failure parameter F is more than 0, terminating the test and generating a test report. By the method disclosed by the invention, the server performance and power consumption have a self-optimizing function compared with the standard test, and the degree of automation and the test efficiency of the test are improved.

Description

Server testing method and device
Technical Field
The present invention relates to the field of server technologies, and in particular, to a method and an apparatus for testing a server.
Background
With the starting of large-scale popularization and application of the emerging technologies such as 5G, cloud computing and the like, the demands of users are increasing in geometric level, the data volume processed by a data center is rapidly increased, and the corresponding power consumption is also rapidly increased, so that the outstanding energy consumption problem is brought. The server is an important component of data processing and occupies 40% -50% of the total power consumption. On the one hand, the server technology is required to be continuously and iteratively updated to seek a higher performance-power consumption ratio; on the other hand, a reliable test method is needed to accurately and efficiently test the performance and the power consumption of the server, so as to objectively reflect the performance/power consumption index of the server.
The SPEC Power test (StandardPerformance Evaluation Corporation Power test) is a performance/Power consumption ratio benchmark for evaluating the Power consumption of a server running Java-based applications, and is a server Power consumption ratio test standard recognized by all vendors on the market. The test results represent product competitiveness. In the current SPEC Power test, as shown in fig. 1, a process of a tester is monitored by a controller, and if the test is normal, data collection and report generation are performed after the test is finished; if the test is abnormal, the control machine directly sends out a test interrupt instruction, the test is stopped, the automatic updating of configuration parameters is absent, and the test function is restarted. Moreover, the abnormality of the configuration file cannot be located in the test process. Meanwhile, the test is frequently interrupted, so that the test process is not consistent; repeated debugging of configuration parameters also seriously affects the test efficiency.
Disclosure of Invention
In order to solve the problems in the prior art, the embodiment of the invention provides a server testing method and device, which are used for solving the problem that the prior art does not have a self-optimizing testing function when a performance/power consumption ratio of a server is tested.
In order to solve one or more of the above technical problems, the technical solution adopted by the present invention is as follows:
in a first aspect, a server testing method is provided, for testing a performance-to-power consumption ratio of a server, including:
acquiring test hardware parameters;
synchronizing configuration files;
sending a test instruction to a test machine, and monitoring a process and a log file generated by the process;
if the process and the log file generated by the process are abnormal, checking a self-optimization failure parameter F;
if the self-optimization failure parameter F=0, the pressure value parameter is increased, and then the repeated execution is started from the synchronization of the configuration files;
if the self-optimization failure parameter F is greater than 0, the test is terminated, and a test report is generated.
Further, before obtaining the test hardware parameters, the method further comprises: and performing self-checking, and checking the connection of the test system.
Further, if the monitoring process and the log file generated by the process are abnormal, judging abnormal information and executing operation corresponding to the abnormal information.
Further, judging the abnormality information and performing the operation corresponding to the abnormality information includes:
if the first preset keyword is searched, updating a self-optimization failure parameter F in the configuration file, reducing a pressure load value, and then repeatedly executing from the synchronization of the configuration file;
if the second preset keyword is searched, updating a self-optimization failure parameter F in the test script, increasing the size of the memory pool, and then repeatedly executing from the synchronous start of the configuration file;
if the third preset keyword is retrieved, the testing machine is prompted to disconnect, testing is terminated, and the current configuration is reserved.
Further, obtaining the test hardware parameters includes:
acquiring the number of cores of a CPU of the testing machine;
and acquiring the total memory of the server.
Further, performing profile synchronization includes:
transmitting the configuration file to the testing machine;
downloading the configuration file;
and checking the consistency of the configuration file.
In a second aspect, a server testing method is provided, for testing a performance-to-power consumption ratio of a server, including:
the testing machine receives the configuration file transmitted from the control machine to download and check the configuration file;
clearing the java process;
and acquiring a test instruction sent by the control machine, creating a process, and generating a log file by the process so as to enable the control machine to monitor the process and the log file generated by the process.
In a third aspect, a server testing apparatus is provided for testing a performance-to-power consumption ratio of a server, including a controller;
the control machine comprises: the system comprises a self-checking module, a hardware parameter acquisition module, a configuration file synchronization module, an instruction module, a monitoring module, a parameter checking module, a self-optimizing module and a report generating module;
the self-checking module is used for self-checking and checking the connection of the test system;
the hardware parameter acquisition module is used for acquiring test hardware parameters;
the configuration file synchronization module is used for synchronizing configuration files;
the instruction module is used for sending a test instruction to the tester;
the monitoring module is used for monitoring the process and the log file generated by the process;
the parameter checking module is used for checking whether the self-optimization failure parameter F is greater than 0;
a self-optimizing module; for increasing the pressure value parameter;
and the report generation module is used for generating a test report.
Further, the monitoring module includes: an abnormality judgment sub-module, an abnormality identification sub-module, and an abnormality response sub-module;
the abnormality judging sub-module is used for judging whether the process or the log file generated by the process is abnormal or not;
the abnormality identification sub-module is used for retrieving preset keywords and identifying abnormality;
an anomaly handling submodule for
When the first preset keyword is searched, updating a self-optimization failure parameter F in the configuration file, reducing a pressure load value, and then repeatedly executing from the synchronization of the configuration file;
when the second preset keyword is searched, updating a self-optimization failure parameter F in the test script, increasing the size of the memory pool, and then repeatedly executing from the step of synchronizing the configuration files;
and when the third preset keyword is retrieved, prompting the testing machine to disconnect, terminating the test and reserving the current configuration.
In a fourth aspect, a server testing apparatus is provided for testing a performance-to-power consumption ratio of a server, including a tester;
the tester comprises: the system comprises a configuration file receiving module, a process clearing module, an instruction acquisition module, a process creation module and a log storage module;
the configuration file receiving module is used for receiving the configuration file transmitted from the controller by the testing machine so as to be downloaded and checked by the controller;
the process clearing module is used for clearing the java process;
the instruction acquisition module is used for acquiring a test instruction sent by the controller;
the process creation module is used for creating a process; for the control machine to monitor the process;
and the log saving module is used for saving the log file generated by the process so as to enable the control machine to monitor the log file generated by the process.
The technical scheme provided by the embodiment of the invention has the beneficial effects that:
1. the server performance power consumption ratio standard test with the self-optimization function is provided, and under the condition that the test of the round does not encounter an abnormality, the configuration parameters are automatically updated after the test of the round is terminated, and a new round of test is started. The efficiency and the automation degree of the test are improved;
2. the method has a positioning function for the abnormal problems caused by the configuration file in the test process, and can reinitiate the test after automatically updating the parameters of the configuration file, thereby improving the test efficiency;
3. in the prior art, the mode that the test is exited when the abnormality is detected is improved, and the continuity of the test process is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a SPEC Power test performed on a server in the prior art provided by the present invention;
FIG. 2 is a schematic diagram of a control mechanism of a server testing method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of performing profile synchronization according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a test machine flow of a server test method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a controller module of a server testing device according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a testing machine module of a server testing device according to an embodiment of the present invention;
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some examples of the present invention, not all examples. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Unless defined otherwise, technical or scientific terms used in this disclosure should be given the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure belongs. The terms "first," "second," and the like, as used in this disclosure, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. Likewise, the terms "a," "an," or "the" and similar terms do not denote a limitation of quantity, but rather denote the presence of at least one. The numerals in the drawings of the specification merely denote distinction of respective functional components or modules, and do not denote logical relationships between the components or modules. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed.
Hereinafter, various embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Note that in the drawings, the same reference numerals are given to constituent parts having substantially the same or similar structures and functions, and repeated description thereof will be omitted.
In the prior art, a SPEC Power test method used for a server lacks a self-optimizing function, so that the automation degree of a test flow is low; and the abnormal conditions during the test can not be positioned and identified, the abnormal conditions are usually handled by adopting a termination test mode, the test process is often terminated, and the test efficiency is seriously affected. The embodiment of the invention discloses a server testing method and device, and the specific technical scheme is as follows:
in one embodiment, as shown in fig. 2, a server testing method includes:
step S100: performing self-checking, and checking the connection of the test system;
step S110: acquiring test hardware parameters;
step S120: synchronizing configuration files;
step S130: sending a test instruction to a test machine, and monitoring a process and a log file generated by the process;
step S140: judging whether the process and the log file generated by the process are abnormal or not, and if the process and the log file generated by the process are abnormal, checking a self-optimization failure parameter F;
step S150: if the self-optimization failure parameter f=0, the pressure value parameter is increased, and then the execution is repeated from step S120;
step S160: if the self-optimization failure parameter F is greater than 0, the test is terminated, and a test report is generated.
Step S100: and performing self-checking, and checking the connection of the test system.
Because the SPEC Power test environment needs to be physically set up, it is necessary to first check whether the system is properly connected before the test is performed. The automatic checking device comprises a self-checking module, and is used for performing connection checking on a power meter, a thermometer, a control machine and a testing machine.
In one embodiment, the connection verification is performed on a power meter, a temperature meter, a control machine and a testing machine.
Step S110: and obtaining the test hardware parameters.
Acquiring the hardware parameters of the test refers to acquiring the hardware parameters of the test machine, and configuring the acquired hardware parameters related to the test in a configuration file.
Hardware parameters related to testing include, but are not limited to: CPU core number of the tester and total memory of the server.
And before the self-optimizing function operates, acquiring the hardware parameters related to the test as the basis of self-optimization. Is the basis of the self-optimizing function of the method.
In one embodiment, the test hardware parameters obtained are: the CPU core number of the tester and the total memory of the server.
Step S120: and performing configuration file synchronization. The specific steps are shown in fig. 3, and include:
step S121: transmitting the configuration file to the testing machine;
step S122: downloading a configuration file;
step S123: and checking the consistency of the configuration file.
The testing machine is connected to the controller through the network cable, and in order for the testing machine to obtain the configuration file, first, the controller needs to transmit the configuration file to the testing machine through step S121. In order to ensure the consistency of the configuration file received by the testing machine and the configuration file sent by the controller, the configuration file is firstly downloaded from the testing machine through step S122, and then the consistency of the configuration file is checked through step S123. For the tools for checking the consistency of the configuration files, MD5, SHA1, CRC32, CRC16, CRC8 and other checking tools can be adopted, the checking result is compared with a pre-stored reference result, and if the checking result is the same with the pre-stored reference result, the consistency of the configuration files transmitted to the testing machine and the configuration files sent by the control machine is indicated.
In one embodiment, the consistency of the configuration file is checked with an MD5 tool.
Step S130: and sending a test instruction to the tester, and monitoring the process and the log file generated by the process.
The controller sends a test instruction to the tester, and marks the beginning of the test process. At this point, the control machine will monitor the processes generated by the test machine, as well as the log files generated by the processes.
Step S140: if the process and the log file generated by the process are abnormal, checking a self-optimization failure parameter F;
when the testing machine passes a round of testing through the current configuration file and the test script file, the process or the log file generated by the process is not found to have abnormality, so that the server can be qualified as the current configuration testing environment. However, if the test result of this round represents the best test performance of the server, it is necessary to check the self-optimization failure parameter F in the configuration file specdevice_ssj.
However, if an abnormality occurs in a process or a log file generated by the process, it is necessary to identify the abnormality and perform a corresponding operation with respect to the abnormality.
The specific contents are as follows:
if the first preset keyword is retrieved, updating the self-optimization failure parameter F in the configuration file, reducing the pressure load value, and then repeatedly executing from the step S120;
if the second preset keyword is retrieved, updating the self-optimization failure parameter F in the test script, increasing the size of the memory pool, and then repeatedly executing from the step S120;
if the third preset keyword is retrieved, the testing machine is prompted to disconnect, testing is terminated, and the current configuration is reserved.
In one embodiment, the first preset keyword is "Sample Fail", and when the "Sample Fail" keyword is retrieved, the self-optimization failure parameter F in the configuration file specheader_ssj. Meanwhile, the number of pressure load values (hereinafter referred to as "wasehouses") is reduced, and the modification rule for the wasehouses is: after the CPU core number of the tester is obtained, the lscpu|grep core is decreased according to the multiple of the core number. Then repeatedly executing from the synchronous start of the configuration file;
the second preset keyword is "OutOfMemory", and when the "OutOfMemory" keyword is retrieved, the self-optimization failure parameter F in the test script (runssj.bat) is updated, and f=f+1. Meanwhile, the size of the memory pool (hereinafter, xmx) is increased, and each increased reference is: the total memory acquired by the server is divided by the number of processes and then divided by the number of cores bound by each process. The total memory of the server is obtained by the control machine, the process number is the JVM number in the configuration file, and the core number is the binding number in the task command. Then repeatedly executing from the synchronous start of the configuration file;
and the third preset keyword is 'Connect Fail', and when the 'Connect Fail' keyword is retrieved, the tester is prompted to disconnect, the test is terminated, and the current configuration is reserved.
It should be noted that "Connect Fail" is caused by an abnormality in the physical connection between the systems, and does not belong to an abnormality of the configuration file. Thus, the current configuration is preserved so that testing continues after exception removal.
Step S150: if the self-optimization failure parameter F=0, the pressure value parameter is increased, and then the repeated execution is started from the synchronization of the configuration files;
if the self-optimization failure parameter f=0 is detected in the configuration file specheader_ssj.tips, it is indicated that no exception condition occurs in the process or the log file generated by the process in the previous test, and the server may exhibit better performance in the test. At this time, after the pressure load parameter wasehouse is increased, the execution is repeated from the start of the synchronization of the configuration file, so that the optimal performance of the server can be obtained.
The modification way of the wasehouse is as follows: increment by a multiple of the tester CPU core number lscpu|grep core.
If the self-optimization failure parameter F is more than 0, terminating the test and outputting a test report;
if the self-optimization failure parameter F >0, the test environment is configured as the test environment which can reach the best test performance by the server. Because the server has an abnormal condition in the previous test, that is, the server can not complete the test task at that time, corresponding to the configuration of the test environment when the abnormal condition occurs. After debugging through step S140, the test is passed. Step S140 is a process of debugging from a severe environment to a relaxed environment. The test environment configuration is gradually adjusted downwards from the environment configuration of the server which does not pass the test, and the obtained first pass test environment configuration can represent the optimal performance of the server.
In another embodiment, as shown in fig. 4, a server testing method includes:
step S210: the testing machine receives the configuration file transmitted from the control machine for the control machine to download and check;
step S220: clearing the java process;
step S230: and acquiring a test instruction sent by the control machine, creating a process, and generating a log file by the process so as to enable the control machine to monitor the process and the log file generated by the process.
In another embodiment, as shown in fig. 5, a server testing apparatus includes a controller 01, the controller 01 including: the system comprises a self-checking module 100, a hardware parameter acquisition module 110, a configuration file synchronization module 120, an instruction module 130, a monitoring module 140, a parameter checking module 150, a self-optimizing module 160 and a report generating module 170;
the self-checking module 100 is used for self-checking and checking the connection of the test system;
a hardware parameter obtaining module 110, configured to obtain a test hardware parameter;
a profile synchronization module 120, configured to perform profile synchronization;
an instruction module 130, configured to issue a test instruction to the tester;
a monitoring module 140 for monitoring the process and log files generated by the process;
a parameter checking module 150, configured to check whether the self-optimization failure parameter F is greater than 0;
a self-optimizing module 160; for increasing the pressure value parameter;
the report generating module 170 is configured to generate a test report.
In one embodiment, the monitoring module includes: an abnormality determination sub-module 141, an abnormality identification sub-module 142, and an abnormality handling sub-module 143;
an anomaly determination sub-module 141, configured to determine whether an anomaly exists in a process or a log file generated by the process;
an anomaly identification sub-module 142, configured to retrieve a preset keyword and identify anomalies;
the anomaly handling sub-module 143 is configured to update the self-optimization failure parameter F in the configuration file when the first preset keyword is retrieved, reduce the pressure load value, and then start to perform repeated execution from the synchronization of the configuration file;
when the second preset keyword is searched, updating a self-optimization failure parameter F in the test script, increasing the size of the memory pool, and then repeatedly executing from the step of synchronizing the configuration files;
and when the third preset keyword is retrieved, prompting the testing machine to disconnect, terminating the test and reserving the current configuration.
In another embodiment, as shown in fig. 6, a server testing apparatus includes a tester 02, the tester 02 including: the system comprises a configuration file receiving module 210, a process clearing module 220, an instruction acquisition module 230, a process creation module 240 and a log saving module 250;
a configuration file receiving module 210, configured to receive, by the testing machine, a configuration file transmitted from the controller, for the controller to download and check;
the process clearing module 220 is configured to clear a java process;
the instruction acquisition module 230 is configured to acquire a test instruction sent by the controller;
a process creation module 240 for creating a process; for the control machine to monitor the process;
the log saving module 250 is configured to save a log file generated by the process, so that the control machine monitors the log file generated by the process.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present invention, which is not described herein.
Example 1
Firstly, self-checking the built SPEC Power testing environment, and checking the connection of a testing system. And confirming whether the system is connected correctly or not for verification. And (5) performing connection verification on the power meter, the thermometer, the controller and the testing machine.
And carrying out the previous step, and obtaining the test hardware parameters.
Acquiring the hardware parameters of the test refers to acquiring the hardware parameters of the test machine, and configuring the acquired hardware parameters related to the test in a configuration file.
And acquiring the CPU core number of the tester and the total memory of the server, wherein the CPU core number and the total memory of the server are used as the basis of self-optimization.
And carrying out the last step of configuration file synchronization.
Firstly, transmitting a configuration file to a testing machine; secondly, downloading the configuration file from the testing machine; thirdly, an MD5 checking tool is adopted to check the consistency of the configuration files transmitted to the testing machine and the configuration files sent by the control machine.
And the step of receiving, namely sending a test instruction to the tester, and monitoring the process and the log file generated by the process.
The last step is carried out, if the process and the log file generated by the process are abnormal, the self-optimization failure parameter F is checked; if the process or the log file generated by the process is abnormal, the abnormality needs to be identified, and corresponding operation is performed on the abnormality.
The specific contents are as follows:
if the first preset keyword is searched, updating a self-optimization failure parameter F in the configuration file, reducing a pressure load value, and then repeatedly executing from the synchronization of the configuration file;
if the second preset keyword is searched, updating a self-optimization failure parameter F in the test script, increasing the size of the memory pool, and then repeatedly executing from the synchronous start of the configuration file;
if the third preset keyword is retrieved, the testing machine is prompted to disconnect, testing is terminated, and the current configuration is reserved.
If the "Sample Fail" keyword is retrieved, the self-optimization failure parameter F in the configuration file specheader_ssj.tips is updated, and f=f+1. Meanwhile, the number of pressure load values (hereinafter referred to as "wasehouses") is reduced, and the modification rule for the wasehouses is: after the CPU core number of the tester is obtained, the lscpu|grep core is decreased according to the multiple of the core number. Then repeatedly executing from the synchronous start of the configuration file;
if the "OutOfMemory" keyword is retrieved, the self-optimization failure parameter F in the test script (runssj.bat) is updated, and f=f+1. Meanwhile, the size of the memory pool (hereinafter, xmx) is increased, and each increased reference is: the total memory acquired by the server is divided by the number of processes and then divided by the number of cores bound by each process. The total memory of the server is obtained by the control machine, the process number is the JVM number in the configuration file, and the core number is the binding number in the task command. Then repeatedly executing from the synchronous start of the configuration file;
and if the 'Connect Fail' keyword is retrieved, prompting the testing machine to disconnect, terminating the test and reserving the current configuration.
If the self-optimization failure parameter f=0 is detected in the configuration file specpilot_ssj.tips, the execution is repeated from the synchronization of the configuration file after the pressure load parameter warehouse is increased, so as to obtain the best performance of the server.
The modification way of the wasehouse is as follows: increment by a multiple of the tester CPU core number lscpu|grep core.
If the self-optimization failure parameter F is greater than 0, the test is terminated, and a test report is output.
Example two
Firstly, the testing machine receives a configuration file transmitted from the control machine for the control machine to download and check;
the previous step is carried out, and the java process is emptied;
and receiving the last step, acquiring a test instruction sent by the control machine, creating a process, and generating a log file by the process so as to enable the control machine to monitor the process and the log file generated by the process.
Example III
Firstly, self-checking the built SPEC Power testing environment, and checking the connection of a testing system. And confirming whether the system is connected correctly or not for verification. And (5) performing connection verification on the power meter, the thermometer, the controller and the testing machine.
And carrying out the previous step, and obtaining the test hardware parameters.
Acquiring the hardware parameters of the test refers to acquiring the hardware parameters of the test machine, and configuring the acquired hardware parameters related to the test in a configuration file.
And acquiring the CPU core number of the tester and the total memory of the server, wherein the CPU core number and the total memory of the server are used as the basis of self-optimization.
And carrying out the last step of configuration file synchronization.
The control machine transmits the configuration file to the testing machine;
the testing machine receives the configuration file transmitted from the control machine for the control machine to download and check;
the control machine downloads the configuration file from the test machine;
and (3) checking the consistency of the configuration file transmitted to the testing machine and the configuration file sent by the control machine by adopting an MD5 checking tool.
The step of receiving, namely, the testing machine empties the java process;
and the step of receiving, namely sending a test instruction to the tester, and monitoring the process and the log file generated by the process.
And the test machine acquires a test instruction sent by the control machine, creates a process, and generates a log file by the process so that the control machine can monitor the process and the log file generated by the process.
The last step is carried out, if the process and the log file generated by the process are abnormal, the self-optimization failure parameter F is checked; if the process or the log file generated by the process is abnormal, the abnormality needs to be identified, and corresponding operation is performed on the abnormality.
The specific contents are as follows:
if the first preset keyword is searched, updating a self-optimization failure parameter F in the configuration file, reducing a pressure load value, and then repeatedly executing from the synchronization of the configuration file;
if the second preset keyword is searched, updating a self-optimization failure parameter F in the test script, increasing the size of the memory pool, and then repeatedly executing from the synchronous start of the configuration file;
if the third preset keyword is retrieved, the testing machine is prompted to disconnect, testing is terminated, and the current configuration is reserved.
If the "Sample Fail" keyword is retrieved, the self-optimization failure parameter F in the configuration file specheader_ssj.tips is updated, and f=f+1. Meanwhile, the number of pressure load values (hereinafter referred to as "wasehouses") is reduced, and the modification rule for the wasehouses is: after the CPU core number of the tester is obtained, the lscpu|grep core is decreased according to the multiple of the core number. Then repeatedly executing from the synchronous start of the configuration file;
if the "OutOfMemory" keyword is retrieved, the self-optimization failure parameter F in the test script (runssj.bat) is updated, and f=f+1. Meanwhile, the size of the memory pool (hereinafter, xmx) is increased, and each increased reference is: the total memory acquired by the server is divided by the number of processes and then divided by the number of cores bound by each process. The total memory of the server is obtained by the control machine, the process number is the JVM number in the configuration file, and the core number is the binding number in the task command. Then repeatedly executing from the synchronous start of the configuration file;
and if the 'Connect Fail' keyword is retrieved, prompting the testing machine to disconnect, terminating the test and reserving the current configuration.
If the self-optimization failure parameter f=0 is detected in the configuration file specpilot_ssj.tips, the execution is repeated from the synchronization of the configuration file after the pressure load parameter warehouse is increased, so as to obtain the best performance of the server.
The modification way of the wasehouse is as follows: increment by a multiple of the tester CPU core number lscpu|grep core.
If the self-optimization failure parameter F is greater than 0, the test is terminated, and a test report is output.
Example IV
A server testing apparatus comprising a controller, the controller comprising: the system comprises a self-checking module 100, a hardware parameter acquisition module 110, a configuration file synchronization module 120, an instruction module 130, a monitoring module 140, a parameter checking module 150, a self-optimizing module 160 and a report generating module 170;
the self-checking module 100 is used for self-checking and checking the connection of the test system;
a hardware parameter obtaining module 110, configured to obtain a test hardware parameter;
a profile synchronization module 120, configured to perform profile synchronization;
an instruction module 130, configured to issue a test instruction to the tester;
a monitoring module 140 for monitoring the process and log files generated by the process;
a parameter checking module 150, configured to check whether the self-optimization failure parameter F is greater than 0;
a self-optimizing module 160; for increasing the pressure value parameter;
the report generating module 170 is configured to generate a test report.
Example five
A server testing apparatus comprising a testing machine, the testing machine comprising: the system comprises a configuration file receiving module 210, a process clearing module 220, an instruction acquisition module 230, a process creation module 240 and a log saving module 250;
a configuration file receiving module 210, configured to receive, by the testing machine, a configuration file transmitted from the controller, for the controller to download and check;
the process clearing module 220 is configured to clear a java process;
the instruction acquisition module 230 is configured to acquire a test instruction sent by the controller;
a process creation module 240 for creating a process; for the control machine to monitor the process;
the log saving module 250 is configured to save a log file generated by the process, so that the control machine monitors the log file generated by the process.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program loaded on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via a communication device, or from memory, or from ROM. The above-described functions defined in the methods of the embodiments of the present application are performed when the computer program is executed by an external processor.
It should be noted that, the computer readable medium of the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of the present application, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Whereas in embodiments of the present application, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (Radio Frequency), and the like, or any suitable combination thereof.
The computer readable medium may be contained in the server; or may exist alone without being assembled into the server. The computer readable medium carries one or more programs which, when executed by the server, cause the server to: acquiring a frame rate of an application on the terminal in response to detecting that a peripheral mode of the terminal is not activated; when the frame rate meets the screen-extinguishing condition, judging whether a user is acquiring screen information of the terminal; and controlling the screen to enter an immediate dimming mode in response to the judgment result that the user does not acquire the screen information of the terminal.
Computer program code for carrying out operations for embodiments of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing has outlined the detailed description of the preferred embodiment of the present application, and the detailed description of the principles and embodiments of the present application has been provided herein by way of example only to facilitate the understanding of the method and core concepts of the present application; also, as will occur to those of ordinary skill in the art, many modifications are possible in view of the teachings of the present application, both in the detailed description and the scope of its applications. In view of the foregoing, this description should not be construed as limiting the application.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (7)

1. A server testing method for testing a performance-to-power consumption ratio of a server, the server testing method comprising:
acquiring test hardware parameters;
synchronizing configuration files;
sending a test instruction to a test machine, and monitoring a process and a log file generated by the process;
if the process and the log file generated by the process are abnormal, checking a self-optimization failure parameter;
if the self-optimization failure parameter is 0, increasing a pressure value parameter, and then repeatedly executing from the synchronous start of the configuration file;
if the self-optimization failure parameter is greater than 0, terminating the test and generating a test report;
if the process and the log file generated by the process are abnormal, judging abnormal information and executing operation corresponding to the abnormal information;
the judging of the abnormal information and executing the operation corresponding to the abnormal information comprise the following steps:
if the first preset keyword is searched, updating self-optimization failure parameters in the configuration file, reducing the pressure load value, and then starting to execute repeatedly from the synchronization of the configuration file;
if the second preset keyword is searched, updating a self-optimization failure parameter in the test script, increasing the size of a memory pool, and then starting to execute repeatedly from the synchronous configuration file;
if the third preset keyword is retrieved, the testing machine is prompted to disconnect, testing is terminated, and the current configuration is reserved.
2. The method for testing a server according to claim 1, wherein before obtaining the test hardware parameters, further comprises: and performing self-checking, and checking the connection of the test system.
3. The server testing method according to claim 1, wherein the obtaining the test hardware parameters includes:
acquiring the number of cores of a CPU of the testing machine;
and acquiring the total memory of the server.
4. The server testing method according to claim 1, wherein said performing profile synchronization comprises:
transmitting the configuration file to a testing machine;
downloading the configuration file;
and checking the consistency of the configuration file.
5. A server testing method for testing a performance-to-power consumption ratio of a server, the server testing method comprising:
the testing machine receives the configuration file transmitted from the control machine so as to be downloaded and checked by the control machine;
clearing the java process;
acquiring a test instruction sent by the controller, creating a process, and generating a log file by the process so that the controller can monitor the process and the log file generated by the process;
before the test instruction sent by the controller is obtained, the server test method further comprises the following steps:
acquiring test hardware parameters;
synchronizing configuration files;
after obtaining the test instruction sent by the controller, the server test method further comprises the following steps:
the control machine monitors a process and a log file generated by the process;
if the process and the log file generated by the process are abnormal, checking a self-optimization failure parameter;
if the self-optimization failure parameter is 0, increasing a pressure value parameter, and then repeatedly executing from the synchronous start of the configuration file;
if the self-optimization failure parameter is greater than 0, terminating the test and generating a test report;
if the process and the log file generated by the process are abnormal, judging abnormal information and executing operation corresponding to the abnormal information;
the judging of the abnormal information and executing the operation corresponding to the abnormal information comprise the following steps:
if the first preset keyword is searched, updating self-optimization failure parameters in the configuration file, reducing the pressure load value, and then starting to execute repeatedly from the synchronization of the configuration file;
if the second preset keyword is searched, updating a self-optimization failure parameter in the test script, increasing the size of a memory pool, and then starting to execute repeatedly from the synchronous configuration file;
if the third preset keyword is retrieved, the testing machine is prompted to disconnect, testing is terminated, and the current configuration is reserved.
6. A server testing device for testing the performance-to-power consumption ratio of a server, characterized in that the server testing device comprises a controller;
the control machine includes: the system comprises a self-checking module, a hardware parameter acquisition module, a configuration file synchronization module, an instruction module, a monitoring module, a parameter checking module, a self-optimizing module and a report generating module;
the self-checking module is used for performing self-checking and checking the connection of the test system;
the hardware parameter acquisition module is used for acquiring test hardware parameters;
the configuration file synchronization module is used for performing configuration file synchronization;
the instruction module is used for sending a test instruction to the tester;
the monitoring module is used for monitoring a process and a log file generated by the process;
the parameter checking module is used for checking whether the self-optimization failure parameter is greater than 0;
the self-optimizing module; for increasing the pressure value parameter;
the report generation module is used for generating a test report;
wherein, the monitoring module includes: an abnormality judgment sub-module, an abnormality identification sub-module, and an abnormality response sub-module;
the abnormality judging submodule is used for judging whether the process or a log file generated by the process is abnormal or not;
the abnormality identification sub-module is used for retrieving preset keywords and identifying the abnormality;
the anomaly handling submodule is used for:
when a first preset keyword is searched, updating self-optimization failure parameters in a configuration file, reducing a pressure load value, and then starting to execute repeated execution from the synchronization of the configuration file;
when a second preset keyword is searched, updating a self-optimization failure parameter in the test script, increasing the size of a memory pool, and then starting to execute repeatedly from the synchronous configuration file;
and when the third preset keyword is retrieved, prompting the testing machine to disconnect, terminating the test and reserving the current configuration.
7. A server testing device for testing the performance-to-power consumption ratio of a server, characterized in that the server testing device comprises a tester;
the tester includes: the system comprises a configuration file receiving module, a process clearing module, an instruction acquisition module, a process creation module and a log storage module;
the configuration file receiving module is used for receiving the configuration file transmitted from the controller by the testing machine so as to be downloaded and checked by the controller;
the process clearing module is used for clearing the java process;
the instruction acquisition module is used for acquiring a test instruction sent by the controller;
the process creation module is used for creating a process; for the control machine to monitor the process;
the log saving module is used for saving the log file generated by the process so as to enable the control machine to monitor the log file generated by the process;
wherein, the server testing device further includes:
the hardware parameter acquisition module is used for acquiring test hardware parameters;
the configuration file synchronization module is used for synchronizing configuration files;
the control machine also comprises a monitoring module, wherein the monitoring module is used for:
monitoring a process and a log file generated by the process;
if the process and the log file generated by the process are abnormal, checking a self-optimization failure parameter;
if the self-optimization failure parameter is 0, increasing a pressure value parameter, and then repeatedly executing from the synchronous start of the configuration file;
if the self-optimization failure parameter is greater than 0, terminating the test and generating a test report;
if the process and the log file generated by the process are abnormal, judging abnormal information and executing operation corresponding to the abnormal information;
the judging of the abnormal information and executing the operation corresponding to the abnormal information comprise the following steps:
if the first preset keyword is searched, updating self-optimization failure parameters in the configuration file, reducing the pressure load value, and then starting to execute repeatedly from the synchronization of the configuration file;
if the second preset keyword is searched, updating a self-optimization failure parameter in the test script, increasing the size of a memory pool, and then starting to execute repeatedly from the synchronous configuration file;
if the third preset keyword is retrieved, the testing machine is prompted to disconnect, testing is terminated, and the current configuration is reserved.
CN202111432937.2A 2021-11-29 2021-11-29 Server testing method and device Active CN114138578B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111432937.2A CN114138578B (en) 2021-11-29 2021-11-29 Server testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111432937.2A CN114138578B (en) 2021-11-29 2021-11-29 Server testing method and device

Publications (2)

Publication Number Publication Date
CN114138578A CN114138578A (en) 2022-03-04
CN114138578B true CN114138578B (en) 2024-01-12

Family

ID=80389210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111432937.2A Active CN114138578B (en) 2021-11-29 2021-11-29 Server testing method and device

Country Status (1)

Country Link
CN (1) CN114138578B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182288A (en) * 2014-08-18 2014-12-03 浪潮电子信息产业股份有限公司 Method for automatically testing power consumption of server cluster system
CN104184631A (en) * 2014-09-01 2014-12-03 浪潮电子信息产业股份有限公司 Method for testing performance per watt of server cluster system through SPECPOWER
CN104572419A (en) * 2015-01-30 2015-04-29 浪潮电子信息产业股份有限公司 Method for testing dynamic power consumption of servers
CN104598273A (en) * 2015-01-08 2015-05-06 浪潮电子信息产业股份有限公司 Method for optimizing and testing complete machine by specpower
CN108874602A (en) * 2018-06-15 2018-11-23 郑州云海信息技术有限公司 It a kind of automatic setting and configures IMDT and collects the method and system of information
CN110442491A (en) * 2019-07-09 2019-11-12 苏州浪潮智能科技有限公司 A kind of method based on SPECPower testing server performance peak value, equipment and readable medium
CN111767957A (en) * 2020-07-01 2020-10-13 中国银行股份有限公司 Method and device for detecting log abnormity, storage medium and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182288A (en) * 2014-08-18 2014-12-03 浪潮电子信息产业股份有限公司 Method for automatically testing power consumption of server cluster system
CN104184631A (en) * 2014-09-01 2014-12-03 浪潮电子信息产业股份有限公司 Method for testing performance per watt of server cluster system through SPECPOWER
CN104598273A (en) * 2015-01-08 2015-05-06 浪潮电子信息产业股份有限公司 Method for optimizing and testing complete machine by specpower
CN104572419A (en) * 2015-01-30 2015-04-29 浪潮电子信息产业股份有限公司 Method for testing dynamic power consumption of servers
CN108874602A (en) * 2018-06-15 2018-11-23 郑州云海信息技术有限公司 It a kind of automatic setting and configures IMDT and collects the method and system of information
CN110442491A (en) * 2019-07-09 2019-11-12 苏州浪潮智能科技有限公司 A kind of method based on SPECPower testing server performance peak value, equipment and readable medium
CN111767957A (en) * 2020-07-01 2020-10-13 中国银行股份有限公司 Method and device for detecting log abnormity, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN114138578A (en) 2022-03-04

Similar Documents

Publication Publication Date Title
EP3591485B1 (en) Method and device for monitoring for equipment failure
CN111416821A (en) Internet of things equipment information acquisition method, system and device
CN106897095B (en) Method and device for hot repairing application program, readable storage medium and computing equipment
CN111666217B (en) Method and apparatus for testing code
CN108108296B (en) Cloud testing method, server and client
US8661293B2 (en) Test architecture based on intelligent test sequence
CN112269697B (en) Equipment storage performance testing method, system and related device
CN114138578B (en) Server testing method and device
CN116301997A (en) Upgrading method, device, equipment and medium of controller
CN110543418A (en) database performance test method, system and storage medium
CN115952098A (en) Performance test tuning scheme recommendation method and system
CN115437865A (en) Method, device, equipment and medium for testing abnormal power failure of hard disk
CN110580216A (en) application extraction and detection method and device
CN114003480A (en) APP starting time monitoring system and method
CN111737129A (en) Service control method, service control device, computer readable medium and electronic equipment
CN116401113B (en) Environment verification method, device and medium for heterogeneous many-core architecture acceleration card
CN113110955B (en) System disk repair method, storage medium and device
CN117194390B (en) Database migration method and device
CN113157558B (en) System testing method and device
CN109871310B (en) Version quality testing method and device
CN117152861A (en) Automatic inspection method, device, electronic equipment and computer readable medium
CN114675844A (en) Deployment method, device, equipment, medium and product of micro-service application
CN117687853A (en) Firmware detection method, device, equipment and medium
CN115203158A (en) Data comparison method, device, equipment and storage medium
CN115098394A (en) Test method, test device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant