Server hardware testing method and device, electronic device and readable storage medium
In server hardware testing, the substrate management controller accesses the hardware at a preset frequency and analyzes the return value and pressure data, solving the problem of insufficient hardware testing accuracy, achieving comprehensive monitoring of the hardware and reasonable frequency management, and improving testing accuracy.
Patent Information
- Application Number
- CN202211446169.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-11-18
AI Technical Summary
The existing server hardware testing methods do not fully consider the interaction between the substrate management controller and the hardware, resulting in insufficient test accuracy.
Under the server's hardware load to be tested, the hardware is accessed at a preset frequency through the substrate management controller, and the return value and stress test data are obtained and analyzed to ensure that the data fluctuations within the preset time are within the acceptable range, the return value is within the preset range, and no errors occur, as the test pass standard.
Improve the accuracy of hardware testing, avoid downtime or performance degradation due to unreasonable frequency settings, and achieve comprehensive monitoring of hardware and reasonable frequency management.
Smart Images

Figure CN116126604B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of servers, and in particular to a hardware testing method and device for a server, an electronic device, and a readable storage medium. Background Art
[0002] The interaction between server hardware and the baseboard management controller (BMC) is particularly important for operation and maintenance.
[0003] Currently, server hardware testing does not focus on the interaction between the BMC and the server hardware, and whether it affects the performance of the server hardware, resulting in inaccurate server hardware testing. Summary of the Invention
[0004] The present invention provides a server hardware testing method and device, an electronic device and a readable storage medium, aiming to solve the problem of poor accuracy in existing server hardware testing.
[0005] A first aspect of the present invention provides a server hardware testing method, which is applied to a server having a corresponding baseboard management controller. The method comprises:
[0006] When the hardware to be tested of the server is under load operation, first stress test data of the hardware to be tested is obtained; the load operation includes: the hardware to be tested is operated under a load rate greater than 0;
[0007] When a baseboard management controller corresponding to the server accesses the hardware under test at a preset frequency and the hardware under test does not report an error, obtaining a return value returned by the hardware under test to the baseboard management controller based on the access, and obtaining second stress test data of the hardware under test;
[0008] Within the preset time length, if the second stress test data is greater than or equal to the preset proportion of the first stress test data, the fluctuation amplitude of the second stress test data is less than or equal to the preset amplitude, and all the return values are within the preset range, the test of the hardware under test for the access of the preset frequency passes.
[0009] In the present invention, the second stress test data is the stress test data of the hardware to be tested obtained when the baseboard management controller corresponding to the server accesses the hardware to be tested at a preset frequency and the hardware to be tested does not report an error. Here, the hardware to be tested does not report an error, the second stress test data is greater than or equal to the first stress test data of a preset ratio, and the fluctuation amplitude of the second stress test data is less than or equal to the preset amplitude. These all take into account whether the interaction between the baseboard management controller and the hardware to be tested at a preset frequency has an adverse effect on the hardware to be tested. The return value is within a preset range. This takes into account whether the interaction between the baseboard management controller and the hardware to be tested at a preset frequency has an adverse effect on the baseboard management controller. The test of the hardware to be tested passes only when the second stress test data is greater than or equal to the first stress test data of a preset ratio within a preset time period, the fluctuation amplitude of the second stress test data is less than or equal to the preset amplitude, and the return value is within a preset range. The test of the hardware to be tested fully considers the impact of the interaction between the baseboard management controller and the hardware to be tested at a preset frequency on the hardware to be tested, as well as the impact on the baseboard management controller. The test considers factors more comprehensively, thereby improving the accuracy of the test. At the same time, the baseboard management controller's access frequency to the device under test can be adjusted with reference to the preset frequency, so that the baseboard management controller's access frequency to the device under test falls within a reasonable range, which can not only fully monitor and control the hardware under test, but also avoid serious problems such as downtime or equipment performance degradation caused by unreasonable access frequency settings.
[0010] Optionally, when the baseboard management controller corresponding to the server accesses the hardware under test at a preset frequency and the hardware under test does not report an error, obtaining a return value returned by the hardware under test to the baseboard management controller based on the access, and obtaining second stress test data of the hardware under test, includes:
[0011] When the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency and no error information of the hardware under test appears in the operating system log of the server, obtain the return value returned by the hardware under test to the baseboard management controller based on the access, and obtain second stress test data of the hardware under test.
[0012] Optionally, when the hardware to be tested of the server is under load, obtaining first stress test data of the hardware to be tested includes:
[0013] When the hardware to be tested of the server is a storage device of the server and the storage device is running under load, obtaining first stress test data of the storage device through an FIO test tool;
[0014] When the hardware to be tested of the server is a network device of the server and the network device is running under load, obtaining first stress test data of the network device through an iperf testing tool;
[0015] When the hardware to be tested of the server is a memory device of the server and the memory device is running under load, obtaining first stress test data of the memory device by using a memtester test tool or a stresapptest test tool;
[0016] When the hardware to be tested of the server is a power supply device of the server and the power supply device is running under load, obtaining first stress test data of the power supply device through a PTU test tool;
[0017] The method further comprises: obtaining, when a baseboard management controller corresponding to the server accesses the hardware under test at a preset frequency and the hardware under test does not report an error, a return value returned by the hardware under test to the baseboard management controller based on the access, and obtaining second stress test data of the hardware under test, including:
[0018] When a baseboard management controller corresponding to the server accesses the storage device at the preset frequency and the storage device does not report an error, obtaining a return value returned by the storage device to the baseboard management controller based on the access, and obtaining second stress test data of the storage device through an FIO test tool;
[0019] When a baseboard management controller corresponding to the server accesses the network device at a preset frequency and the network device does not report an error, obtaining a return value returned by the network device to the baseboard management controller based on the access, and obtaining second stress test data of the network device through an iperf test tool;
[0020] When a baseboard management controller corresponding to the server accesses the memory device at a preset frequency and the memory device does not report an error, obtaining a return value returned by the memory device to the baseboard management controller based on the access, and obtaining second stress test data of the memory device through a memtester test tool or a stresapptest test tool;
[0021] When the baseboard management controller corresponding to the server accesses the power supply device at a preset frequency and the power supply device does not report an error, the return value returned by the power supply device to the baseboard management controller based on the access is obtained, and the second stress test data of the power supply device is obtained through the PTU test tool.
[0022] Optionally, the hardware to be tested includes: a fast external device interconnection bus and an interface device.
[0023] Optionally, the method further includes: in any one of the following three situations, the hardware under test fails the test for access at the preset frequency:
[0024] Within the preset time period, the second stress test data is less than the first stress test data by the preset ratio;
[0025] Within the preset time period, the fluctuation range of the second stress test data is greater than the preset range;
[0026] Within the preset time period, any of the return values is not within the preset range.
[0027] Optionally, the method further includes:
[0028] When the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency and the hardware under test reports an error, the hardware under test fails the access test for the preset frequency.
[0029] Optionally, when the baseboard management controller corresponding to the server accesses the hardware under test at a preset frequency and the hardware under test does not report an error, obtaining a return value returned by the hardware under test to the baseboard management controller based on the access, and obtaining second stress test data of the hardware under test, includes:
[0030] When the baseboard management controller corresponding to the server accesses the hardware under test through the restful interface of the hardware under test at the preset frequency, and the hardware under test does not report an error, the return value returned by the hardware under test to the baseboard management controller based on the access is obtained, and the second stress test data of the hardware under test is obtained.
[0031] A second aspect of the present invention provides a server hardware testing device, which is applied to a server having a corresponding baseboard management controller, and includes:
[0032] A first stress test data acquisition module is configured to acquire first stress test data of the hardware to be tested when the hardware to be tested of the server is under load operation; the load operation includes: the hardware to be tested is operated when the load rate is greater than 0;
[0033] a second stress test data acquisition module, configured to, when a baseboard management controller corresponding to the server accesses the hardware under test at a preset frequency and the hardware under test does not report an error, obtain a return value returned by the hardware under test to the baseboard management controller based on the access, and obtain second stress test data of the hardware under test;
[0034] The test pass module is used to pass the test of the hardware under test for the access of the preset frequency when, within a preset time period, the second stress test data is greater than or equal to the preset proportion of the first stress test data, the fluctuation amplitude of the second stress test data is less than or equal to the preset amplitude, and all the return values are within a preset range.
[0035] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of any of the aforementioned server hardware testing methods are implemented.
[0036] According to a fourth aspect of the present invention, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the aforementioned server hardware testing methods are implemented.
[0037] The server hardware testing device, electronic device, and readable storage medium in the present invention all have the same or similar beneficial effects as any of the aforementioned server hardware testing methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0039] Figure 1 A flowchart showing the steps of a server hardware testing method according to an embodiment of the present invention is shown;
[0040] Figure 2 A schematic structural diagram of a server hardware testing device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0041] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0042] The server hardware specifically refers to the hardware required by the server to ensure the normal operation of the server. It can be the hardware of the server itself or the hardware extended by the server. The server has a corresponding baseboard management controller. The baseboard management controller mainly performs a series of monitoring and control functions on each hardware of the server. Specifically, the baseboard management controller accesses each hardware of the server, and each hardware of the server returns a return value to the baseboard management controller. The return value can realize the monitoring function of each hardware of the server. The baseboard management controller can access each hardware of the server by inputting instructions, etc. By inputting instructions to each hardware of the server, it can realize the control and monitoring of each hardware of the server.
[0043] Figure 1 The following is a flowchart showing the steps of a server hardware testing method according to an embodiment of the present invention. Figure 1 As shown, the test method may include the following steps:
[0044] Step 101 , when the hardware to be tested of the server is in load operation, first stress test data of the hardware to be tested is obtained; the load operation includes: the hardware to be tested is operated under a load rate greater than 0.
[0045] The hardware to be tested can be any hardware of the server. For example, the hardware to be tested can be the storage device of the server. For example, an HBA (Host bus adapter) card specifically refers to a board card, hard disk, RAID (Redundant Arrays of Independent Disks) card, SAS (hard disk expansion) card, etc. that can be inserted into the server. For another example, the hardware to be tested can be the hard disk of the server. For another example, the hardware to be tested can be a network device such as a network card or HCA card of the server. For another example, the hardware to be tested can be the power supply of the server. There is no specific limitation on the specific hardware to be tested.
[0046] Specifically, a test configuration can be set up according to the stress test requirements of the hardware to be tested, and then the first stress test data of the server's hardware to be tested under load operation can be obtained under the test configuration. Load operation can include: the hardware to be tested is running under a load rate greater than 0, or the hardware to be tested is running normally. The load rate of the hardware to be tested during load operation only needs to be greater than 0, and there is no limitation on the specific load rate. For example, the hardware to be tested is running under a load rate of 40%, and the hardware to be tested is running under a load rate of 70%.
[0047] The load rate here specifically refers to the ratio of the resources occupied by the hardware under test to the maximum resources the hardware under test can provide. For example, if the total resources currently occupied by programs running on the hardware under test account for 50% of the maximum resources the hardware under test can provide, then the current load rate of the hardware under test is 50%.
[0048] There is no limitation on the stress test tool or stress test tools used to obtain the first stress test data of the hardware to be tested. Optionally, for the storage device of the server, the stress test tool may include the FIO stress test tool, etc. For the memory device of the server, the stress test tool may include the memtester stress test tool or the stresapptest (Stressful Application Test) stress test tool, etc. For the network equipment of the server, the stress test may include the iperf stress test tool, etc. For the power supply equipment of the server, the stress test may include the PTU (performance tuning utility) stress test tool, etc. The above stress test tools are more closely matched with the corresponding hardware to be tested, the test accuracy is higher, and the first stress test data obtained is more accurate.
[0049] For the server's storage device, the first stress test data may include stress test data representing read and write speeds or read and write status. For the server's memory, the first stress test data may include stress test data representing memory usage. For the server's network device, the first stress test data may include stress test data representing network bandwidth. For the server's power supply device, the first stress test data may also include the operating frequency of the CPU (central processing unit).
[0050] Step 102, when the baseboard management controller corresponding to the server accesses the hardware under test at a preset frequency and the hardware under test does not report an error, obtain the return value returned by the hardware under test to the baseboard management controller based on the access, and obtain second stress test data of the hardware under test.
[0051] The baseboard management controller corresponding to the server primarily accesses the hardware under test at a preset frequency through the interface corresponding to the hardware under test. Optionally, the baseboard management controller corresponding to the server accesses the hardware under test at a preset frequency through the RESTful interface of the hardware under test. Accessing through the RESTful interface provides a fast access rate. There is no specific limitation on which interface of the hardware under test the baseboard management controller corresponding to the server uses to access the hardware under test at the preset frequency.
[0052] The preset frequency here can be set according to actual needs. The fact that the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency and the hardware under test does not report an error can indicate that the hardware under test does not encounter any major errors or can operate normally during the process of the baseboard management controller corresponding to the server accessing the hardware under test at the preset frequency.
[0053] In this step, the second pressure test data and the first pressure test data may be of the same type, and the second pressure test data may be obtained in the same manner as the first pressure test data in step 101 .
[0054] Optionally, for the server's storage device, the second stress test data can be obtained through the FIO stress test tool. For the server's memory device, the second stress test data can be obtained through the memtester stress test tool or the stresapptest stress test tool. For the server's network device, the second stress test data can be obtained through the iperf stress test tool. For the server's power supply equipment, the second stress test data can be obtained through the PTU stress test tool. The above-mentioned stress test tools are more closely matched with the corresponding hardware to be tested, the test accuracy is higher, and the second stress test data obtained is more accurate.
[0055] Optionally, before step 102, a remote connection tool (SSH) can be used to connect to the baseboard management controller corresponding to the server, and a quick connection can be achieved through the connection tool. The remote connection tool SSH is a remote tool that can be used to securely connect to a remote server. The remote connection tool uses encryption to ensure that data is not intercepted or read by anyone other than the intended recipient. Commonly used SSH remote tools include: Xshell (a powerful secure terminal simulation software), OpenSSH (a free open source implementation of the SSH protocol), PuTTY (a Telnet / SSH / RLOGIN / pure TCP and serial port connection software), etc. There is no specific limitation on which remote connection tool is used to connect to the baseboard management controller corresponding to the server.
[0056] Optionally, step 102 may include: when the baseboard management controller corresponding to the server accesses the hardware to be tested at the preset frequency and no error information of the hardware to be tested appears in the operating system log of the server, obtaining the return value returned by the hardware to be tested to the baseboard management controller based on the access, and obtaining the second stress test data of the hardware to be tested. Specifically, usually if the hardware of the server reports an error, there will be a record in the operating system (OS) log of the server. Then, if no error information of the hardware to be tested appears in the operating system log of the server, it can be indicated that the hardware to be tested has no error or that the hardware to be tested is running normally. Through the operating system log of the server, it can be quickly and accurately obtained whether the hardware to be tested reports an error during the process of the baseboard management controller corresponding to the server accessing the hardware to be tested at the preset frequency.
[0057] Step 103: Within the preset time period, if the second stress test data is greater than or equal to the preset proportion of the first stress test data, the fluctuation amplitude of the second stress test data is less than or equal to the preset amplitude, and all the return values are within the preset range, the test of the access of the hardware under test to the preset frequency passes.
[0058] The preset duration, preset ratio, preset amplitude, and preset range here can be set according to test requirements, etc. The preset duration is greater than 0, and the preset ratio is greater than 0 and less than 1.
[0059] If, within a preset duration, the second stress test data is greater than or equal to a preset proportion of the first stress test data, this may indicate that, within the preset duration, the server's corresponding baseboard management controller accessed the hardware under test at the preset frequency, resulting in a relatively small and acceptable performance impact on the hardware under test. For example, if, within the preset duration, the second stress test data is 95% of the first stress test data, this indicates that, within the preset duration, the server's corresponding baseboard management controller accessed the hardware under test at the preset frequency, resulting in a performance impact of approximately 5% on the hardware under test.
[0060] Within a preset duration, the fluctuation amplitude of the second stress test data is less than or equal to the preset amplitude, which can indicate that within the preset duration, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, and the impact on the stable operation of the hardware under test is relatively small and within an acceptable range. Here, within the preset duration, the fluctuation amplitude of the second stress test data is less than or equal to the preset amplitude. For the same type of second stress test data, the fluctuation amplitude of each second stress test data within the preset duration can be based on the average value of the second stress test data within the preset duration.
[0061] Within the preset time, all return values returned by the hardware under test to the baseboard management controller based on the aforementioned access are within the preset range, which can indicate that within the preset time, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, and the interaction between the baseboard management controller and the hardware under test is relatively small and within an acceptable range. All return values within the preset range specifically means that each access of the hardware under test based on the baseboard management controller has a return value, and each return value is within the normal range. For example, under normal temperature conditions, the preset range of the temperature of the hardware under test is greater than or equal to normal temperature. If the baseboard management controller's access to the hardware under test is to obtain the temperature of the hardware under test, and the return value returned by the hardware under test based on the access is 35°C, it can be considered that the return value is within the preset range.
[0062] To sum up, in the present invention, within the preset time, the baseboard management controller corresponding to the server accesses the hardware to be tested at the preset frequency, and the impact on the performance of the hardware to be tested is relatively small. Within an acceptable range and within the preset time, the baseboard management controller corresponding to the server accesses the hardware to be tested at the preset frequency, and the impact on the stable operation of the hardware to be tested is relatively small. Within an acceptable range and within the preset time, the baseboard management controller corresponding to the server accesses the hardware to be tested at the preset frequency, and the impact on the interaction between the baseboard management controller and the hardware to be tested is relatively small. Within an acceptable range, the test of the hardware to be tested for the access at the preset frequency is passed. The test of the hardware to be tested fully considers the impact of the interaction between the baseboard management controller and the hardware to be tested at the preset frequency on the hardware to be tested, as well as the impact on the baseboard management controller. The test considerations are more comprehensive, thereby improving the test accuracy. At the same time, the test of the access of the hardware under test to the preset frequency is passed. For the hardware under test, the baseboard management controller can set the access frequency of the hardware under test based on the preset frequency, so that the access frequency of the baseboard management controller to the device under test falls within a reasonable range, which can not only comprehensively monitor and control the hardware under test, but also avoid serious problems such as downtime or equipment performance degradation caused by unreasonable access frequency settings.
[0063] It should be noted that this testing method can be performed at multiple preset frequencies, thereby helping to set the baseboard management controller's access frequency to the device under test within a reasonable range. This allows for comprehensive monitoring and control of the hardware under test while avoiding downtime or severe performance degradation caused by improper access frequency settings. The specific preset frequencies and the number of preset frequencies are not specifically limited.
[0064] Optionally, the server's hardware under test may be a Peripheral Component Interconnect Express (PCIE) device. Specifically, PCIE devices interact more frequently with a baseboard management controller (BMC). Therefore, when testing the hardware under test, fully considering the impact of the BMC's interaction with the hardware under test significantly improves the accuracy of PCIE device testing.
[0065] Optionally, the aforementioned preset ratio can be: 90%, that is, only when the second stress test data is greater than or equal to 90% of the first stress test data within the preset time period can it be considered that within the preset time period, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, and the performance impact of the hardware under test is relatively small and within an acceptable range. For example, within the preset time period, the second stress test data is 91% of the first stress test data, it can be considered that within the preset time period, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, and the performance impact of the hardware under test is relatively small and within an acceptable range. For another example, within the preset time period, the second stress test data is 95% of the first stress test data, it can be considered that within the preset time period, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, and the performance impact of the hardware under test is relatively small and within an acceptable range. For another example, within the preset time period, the second stress test data is 97% of the first stress test data. It can be considered that within the preset time period, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, and the impact on the performance of the hardware under test is relatively small and within an acceptable range.
[0066] Optionally, the preset amplitude is 5%, that is, within the preset time length, the fluctuation amplitude of the second stress test data is less than or equal to 5%, which can indicate that within the preset time length, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, and the impact on the stable operation of the hardware under test is relatively small and within an acceptable range. For example, within the preset time length, the fluctuation amplitude of the second stress test data is -5% to +5%, which can indicate that within the preset time length, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, and the impact on the stable operation of the hardware under test is relatively small and within an acceptable range. For another example, within the preset time length, the fluctuation amplitude of the second stress test data is -3% to +5%, which can indicate that within the preset time length, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, and the impact on the stable operation of the hardware under test is relatively small and within an acceptable range. For another example, within the preset time period, the fluctuation range of the second stress test data is -2% to +4%, which can indicate that within the preset time period, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, and the impact on the stable operation of the hardware under test is relatively small and within an acceptable range. For another example, within the preset time period, the fluctuation range of the second stress test data is -4% to 3%, which can indicate that within the preset time period, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, and the impact on the stable operation of the hardware under test is relatively small and within an acceptable range. For another example, within the preset time period, the fluctuation range of the second stress test data is -4.3% to 3.9%, which can indicate that within the preset time period, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, and the impact on the stable operation of the hardware under test is relatively small and within an acceptable range.
[0067] Optionally, the aforementioned preset duration may be greater than or equal to 24 hours. During a longer duration, the baseboard management controller corresponding to the server accesses the hardware to be tested at the preset frequency, which has a relatively small impact on the performance of the hardware to be tested. Within an acceptable range, the baseboard management controller corresponding to the server accesses the hardware to be tested at the preset frequency, which has a relatively small impact on the stable operation of the hardware to be tested. Within an acceptable range, the baseboard management controller corresponding to the server accesses the hardware to be tested at the preset frequency, which has a relatively small impact on the interaction between the baseboard management controller and the hardware to be tested. Within an acceptable range, the test of the hardware to be tested passes. The test time is longer, which can avoid test errors caused by accidental errors, thereby improving the test accuracy.
[0068] For example, the preset time length may be 48 hours. For another example, the preset time length may be 36 hours. For another example, the preset time length may be 24 hours. For another example, the preset time length may be 72 hours.
[0069] Optionally, the hardware under test fails the test for the preset access frequency in any of the following three situations: within the preset duration, the second stress test data is less than the first stress test data by a preset ratio; within the preset duration, the fluctuation amplitude of the second stress test data is greater than the preset amplitude; within the preset duration, any return value is outside the preset range.
[0070] Specifically, within the aforementioned preset time period, the second stress test data is less than the preset proportion of the first stress test data, indicating that within the preset time period, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, which has a relatively large impact on the performance of the hardware under test and is within an unacceptable range. Therefore, the test of the hardware under test for access at the preset frequency fails.
[0071] For example, if the hardware to be tested is a storage device, the first stress test data and the second stress test data are both read and write speeds, the preset frequency is 1 second / time, and the preset ratio is 90%. Within the aforementioned preset time length, the second stress test data is 70% of the first stress test data, indicating that within the preset time length, the baseboard management controller corresponding to the server accesses the hardware to be tested at the preset frequency, which has a relatively large impact on the performance of the hardware to be tested, that is, the read and write speed of the storage device is greatly reduced and is within an unacceptable range. Therefore, the test of the access of the preset frequency of the hardware to be tested fails.
[0072] For example, if the hardware to be tested is a network device, the first stress test data and the second stress test data are both network rates, the preset frequency is 1 second / time, the preset ratio is 90%, and within the aforementioned preset time length, the second stress test data is 60% of the first stress test data, indicating that within the preset time length, the baseboard management controller corresponding to the server accesses the hardware to be tested at the preset frequency, which has a relatively large impact on the performance of the hardware to be tested, that is, the network rate of the network device is greatly reduced and is within an unacceptable range. Therefore, the test of the access to the preset frequency of the hardware to be tested fails.
[0073] For another example, if the hardware to be tested is a network device, the first stress test data and the second stress test data are both network rates, the preset frequency is 1 second / time, the preset ratio is 90%, and within the aforementioned preset time period, the second stress test data is 40% of the first stress test data, indicating that within the preset time period, the baseboard management controller corresponding to the server accesses the hardware to be tested at the preset frequency, which has a relatively large impact on the performance of the hardware to be tested, that is, the network rate of the network device is greatly reduced and is within an unacceptable range. Therefore, the test of the access to the preset frequency of the hardware to be tested fails.
[0074] Within the aforementioned preset time period, the fluctuation amplitude of the second stress test data is greater than the preset amplitude, indicating that within the preset time period, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, which has a relatively large impact on the stable operation of the hardware under test and is within an unacceptable range. Therefore, the test of the hardware under test for access at the preset frequency fails.
[0075] For example, the first stress test data and the second stress test data are both the CPU frequencies. Within the aforementioned preset time period, the fluctuation range of the second stress test data reaches 60%. Then, within the preset time period, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, which has a relatively large impact on the stable operation of the hardware under test and is within an unacceptable range. Therefore, the test of the hardware under test for access to the preset frequency fails.
[0076] For another example, the first stress test data and the second stress test data are both the CPU frequencies. Within the aforementioned preset time period, the fluctuation range of the second stress test data reaches 70%. Then, within the preset time period, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, which has a relatively large impact on the stable operation of the hardware under test and is within an unacceptable range. Therefore, the test of the hardware under test for access to the preset frequency fails.
[0077] If any return value within the aforementioned preset time period is outside the aforementioned preset range, it means that within the preset time period, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, and the interaction impact between the baseboard management controller and the hardware under test is relatively large and within an unacceptable range. Therefore, the test of the hardware under test for access to the preset frequency fails.
[0078] For example, in a normal temperature environment, the preset range of the temperature of the hardware under test is greater than or equal to normal temperature. If the baseboard management controller accesses the hardware under test to obtain the temperature of the hardware under test, the hardware under test returns a value of -20°C based on this access, which is not within the preset range. This indicates that within the preset duration, the baseboard management controller corresponding to the server accessed the hardware under test at the preset frequency, and the interaction between the baseboard management controller and the hardware under test was relatively large and within an unacceptable range. Therefore, the test of the hardware under test for access at the preset frequency failed.
[0079] For another example, under normal temperature conditions, the preset temperature range of the hardware under test is greater than or equal to normal temperature. If the baseboard management controller accesses the hardware under test to obtain the temperature of the hardware under test, and the hardware under test returns a value of -10°C based on this particular access, this return value is not within the preset range. This indicates that within the preset duration, the baseboard management controller corresponding to the server accessed the hardware under test at the preset frequency, and the interaction between the baseboard management controller and the hardware under test was relatively large and within an unacceptable range. Therefore, the hardware under test failed the test for access at the preset frequency.
[0080] For another example, under normal temperature conditions, the preset temperature range of the hardware under test is greater than or equal to normal temperature. If the baseboard management controller accesses the hardware under test to obtain the temperature of the hardware under test, the return value returned by the hardware under test based on this particular access is empty, and this return value is also not within the preset range. This indicates that within the preset duration, the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, and the interaction between the baseboard management controller and the hardware under test is relatively large and within an unacceptable range. Therefore, the test of the hardware under test for access at the preset frequency fails.
[0081] Optionally, the method may further include: if the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency and the hardware under test reports an error, the test for access of the hardware under test at the preset frequency fails. Specifically, if the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency and the hardware under test reports an error, it means that the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency, which has a significant impact on the hardware under test and has caused the hardware under test to be unable to operate normally. Therefore, the test for access of the hardware under test at the preset frequency fails.
[0082] Figure 2 The following is a schematic diagram showing the structure of a server hardware testing device according to an embodiment of the present invention. The device is applied to a server having a corresponding baseboard management controller. The device may include:
[0083] The first stress test data acquisition module 201 is configured to acquire first stress test data of the hardware under test when the hardware under test of the server is under load operation; the load operation includes: the hardware under test is operated under a load rate greater than 0;
[0084] A second stress test data acquisition module 202 is configured to, when a baseboard management controller corresponding to the server accesses the hardware under test at a preset frequency and the hardware under test does not report an error, obtain a return value returned by the hardware under test to the baseboard management controller based on the access, and obtain second stress test data of the hardware under test;
[0085] The test pass module 203 is used to pass the test of the hardware under test for access to the preset frequency when, within a preset time period, the second stress test data is greater than or equal to a preset proportion of the first stress test data, the fluctuation amplitude of the second stress test data is less than or equal to a preset amplitude, and all the return values are within a preset range.
[0086] Optionally, the second stress test data acquisition module 202 may include:
[0087] The first acquisition unit for the second stress test data is used to obtain the return value returned by the hardware under test to the baseboard management controller based on the access, when the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency and no error information of the hardware under test appears in the operating system log of the server, and obtain the second stress test data of the hardware under test.
[0088] Optionally, the first stress test data acquisition module 201 may include:
[0089] A first stress test data acquisition unit is configured to acquire first stress test data of the storage device through an FIO test tool when the hardware to be tested of the server is a storage device of the server and the storage device is under load;
[0090] A second unit for obtaining first stress test data is configured to obtain first stress test data of the network device by using an iperf test tool when the hardware to be tested of the server is a network device of the server and the network device is under load;
[0091] A first stress test data acquisition third unit is configured to acquire first stress test data of the memory device by using a memtester test tool or a stresapptest test tool when the hardware to be tested of the server is a memory device of the server and the memory device is under load;
[0092] a first stress test data acquisition fourth unit, configured to acquire first stress test data of the power supply device through a PTU test tool when the hardware to be tested of the server is a power supply device of the server and the power supply device is under load;
[0093] The second stress test data acquisition module 202 may include:
[0094] a second stress test data second acquisition unit, configured to, when a baseboard management controller corresponding to the server accesses the storage device at the preset frequency and the storage device does not report an error, acquire a return value returned by the storage device to the baseboard management controller based on the access, and acquire second stress test data of the storage device through an FIO test tool;
[0095] A third acquisition unit for second stress test data is configured to, when a baseboard management controller corresponding to the server accesses the network device at a preset frequency and the network device does not report an error, acquire a return value returned by the network device to the baseboard management controller based on the access, and acquire second stress test data of the network device through an iperf test tool;
[0096] a fourth acquiring unit for acquiring second stress test data, configured to, when a baseboard management controller corresponding to the server accesses the memory device at a preset frequency and the memory device reports no error, acquire a return value returned by the memory device to the baseboard management controller based on the access, and acquire second stress test data of the memory device through a memtester test tool or a stresapptest test tool;
[0097] The fifth acquisition unit for the second stress test data is used to obtain the return value returned by the power supply device to the baseboard management controller based on the access when the baseboard management controller corresponding to the server accesses the power supply device at a preset frequency and the power supply device does not report an error, and obtain the second stress test data of the power supply device through the PTU test tool.
[0098] Optionally, the preset ratio is 90%;
[0099] The preset amplitude is 5%.
[0100] Optionally, the hardware to be tested includes: a fast external device interconnection bus and an interface device.
[0101] Optionally, the server hardware testing device may further include:
[0102] The first test failure module is used in any of the following three situations, where the hardware under test fails the test for access to the preset frequency:
[0103] Within the preset time period, the second stress test data is less than the first stress test data by the preset ratio;
[0104] Within the preset time period, the fluctuation range of the second stress test data is greater than the preset range;
[0105] Within the preset time period, any of the return values is not within the preset range.
[0106] Optionally, the server hardware testing device may further include:
[0107] The second test failure module is used to fail the test of the hardware under test for accessing the preset frequency when the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency and the hardware under test reports an error.
[0108] Optionally, the preset duration is greater than or equal to 24 hours.
[0109] The second stress test data acquisition module 202 may include:
[0110] The sixth acquisition unit for the second stress test data is used to obtain the return value returned by the hardware under test to the baseboard management controller based on the access, when the baseboard management controller corresponding to the server accesses the hardware under test through the restful interface of the hardware under test at the preset frequency and the hardware under test does not report an error, and obtain the second stress test data of the hardware under test.
[0111] The server hardware testing device has the same or similar beneficial effects as any of the aforementioned server hardware testing methods, and they can be referenced with each other. To avoid repetition, they will not be described here.
[0112] The present invention will be further explained below with reference to specific embodiments:
[0113] Example
[0114] The server hardware under test is a RAID card. Set up the test configuration and connect to the server's corresponding baseboard management controller. Use the FIO stress test tool to obtain the first and second stress test data.
[0115] For sequential reads and writes, use bs = 128k and iodepth = 32, meaning each request uses a block size of 128k and an I / O queue depth of 32. Alternatively, for random reads and writes, use bs = 4k and iodepth = 32, meaning each request uses a block size of 4k and an I / O queue depth of 32. Start a stress test while the RAID card is running under load and obtain the first stress test data. For example, use iostat 1 to obtain the first stress test data.
[0116] The server's baseboard management controller accesses the RAID card through a RESTful interface at a frequency of once per second. Specifically, it obtains RAID card information once per second using the command: Get:https: / / BMC_IP / api / raid / getraidCtrlInfo. If the RAID card does not report an error, it obtains the RAID card's return value based on this access and obtains the second stress test data.
[0117] Both the first stress test data and the second stress test data can be bandwidth information. Within 48 hours, if the second stress test data is greater than or equal to 90% of the first stress test data, and the RAID card's return value based on each access is within a preset range, and the fluctuation range of the second stress test data is less than or equal to 5%, then the RAID card passes the test for accesses with a frequency of 1 access per second. Otherwise, the RAID card fails the test for accesses with a frequency of 1 access per second.
[0118] The present invention also provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of any of the aforementioned server hardware testing methods are implemented.
[0119] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0120] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0121] An embodiment of the present invention further provides a readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the aforementioned server hardware testing methods.
[0122] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0123] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0124] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.
Claims
1. A server hardware testing method, characterized in that: Applied to a server, the server having a corresponding baseboard management controller, the method includes: When the hardware to be tested of the server is under load operation, first stress test data of the hardware to be tested is obtained; the load operation includes: the hardware to be tested is operated under a load rate greater than 0; When a baseboard management controller corresponding to the server accesses the hardware under test at a preset frequency and the hardware under test does not report an error, obtaining a return value returned by the hardware under test to the baseboard management controller based on the access, and obtaining second stress test data of the hardware under test; If, within a preset time period, the second stress test data is greater than or equal to a preset proportion of the first stress test data, the fluctuation amplitude of the second stress test data is less than or equal to a preset amplitude, and all the return values are within a preset range, the test of the hardware under test for access at the preset frequency passes; The step of obtaining first stress test data of the hardware to be tested when the hardware to be tested of the server is under load operation includes: When the hardware to be tested of the server is a storage device of the server and the storage device is running under load, obtaining first stress test data of the storage device through an FIO test tool; When the hardware to be tested of the server is a network device of the server and the network device is running under load, obtaining first stress test data of the network device through an iperf testing tool; When the hardware to be tested of the server is a memory device of the server and the memory device is running under load, obtaining first stress test data of the memory device by using a memtester test tool or a stresapptest test tool; When the hardware to be tested of the server is a power supply device of the server and the power supply device is running under load, obtaining first stress test data of the power supply device through a PTU test tool; The method further comprises: obtaining, when a baseboard management controller corresponding to the server accesses the hardware under test at a preset frequency and the hardware under test does not report an error, a return value returned by the hardware under test to the baseboard management controller based on the access, and obtaining second stress test data of the hardware under test, including: When a baseboard management controller corresponding to the server accesses the storage device at the preset frequency and the storage device does not report an error, obtaining a return value returned by the storage device to the baseboard management controller based on the access, and obtaining second stress test data of the storage device through an FIO test tool; When a baseboard management controller corresponding to the server accesses the network device at a preset frequency and the network device does not report an error, obtaining a return value returned by the network device to the baseboard management controller based on the access, and obtaining second stress test data of the network device through an iperf test tool; When a baseboard management controller corresponding to the server accesses the memory device at a preset frequency and the memory device does not report an error, obtaining a return value returned by the memory device to the baseboard management controller based on the access, and obtaining second stress test data of the memory device through a memtester test tool or a stresapptest test tool; When the baseboard management controller corresponding to the server accesses the power supply device at a preset frequency and the power supply device does not report an error, the return value returned by the power supply device to the baseboard management controller based on the access is obtained, and the second stress test data of the power supply device is obtained through the PTU test tool.
2. The server hardware testing method according to claim 1, wherein: The method further comprises: obtaining, when a baseboard management controller corresponding to the server accesses the hardware under test at a preset frequency and the hardware under test does not report an error, a return value returned by the hardware under test to the baseboard management controller based on the access, and obtaining second stress test data of the hardware under test, including: When the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency and no error information of the hardware under test appears in the operating system log of the server, obtain the return value returned by the hardware under test to the baseboard management controller based on the access, and obtain second stress test data of the hardware under test.
3. The server hardware testing method according to claim 1 or 2, characterized in that: The hardware to be tested includes: a fast external device interconnection bus and an interface device.
4. The server hardware testing method according to claim 1 or 2, characterized in that: The method further includes: in any of the following three situations, the hardware under test fails the test for access at the preset frequency: Within the preset time period, the second stress test data is less than the first stress test data by the preset ratio; Within the preset time period, the fluctuation range of the second stress test data is greater than the preset range; Within the preset time period, any of the return values is not within the preset range.
5. The server hardware testing method according to claim 1 or 2, characterized in that: The method further comprises: When the baseboard management controller corresponding to the server accesses the hardware under test at the preset frequency and the hardware under test reports an error, the hardware under test fails the access test for the preset frequency.
6. The server hardware testing method according to claim 1 or 2, characterized in that: The method further comprises: obtaining, when a baseboard management controller corresponding to the server accesses the hardware under test at a preset frequency and the hardware under test does not report an error, a return value returned by the hardware under test to the baseboard management controller based on the access, and obtaining second stress test data of the hardware under test, including: When the baseboard management controller corresponding to the server accesses the hardware under test through the restful interface of the hardware under test at the preset frequency, and the hardware under test does not report an error, the return value returned by the hardware under test to the baseboard management controller based on the access is obtained, and the second stress test data of the hardware under test is obtained.
7. A server hardware testing device, characterized in that: Applied to a server having a corresponding baseboard management controller, the device includes: A first stress test data acquisition module is configured to acquire first stress test data of the hardware to be tested when the hardware to be tested of the server is under load operation; the load operation includes: the hardware to be tested is operated when the load rate is greater than 0; a second stress test data acquisition module, configured to, when a baseboard management controller corresponding to the server accesses the hardware under test at a preset frequency and the hardware under test does not report an error, obtain a return value returned by the hardware under test to the baseboard management controller based on the access, and obtain second stress test data of the hardware under test; A test pass module, configured to determine that the hardware under test has passed the access test for the preset frequency if, within a preset time period, the second stress test data is greater than or equal to a preset proportion of the first stress test data, the fluctuation amplitude of the second stress test data is less than or equal to a preset amplitude, and all the return values are within a preset range; The first stress test data acquisition module includes: A first stress test data acquisition unit is configured to acquire first stress test data of the storage device through an FIO test tool when the hardware to be tested of the server is a storage device of the server and the storage device is under load; A second unit for obtaining first stress test data is configured to obtain first stress test data of the network device by using an iperf test tool when the hardware to be tested of the server is a network device of the server and the network device is under load; A first stress test data acquisition third unit is configured to acquire first stress test data of the memory device by using a memtester test tool or a stresapptest test tool when the hardware to be tested of the server is a memory device of the server and the memory device is under load; a first stress test data acquisition fourth unit, configured to acquire first stress test data of the power supply device through a PTU test tool when the hardware to be tested of the server is a power supply device of the server and the power supply device is under load; The second stress test data acquisition module may include: a second stress test data second acquisition unit, configured to, when a baseboard management controller corresponding to the server accesses the storage device at the preset frequency and the storage device does not report an error, acquire a return value returned by the storage device to the baseboard management controller based on the access, and acquire second stress test data of the storage device through an FIO test tool; A third acquisition unit for second stress test data is configured to, when a baseboard management controller corresponding to the server accesses the network device at a preset frequency and the network device does not report an error, acquire a return value returned by the network device to the baseboard management controller based on the access, and acquire second stress test data of the network device through an iperf test tool; a fourth acquiring unit for second stress test data, configured to, when a baseboard management controller corresponding to the server accesses the memory device at a preset frequency and the memory device reports no error, acquire a return value returned by the memory device to the baseboard management controller based on the access, and acquire second stress test data of the memory device through a memtester test tool or a stresapptest test tool; The fifth acquisition unit for the second stress test data is used to obtain the return value returned by the power supply device to the baseboard management controller based on the access when the baseboard management controller corresponding to the server accesses the power supply device at a preset frequency and the power supply device does not report an error, and obtain the second stress test data of the power supply device through the PTU test tool.
8. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the server hardware testing method according to any one of claims 1 to 6 are implemented.
9. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the server hardware testing method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Test system and three-dimensional camera test method realized by using test system
CN113465879A
Server power consumption test method and device
CN113961413A