CN114138578A - Server testing method and device - Google Patents

Server testing method and device Download PDF

Info

Publication number
CN114138578A
CN114138578A CN202111432937.2A CN202111432937A CN114138578A CN 114138578 A CN114138578 A CN 114138578A CN 202111432937 A CN202111432937 A CN 202111432937A CN 114138578 A CN114138578 A CN 114138578A
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.)
Granted
Application number
CN202111432937.2A
Other languages
Chinese (zh)
Other versions
CN114138578B (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

Images

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. The method comprises the following steps: performing self-checking, checking the connection of the test system, and acquiring test hardware parameters; carrying out configuration file synchronization; sending a test instruction to a tester, and monitoring a process and a log file generated by the process; if the process and the log file generated by the process are not abnormal, checking a self-optimization failure parameter F; if the self-optimization failure parameter F is 0, increasing a pressure value parameter, and then starting to execute repeatedly from the synchronization of the configuration file; if the self-optimization failure parameter F is larger than 0, terminating the test and generating a test report. The method disclosed by the invention has the advantages that the performance power consumption of the server has a self-optimization function compared with the standard test, and the automation degree and the test efficiency of the test are improved.

Description

Server testing method and device
Technical Field
The invention relates to the technical field of servers, in particular to a server testing method and device.
Background
With the large-scale popularization and application of emerging technologies such as 5G and cloud computing, the user demand is increasing in geometric scale, the data volume processed by a data center is rapidly increased, the corresponding power consumption is also rapidly increased, and the outstanding energy consumption problem is brought. Servers, as an important component of data processing, account for 40% -50% of the total power consumption. In the face of dual challenges of server performance and power consumption, on one hand, continuous iteration updating in the aspect of server technology is needed, and a higher performance-power consumption ratio is sought; on the other hand, a reliable testing method is needed to accurately and efficiently test the performance and power consumption of the server so as to objectively reflect the performance/power consumption index of the server.
The SPEC Power test (standard performance Evaluation Corporation Power test) is a performance/Power consumption benchmark test for evaluating the Power consumption of a server running a Java-based application, and is a commercially accepted standard for testing the Power consumption of servers. The test results represent product competitiveness. In the present SPEC Power test, as shown in fig. 1, a controller monitors the progress of a tester, and if the test is normal, data collection and report generation are performed after the test is finished; if the test is abnormal, the controller directly sends out a test interrupt instruction, the test is quitted, the configuration parameters are not updated automatically, and the test function is restarted. Moreover, the exception of the configuration file cannot be located in the test process. Meanwhile, frequent interruption of the test will result in inconsistent test process; the repeated debugging of the configuration parameters also seriously affects the testing efficiency.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a server testing method and apparatus, so as to overcome the problem that the prior art does not have a self-optimization testing function when performing a performance/power consumption ratio test on a server.
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 power consumption ratio of a server, and includes:
acquiring test hardware parameters;
carrying out configuration file synchronization;
sending a test instruction to a tester, and monitoring a process and a log file generated by the process;
if the process and the log file generated by the process are not abnormal, checking a self-optimization failure parameter F;
if the self-optimization failure parameter F is 0, increasing the pressure value parameter, and then starting to execute repeatedly from the synchronization of the configuration files;
if the self-optimization failure parameter F is larger than 0, the test is terminated, and a test report is generated.
Further, before obtaining the test hardware parameter, the method further includes: 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, the determining the abnormal information and performing the operation corresponding to the abnormal information includes:
if the first preset keyword is retrieved, updating a self-optimization failure parameter F in the configuration file, reducing a pressure load value, and then starting to execute repeatedly from the synchronization of the configuration file;
if the second preset keyword is retrieved, updating a self-optimization failure parameter F in the test script, increasing the size of a memory pool, and then starting to execute repeatedly from the synchronization of the configuration file;
and if the third preset keyword is searched, prompting the test machine to disconnect, terminating the test and keeping the current configuration.
Further, the acquiring the test hardware parameters comprises:
acquiring the core number of a CPU of a tester;
and acquiring the total memory of the server.
Further, synchronizing the configuration file comprises:
transmitting the configuration file to a 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 power consumption ratio of a server, and includes:
the test machine receives the configuration file transmitted from the control machine so as to be downloaded and verified by the control machine;
emptying 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 that the control machine can 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 power consumption ratio of a server, including a controller;
this controlling 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 generation 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 synchronizing the configuration files;
the instruction module is used for sending a test instruction to the test machine;
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 larger than 0;
a self-optimization 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 handling sub-module;
the abnormity judgment submodule is used for judging whether the process or the log file generated by the process is abnormal or not;
the abnormity identification submodule is used for retrieving preset keywords and identifying abnormity;
an exception handling submodule for
When the first preset keyword is retrieved, updating a self-optimization failure parameter F in the configuration file, reducing a pressure load value, and then starting to execute repeatedly from the synchronization of the configuration file;
when a second preset keyword is retrieved, updating a self-optimization failure parameter F in the test script, increasing the size of a memory pool, and then starting to execute repeatedly from the synchronization of the configuration file;
and when the third preset keyword is retrieved, prompting the test machine to disconnect, terminating the test and keeping the current configuration.
In a fourth aspect, a server testing apparatus is provided for testing a performance power consumption ratio of a server, including a testing machine;
this test machine includes: the system comprises a configuration file receiving module, a process clearing module, an instruction obtaining module, a process creating module and a log saving module;
the configuration file receiving module is used for receiving the configuration file transmitted from the control machine by the testing machine so as to be downloaded and verified by the control machine;
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 storage module is used for storing the log file generated by the process so that the controller can monitor the log file generated by the process.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
1. the server performance power consumption ratio standard test with the self-optimization function is provided, and under the condition that the current test is not abnormal, the configuration parameters are automatically updated after the current test is terminated, and a new test is started. The efficiency and the degree of automation of the test are improved;
2. the method has a positioning function for the abnormal problem 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. the method improves the mode that the test is exited when the abnormality is detected in the prior art, and ensures the continuity of the test process.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a SPEC Power test performed on a server according to the prior art;
fig. 2 is a schematic flow chart of control testing of a server testing method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of configuration file synchronization according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a test of a server test method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a control engine module of a server testing device according to an embodiment of the present invention;
FIG. 6 is a diagram of a testing machine module of a server testing device according to an embodiment of the present invention;
Detailed Description
In order to make 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 a part of examples of the present invention, and not all examples. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Unless otherwise defined, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure belongs. The use of "first," "second," and similar terms in this disclosure is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. Also, the use of the terms "a," "an," or "the" and similar referents do not denote a limitation of quantity, but rather denote the presence of at least one. The reference numerals in the drawings in the specification merely indicate the distinction between the respective functional components or modules, and do not indicate the logical relationship between the components or modules. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
Hereinafter, various embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. It is to be noted 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, the SPEC Power test method used by the server lacks a self-optimization function, so that the automation degree of the test process is low; and the abnormal conditions occurring in the test period can not be positioned and identified, the abnormal conditions are usually dealt with by adopting a termination test mode, the test process is frequently terminated, and the test efficiency is seriously influenced. The embodiment of the invention discloses a server testing method and a 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 to check the connection of the test system;
step S110: acquiring test hardware parameters;
step S120: carrying out configuration file synchronization;
step S130: sending a test instruction to a tester, 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 not abnormal, checking a self-optimization failure parameter F;
step S150: if the self-optimization failure parameter F is 0, increasing the pressure value parameter, and then repeating the step S120;
step S160: if the self-optimization failure parameter F is larger 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.
Since the SPEC Power test environment needs to be physically built, it is necessary to first verify whether the system is properly connected before the test is performed. The method comprises the steps of starting a self-checking module, and carrying out connection checking on a power meter, a temperature meter, a control machine and a testing machine.
In one embodiment, connection verification is performed on the power meter, the temperature meter, the control machine and the testing machine.
Step S110: and acquiring test hardware parameters.
Acquiring the test hardware parameters means acquiring the hardware parameters of the tester and configuring the acquired hardware parameters related to the test in a configuration file.
Hardware parameters associated with testing include, but are not limited to: CPU core number of the tester and total memory of the server.
Before the self-optimization function is operated, hardware parameters related to testing are obtained and used as the basis of self-optimization. Is the basis of the self-optimization function of the method.
In one embodiment, the acquired test hardware parameters are: CPU core number of the tester and total memory of the server.
Step S120: and carrying out configuration file synchronization. The specific steps are shown in fig. 3, and include:
step S121: transmitting the configuration file to a testing machine;
step S122: downloading a configuration file;
step S123: and checking the consistency of the configuration files.
The tester is connected to the controller via a network, and in order to obtain the configuration file from the tester, the controller needs to transmit the configuration file to the tester in step S121. In order to ensure the consistency between the configuration file received by the tester and the configuration file sent by the controller, the configuration file is downloaded from the tester in step S122, and then the consistency of the configuration file is verified in step S123. For the tool for checking the consistency of the configuration files, checking tools such as MD5, SHA1, CRC32, CRC16, CRC8 and the like can be used, the checking result is compared with the pre-stored reference result, and if the two are the same, it indicates that the configuration file transmitted to the tester and the configuration file sent by the controller have consistency.
The consistency of the configuration file is checked in one embodiment with the MD5 tool.
Step S130: test instructions are issued to the tester and the process and log files generated by the process are monitored.
The control machine sends a test instruction to the tester, which marks the beginning of the test process. At this point, the control engine will monitor the processes generated by the tester, as well as the log files generated by the processes.
Step S140: if the process and the log file generated by the process are not abnormal, checking a self-optimization failure parameter F;
when the test machine passes a round of test by using the current configuration file and the test script file, the server can be qualified in the currently configured test environment if no process or no abnormity exists in the log file generated by the process. However, if the test result in this round represents the optimal test performance of the server, the self-optimization failure parameter F in the SPECpower _ ssj.tips configuration file needs to be checked, and the step S150 is combined to perform further determination.
However, if an exception occurs in a process or a log file generated by the process, the exception needs to be identified, and a corresponding operation is performed for the exception.
The specific content is 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;
and if the third preset keyword is searched, prompting the test machine to disconnect, terminating the test and keeping the current configuration.
In one embodiment, the first predetermined keyword is "Sample Fail", and when the "Sample Fail" keyword is retrieved, the self-optimization failure parameter F in the profile SPECpower _ ssj.tips is updated, and F + 1. Meanwhile, the number of pressure load values (hereinafter referred to as: warthouse) is reduced, and the modification rule of warthouse is as follows: and acquiring the number of the CPU cores of the tester, and then decreasing the lscpu | grep core according to the multiple of the number of the cores. Then, the configuration file synchronization is carried out and the repeated execution is started;
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 is F + 1. Meanwhile, the size of the memory pool (hereinafter referred to as: Xmx) is increased, and the reference for each increase is as follows: and dividing the total memory acquired by the server by the number of processes and then by the number of cores bound by each process. The total memory of the server is obtained by the controller, the process number is the JVM number in the configuration file, and the core number is the binding number in the taskset command. Then, the configuration file synchronization is carried out and the repeated execution is started;
the third preset keyword is 'Connect Fail', when the 'Connect Fail' keyword is retrieved, the test machine is prompted to disconnect, the test is terminated, and the current configuration is reserved.
It should be noted that "Connect Fail" is an exception that is caused by an exception occurring in a physical connection between systems and does not belong to a configuration file. Therefore, the current configuration is retained so that the test continues after exception rejection.
Step S150: if the self-optimization failure parameter F is 0, increasing the pressure value parameter, and then starting to execute repeatedly from the synchronization of the configuration files;
if the self-optimization failure parameter F is detected to be 0 in the configuration file SPECpower _ ssj.tips, it indicates that no exception 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, winehouse, is increased, the execution is repeated from the time of performing the profile synchronization, and the best performance of the server can be obtained.
The method for modifying the warthouse comprises the following steps: increment by a multiple of the tester CPU core number lscpu | grep core.
If the self-optimization failure parameter F is greater than 0, terminating the test and outputting a test report;
if the self-optimization failure parameter F >0, it indicates that the test environment at this time is configured as the test environment in which the server can achieve the best test performance. The server cannot complete the current test task because of the abnormal condition in the previous test, that is, the test environment configuration corresponding to the abnormal condition. After debugging is performed in step S140, the test can be passed. Step S140 is a process of debugging from a harsh environment to a moderate environment. And gradually adjusting the test environment configuration from the environment configuration in which the server does not pass the test, wherein the obtained first passing 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 test machine receives the configuration file transmitted from the control machine so that the control machine can download and check the configuration file;
step S220: emptying 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 that the control machine can 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, where the controller 01 includes: the system comprises a self-test 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-optimization module 160 and a report generation module 170;
the self-checking module 100 is used for performing self-checking and checking the connection of the test system;
a hardware parameter obtaining module 110, configured to obtain test hardware parameters;
a configuration file synchronization module 120, configured to synchronize configuration files;
an instruction module 130, configured to send a test instruction to the tester;
a monitoring module 140 for monitoring the processes and log files generated by the processes;
a parameter checking module 150 for checking whether the self-optimization failure parameter F is greater than 0;
a self-optimization module 160; for increasing the pressure value parameter;
and a report generating module 170 for generating a test report.
In one embodiment, the monitoring module comprises: an abnormality judgment sub-module 141, an abnormality identification sub-module 142, and an abnormality handling sub-module 142;
an anomaly determination submodule 141, configured to determine whether a process or a log file generated by the process is anomalous;
an anomaly identification submodule 142, configured to retrieve a preset keyword and identify an anomaly;
the exception handling sub-module 143 is configured to, when the first preset keyword is retrieved, update the self-optimization failure parameter F in the configuration file, reduce the pressure load value, and then start to execute repeatedly from the synchronization of the configuration file;
when a second preset keyword is retrieved, updating a self-optimization failure parameter F in the test script, increasing the size of a memory pool, and then starting to execute repeatedly from the synchronization of the configuration file;
and when the third preset keyword is retrieved, prompting the test machine to disconnect, terminating the test and keeping the current configuration.
In another embodiment, as shown in fig. 6, a server test apparatus includes a tester 02, where the tester 02 includes: a configuration file receiving module 210, a process clearing module 220, an instruction obtaining module 230, a process creating module 240 and a log saving module 250;
a configuration file receiving module 210, configured to receive, by the tester, the configuration file transmitted from the controller, so that the controller can download and verify the configuration file;
a process clearing module 220 for clearing the java process;
an instruction obtaining module 230, configured to obtain a test instruction sent by the controller;
a process creation module 240 for creating a process; for the control machine to monitor the process;
and a log saving module 250, configured to save the log file generated by the process, so that the controller monitors the log file generated by the process.
All the above-mentioned optional technical solutions can be combined arbitrarily to form the optional embodiments of the present invention, and are not described herein again.
Example one
Firstly, self-checking is carried out on the built SPEC Power test environment, and connection of a test system is verified. And checking whether the system is connected correctly. And (4) performing connection verification on the power meter, the temperature meter, the controller and the tester.
And carrying out the previous step to obtain the test hardware parameters.
Acquiring the test hardware parameters means acquiring the hardware parameters of the tester and configuring the acquired hardware parameters related to the test in a configuration file.
And acquiring the number of CPU cores of the tester and the total memory of the server as a basis for self optimization.
And carrying out the last step to synchronize the configuration files.
Firstly, transmitting a configuration file to a testing machine; secondly, downloading the configuration file from the testing machine; third, the MD5 verification tool is used to verify the consistency of the configuration file transmitted to the tester and the configuration file sent by the controller.
And the next step is carried out, a test instruction is sent to the tester, and the process and the log file generated by the process are monitored.
Carrying out the previous step, and if the process and the log file generated by the process are not abnormal, checking a self-optimization failure parameter F; if the process or the log file generated by the process is abnormal, the abnormal is needed to be identified, and corresponding operation is performed according to the abnormal.
The specific content is as follows:
if the first preset keyword is retrieved, updating a self-optimization failure parameter F in the configuration file, reducing a pressure load value, and then starting to execute repeatedly from the synchronization of the configuration file;
if the second preset keyword is retrieved, updating a self-optimization failure parameter F in the test script, increasing the size of a memory pool, and then starting to execute repeatedly from the synchronization of the configuration file;
and if the third preset keyword is searched, prompting the test machine to disconnect, terminating the test and keeping the current configuration.
If the keyword "Sample Fail" is retrieved, the self-optimization failure parameter F in the profile SPECpower _ ssj.tips is updated, and F is F + 1. Meanwhile, the number of pressure load values (hereinafter referred to as: warthouse) is reduced, and the modification rule of warthouse is as follows: and acquiring the number of the CPU cores of the tester, and then decreasing the lscpu | grep core according to the multiple of the number of the cores. Then, the configuration file synchronization is carried out and the repeated execution is started;
when the "OutOfMemory" keyword is searched, the self-optimization failure parameter F in the test script (runssj.bat) is updated, and F is F + 1. Meanwhile, the size of the memory pool (hereinafter referred to as: Xmx) is increased, and the reference for each increase is as follows: and dividing the total memory acquired by the server by the number of processes and then by the number of cores bound by each process. The total memory of the server is obtained by the controller, the process number is the JVM number in the configuration file, and the core number is the binding number in the taskset command. Then, the configuration file synchronization is carried out and the repeated execution is started;
if the keyword 'Connect Fail' is searched, the test machine is prompted to disconnect, the test is terminated, and the current configuration is reserved.
In the previous step, if the self-optimization failure parameter F is detected to be 0 in the profile SPECpower _ ssj.pps, the pressure load parameter, warehouse, is increased, and then the process is repeated from the synchronization of the profiles to obtain the best performance of the server.
The method for modifying the warthouse comprises the following steps: increment by a multiple of the tester CPU core number lscpu | grep core.
If the self-optimization failure parameter F is larger than 0, the test is terminated, and a test report is output.
Example two
Firstly, a tester receives a configuration file transmitted from a controller so that the controller can download and verify the configuration file;
carrying out the previous step and emptying the java process;
and carrying out the last step, acquiring the 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.
EXAMPLE III
Firstly, self-checking is carried out on the built SPEC Power test environment, and connection of a test system is verified. And checking whether the system is connected correctly. And (4) performing connection verification on the power meter, the temperature meter, the controller and the tester.
And carrying out the previous step to obtain the test hardware parameters.
Acquiring the test hardware parameters means acquiring the hardware parameters of the tester and configuring the acquired hardware parameters related to the test in a configuration file.
And acquiring the number of CPU cores of the tester and the total memory of the server as a basis for self optimization.
And carrying out the last step to synchronize the configuration files.
The control machine transmits the configuration file to the test machine;
the test machine receives the configuration file transmitted from the control machine so that the control machine can download and check the configuration file;
the control machine downloads the configuration file from the testing machine;
the MD5 verification tool is used to verify the consistency of the configuration file transmitted to the tester and the configuration file sent by the controller.
Carrying out the previous step, and emptying the java process by the tester;
and the next step is carried out, a test instruction is sent to the tester, and the process and the log file generated by the process are monitored.
And in the previous step, the tester acquires the test instruction sent by the controller, creates a process, and generates a log file by the process so that the controller can monitor the process and the log file generated by the process.
Carrying out the previous step, and if the process and the log file generated by the process are not abnormal, checking a self-optimization failure parameter F; if the process or the log file generated by the process is abnormal, the abnormal is needed to be identified, and corresponding operation is performed according to the abnormal.
The specific content is as follows:
if the first preset keyword is retrieved, updating a self-optimization failure parameter F in the configuration file, reducing a pressure load value, and then starting to execute repeatedly from the synchronization of the configuration file;
if the second preset keyword is retrieved, updating a self-optimization failure parameter F in the test script, increasing the size of a memory pool, and then starting to execute repeatedly from the synchronization of the configuration file;
and if the third preset keyword is searched, prompting the test machine to disconnect, terminating the test and keeping the current configuration.
If the keyword "Sample Fail" is retrieved, the self-optimization failure parameter F in the profile SPECpower _ ssj.tips is updated, and F is F + 1. Meanwhile, the number of pressure load values (hereinafter referred to as: warthouse) is reduced, and the modification rule of warthouse is as follows: and acquiring the number of the CPU cores of the tester, and then decreasing the lscpu | grep core according to the multiple of the number of the cores. Then, the configuration file synchronization is carried out and the repeated execution is started;
when the "OutOfMemory" keyword is searched, the self-optimization failure parameter F in the test script (runssj.bat) is updated, and F is F + 1. Meanwhile, the size of the memory pool (hereinafter referred to as: Xmx) is increased, and the reference for each increase is as follows: and dividing the total memory acquired by the server by the number of processes and then by the number of cores bound by each process. The total memory of the server is obtained by the controller, the process number is the JVM number in the configuration file, and the core number is the binding number in the taskset command. Then, the configuration file synchronization is carried out and the repeated execution is started;
if the keyword 'Connect Fail' is searched, the test machine is prompted to disconnect, the test is terminated, and the current configuration is reserved.
In the previous step, if the self-optimization failure parameter F is detected to be 0 in the profile SPECpower _ ssj.pps, the pressure load parameter, warehouse, is increased, and then the process is repeated from the synchronization of the profiles to obtain the best performance of the server.
The method for modifying the warthouse comprises the following steps: increment by a multiple of the tester CPU core number lscpu | grep core.
If the self-optimization failure parameter F is larger than 0, the test is terminated, and a test report is output.
Example four
A server testing apparatus comprising a controller, the controller comprising: the system comprises a self-test 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-optimization module 160 and a report generation module 170;
the self-checking module 100 is used for performing self-checking and checking the connection of the test system;
a hardware parameter obtaining module 110, configured to obtain test hardware parameters;
a configuration file synchronization module 120, configured to synchronize configuration files;
an instruction module 130, configured to send a test instruction to the tester;
a monitoring module 140 for monitoring the processes and log files generated by the processes;
a parameter checking module 150 for checking whether the self-optimization failure parameter F is greater than 0;
a self-optimization module 160; for increasing the pressure value parameter;
and a report generating module 170 for generating a test report.
EXAMPLE five
A server testing apparatus comprising a tester, the tester comprising: a configuration file receiving module 210, a process clearing module 220, an instruction obtaining module 230, a process creating module 240 and a log saving module 250;
a configuration file receiving module 210, configured to receive, by the tester, the configuration file transmitted from the controller, so that the controller can download and verify the configuration file;
a process clearing module 220 for clearing the java process;
an instruction obtaining module 230, configured to obtain a test instruction sent by the controller;
a process creation module 240 for creating a process; for the control machine to monitor the process;
and a log saving module 250, configured to save the log file generated by the process, so that the controller monitors the log file generated by the process.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams 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 illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means, or installed from the memory, or installed from the ROM. The computer program, when executed by an external processor, performs the above-described functions defined in the methods of embodiments of the present application.
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. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 embodiments of the 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. In embodiments of the present application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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, optical cables, RF (Radio Frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the server; or may exist separately and not be assembled into the server. The computer readable medium carries one or more programs which, when executed by the server, cause the server to: when the peripheral mode of the terminal is detected to be not activated, acquiring a frame rate of an application on the terminal; when the frame rate meets the screen information condition, judging whether a user is acquiring the 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 type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The technical solutions provided by the present application are introduced in detail, and specific examples are applied in the description to explain the principles and embodiments of the present application, and the descriptions of the above examples are only used to help understanding the method and the core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, the specific embodiments and the application range may be changed. In view of the above, the description should not be taken as limiting the application.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A server testing method for testing performance power consumption ratio of a server, the server testing method comprising:
acquiring test hardware parameters;
carrying out configuration file synchronization;
sending a test instruction to a tester, and monitoring a process and a log file generated by the process;
if the process and the log file generated by the process are not abnormal, checking a self-optimization failure parameter;
if the self-optimization failure parameter is 0, increasing a pressure value parameter, and then starting to execute repeatedly from the synchronization of the configuration file;
if the self-optimization failure parameter is larger than 0, terminating the test and generating a test report.
2. The method for testing the server according to claim 1, wherein before obtaining the testing hardware parameters, the method further comprises: and performing self-checking and checking the connection of the test system.
3. The server test method according to claim 1 or 2, wherein if the process and the log file generated by the process have an abnormality, abnormality information is determined, and an operation corresponding to the abnormality information is executed.
4. The method according to claim 3, wherein the determining the abnormal information and performing the operation corresponding to the abnormal information comprises:
if the first preset keyword is retrieved, updating a self-optimization failure parameter in the configuration file, reducing a pressure load value, and then starting to execute repeatedly from the synchronization of the configuration file;
if the second preset keyword is retrieved, 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 synchronization of the configuration file;
and if the third preset keyword is searched, prompting the test machine to disconnect, terminating the test and keeping the current configuration.
5. The method according to claim 1, wherein the obtaining the testing hardware parameters comprises:
acquiring the core number of a CPU of a tester;
and acquiring the total memory of the server.
6. The method according to claim 1, wherein the synchronizing the configuration files comprises:
transmitting the configuration file to a testing machine;
downloading the configuration file;
and checking the consistency of the configuration files.
7. A server testing method for testing performance power consumption ratio of a server, the server testing method comprising:
the testing machine receives the configuration file transmitted from the control machine so that the control machine can download and check the configuration file;
emptying 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 that the control machine can monitor the process and the log file generated by the process.
8. A server testing device is used for testing the performance power consumption ratio of a server and is characterized by comprising a controller;
the controlling 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 generation 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 the configuration files;
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-optimization module; for increasing the pressure value parameter;
and the report generating module is used for generating a test report.
9. The server testing device of claim 8, wherein the monitoring module comprises: an abnormality judgment sub-module, an abnormality identification sub-module and an abnormality handling sub-module;
the abnormity judgment submodule is used for judging whether the process or the log file generated by the process is abnormal or not;
the abnormity identification submodule is used for retrieving a preset keyword and identifying the abnormity;
the exception handling submodule is used for:
when a first preset keyword is retrieved, updating a self-optimization failure parameter in a configuration file, reducing a pressure load value, and then starting to execute repeatedly from the synchronization of the configuration file;
when a second preset keyword is retrieved, 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 synchronization of the configuration file;
and when the third preset keyword is retrieved, prompting the test machine to disconnect, terminating the test and keeping the current configuration.
10. A server testing device is used for testing the performance power consumption ratio of a server and is characterized by comprising a testing machine;
the testing machine comprises: the system comprises a configuration file receiving module, a process clearing module, an instruction obtaining module, a process creating module and a log saving module;
the configuration file receiving module is used for the testing machine to receive the configuration file transmitted from the control machine so as to be downloaded and verified by the control machine;
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 control machine;
the process creation module is used for creating a process; for the controller to monitor the process;
and the log storage module is used for storing the log file generated by the process so that the controller can monitor the log file generated by the process.
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 true CN114138578A (en) 2022-03-04
CN114138578B 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
CN114138578B (en) 2024-01-12

Similar Documents

Publication Publication Date Title
WO2017000424A1 (en) Protocol detection method and apparatus
EP2883143A1 (en) Performance tests in a continuous deployment pipeline
EP3591485B1 (en) Method and device for monitoring for equipment failure
CN113468009B (en) Pressure testing method and device, electronic equipment and storage medium
CN112269697B (en) Equipment storage performance testing method, system and related device
CN112380046B (en) Calculation result verification method, system, device, equipment and storage medium
CN110580220B (en) Method for measuring code segment execution time and terminal equipment
US8661293B2 (en) Test architecture based on intelligent test sequence
CN116401113B (en) Environment verification method, device and medium for heterogeneous many-core architecture acceleration card
CN116594657A (en) OTA upgrading method and device, vehicle and storage medium
CN114138578B (en) Server testing method and device
CN115952098A (en) Performance test tuning scheme recommendation method and system
CN115794525A (en) BMC (baseboard management controller) pressure testing method, device, equipment and storage medium
CN115509931A (en) System-based performance test method and device, electronic equipment and storage medium
CN116149709A (en) Firmware upgrading method, device, equipment and medium
CN114003419B (en) Method, system and device for automatically testing RAS characteristics of memory based on OSES
CN115437865A (en) Method, device, equipment and medium for testing abnormal power failure of hard disk
CN115203158A (en) Data comparison method, device, equipment and storage medium
CN115061921A (en) Automatic test method, device, electronic equipment and readable storage medium
CN115373923A (en) 0x7c error positioning method, device and medium
CN114116291B (en) Log detection method, log detection device, computer device and storage medium
CN115576821B (en) Verification method and device, electronic equipment and storage medium
CN114816876B (en) Automatic test system for server Redfish interface specifications
CN117193798A (en) Application deployment method, apparatus, device, readable storage medium and program product
CN117648252A (en) Function test method and device for software application, electronic equipment and storage 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