A BMC cold restart stress testing system and method
By designing the BMC cold restart stress testing system, the problems of low testing efficiency and insufficient coverage in the existing technology are solved, and automated testing and flexible configuration of multiple servers are realized, which improves the testing efficiency and fault positioning accuracy of BMC cold start.
Patent Information
- Application Number
- CN202111670985.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The existing BMC cold restart test is inefficient, cannot be tested in parallel, the test coverage is insufficient, and the parameters of the BMC server under test cannot be flexibly configured.
A BMC cold restart stress testing system was designed. Through the test host, the BMC cold start test script is automatically executed, the test results are obtained and the report is generated, and information comparison and fault location are compared with the host operating system of the tested server.
The simultaneous testing of multiple servers is realized, which improves the testing efficiency, increases the coverage of BMC interaction and status judgment, and provides flexible configuration parameter expansion.
Smart Images

Figure CN114546747B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer firmware, and in particular relates to a BMC cold restart stress testing system and method. Background Art
[0002] A BMC is a control unit deployed in a server with an independent power supply and I / O interface. It controls the server's sensors, hard drives, network, graphics cards, and other peripherals. Regardless of whether the server has an operating system installed or is powered on, the BMC monitors the server's operating status as long as it is powered on.
[0003] The BMC is directly connected to the host system's motherboard and can monitor the host's physical status, restart, reinstall the system, and even monitor the system screen via remote KVM. The BMC also has a built-in web server, allowing administrators to remotely log in to the BMC to manage server power, view logs, and perform other operations.
[0004] A BMC cold restart is the process of completely restarting the BMC. Because the BMC is equipped with numerous services, a large number of service processes are started sequentially during the BMC restart. If a process service encounters a problem during startup, the BMC will generally freeze, which can even cause the entire server to crash. Therefore, long-term, high-frequency cold restart testing can effectively verify the stability of the BMC system. Existing BMC cold restart testing is generally done manually, which has the following problems:
[0005] 1) During BMC cold restart stress testing, when multiple models are submitted for testing simultaneously, manual testing is inefficient and cannot be conducted in parallel. Therefore, only each model can be tested one by one, and other models need to wait for testing.
[0006] 2) The existing testing method checks BMC connectivity and command availability after restarting the BMC through IPMI. It does not collect BMC information or perform connectivity checks on interactions with the BMC at the system level, resulting in insufficient test coverage.
[0007] 3) The current test method cannot flexibly configure the parameters of the BMC of the server under test. Summary of the Invention
[0008] In view of this, the present invention provides a BMC cold restart stress testing system and method, which can improve the efficiency of BMC cold start testing, increase the coverage of BMC interaction and status judgment, and realize the flexible expansion of BMC configuration parameters.
[0009] A BMC cold restart stress testing system includes two types of equipment: a test host and a tested server. The test host can be connected to multiple tested servers via a network. The test host provides a writing environment for server BMC test scripts. Testers will write BMC cold restart test script instances. The completed script will be sent to the tested server via the test host. The test program of the tested server's host operating system will send test instructions to the BMC to execute the test script, obtain BMC test results, and automatically generate a test report to complete the BMC cold start test.
[0010] Furthermore, the test host includes a BMC test script library, a BMC test script issuing module, and a BMC test result collection module:
[0011] The BMC test script library includes scripts for BMC function and performance testing, especially the BMC cold start test script designed in the present invention;
[0012] The BMC test script sending module is used to send the test script to the server under test;
[0013] The BMC test result collection module is used to collect the BMC test results of all servers to be tested;
[0014] Furthermore, the server under test includes a host operating system and a BMC;
[0015] The host operating system is a software program that manages server hardware and software resources. It handles tasks such as managing and configuring memory, determining the priority of system resource supply and demand, controlling input and output devices, operating the network, and managing the file system. It also provides an interface for users to interact with the system. The BMC cold boot test program can be deployed and run in the host operating system.
[0016] The BMC is a control unit deployed on the server with an independent power supply and independent I / O interface. It can control the server's sensors, hard disk, network, graphics card and other peripherals. Regardless of whether the server has an operating system installed or is turned on, the server's operating status can be monitored as long as the baseboard management controller is powered on. The BMC is directly connected to the host system's motherboard and can monitor the host's physical status, restart, reinstall the system, and even monitor the system screen through the remote KVM function; the BMC has a built-in network server, and administrators can remotely log in to the BMC to manage the server's power supply and view logs.
[0017] Furthermore, a test script agent module, a cold start test script, a communication module, a test data storage module, a test data analysis module and a policy configuration module are deployed in the host operating system;
[0018] The test script agent module is used to receive the script sent by the test host and execute it;
[0019] The cold start test script is used to execute the BMC cold start instruction, and the script is received from the test host;
[0020] The communication module is used to send a command to the OS communication module of the BMC to obtain the cold start test information of the BMC;
[0021] The test data storage module is used to store the test data returned by the BMC OS communication module;
[0022] The test data analysis module is used to compare the BMC test data. If they are consistent, the cold start test has passed. If they are inconsistent, it indicates that the BMC is working abnormally after the cold start.
[0023] The policy configuration module is used to store the BMC cold start test policy, which includes a user name and password, cycle test data and test reference value;
[0024] Furthermore, the BMC includes a restart module, a configuration information module and an OS communication module:
[0025] The restart module is used to execute the command sent by the test script agent module, perform a cold restart of the BMC and send test information, the test information includes the current time, server hardware information and the number of remaining restarts;
[0026] The BMC configuration information module is used to store current BMC information, such as LAN info, mc info, sensor, sdr and other information;
[0027] The OS communication module is used to send BMC information to the operating system of the host machine.
[0028] A stress testing method based on cold restart of a server BMC, the implementation of which includes the following steps:
[0029] Step 1: The test host sends the BMC cold start script and related dependency libraries in the BCM test script library to the server under test through the BMC test script sending module to complete the environment configuration of the server under test;
[0030] Step 2: After receiving the cold start test script through the BMC test script agent module, the host operating system of the server to be tested will first notify the BMC to capture the benchmark information;
[0031] Step 3: The host operating system receives the benchmark information from the BMC. The test host prints the benchmark information to the screen through the BCM test result collection module and waits for the tester to confirm that the captured information is consistent with the actual configuration. Wait for 30 seconds. If there is no confirmation, it is assumed to be consistent.
[0032] Step 4: Read the cyclic test data in the strategy configuration module for testing;
[0033] Step 5: Determine whether the cycle test is greater than or equal to 1. If so, proceed to the next step; if not, upload the BMC cold start test results to the test host and proceed to step 14;
[0034] Step 6: The script agent module of the host operating system sends a cold restart command to the BMC. After receiving the command, the BMC performs a cold restart through the restart module. It determines whether the command execution is successful. If so, it proceeds to the next step. If not, it protects the site and ends the process.
[0035] Step 7: Check whether the BMC has recovered. Check every 10 seconds for 300 seconds. Send raw 0x06 0x01 in-band and SSH to the BMC system to check whether the web service has recovered.
[0036] Step 8: Determine whether the BMC has recovered after 300 seconds. If so, proceed to the next step. If not, secure the site and end the process.
[0037] Step 9. Use the curl command to collect BMC WEB page related information, including the host name, server information, and BMC information on the server overview page. The test data storage module stores the collected information in a folder named loop_num+ip.
[0038] Step 10: Send IPMI commands to the BMC through the BMC communication module to obtain the sensor, sdr, mc info, and LAN info information stored in the BMC information configuration module. The test data storage module stores the collected information in a folder named loop_num+ip.
[0039] Step 11: The test data analysis module compares the collected information with the baseline information;
[0040] Step 12: Determine whether the current information is consistent with the baseline information. If so, proceed to the next step; if not, proceed to step 14.
[0041] Step 13: Subtract 1 from the number of cycle tests and go to step 5;
[0042] Step 14: The test host collects the BMC cold restart test results of all servers under test through the BCM test result collection module;
[0043] Step 15: The process ends.
[0044] Beneficial effects:
[0045] 1. The BMC cold restart stress testing system of the present invention can perform BMC cold start tests on multiple servers under test simultaneously in an automated manner through a single test host, which improves testing efficiency compared to manual remote single-server testing.
[0046] 2. The BMC cold restart stress testing method of the present invention checks the connectivity between the operating system layer and the BMC during the BMC cold restart process. If an abnormality is found, the script will be terminated and relevant log information will be recorded, which can provide more accurate and sufficient information for BMC fault location.
[0047] 3. The BMC restart module of the present invention and the test data analysis module of the tested server work together to compare the server information obtained after the BMC cold restart with the benchmark information, providing a method for quickly judging whether the working status is normal after the BMC cold restart. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a diagram of the stress test system framework based on server BMC cold restart;
[0049] Figure 2 This is a flow chart of the stress testing method based on server BMC cold restart. DETAILED DESCRIPTION
[0050] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0051] The present invention provides a BMC cold restart stress test system and method, as shown in the attached Figure 1 As shown in the figure, the BMC cold restart stress test system includes two types of equipment: a test host and a server under test. The test host can be connected to multiple servers under test through the network. The test host provides an environment for writing test scripts for the server BMC. Testers will write test script instances for BMC cold start. The completed script will be sent to the server under test through the test host. The test program of the host operating system of the server under test will send test instructions to the BMC to execute the test script, obtain the BMC test results, and automatically generate a test report to complete the BMC cold start test.
[0052] The test host includes the BMC test script library, the BMC test script delivery module, and the BMC test result collection module:
[0053] BMC test script library, including scripts for BMC function and performance testing, especially the BMC cold start test script designed in the present invention;
[0054] The BMC test script sending module is used to send the test script to the server under test;
[0055] The BMC test result collection module is used to collect the BMC test results of all servers to be tested;
[0056] The server under test includes a host operating system and a baseboard management (BMC). The host operating system is the software program that manages the server's hardware and software resources. It handles tasks such as managing and configuring memory, determining the priority of system resource supply and demand, controlling input and output devices, operating the network, and managing the file system. It also provides an interface for users to interact with the system. The BMC cold start test program can be deployed and run in the host operating system. The BMC is a control unit deployed on the server with an independent power supply and independent I / O interface. It can control the server's sensors, hard drives, network, graphics cards, and other peripherals. Regardless of whether the server has an operating system installed or is powered on, the server's operating status can be monitored as long as the baseboard management controller is powered on. The BMC is directly connected to the host system's motherboard and can monitor the host's physical status, restart, reinstall the system, and even monitor the system screen via remote KVM functionality. The BMC has a built-in network server, allowing administrators to remotely log in to the BMC to manage server power and view logs.
[0057] The test script agent module, cold start test script, communication module, test data storage module, test data analysis module and policy configuration module are deployed in the host operating system.
[0058] The test script agent module is used to receive the script sent by the test host and execute it;
[0059] The cold start test script is used to execute the BMC cold start instruction. The script is received from the test host.
[0060] The communication module is used to send commands to the BMC's OS communication module to obtain BMC cold start test information;
[0061] The test data storage module is used to store the test data returned by the BMC OS communication module;
[0062] The test data analysis module is used to compare the BMC test data. If they are consistent, the cold start test has passed. If they are inconsistent, it indicates that the BMC is working abnormally after the cold start.
[0063] The policy configuration module is used to store the BMC cold start test policy, which includes a user name and password, cyclic test data, and a test benchmark value.
[0064] The BMC includes a restart module, a configuration information module, and an OS communication module:
[0065] The restart module is used to execute the command sent by the test script agent module, perform a cold restart of the BMC, and send test information. The test information includes the current time, server hardware information, and the number of remaining restarts.
[0066] The BMC configuration information module is used to store current BMC information, such as LAN info, MC info, sensor, SDR, etc.
[0067] The OS communication module is used to send BMC information to the operating system of the host machine.
[0068] The present invention also provides a stress test method based on cold restart of server BMC. The prerequisite of this method is that the tester writes test scripts for multiple server BMCs, which include the BMC IP, BMC user name, BMC password, OS IP, OS user name, OS password and test cycle information of each machine to be tested. The BMC test process of one of the servers is used as an example to illustrate. The implementation steps of this method are shown in the attached figure. Figure 2 As shown, the following steps are included:
[0069] Step 1: After deploying this solution on the test host, the tester fills in the configuration file. The content includes: BMC IP of the test machine: 192.168.2.2, BMC username: admin, BMC password: admin, OS IP: 192.168.2.3, OS username: root, OS password: root, and the number of test laps: 1000.
[0070] Step 2: Run this tool on the test host;
[0071] Step 3: After the program is running, first send a power-on command to the device under test through the IPMI out-of-band command. After powering on, check whether 192.168.2.2 and 192.168.2.3 can be pinged. If the test fails, retain the scene;
[0072] Step 4: After the test is completed, the test host uses Python's paramiko module to remotely connect to the machine under test through SSH, and sends the test script and dependent libraries to the machine under test;
[0073] Step 5: After receiving the script, the machine under test runs the script, installs related dependency libraries, and completes the machine under test environment configuration;
[0074] Step 6. Use curl and ipmitool to capture and save the test benchmark information of the machine under test, including: host name, model, manufacturer, serial number, BMC version, IP address, sensor, sdr, mc info, and LAN info on the web overview page. The benchmark information is then transmitted back to the test host and printed on the screen for the tester to confirm whether the benchmark information is consistent with the actual information. If not, the machine under test is retained on site.
[0075] Step 7: After the tester confirms the completion, the test host sends relevant commands to the machine under test, runs the BMC cycle cold restart program on the OS of the machine under test, and starts the BMC cycle cold restart test.
[0076] Step 8. Run the cold restart program in a loop, and restart the BMC of the test machine by sending the ipmi command in-band. After each BMC cold restart, create a folder named "loop_num+192.168.2.2" on the test machine to store the captured information, check whether the BMC is restored, and after the BMC is restored, capture and save the current information, including: host name, model, manufacturer, serial number, BMC version, IP address on the web overview page, hard disk information, sensor, sdr, mc info, LAN info on the web hardware status page, and compare them with the benchmark information to determine whether they are consistent. If they are inconsistent, terminate the program on the test machine, save the scene, and upload the test data to the test host;
[0077] Step 9: When the test times set in the configuration file reach 1000, the test passes and the device under test uploads the test data to the test host;
[0078] Step 10: The host determines whether the test passes based on the test data and generates a test report;
[0079] Step 11: The tester reviews the test report to determine the test results. If the test fails, the problem is located based on the test data and the retained on-site analysis.
[0080] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A BMC cold restart stress test system, characterized in that: The system includes two types of equipment: a test host and a server under test. The test host can connect to multiple servers under test through the network. The test host provides an environment for writing server BMC test scripts. Testers will write BMC cold start test script instances. The completed test script will be sent to the server under test through the test host. The test program of the server's host operating system will send test instructions to the BMC to execute the test script, obtain BMC test results, and automatically generate a test report to complete the BMC cold start test. The test host includes a BMC test script library, a BMC test script issuing module, and a BMC test result collection module: The BMC test script library includes scripts for BMC function and performance testing; The BMC test script sending module is used to send the test script to the server under test; The BMC test result collection module is used to collect the BMC test results of all servers to be tested; The server under test includes a host operating system and a BMC; The host operating system deploys a test script agent module, a cold start test script, a communication module, a test data storage module, a test data analysis module and a policy configuration module; The test script agent module is used to receive and execute the script sent by the test host; The cold start test script is used to execute the BMC cold start instruction, and the cold start test script is received from the test host; The communication module is used to send a command to the OS communication module of the BMC to obtain the cold start test information of the BMC; The test data storage module is used to store the test data returned by the BMC OS communication module; The test data analysis module is used to compare the BMC test data. If they are consistent, the cold start test has passed. If they are inconsistent, it indicates that the BMC is working abnormally after the cold start. The policy configuration module is used to store the BMC cold start test policy, which includes a user name and password, cycle test data and test reference value; The BMC includes a restart module, a configuration information module and an OS communication module: The restart module is used to execute the command sent by the test script agent module, perform a BMC cold start and send test information, the test information includes the current time, server hardware information and the remaining restart times; The configuration information module is used to store current BMC information; The OS communication module is used to send current BMC information to the host operating system.
2. A BMC cold restart stress testing system according to claim 1, characterized in that: The host operating system is a software program that manages server hardware and software resources. The host operating system can manage and configure memory, determine the priority of system resource supply and demand, control input and output devices, operate the network and manage the file system, and provide an operating interface for users to interact with the system. The host operating system can deploy and run the BMC cold start test program. The BMC is a control unit deployed on the server with an independent power supply and independent I / O interface. It can control the server's peripherals. Regardless of whether the server has an operating system installed or is turned on, the server's operating status can be monitored as long as the BMC is powered on. The BMC is directly connected to the host operating system's motherboard and can monitor the host operating system's restart, reinstallation, and physical status, and monitor the system screen through the remote KVM function. The BMC has a built-in network server, and administrators can remotely log in to the BMC to manage the power supply of the network server and view logs.
3. A BMC cold restart stress test method, used in the BMC cold restart stress test system according to claim 2, characterized in that: The implementation of this method includes the following steps: Step 1: The test host sends the BMC cold start test script and related dependency libraries in the BMC test script library to the server under test through the BMC test script sending module, completing the server environment configuration; Step 2: After receiving the cold start test script through the test script agent module, the host operating system in the server to be tested will first notify the BMC to capture the benchmark information; Step 3: The host operating system receives the baseline information from the BMC. The test host uses the BMC test result collection module to print the baseline information to the test host screen. The tester waits for 30 seconds to confirm that the captured information is consistent with the actual configuration. If there is no confirmation, it is assumed to be consistent. Step 4: Read the cyclic test data in the strategy configuration module for testing; Step 5: Determine whether the cycle test is greater than or equal to 1. If so, proceed to the next step; if not, upload the BMC test results to the test host and proceed to step 14; Step 6: The test script agent module of the host operating system sends a cold start command to the BMC. After receiving the command, the BMC performs a cold start through the restart module. It determines whether the command execution is successful. If so, it proceeds to the next step. If not, it protects the site and ends the process. Step 7: Check whether the BMC has recovered. Check every 10 seconds for a total of 300 seconds. The check method is to send raw 0x06 0x01 in-band and SSH to the BMC to check whether the web service has recovered. Step 8: Determine whether the BMC has recovered after 300 seconds. If so, proceed to the next step. If not, secure the site and end the process. Step 9. Use the curl command to collect BMC WEB page related information, including the host name, server information, and BMC information on the server overview page. The test data storage module stores the collected information in a folder named loop_num+ip. Step 10: Send IPMI commands to the BMC through the host operating system's communication module to obtain the sensor, sdr, mc info, and lan info information stored in the BMC's configuration information module. The test data storage module stores the collected information in a folder named loop_num+ip. Step 11: The test data analysis module compares the collected information with the baseline information; Step 12: Determine whether the collected information is consistent with the baseline information. If so, proceed to the next step; if not, proceed to step 14. Step 13: Subtract 1 from the number of cycle tests and go to step 5; Step 14: The test host collects the BMC test results of all servers under test through the BMC test result collection module; Step 15: The process ends.
Citation Information
Patent Citations
Method and apparatus for testing application performance
CN105095089A
BMC comprehensive test method and system, terminal and storage medium
CN111858201A