Automatic hard disk testing method and device and readable storage medium
By importing preset BIOS configuration parameters and automated transmission and compiling FIO source code, the problem of traditional hard disk testing methods relying on manual operations is solved, and efficient automation of hard disk testing is achieved, ensuring the accuracy and reliability of test results.
Patent Information
- Application Number
- CN202510352632.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN119883851A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hard disk testing, and in particular to a hard disk automatic testing method, device and readable storage medium. Background Art
[0002] The server hard disk test is a key link to ensure server performance and data security. As a widely used disk I / O performance test tool, FIO (Flexible I / OTester) has become a must-test item in server hard disk testing. FIO can simulate various complex I / O operation scenarios, provide rich performance indicators, and help users evaluate the performance of storage devices. However, traditional hard disk testing methods mainly rely on manual operation and manual adjustment of test tool parameters, resulting in low test efficiency and low test automation.
[0003] FIO testing involves a series of tedious processes such as BIOS configuration tuning, platform compilation, parameter adjustment, and data feedback. In related technologies, the server's BIOS configuration is manually optimized to ensure that the test environment reaches the best performance state. However, manual tuning not only reduces test efficiency, but also easily leads to configuration errors due to human errors, thereby affecting the accuracy of test results; FIO test installation and compilation also need to be completed manually, which is prone to installation failure or compilation errors due to environmental differences, reducing the accuracy of test results; in addition, FIO's parameter settings need to be manually adjusted according to different test objectives, resulting in a low degree of test automation. When there are multiple servers, the test parameters of each server need to be manually adjusted one by one, which increases labor costs and low test efficiency. Summary of the invention
[0004] The present invention provides a hard disk automatic testing method, device and readable storage medium, aiming to solve at least one of the technical problems existing in the prior art.
[0005] The technical solution of the present invention is a hard disk automatic testing method, which comprises: S100: importing configuration information, where the configuration information includes preset BIOS configuration parameters; S200: Acquire current BIOS configuration information of the remote server, and determine the consistency between the BIOS configuration information and the BIOS configuration parameters; S300: If the BIOS configuration information and the BIOS configuration parameters do not meet the consistency requirement, update the BIOS configuration information, and restart the remote server to make the updated BIOS configuration information take effect; S400: Connect to the remote server using SSH, transfer the FIO source code file to the remote server through the SFTP protocol, and compile on the remote server to generate FIO commands; S500: In response to the FIO command, a performance test is performed on the hard disk to be tested; S600: Upload the performance test content and test progress of the hard disk to be tested to a host computer, so that the host computer generates a visual test result according to the performance test content and the test progress.
[0006] Further, the BIOS configuration parameter is a first key-value pair in JSON format, and the step S200 includes: S210: query the current BIOS configuration information of the remote server in a GET manner through a Redfish interface, where the BIOS configuration information is a second key-value pair in a JSON format; S220: performing proofreading on the first key-value pair corresponding to the BIOS configuration parameter and the second key-value pair corresponding to the BIOS configuration information to obtain a proofreading result; S230: Determine the consistency between the BIOS configuration information and the BIOS configuration parameters according to the verification result.
[0007] Further, the step S300 includes: S310: If the BIOS configuration information and the BIOS configuration parameters do not meet the consistency requirement, send a PATCH command; S320: In response to the PATCH command, set the BIOS configuration parameter as a tuning parameter, and use the tuning parameter to perform a tuning action on the BIOS configuration information of the remote server to update the BIOS configuration information; S330: Sending a POST command through a restart request interface to request the remote server to restart; S340: When it is detected that the IP address of the remote server is pinged successfully, it is determined that the remote server is restarted successfully; S350: Re-acquire the BIOS configuration information of the remote server, and when the re-acquired BIOS configuration information of the remote server is consistent with the tuning parameter, determine that the updated BIOS configuration information is effective.
[0008] Furthermore, the configuration information also includes login parameters for connecting to the remote server and connection parameters for establishing an SSH connection, the login parameters including the IP address of the BMC, the login user name of the BMC, and the login password of the BMC; the connection parameters include the IP address of the remote server, the login user name of the remote server, and the login password of the remote server.
[0009] Further, the step S400 includes: S410: Creating an SSH object according to the IP address of the remote server, the login user name of the remote server, and the login password of the remote server to initialize SSH; S420: Connect to the corresponding remote server through SSH, and create a compilation directory in response to the mkdir command; S430: Transfer the FIO source code file to the remote server via the SFTP protocol, and close the SFTP protocol connection; S440: performing weighted processing on the compilation directory and the FIO source code file; S450: In the FIO source code file, execute configure, make, and make install commands to perform online compilation to generate FIO commands.
[0010] Furthermore, the method further comprises: S460: Enter the fio --version command to verify whether the FIO command is compiled successfully; S470: In response to the fio --version command, when the return value is a first preset value, determining that the FIO command is compiled successfully; S480: In response to the fio --version command, when the return value is a second preset value, determining that the FIO command compilation fails, and sending a compilation error prompt.
[0011] Furthermore, the method further comprises: S501: Identify the hard disk on the remote server through the lsblk command; S502: Determine the type of the hard disk by using the cat / sys / block / $device / queue / rotational command. The type of the hard disk includes a solid state drive and a mechanical hard disk. S503: Determine parameter settings of the FIO command according to the determined hard disk type.
[0012] Further, the visual test result includes a test display progress bar, the test display progress bar includes the performance test content and the test progress, the test progress includes an initialization phase, an FIO file transmission phase, an FIO compilation phase, a Write test phase, a Read test phase and a test completion phase, and the step S600 includes: S610: Acquire the current performance test content of the hard disk to be tested, and determine the current test progress of the performance test according to the current performance test content; S620: Upload the current performance test content of the hard disk to be tested and the current test progress of the performance test to the host computer to generate a test display progress bar, wherein the current test progress of the performance test is highlighted in the test display progress bar.
[0013] The technical solution of the present invention also relates to a computer device, comprising a memory and a processor, wherein the processor implements the above method when executing a computer program stored in the memory.
[0014] The technical solution of the present invention also relates to a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor.
[0015] According to some embodiments of the present invention, the beneficial effects of the present invention are as follows: By importing preset BIOS configuration parameters, the test environment is standardized to ensure the consistency and comparability of test results, while avoiding errors and inconsistencies caused by manually setting BIOS parameters, reducing manual intervention, and improving test efficiency and the accuracy of test results; obtain the current BIOS configuration information of the remote server, and determine the consistency of the BIOS configuration information and BIOS configuration parameters to avoid test result deviations caused by configuration differences; if the BIOS configuration information and BIOS configuration parameters do not meet the consistency requirements, automatically update the BIOS configuration information to ensure that the BIOS configuration information of the remote server reaches the optimal performance state, thereby improving the accuracy and reliability of hard disk testing. After completing the BIOS configuration information update, automatically restart the remote server to make the updated BIOS configuration information effective, without manual intervention, and improve the automation of hard disk testing. Use SSH to connect to the remote server, transfer the FIO source code file to the remote server through the SFTP protocol, and compile and generate FIO commands online on the remote server to realize the automatic transmission and compilation of FIO source code files, without the need to manually log in to the remote server for operation, reducing the time and energy of manual file transmission and compilation, and improving test efficiency. In response to the FIO command, a performance test is performed on the hard disk to be tested, and the performance test content and test progress of the hard disk to be tested are uploaded to the host computer to generate visual test results, which improves the visualization of the test results and enables testers to monitor the test progress and hard disk performance indicators in real time, providing accurate data basis for hard disk performance optimization and troubleshooting.
[0016] In addition, additional aspects and advantages of the present invention will be given in part in the following description, and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1It is an overall flow chart of a hard disk automatic testing method provided by an embodiment of the present invention; Figure 2 is a flowchart of a specific implementation method of step S200 in the hard disk automatic testing method provided by an embodiment of the present invention; Figure 3 is a flowchart of a specific implementation method of step S300 in the hard disk automatic testing method provided by an embodiment of the present invention; Figure 4 is a flowchart of a specific implementation method of step S400 in the hard disk automatic testing method provided by an embodiment of the present invention; Figure 5 is a flow chart of a method for determining whether an FIO command is compiled successfully provided by an embodiment of the present invention; Figure 6 is a flow chart of a method for setting parameters for an FIO command provided by an embodiment of the present invention; Figure 7 is a flowchart of a specific implementation method of step S600 in the hard disk automatic testing method provided by an embodiment of the present invention; Figure 8 This is a test progress bar display of the automated hard disk test of six remote servers; Fig. 9 It is a schematic diagram of the test results of the automatic test of the hard disks of six remote servers; Fig.10 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The concept, specific structure and technical effects of the present invention will be clearly and completely described below in combination with the embodiments and drawings to fully understand the purpose, scheme and effect of the present invention.
[0019] It should be noted that, unless otherwise specified, when a feature is referred to as being "fixed" or "connected" to another feature, it may be directly fixed or connected to another feature, or it may be indirectly fixed or connected to another feature. The singular forms "a", "said" and "the" used herein are also intended to include the plural forms, unless the context clearly indicates otherwise. In addition, unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art. The terms used in this specification are intended only to describe specific embodiments and are not intended to limit the invention. The term "and / or" used herein includes any combination of one or more of the related listed items.
[0020] It should be understood that, although the term first, second, third etc. may be adopted to describe various elements in the present disclosure, these elements should not be limited to these terms. These terms are only used to distinguish the same type of elements from each other. For example, without departing from the scope of the present disclosure, the first element may also be referred to as the second element, and similarly, the second element may also be referred to as the first element. The use of any and all examples or exemplary language ("for example", "such as" etc.) provided herein is only intended to better illustrate embodiments of the present invention, and unless otherwise required, will not impose limitations on the scope of the present invention.
[0021] The server's hard disk test is a key link to ensure server performance and data security. FIO (Flexible I / OTester), as a widely used disk I / O performance testing tool, has become a must-test item in the server's hard disk test. FIO testing involves a series of tedious processes such as BIOS configuration tuning, platform compilation, parameter adjustment, and data feedback. In related technologies, the server's BIOS configuration is manually optimized to ensure that the test environment reaches the best performance state. However, manual tuning not only reduces test efficiency, but also easily leads to configuration errors due to human errors, thereby affecting the accuracy of test results; FIO's test installation and compilation also need to be completed manually, which is prone to installation failure or compilation errors due to environmental differences, reducing the accuracy of test results; in addition, FIO's parameter settings need to be manually adjusted according to different test objectives, resulting in a low degree of test automation, increased labor costs, and reduced test efficiency.
[0022] Based on this, an embodiment of the present invention provides a hard disk automated testing method, which enables the remote server's BIOS configuration information tuning, BIOS configuration information updating, FIO source code file transmission and compilation, and hard disk performance testing processes to be automated, thereby improving the automation level and test efficiency of hard disk testing, reducing manual intervention, and improving the accuracy of test results.
[0023] The hard disk automatic testing method provided by the embodiment of the present invention will be described in detail below with reference to the accompanying drawings.
[0024] Reference Figure 1 As shown, Figure 1 : is a general flow chart of a hard disk automatic testing method provided by an embodiment of the present invention. The hard disk automatic testing method includes but is not limited to steps S100 to S600. Specifically: S100: importing configuration information, where the configuration information includes preset BIOS configuration parameters; S200: Acquire current BIOS configuration information of the remote server, and determine consistency between the BIOS configuration information and BIOS configuration parameters; S300: If the BIOS configuration information and the BIOS configuration parameters do not meet the consistency requirement, update the BIOS configuration information, and restart the remote server to make the updated BIOS configuration information take effect; S400: Use SSH to connect to the remote server, transfer the FIO source code files to the remote server via the SFTP protocol, and compile them on the remote server to generate FIO commands; S500: In response to the FIO command, a performance test is performed on the hard disk to be tested; S600: Upload the performance test content and test progress of the hard disk to be tested to the host computer, so that the host computer generates a visual test result according to the performance test content and test progress.
[0025] In some embodiments of the present invention, the hard disk automated testing method includes: first, importing configuration information, the configuration information includes preset BIOS configuration parameters, it can be understood that the preset BIOS configuration parameters are an important tuning parameter, which is used to configure the mode of the remote server to be a high-performance mode, and by importing the preset BIOS configuration parameters, the test environment is standardized to ensure the consistency and comparability of the test results. In addition, by importing the BIOS configuration parameters, manual intervention can be reduced, errors and inconsistencies caused by manually setting BIOS parameters can be avoided, and the test efficiency and the accuracy of the test results can be improved. Then, the current BIOS configuration information of the remote server is obtained, and the consistency of the current BIOS configuration information of the remote server and the preset BIOS configuration parameters is judged to automatically verify whether the current BIOS configuration information of the remote server meets the preset optimal performance configuration requirements, and avoid the test result deviation caused by configuration differences. If the BIOS configuration information and the BIOS configuration parameters do not meet the consistency requirements, the BIOS configuration information is automatically updated to ensure that the BIOS configuration information of the remote server reaches the optimal performance state, thereby improving the accuracy and reliability of the hard disk test, and after completing the BIOS configuration information update, the remote server is automatically restarted to make the updated BIOS configuration information effective, without manual intervention, and the automation of the hard disk test is improved. Use SSH to connect to the remote server, then transfer the FIO source code file to the remote server through the SFTP protocol, and compile it on the remote server to generate an executable FIO command, so as to realize the automatic transmission and compilation of the FIO source code file, without the need to manually log in to the remote server for operation, reducing the time and energy of manual file transmission and compilation, improving the test efficiency, and effectively avoiding test failures caused by manual installation errors, ensuring that the FIO test tool is correctly installed and configured on the remote server. Afterwards, in response to the FIO command, the hard disk to be tested is subjected to a performance test, and the performance test content and test progress of the hard disk to be tested are uploaded to the host computer, so that the host computer generates visual test results based on the performance test content and test progress, which improves the visualization of the test results, enables testers to monitor the test progress and performance indicators in real time, and provides accurate data basis for hard disk performance optimization and troubleshooting.
[0026] In another embodiment of the present invention, the hard disk automatic testing method further includes: Import configuration information, which includes preset BIOS configuration parameters; obtain the current BIOS configuration information of the remote server, and determine the consistency between the BIOS configuration information and the BIOS configuration parameters; if the BIOS configuration information and the BIOS configuration parameters meet the consistency requirements, directly use SSH to connect to the remote server, transfer the FIO source code file to the remote server through the SFTP protocol, and compile it on the remote server to generate FIO commands; in response to the FIO command, perform a performance test on the hard disk to be tested; upload the performance test content and test progress of the hard disk to be tested to the host computer, so that the host computer can generate visual test results based on the performance test content and test progress.
[0027] When the BIOS configuration information and BIOS configuration parameters meet the consistency requirements, ensuring that the current BIOS configuration information of the remote server has met the performance configuration requirements of the preset optimal BIOS configuration parameters, there is no need to update the BIOS configuration information. Directly connect to the remote server and generate FIO commands, saving time and resources and improving hard disk testing efficiency.
[0028] It should be noted that, in some embodiments of the present invention, before executing the hard disk automation test method, FIO (Flexible I / O Tester) is connected to the remote server to be tested through its client / server mode, and the FIO server is started on the remote server to be tested to put it into listening mode. At this time, FIO will listen to port 8765 of the remote server to be tested, and the client connects to the remote server to be tested through the --client parameter and controls the FIO test task on the remote server to be tested, thereby realizing the performance test of distributed storage or network storage.
[0029] In the embodiment of the present invention, including a test scenario of one remote server and a test scenario of multiple remote servers, the connection of the servers to be tested in different test scenarios is realized by the following code method.
[0030] When there is a remote server, connect to the remote server using the following command: bash fio --client=<server_ip><job_file> For example, connect to a remote server with IP address 192.168.1.100 and run the test task file test.fio: bash fio --client=192.168.1.100 test.fio When there are multiple remote servers, you can write the IP addresses or host names of multiple remote servers into a file (such as hostlist), and then start the test through the client command, and connect to multiple remote servers through the following command: For example, the hostlist file content is as follows: 192.168.1.100 192.168.1.101 192.168.1.102 The client command is as follows: bash fio --client=hostlist test.fio After multiple remote servers are connected, in response to FIO commands, FIO will send test tasks to the remote servers to perform performance tests on the hard disks to be tested in the remote servers.
[0031] In some embodiments of the present invention, configuration information is imported, the configuration information includes preset BIOS configuration parameters, the configuration information also includes login parameters for connecting to a remote server and connection parameters for establishing an SSH connection, the login parameters include the IP address of the BMC, the login user name of the BMC, and the login password of the BMC; the connection parameters include the IP address of the remote server, the login user name of the remote server, and the login password of the remote server.
[0032] By importing preset BIOS configuration parameters, the test environment is standardized, ensuring that all remote servers are tested under the same configuration and network environment, which helps reduce test result deviations caused by configuration differences and improves the comparability and reliability of test results. It should be noted that in the test scenario of multiple remote servers, after importing the BIOS configuration information, there is no need to manually configure the BIOS configuration of the remote servers one by one. By importing the BIOS configuration information, multiple remote servers can be automatically tested, supporting batch operations, and improving the efficiency of hard disk testing and the degree of test automation.
[0033] The configuration information also includes login parameters of the remote server, which are used to access the remote server through the management interface of the baseboard management controller (BMC). The login parameters include the BMC's IP address, the BMC's login user name, and the BMC's login password. The login parameters ensure that the BMC can correctly connect to the remote server to facilitate subsequent test operations. The configuration information also includes connection parameters for establishing an SSH connection. It can be understood that SSH is a network protocol used to securely connect to a remote server and execute commands. The connection parameters include the remote server's IP address, the remote server's login user name, and the remote server's login password. The connection parameters are used for subsequent compilation and command execution operations.
[0034] Therefore, by importing the above configuration information, the entire process of remote server BIOS configuration, BIOS configuration information update, and hard disk performance testing can be automated, significantly improving test efficiency and accuracy.
[0035] Reference Figure 2 As shown, Figure 2 1 is a flowchart of a specific implementation method of step S200 in the hard disk automatic testing method provided by an embodiment of the present invention. The method of obtaining the current BIOS configuration information of the remote server and determining the consistency of the BIOS configuration information and the BIOS configuration parameters in step S200 includes but is not limited to steps S210 to S230. Specifically: S210: query the current BIOS configuration information of the remote server in GET mode through the Redfish interface, where the BIOS configuration information is a second key-value pair in JSON format; S220: performing a proofreading process on the first key-value pair corresponding to the BIOS configuration parameter and the second key-value pair corresponding to the BIOS configuration information to obtain a proofreading result; S230: Determine the consistency between the BIOS configuration information and the BIOS configuration parameters according to the verification result.
[0036] In the related art, BMC supports the Redfish protocol and can modify BIOS configuration information through the Redfish protocol. In some embodiments of the present invention, the preset BIOS configuration parameters are the first key-value pairs in JSON format. The BIOS configuration parameters include a key and a value corresponding to each other. For example, {ENERGY PERF BIAS CFGmode :Performance} configures the remote server mode to high-performance mode, which is an important tuning item.
[0037] The method for obtaining the current BIOS configuration information of a remote server and judging the consistency between the BIOS configuration information and the BIOS configuration parameters includes: querying and obtaining the current BIOS configuration information of the remote server through the Redfish interface in GET mode and the https: / / {BMC_IP} / redfish / v1 / Systems / 1 / Bios command, wherein the BIOS configuration information is a second key-value pair in JSON format. Proofreading the first key-value pair corresponding to the BIOS configuration parameter and the second key-value pair corresponding to the BIOS configuration information to obtain a proofreading result, judging the consistency between the BIOS configuration information of the remote server and the preset BIOS configuration parameters based on the proofreading result, thereby judging whether the current BIOS configuration information of the remote server meets the preset optimal performance configuration requirements.
[0038] In some embodiments of the present invention, the first key-value pair is (key1, value1), and the second key-value pair is (key2, value2). The proofreading processing of the first key-value pair corresponding to the preset BIOS configuration parameter and the second key-value pair corresponding to the BIOS configuration information of the remote server can be converted into comparing the consistency of the first key-value pair (key1, value1) and the second key-value pair (key2, value2). When the first key-value pair (key1, value1) is the same as the second key-value pair (key2, value2), the proofreading result obtained is that the first key-value pair corresponding to the BIOS configuration parameter and the second key value corresponding to the BIOS configuration information meet the consistency requirement, and it is determined that the BIOS configuration information is consistent with the BIOS configuration parameter, thereby determining that the current BIOS configuration information of the remote server meets the preset optimal performance configuration requirement. There is no need to execute the BIOS configuration update command. SSH is directly used to connect to the remote server, and the FIO source code file is transferred to the remote server through the SFTP protocol, and compiled on the remote server to generate the FIO command. When the first key-value pair (key1, value1) is different from the second key-value pair (key2, value2), the proofreading result is that the first key-value pair corresponding to the BIOS configuration parameter and the second key value corresponding to the BIOS configuration information do not meet the consistency requirement, and it is determined that the BIOS configuration information is inconsistent with the BIOS configuration parameter, thereby determining that the current BIOS configuration information of the remote server does not meet the preset optimal performance configuration requirement, and it is necessary to execute the BIOS configuration update command. At the same time, the inconsistent configuration information is recorded to provide a basis for subsequent updates of the BIOS configuration information. The proofreading result clearly shows the configuration differences, which is convenient for subsequent updates and debugging.
[0039] By proofreading the first key-value pair corresponding to the BIOS configuration parameter and the second key-value pair corresponding to the BIOS configuration information to obtain the proofreading result, it is automatically determined whether the BIOS configuration information needs to be updated based on the proofreading result, thereby realizing automatic proofreading of the remote server BIOS configuration information and ensuring that the remote server is always in the best performance configuration state. This process not only improves the hard disk test efficiency and reduces manual intervention, but also ensures the accuracy and reliability of the test results.
[0040] Reference Figure 3 As shown, Figure 3 The flowchart of the specific implementation method of step S300 in the hard disk automatic testing method provided by the embodiment of the present invention, if the BIOS configuration information and the BIOS configuration parameters do not meet the consistency requirement in step S300, the method of updating the BIOS configuration information and restarting the remote server to make the updated BIOS configuration information effective includes but is not limited to steps S310 to S350, specifically, S310: If the BIOS configuration information and the BIOS configuration parameters do not meet the consistency requirement, send a PATCH command; S320: In response to the PATCH command, the BIOS configuration parameter is set as a tuning parameter, and a tuning action is performed on the BIOS configuration information of the remote server using the tuning parameter to update the BIOS configuration information; S330: Send a POST command through the restart request interface to request the remote server to restart; S340: When it is detected that the IP address of the remote server is pinged successfully, it is determined that the remote server is restarted successfully; S350: Re-acquire the BIOS configuration information of the remote server. When the re-acquired BIOS configuration information of the remote server is consistent with the tuning parameter, determine that the updated BIOS configuration information is effective.
[0041] In some embodiments of the present invention, if the BIOS configuration information and the BIOS configuration parameters do not meet the consistency requirements, it indicates that the current BIOS configuration information of the remote server does not meet the configuration for optimal performance. At this time, it is necessary to update the BIOS configuration information of the remote server, send a PATCH command, and in response to the PATCH command, set the BIOS configuration parameters to tuning parameters, and send the tuning parameters to the remote server, so as to use the tuning parameters to perform tuning actions on the BIOS configuration information of the remote server, and apply the tuning parameters to the BIOS configuration information of the remote server through the https: / / {BMC_IP} / redfish / v1 / Systems / 1 / Bios / Settings interface request to ensure that the remote server is in the optimal performance state, thereby realizing the update operation of the BIOS configuration information of the remote server. The automatic update of the BIOS configuration information of the remote server can reduce manual intervention, improve update efficiency, and automatically apply the tuning parameters to perform tuning actions on the BIOS configuration information of the remote server, thereby reducing manual setting errors.
[0042] However, after performing the tuning action, the remote server needs to be restarted to make the updated BIOS configuration information effective. The POST command is sent through the https: / / {BMC_IP} / redfish / v1 / Systems / 1 / Actions / ComputerSystem.Reset restart request interface to request the remote server to restart. After requesting the remote server to restart, it is necessary to verify whether the remote server has been successfully restarted to ensure that the updated BIOS configuration information of the remote server takes effect. By detecting whether the IP address of the remote server can be pinged, it is confirmed whether the remote server has been restarted and resumed normal operation, and the status of the remote server can be automatically monitored, reducing the process of manual judgment and manual detection of the status of the remote server, and improving the test efficiency. It is understandable that when the IP address of the remote server is pinged, it is determined that the remote server has been restarted successfully.
[0043] After the remote server is restarted, the GET request is called again to obtain the BIOS configuration information of the remote server, and the BIOS configuration information is compared with the tuning parameters. When the re-obtained BIOS configuration information of the remote server is consistent with the tuning parameters, it is determined that the updated BIOS configuration information is effective, thereby ensuring that the BIOS configuration information of the remote server is in the best BIOS configuration performance setting state, thereby improving the accuracy and reliability of the hard disk test.
[0044] In some embodiments of the present invention, before querying the current BIOS configuration information of the remote server in GET mode through the Redfish interface, the hard disk automation test method also includes creating a session through the Redfish interface and obtaining a token for identity authentication, which can be used for subsequent Redfish requests to verify identity and perform operations.
[0045] It is understandable that a POST request is sent to the https: / / {BMC_IP} / redfish / v1 / SessionService / Sessions interface, and the login parameters, namely, the BMC IP address, the BMC login user name, and the BMC login password, are used to request the creation of a session, thereby realizing the creation of the BMC local interface and obtaining a long string, which is equivalent to a token used to verify the identity. For subsequent Redfish requests, the identity must be verified before subsequent test operations are performed, such as obtaining the BIOS configuration information of the remote server, updating the BIOS configuration, etc. In addition, after completing the relevant test tasks, the session is deleted to release resources, thereby releasing memory and improving test efficiency, while ensuring that the authentication token is invalid, and improving the security and reliability of hard disk testing.
[0046] Reference Figure 4 As shown, Figure 4 4 is a flowchart of a specific implementation method of step S400 in the hard disk automatic testing method provided by an embodiment of the present invention. In step S400, SSH is used to connect to a remote server, the FIO source code file is transferred to the remote server through the SFTP protocol, and the FIO command is compiled on the remote server to generate the FIO command, including but not limited to steps S410 to S450. Specifically: S410: Create an SSH object according to the IP address of the remote server, the login user name of the remote server, and the login password of the remote server to initialize SSH; S420: Connect to the corresponding remote server through SSH, and create a compilation directory in response to the mkdir command; S430: Transfer the FIO source code file to the remote server via the SFTP protocol, and close the SFTP protocol connection; S440: weighting the compilation directory and FIO source code files; S450: In the FIO source code file, execute the configure, make, and make install commands to perform online compilation and generate FIO commands.
[0047] In some embodiments of the present invention, an SSH object is created by using the paramiko library of Python and combining the IP address, user name and password of the remote server for subsequent command execution and file transfer; the FIO source code file is copied to the home directory of the remote server through the SSH command, the SSH connection is started to realize automatic login to the remote server, and the SSH connection is realized to the corresponding remote server, and a compilation directory is created in response to the mkdir command, and the compilation directory is used to store the FIO source code and compile it; the SFTP protocol is initialized using the ssh.open_sftp command, and the FIO source code file is transferred from the local to the compilation directory of the remote server through the SFTP protocol. After completing the transmission task, the command sftp.close() is executed to close the connection of the SFTP protocol; weighted processing is performed on the compilation directory and the FIO source code file, and appropriate permissions are set for the compilation directory and the FIO source code file to ensure that the compilation process will not fail due to permission issues; in the FIO source code file, the configure, make, and make install commands are executed for online compilation to generate executable FIO commands.
[0048] By initializing SSH, connecting to the corresponding remote server through SSH, creating a compilation directory, transferring FIO source code files, setting weighted permissions for the transferred FIO source code files, and compiling FIO online to generate FIO commands, there is no need to manually log in to the remote server for operation, which reduces the time and effort of manual file transfer and compilation, realizes automatic transmission and compilation of FIO source code files, improves test efficiency, and effectively avoids test failures caused by manual installation errors, improving the accuracy and reliability of test results.
[0049] In some embodiments of the present invention, after using SSH to connect to a remote server, transferring the FIO source code file to the remote server via the SFTP protocol, and compiling it on the remote server to generate a FIO command, thereby realizing automated transmission and compilation of the FIO source code file, the hard disk automated testing method further includes determining whether the FIO command is compiled successfully to ensure that FIO is correctly installed and available.
[0050] Reference Figure 5 As shown, Figure 5 4 is a flowchart of a method for determining whether an FIO command is successfully compiled provided by an embodiment of the present invention. The method for determining whether an FIO command is successfully compiled includes but is not limited to steps S460 to S480. Specifically: S460: Enter the fio --version command to verify whether the FIO command is compiled successfully; S470: In response to the fio --version command, when the return value is a first preset value, it is determined that the FIO command is compiled successfully; S480: In response to the fio --version command, when the return value is a second preset value, determining that the FIO command compilation fails, and sending a compilation error prompt.
[0051] In some embodiments of the present invention, a method for determining whether an FIO command is compiled successfully includes: inputting an fio --version command to verify whether the FIO command is compiled successfully, responding to the fio --version command, when the return value is a first preset value, wherein the first preset value is 0, determining that the FIO command is compiled successfully, and outputting FIO version information; in another case, responding to the fio --version command, when the return value is a second preset value, wherein the second preset value is non-0, determining that the FIO command fails to compile, and sending a compilation error prompt to inform the tester that the FIO command compilation fails, and to troubleshoot in a timely manner.
[0052] By executing the fio --version command and capturing the return value, we can determine whether the FIO command is compiled successfully based on the return value, thereby judging whether the FIO installation status is correctly installed and available. If FIO is installed successfully, the FIO version information is printed. If FIO fails to be installed, the error information is printed and a compilation error prompt is sent to prompt the tester to check the log for timely troubleshooting, which helps to quickly locate the problem and ensure that FIO can be used normally.
[0053] In some embodiments of the present invention, after compiling on the remote server to generate the FIO command, the hard disk automated testing method further includes setting parameters for the FIO command, referring to Figure 6 As shown, Figure 6 1 is a flow chart of a method for setting parameters for an FIO command provided by an embodiment of the present invention. The method for setting parameters for an FIO command includes but is not limited to steps S501 to S503. Specifically: S501: Identify the hard disk on the remote server through the lsblk command; S502: Determine the type of the hard disk by using the cat / sys / block / $device / queue / rotational command. The types of hard disks include solid state disks and mechanical hard disks. S503: Determine parameter settings of the FIO command according to the determined hard disk type.
[0054] In some embodiments of the present invention, the method for setting parameters for the FIO command includes: identifying the hard disks on the remote server, such as sda, sdb, and sdc, through the lsblk command, so as to determine the number of hard disks on the remote server, and further determining the type of the hard disk as a solid state drive or a mechanical hard disk through the cat / sys / block / $device / queue / rotational command, wherein $device is the number of hard disks on the remote server identified by the lsblk command in the previous step. The type of hard disk is determined by the return value, thereby determining the parameter setting of the FIO command in the hard disk automation test method; when the return value is 0, the type of hard disk is determined to be a solid state drive, and when the return value is 1, the type of hard disk is determined to be a mechanical hard disk; the parameter setting of the FIO command is determined according to the determined type of hard disk, and in response to the FIO command with the test parameters set, the performance test is performed on the hard disk to be tested.
[0055] The parameter setting of the FIO command includes but is not limited to the setting of iodepth. When the hard disk type is a solid state hard disk, iodepth is set to 64, and when the hard disk type is a mechanical hard disk, iodepth is set to 32. In the embodiment of the present invention, appropriate test parameters are set for the FIO command according to the type of hard disk to ensure the accuracy and reliability of the test results.
[0056] It should be noted that the parameter settings of the FIO command are set according to the type of hard disk and different target test requirements. Those skilled in the art can complete the parameter settings of the FIO command according to actual conditions. The embodiment of the present invention does not limit the parameter settings of the FIO command.
[0057] In some embodiments of the present invention, in response to an FIO command, a performance test is performed on the hard disk to be tested, and the performance test content and test progress of the hard disk to be tested are uploaded to a host computer, so that the host computer generates a visual test result based on the performance test content and test progress, and the visual test result includes a test display progress bar, and the test display progress bar includes the performance test content and test progress. The test progress includes an initialization phase, an FIO file transmission phase, an FIO compilation phase, a Write test phase, a Read test phase, and a test completion phase.
[0058] Reference Figure 7 As shown, Figure 7 Flow chart of a specific implementation method of step S600 in the hard disk automatic test method provided by an embodiment of the present invention. In step S600, the performance test content and test progress of the hard disk to be tested are uploaded to the host computer so that the host computer generates a visual test result according to the performance test content and test progress. The method includes but is not limited to steps S610 to S620, specifically: S610: Obtain the current performance test content of the hard disk to be tested, and determine the current test progress of the performance test according to the current performance test content; S620: Upload the current performance test content of the hard disk to be tested and the current test progress of the performance test to the host computer to generate a test display progress bar, wherein the current test progress of the performance test is highlighted in the test display progress bar.
[0059] In some embodiments of the present invention, the performance test content includes initialization test, FIO file transmission test, FIO compilation test, Write test, and Read test; wherein, the initialization test is used to provide a test environment, including creating necessary directories and setting permissions, etc., the FIO file transmission test includes transmitting the FIO source code file to a remote server, the FIO compilation test includes compiling the FIO source code on the remote server to generate executable FIO commands, the Write test includes executing a write test to evaluate the write performance of the hard disk, the Read test executes a write test to evaluate the write performance of the hard disk, and the Read test executes a read test to evaluate the read performance of the hard disk.
[0060] The current performance test content of the hard disk to be tested is obtained in real time to determine the current test progress of the performance test based on the current performance test content; the current performance test content of the hard disk to be tested and the current test progress of the performance test are uploaded to the host computer in real time, so that the host computer can generate a visual test display progress bar based on the current performance test content of the hard disk to be tested and the current test progress of the performance test, so as to realize real-time feedback of the test content and test progress, and highlight the current test progress of the performance test in the test display progress bar, thereby improving the visualization of the test results. In addition, the test display progress bar also displays the completion percentage of the current test progress of the performance test, so that the tester can monitor the test progress in real time.
[0061] In some embodiments of the present invention, in a test scenario of multiple remote servers, after importing the BIOS configuration information, there is no need to manually configure the BIOS configuration of the remote servers one by one. By importing the BIOS configuration information, automated testing of multiple remote servers can be achieved, batch operations are supported, and the efficiency of hard disk testing and the degree of test automation are improved; after completing the setting or tuning of the BIOS configuration information of the remote server to ensure that the BIOS configuration information of the remote server is in the best performance state, SSH is used to connect to the remote server, the FIO source code file is transferred to the remote server through the SFTP protocol, and compiled on the remote server to generate FIO commands; in response to the FIO command, a performance test is performed on the hard disk to be tested; the performance test content and test progress of the hard disk to be tested are uploaded to the host computer, so that the host computer generates visual test results based on the performance test content and test progress.
[0062] In one embodiment, the hard disk automatic test is performed on six remote servers at the same time. The six remote servers under test upload the current performance test content of the hard disk under test and the current test progress of the performance test to the host computer in real time, so that the host computer generates a test display progress bar according to the current performance test content of the hard disk and the current test progress of the performance test. Figure 8 As shown, Figure 8 This is a test progress bar display diagram of the hard disk automation test of six remote servers. The test progress includes the initialization stage, FIO file transfer stage, FIO compilation stage, Write test stage, Read test stage and test completion stage. Among them, the current test progress of the performance test is highlighted in the test display progress bar, which improves the visualization of the test progress and enables testers to monitor the test progress in real time. Fig. 9 As shown, Fig. 9 It is a schematic diagram of the test results of the automated hard disk test of six remote servers. The test results clearly show the performance parameters and performance indicators of the hard disks of the six remote servers, which improves the visualization of the test results and enables testers to monitor the performance indicators of the hard disk test in real time, providing accurate data basis for hard disk performance optimization and troubleshooting.
[0063] Reference Fig. 9As shown, the performance parameters and performance indicators of the hard disk include IOPS, bandwidth, latency (average), CPU utilization, IO depth, total I / O and running time. It can be understood that IOPS is an important indicator for measuring the performance of storage devices (such as hard disks, solid-state drives, storage arrays, etc.), which means the number of input / output operations that can be completed per second. IOPS reflects the number of read and write operations that the storage device can handle per unit time and is one of the key parameters for evaluating the performance of the storage system. Total I / O indicates the total number of inputs / outputs. Total I / O is an indicator for measuring the total amount of data processed by a storage device or system in a specific time period. For example, when the total I / O is 3000 GiB, it means that during the test or operation, the hard disk processed a total of 3000 GiB of data. It should be noted that the "GiB" here is the abbreviation of Gibibyte, which is a binary-based unit of measurement. 1 GiB is equal to 2 30 Bytes, which is approximately equal to 1.2GB.
[0064] The hard disk automatic testing method provided by the embodiment of the present invention is described below with a general implementation.
[0065] Import configuration information, including preset BIOS configuration parameters. Use the Redfish interface to query the current BIOS configuration information of the remote server by requesting https: / / {BMC_IP} / redfish / v1 / Systems / 1 / Bios in GET mode, and compare the BIOS configuration information of the remote server with the preset BIOS configuration parameters to determine whether the preset optimal performance configuration is met. If not, use the PATCH command to request the https: / / {BMC_IP} / redfish / v1 / Systems / 1 / Bios / Settings interface to update the BIOS configuration information of the remote server to the preset BIOS configuration parameters, and automatically update the BIOS configuration information to ensure that the BIOS configuration information of the remote server reaches the optimal performance state, thereby improving the accuracy and reliability of the hard disk test. Then send a POST command to request the remote server to restart through the restart request interface https: / / {} / redfish / v1 / Systems / 1 / Actions / ComputerSystem.Reset to make the updated BIOS configuration information effective, without manual intervention, thereby improving the automation of the hard disk test.
[0066] Specifically, in one embodiment, obtaining the current BIOS configuration information of the remote server and automatically optimizing the BIOS configuration information of the remote server is implemented by the following code: PI_LIST = { "get_bios": "https: / / {} / redfish / v1 / Systems / 1 / Bios", "set_bios": "https: / / {} / redfish / v1 / Systems / 1 / Bios / Settings", "restart_system":"https: / / {} / redfish / v1 / Systems / 1 / Actions / ComputerSystem.Reset" } BMC_IP, username, password, attributes = config["BMC_IP"], config["username"], config["password"], config["attributes"] token, session_id = get_session(BMC_IP, username, password) msg_obj = Msg(self, BMC_IP, token, session_id) # Get the current BIOS configuration information of the remote server current_bios_setting=get_bios(BMC_IP, token, API_LIST["get_bios"].format(BMC_IP)) f not current_bios_settings: msg_obj.send(0, "Failed to obtain BIOS settings") Return Compare the remote server's BIOS configuration information with the preset BIOS configuration parameters to determine whether they meet the preset optimal performance configuration attributes_to_patch = {} for key, value in attributes.items(): if key in current_bios_settings and current_bios_settings[key] !=value: attributes_to_patch[key] = value if not attributes_to_patch: # If the BIOS configuration information of the remote server meets the preset configuration for optimal performance msg_obj.send(1, "BIOS configuration verification successful") else: # If the BIOS configuration information of the remote server does not meet the preset optimal performance configuration result = patch_bios(BMC_IP, token, API_LIST["set_bios"].format(BMC_IP), attributes_to_patch) if not result: msg_obj.send(0, "BIOS setup failed") return else: msg_obj.send(1, "BIOS setup information updated successfully") Specifically, requesting the remote server to restart is implemented through the following code: restart_result=restart_system(BMC_IP,token,API_LIST["restart_system"].format(BMC_IP)) if not restart_result: msg_obj.send(0, "Remote server restart failed") return else: msg_obj.send(1, "The remote server has been restarted, and the configuration needs to be reconfirmed") Initialize SSH, copy the FIO source code file to the compilation directory of the remote server, start the SSH connection to automatically log in to the remote server, use the SFTP protocol to transfer files, perform weighted processing on the compilation directory and FIO source code files, compile the source code of the FIO source code file online on the remote server, generate executable FIO commands, and finally verify whether the FIO command is compiled successfully. The FIO source code file is automatically transmitted and compiled without the need to manually log in to the remote server for operation, which reduces the time and effort of manual file transmission and compilation, improves test efficiency, and effectively avoids test failures caused by manual installation errors.
[0067] Specifically, initialize SSH and use SSH to connect to the remote server through the following code: ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) # Automatically add host key # Connect to the remote server ssh.connect(REMOTE_HOST, username=REMOTE_USER, password=REMOTE_PASSWORD) Specifically, copying the FIO source code file to the compilation directory of the remote server is achieved through the following code: sftp = ssh.open_sftp() for root, dirs, files in os.walk(LOCAL_FIO_DIR): for file in files: local_path = os.path.join(root, file) # Use REMOTE_DIR directly as the remote path without retaining the subdirectory structure remote_path = os.path.join(REMOTE_DIR, file) # Copy files sftp.put(local_path, remote_path) print(f"Copied file: {local_path} -> {remote_path}") sftp.close() Specifically, the online compilation of the source code of the FIO source code file on the remote server is implemented by the following code: command = f"chmod 777 -R {REMOTE_DIR}&& cd {REMOTE_DIR} && . / configure && make && sudo make install" stdin, stdout, stderr = ssh.exec_command(command) exit_status = stdout.channel.recv_exit_status() if exit_status != 0: msg_obj.send(0, "Failed to execute fio compile command") Specifically, verifying whether the FIO command is compiled successfully is implemented through the following code: stdin, stdout, stderr = ssh.exec_command("fio --version") exit_status = stdout.channel.recv_exit_status() if exit_status != 0: msg_obj.send(0, "FIO command does not exist") print("Error output:") print(stderr.read().decode()) sh.close() msg_obj.send(1, "FIO command exists, compiled successfully") Use the lsblk command to extract how many hard disks the remote server has, such as sda, sdb, and sdc. Then use the cat / sys / block / $device / queue / rotational command to determine the type of the hard disk, and determine the type of the hard disk by capturing the return value. When the return value is 0, the type of the hard disk is a solid-state drive. When the return value is 1, the type of the hard disk is a mechanical hard disk. Confirm the parameter setting of the FIO command based on the determined type of the hard disk, and perform a performance test on the hard disk to be tested in response to the FIO command with completed parameter settings; upload the performance test content and test progress of the hard disk to be tested to the host computer, so that the host computer generates visual test results based on the performance test content and test progress, thereby improving the visualization of the test results and enabling testers to monitor the test progress and performance indicators in real time, providing accurate data basis for hard disk performance optimization and troubleshooting.
[0068] In some embodiments of the present invention, a computer device 1000 is further provided, referring to Fig.10 As shown, Fig.10It is a structural diagram of a computer device 1000 provided in an embodiment of the present invention, including a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor executes the program to implement the hard disk automatic testing method described in the above embodiment. Specifically, the electronic device includes a processor 1001, which can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the method provided in the embodiment of the present invention; the memory 1002 can be implemented in the form of a read-only memory 1002 (Read Only Memory, ROM), a static storage device, a dynamic storage device or a random access memory 1002 (Random Access Memory, RAM). The memory 1002 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1002 and are called by the processor 1001 to execute the embodiments of the present invention; the input / output interface 1003 is used to implement information input and output; the communication interface 1004 is used to implement communication interaction between the device and other devices, and communication can be achieved through wired methods (such as USB, network cables, etc.) or wireless methods (such as mobile networks, WIFI, Bluetooth, etc.); a bus transmits information between various components of the device (such as the processor 1001, the memory 1002, the input / output interface 1003 and the communication interface 1004); wherein the processor 1001, the memory 1002, the input / output interface 1003 and the communication interface 1004 are connected to each other within the device through the bus.
[0069] It should be appreciated that the method steps in the embodiments of the present invention can be implemented or implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The method can use standard programming techniques. Each program can be implemented in a high-level process or object-oriented programming language to communicate with a computer system. However, if necessary, the program can be implemented in an assembly or machine language. In any case, the language can be a compiled or interpreted language. In addition, the program can be run on a programmed ASIC for this purpose.
[0070] In addition, the operations of the processes described herein may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and / or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) that is executed collectively on one or more processors, by hardware, or a combination thereof. The computer program includes a plurality of instructions that may be executed by one or more processors.
[0071] Further, the method can be implemented in any type of computing platform that is operably connected to a suitable computer, including but not limited to a personal computer, a minicomputer, a mainframe, a workstation, a network or distributed computing environment, a separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, etc. Various aspects of the present invention can be implemented in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, an optical read and / or write storage medium, a RAM, a ROM, etc., so that it can be read by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the process described herein. In addition, the machine-readable code, or portions thereof, can be transmitted via a wired or wireless network. When such media includes instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor, the invention described herein includes these and other different types of non-transitory computer-readable storage media. When programmed according to the methods and techniques of the present invention, the present invention can also include the computer itself.
[0072] The computer program can be applied to input data to perform the functions described herein, thereby converting the input data to generate output data stored in a non-volatile memory. The output information can also be applied to one or more output devices such as a display. In a preferred embodiment of the present invention, the converted data represents physical and tangible objects, including specific visual depictions of physical and tangible objects produced on the display.
[0073] The above is only a preferred embodiment of the present invention. The present invention is not limited to the above implementation. As long as the technical effect of the present invention is achieved by the same means, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of protection of the present invention. Within the scope of protection of the present invention, its technical scheme and / or implementation method may have various modifications and changes.
Claims
1. A hard disk automated testing method, characterized in that: The method comprises the following steps: S100: importing configuration information, where the configuration information includes preset BIOS configuration parameters; S200: Acquire current BIOS configuration information of the remote server, and determine the consistency between the BIOS configuration information and the BIOS configuration parameters; S300: If the BIOS configuration information and the BIOS configuration parameters do not meet the consistency requirement, update the BIOS configuration information, and restart the remote server to make the updated BIOS configuration information take effect; S400: Connect to the remote server using SSH, transfer the FIO source code file to the remote server through the SFTP protocol, and compile on the remote server to generate FIO commands; S500: In response to the FIO command, a performance test is performed on the hard disk to be tested; S600: Upload the performance test content and test progress of the hard disk to be tested to a host computer, so that the host computer generates a visual test result according to the performance test content and the test progress.
2. The hard disk automated testing method according to claim 1, characterized in that: The BIOS configuration parameter is a first key-value pair in JSON format, and step S200 includes: S210: query the current BIOS configuration information of the remote server in a GET manner through a Redfish interface, where the BIOS configuration information is a second key-value pair in a JSON format; S220: performing proofreading on the first key-value pair corresponding to the BIOS configuration parameter and the second key-value pair corresponding to the BIOS configuration information to obtain a proofreading result; S230: Determine the consistency between the BIOS configuration information and the BIOS configuration parameters according to the verification result.
3. The hard disk automated testing method according to claim 1, characterized in that: The step S300 includes: S310: If the BIOS configuration information and the BIOS configuration parameters do not meet the consistency requirement, send a PATCH command; S320: In response to the PATCH command, set the BIOS configuration parameter as a tuning parameter, and use the tuning parameter to perform a tuning action on the BIOS configuration information of the remote server to update the BIOS configuration information; S330: Sending a POST command through a restart request interface to request the remote server to restart; S340: When it is detected that the IP address of the remote server is pinged successfully, it is determined that the remote server is restarted successfully; S350: Re-acquire the BIOS configuration information of the remote server, and when the re-acquired BIOS configuration information of the remote server is consistent with the tuning parameter, determine that the updated BIOS configuration information is effective.
4. The hard disk automated testing method according to claim 1, characterized in that: The configuration information also includes login parameters for connecting to the remote server and connection parameters for establishing an SSH connection, wherein the login parameters include the IP address of the BMC, the login user name of the BMC, and the login password of the BMC; and the connection parameters include the IP address of the remote server, the login user name of the remote server, and the login password of the remote server.
5. The hard disk automatic testing method according to claim 4, characterized in that: The step S400 includes: S410: Creating an SSH object according to the IP address of the remote server, the login user name of the remote server, and the login password of the remote server to initialize SSH; S420: Connect to the corresponding remote server through SSH, and create a compilation directory in response to the mkdir command; S430: Transfer the FIO source code file to the remote server via the SFTP protocol, and close the SFTP protocol connection; S440: performing weighted processing on the compilation directory and the FIO source code file; S450: In the FIO source code file, execute configure, make, and make install commands to perform online compilation to generate FIO commands.
6. The hard disk automated testing method according to claim 5, characterized in that: The method further comprises: S460: Enter the fio --version command to verify whether the FIO command is compiled successfully; S470: In response to the fio --version command, when the return value is a first preset value, determining that the FIO command is compiled successfully; S480: In response to the fio --version command, when the return value is a second preset value, determining that the FIO command compilation fails, and sending a compilation error prompt.
7. The hard disk automated testing method according to claim 1, characterized in that: The method further comprises: S501: Identify the hard disk on the remote server through the lsblk command; S502: Determine the type of the hard disk by using the cat / sys / block / $device / queue / rotational command, where the type of the hard disk includes a solid state drive and a mechanical hard disk; S503: Determine parameter settings of the FIO command according to the determined hard disk type.
8. The hard disk automated testing method according to claim 1, characterized in that: The visual test result includes a test display progress bar, which includes the performance test content and the test progress. The test progress includes an initialization phase, an FIO file transmission phase, an FIO compilation phase, a Write test phase, a Read test phase, and a test completion phase. Step S600 includes: S610: Acquire the current performance test content of the hard disk to be tested, and determine the current test progress of the performance test according to the current performance test content; S620: Upload the current performance test content of the hard disk to be tested and the current test progress of the performance test to the host computer to generate a test display progress bar, wherein the current test progress of the performance test is highlighted in the test display progress bar.
9. A computer device comprising a memory and a processor, characterized in that: The method according to any one of claims 1 to 8 is implemented when the processor executes the computer program stored in the memory.
10. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Method and device for automatically obtaining BIOS drive and upgrading, computer equipment and storage medium
CN110851165A
Server test method and device, electronic equipment and storage medium
CN116594826A
Server disk performance test method and device, equipment and storage medium
CN118796646A
Cited By
Server configuration management system based on Redfish protocol
CN120223498A
Intelligent pressure testing method for server hardware, computer device and storage device
CN120803878A
Python-based multi-thread remote server stability test system and method
CN121501688A