An OID node testing method, device, apparatus and storage medium
By automating the use of the snmpwalk command to test OID nodes in BMC and enabling rapid collection and saving of information on a web interface, the problem of incomplete OID node information output is solved, thus improving testing efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR (SHANDONG) COMPUTER TECH CO LTD
- Filing Date
- 2023-06-16
- Publication Date
- 2026-06-05
Smart Images

Figure CN116708118B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of server monitoring and testing technology, and in particular to an OID node testing method, apparatus, device, and storage medium. Background Technology
[0002] Currently, the Baseboard Management Controller (BMC) uses SNMP services for status monitoring. However, testing and information acquisition of OID nodes require command-line operations using the SNMPwalk service. The SNMPwalk command needs to be executed from a terminal with appropriate remote access to the BMC, or from a terminal with the SNMPwalk service installed. However, during OID node availability testing and the output of relevant information for each OID node, using the SNMPwalk command in a shell terminal cannot quickly and completely output the information for each correctly tested OID. Furthermore, it requires verifying and organizing the information for each OID node individually, which is detrimental to problem analysis and data acquisition. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide an OID node testing method, apparatus, device, and storage medium that can quickly and completely output information related to each OID node, and facilitate problem analysis and data acquisition. The specific solution is as follows:
[0004] Firstly, this application discloses an OID node testing method, including:
[0005] Perform node testing operations on each OID node using preset testing methods;
[0006] Based on the test results of each OID node, the corresponding OID node information is output to the target file for storage;
[0007] Determine whether the node test operation currently being performed on each of the OID nodes has ended and obtain the corresponding determination result;
[0008] Based on the judgment result, the target file containing the OID node information is saved to the user terminal so that the user can analyze and view the information in the target file.
[0009] Optionally, the node testing operation performed on each OID node using a preset testing method includes:
[0010] Receive target commands sent from the user terminal;
[0011] Determine whether the target command is an IPMI command;
[0012] If the target command is the IPMI command, then the target script file is executed according to the IPMI command to perform node testing operations on each OID node; wherein, the target script file is a script file that stores the snmpwalk command for each OID node;
[0013] If the target command is not the IPMI command, then the step of receiving the target command sent by the user terminal and its subsequent steps are re-executed;
[0014] Accordingly, after performing node testing operations on each OID node using a preset testing method, the process further includes:
[0015] Determine whether the node test operation was successful;
[0016] If the node test operation is successful, then the step of outputting the corresponding OID node information to the target file for storage based on the test results of each OID node and subsequent steps are executed.
[0017] If the node test operation fails, the step of executing the target script file according to the IPMI command to perform node test operations on each OID node is re-executed.
[0018] Optionally, the node testing operation performed on each OID node using a preset testing method includes:
[0019] The node test operation is performed on each OID node according to the received file retrieval instruction; the file retrieval instruction is the instruction issued by the user terminal clicking the file retrieval button on the web interface.
[0020] Optionally, before outputting the corresponding OID node information to the target file for storage based on the test results of each OID node, the method further includes:
[0021] The target OID node that passed the test is determined from the test results corresponding to each OID node.
[0022] Optionally, the step of outputting the corresponding OID node information to a target file for storage based on the test results of each OID node includes:
[0023] The OID node information corresponding to the target OID node that passed the test in the test results is output to the target file for storage.
[0024] Optionally, the step of saving the target file containing the OID node information to the user terminal based on the judgment result so that the user can analyze and view the information in the target file includes:
[0025] If the determination result indicates that the node test operation performed on each of the OID nodes has ended, then the target file storing the OID node information is copied to the user terminal so that the user can analyze and view the information in the target file.
[0026] Optionally, the step of saving the target file containing the OID node information to the user terminal based on the judgment result so that the user can analyze and view the information in the target file includes:
[0027] If the judgment result indicates that the node testing operation performed on each of the OID nodes has ended, then the target file containing the OID node information is downloaded and saved to the user terminal according to the received file download instruction so that the user can analyze and view the information in the target file; wherein, the file download instruction is an instruction issued by the user terminal clicking the file download button on the web interface.
[0028] Secondly, this application discloses an OID node testing device, comprising:
[0029] The node testing module is used to perform node testing operations on each OID node using preset testing methods.
[0030] The information output module is used to output the corresponding OID node information to the target file for storage based on the test results of each OID node;
[0031] The judgment module is used to determine whether the node test operation currently being performed on each of the OID nodes has ended and to obtain the corresponding judgment result;
[0032] The file saving module is used to save the target file containing the OID node information to the user terminal based on the judgment result so that the user can analyze and view the information in the target file.
[0033] Thirdly, this application discloses an electronic device, including:
[0034] Memory, used to store computer programs;
[0035] A processor is used to execute the computer program to implement the steps of the aforementioned disclosed OID node testing method.
[0036] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed OID node testing method.
[0037] As can be seen, this application provides an OID node testing method, including: performing node testing operations on each OID node using a preset testing method; outputting the corresponding OID node information to a target file for storage based on the test results of each OID node; determining whether the node testing operation on each OID node has ended and obtaining a corresponding determination result; and saving the target file containing the OID node information to a user terminal based on the determination result so that the user can analyze and view the information in the target file. Therefore, this application utilizes a preset testing method to perform node testing operations on each OID node, testing the OID nodes more comprehensively and meticulously, thereby completing the complete testing work. Furthermore, it outputs the corresponding OID node information to a target file based on the test results, realizing the collection of OID node-related information. It can also save the target file containing the OID node information to the user terminal. In other words, the above technical solution of this application effectively completes the testing of OID nodes and the generation of information files, thereby enabling the rapid and complete output of information related to each OID node, which is beneficial for problem analysis and data acquisition. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0039] Figure 1 This is a flowchart of an OID node testing method disclosed in this application;
[0040] Figure 2 This is a flowchart of a specific OID node testing method disclosed in this application;
[0041] Figure 3 This is a flowchart of a specific OID node testing method disclosed in this application;
[0042] Figure 4 This is a flowchart of a specific OID node testing method disclosed in this application;
[0043] Figure 5 This is a flowchart of a specific OID node testing method disclosed in this application;
[0044] Figure 6 This is a flowchart of another specific OID node testing method disclosed in this application;
[0045] Figure 7 This is a schematic diagram of the structure of an OID node testing device disclosed in this application;
[0046] Figure 8 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] Currently, status monitoring in BMC is performed using SNMP services. However, testing and information acquisition of OID nodes require command-line operations using the SNMPwalk service. The SNMPwalk command needs to be executed from a terminal with appropriate remote access to the BMC, or from a terminal with the SNMPwalk service installed. However, during OID node availability testing and the output of relevant information for each OID node, using the SNMPwalk command in a shell terminal cannot quickly and completely output the information of each tested and functioning OID. Furthermore, it requires verifying and organizing the information of each OID node individually, which is detrimental to problem analysis and data acquisition. Therefore, this application provides an OID node testing scheme that can quickly and completely output information related to each OID node, facilitating problem analysis and data acquisition.
[0049] This invention discloses an OID node testing method, see [link to relevant documentation]. Figure 1 As shown, the method includes:
[0050] Step S11: Perform node testing operations on each OID node using the preset test method.
[0051] It should be noted that currently, BMC uses SNMP service for status monitoring. However, testing and information retrieval of OID nodes require command-line operations using the SNMP Walk service. But SNMP Walk commands require authorized remote access to the BMC terminal, or the operation must be performed on a terminal with the SNMP Walk service installed. To address this, this implementation installs the SNMP Walk service in the BMC and uses preset testing methods to automate the testing of each OID node using SNMP Walk commands. For example, an IPMI command can be used to automate the testing of each OID node using SNMP Walk commands, or users can click the file retrieval button on the web interface instead of manually entering SNMP Walk commands in the terminal, which also provides a convenient and effective way to test the availability of OID nodes.
[0052] Step S12: Based on the test results of each OID node, output the corresponding OID node information to the target file for storage.
[0053] It should be noted that OID node testing is performed using preset testing methods, and information data is collected simultaneously. Based on the test results of each OID node, the collected OID node-related information is output to a file. For example, snmpwalk can be used to process each OID node, and the IPMI command can be used to collect and output the OID node-related information to a document based on the test results of each OID node. Alternatively, the OID node information can be collected and processed by clicking the file acquisition button on the web interface, generating an OID node information file with one click and uploading it to the web. In other words, clicking the file acquisition button completes the action of using snmpwalk to output the OID node information file.
[0054] Step S13: Determine whether the node test operation performed on each of the OID nodes has ended and obtain the corresponding determination result.
[0055] In this embodiment, it is determined whether the current OID node test has ended. If the determination result indicates that the node test operation performed on each of the OID nodes has not ended, the operation of testing the OID nodes and outputting the relevant OID nodes to the target file continues.
[0056] Step S14: Based on the judgment result, save the target file containing the OID node information to the user terminal so that the user can analyze and view the information in the target file.
[0057] In this embodiment, when the node testing operation for each of the OID nodes ends, there are two ways to save the target file to the user terminal. First, if the determination result indicates that the node testing operation for each of the OID nodes has ended, the target file storing the OID node information is copied to the user terminal so that the user can analyze and view the information in the target file. Second, if the determination result indicates that the node testing operation for each of the OID nodes has ended, the target file storing the OID node information is downloaded according to the received file download instruction and saved to the user terminal so that the user can analyze and view the information in the target file. The file download instruction is issued by the user terminal clicking the file download button on the web interface. In other words, it determines whether the current OID node test has ended. If it has, the target file is copied to the local machine or saved to the local machine by the user clicking the file download button on the web interface, so that the user can view the OID node description, node type, OID information of the included node values, meaning information of the node values, node names, etc., contained in the file. By analyzing the OID information in the output file, the effect of using the SNMP Walk service to monitor and test various information of the system is achieved. In other words, the web interface implements an OID file output page, providing "File Acquisition" and "File Download" buttons. Clicking the "File Acquisition" button completes the full testing of all OID nodes using the snmpwalk command and outputs the OID node information file. Clicking the "File Download" button downloads the file to the local machine for viewing. This allows viewing the OID information in the target file and then analyzing various system information about the OID nodes. For example, it allows viewing CPU (Central Processing Unit) status information, including the OID node's description, node type, the OID information of the included node values, the meaning of the node values, and the node name of the node value.
[0058] Therefore, in this embodiment, a preset testing method is used to perform node testing operations on each OID node, which tests the OID nodes more comprehensively and meticulously, thereby completing the complete testing work. Then, based on the test results, the corresponding OID node information is output to the target file, realizing the collection of OID node-related information. The target file containing the OID node information can also be saved to the user terminal. That is, the above-mentioned technical solution of this application effectively completes the work of testing OID nodes and generating information files, thereby enabling the rapid and complete output of information related to each OID node, which is beneficial to problem analysis and data acquisition.
[0059] See Figure 2As shown, this embodiment of the invention discloses a specific OID node testing method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution.
[0060] Step S21: Perform node testing operations on each OID node using the preset test method.
[0061] Step S22: Determine whether the node test operation was successful.
[0062] In this embodiment, after performing node testing operations on each OID node using a preset testing method, it can also be determined whether the current node testing operation is successful.
[0063] Step S23: If the node test operation fails, the step of performing node test operation on each OID node using the preset test method is re-executed.
[0064] In this embodiment, if the current node test operation fails, the step of performing node test operations on each OID node using the preset test method is re-executed.
[0065] Step S24: If the node test operation is successful, proceed to step S25 and subsequent steps.
[0066] In this embodiment, if the node test operation is successful, the subsequent step of outputting the corresponding OID node information to the target file for storage based on the test results of each OID node is executed.
[0067] Step S25: Based on the test results of each OID node, output the corresponding OID node information to the target file for storage.
[0068] Step S26: Determine whether the node test operation performed on each of the OID nodes has ended and obtain the corresponding determination result.
[0069] Step S27: Based on the judgment result, save the target file containing the OID node information to the user terminal so that the user can analyze and view the information in the target file.
[0070] For details regarding steps S21 and S25 to S27, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
[0071] Therefore, in this embodiment, a preset testing method is used to perform node testing operations on each OID node, which tests the OID nodes more comprehensively and meticulously, and determines whether the test operation is successful, so as to ensure successful node testing and complete the complete testing work. Then, based on the test results, the corresponding OID node information is output to the target file, realizing the collection of OID node-related information. The target file containing the OID node information can also be saved to the user terminal. That is, the above-mentioned technical solution of this application effectively completes the work of testing OID nodes and generating information files, thereby enabling the rapid and complete output of information related to each OID node, which is beneficial to problem analysis and data acquisition.
[0072] See Figure 3 As shown, this embodiment of the invention discloses a specific OID node testing method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution.
[0073] Step S31: Execute the target script file according to the ipmi command to perform node testing operations on each OID node; wherein, the target script file is a script file that stores the snmpwalk command for each OID node.
[0074] In this embodiment, for the process where there is currently no OID node testing and no output of relevant information for each OID node, a target script file is executed according to the IPMI command to perform node testing operations on each OID node; wherein, the target script file is a script file that stores the snmpwalk commands for each OID node. It can be understood that the relevant commands for OID node testing and OID node information output using snmpwalk are written into a script file, and then made into an IPMI command in the BMC. This IPMI command is used to execute the script file, and then operates on the executed snmpwalk commands to verify the availability of each OID node and obtain OID node information. The obtained information is then processed and output to a file. In other words, snmpwalk is used to process each OID node, and the IPMI command is used to collect and output relevant OID node information to a document.
[0075] In one specific implementation, a target command sent by a user terminal is received; it is determined whether the target command is an IPMI command; if the target command is an IPMI command, a target script file is executed according to the IPMI command to perform node testing operations on each OID node; wherein, the target script file is a script file storing the snmpwalk command for each OID node; if the target command is not an IPMI command, the step of receiving the target command sent by the user terminal and its subsequent steps are re-executed; it is determined whether the node testing operation is successful; if the node testing operation is successful, the step of outputting the corresponding OID node information to a target file for storage based on the test results of each OID node and its subsequent steps are executed; if the node testing operation fails, the step of executing the target script file according to the IPMI command to perform node testing operations on each OID node is re-executed. In other words, before and after executing the target script file according to the IPMI command to perform node testing operations on each OID node, the determination of whether the command is an IPMI command and the determination of whether the test operation is successful are added, thereby improving the accuracy of the test.
[0076] Step S32: Based on the test results of each OID node, output the corresponding OID node information to the target file for storage.
[0077] Step S33: Determine whether the node test operation performed on each of the OID nodes has ended and obtain the corresponding determination result.
[0078] Step S34: Based on the judgment result, save the target file containing the OID node information to the user terminal so that the user can analyze and view the information in the target file.
[0079] For details regarding steps S32 to S34, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
[0080] As can be seen, in this embodiment, the node testing operation is performed on each OID node according to the test method of executing the target script file according to the IPMI command. This provides a more comprehensive and detailed test of the OID nodes. Before and after executing the target script file according to the IPMI command to perform node testing operations on each OID node, the determination of whether the command is an IPMI command and whether the test operation is successful are added. This improves the accuracy of the test and ensures the completion of the complete test work. Then, based on the test results, the corresponding OID node information is output to the target file, realizing the collection of OID node-related information. The target file storing the OID node information can also be saved to the user terminal. That is, the above-mentioned technical solution of this application effectively completes the work of testing OID nodes and generating information files, thereby enabling the rapid and complete output of information related to each OID node, which is beneficial to problem analysis and data acquisition.
[0081] See Figure 4 As shown, this embodiment of the invention discloses a specific OID node testing method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution.
[0082] Step S41: Perform node testing operations on each OID node according to the received file retrieval instruction; the file retrieval instruction is the instruction issued by the user terminal clicking the file retrieval button on the web interface.
[0083] Understandably, the file retrieval command enables node testing of each OID node. Users can simply click the "File Retrieval" button on the web interface to output OID node information files using the `snmpwalk` command, replacing the need to manually enter the `snmpwalk` command in the terminal. This provides a more convenient and effective way to test the availability of OID nodes. In other words, clicking the "File Retrieval" button on the web interface allows for the collection and processing of OID node information, generating OID node information files and uploading them to the web interface with a single click.
[0084] Step S42: Based on the test results of each OID node, output the corresponding OID node information to the target file for storage.
[0085] Step S43: Determine whether the node test operation performed on each of the OID nodes has ended and obtain the corresponding determination result.
[0086] Step S44: Based on the judgment result, save the target file containing the OID node information to the user terminal so that the user can analyze and view the information in the target file.
[0087] For details regarding steps S42 to S44, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
[0088] As can be seen, in this embodiment, the file acquisition command enables node testing of each OID node, allowing for more comprehensive and detailed testing of the OID nodes and ensuring the completion of the full testing process. Based on the test results, the corresponding OID node information is output to the target file, achieving the collection of OID node-related information. Furthermore, the target file containing the OID node information can be saved to the user terminal. Therefore, the above technical solution effectively completes the testing of OID nodes and the generation of information files, enabling rapid and complete output of information related to each OID node, which is beneficial for problem analysis and data acquisition.
[0089] See Figure 5 As shown, this embodiment of the invention discloses a specific OID node testing method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution.
[0090] Step S51: Perform node testing operations on each OID node using the preset test method.
[0091] Step S52: Determine the target OID node that has passed the test from the test results corresponding to each OID node.
[0092] In this embodiment, a preset test method is used to perform node testing on each OID node to obtain the corresponding test results. Then, the target OID node that is normal in the test results corresponding to each OID node is determined.
[0093] Step S53: Output the OID node information corresponding to the target OID node that passed the test in the test results to the target file for storage.
[0094] In this embodiment, after determining the target OID node that has passed the test from the test results corresponding to each OID node, the OID node information corresponding to the target OID node that has passed the test from the test results is output to the target file for storage.
[0095] Step S54: Determine whether the node test operation performed on each of the OID nodes has ended and obtain the corresponding determination result.
[0096] Step S55: Based on the judgment result, save the target file containing the OID node information to the user terminal so that the user can analyze and view the information in the target file.
[0097] For details regarding steps S51, S54, and S55, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
[0098] Therefore, in this embodiment, a preset testing method is used to perform node testing operations on each OID node, which tests the OID nodes more comprehensively and meticulously, thereby completing the complete testing work. Then, based on the test results, the node information of the OID nodes that have passed the test is output to the target file, realizing the collection of OID node-related information. The target file containing the OID node information can also be saved to the user terminal. That is, the above-mentioned technical solution of this application effectively completes the work of testing OID nodes and generating information files, thereby enabling the rapid and complete output of information related to each OID node, which is beneficial to problem analysis and data acquisition.
[0099] For example, see Figure 6As shown, the snmpwalk commands for each OID node are written into a script file. OID node testing is performed by executing the script file using the IPMI command or by clicking the file retrieval button on the web interface, simultaneously collecting information and data. If the script file is executed using the IPMI command, the OID node test is performed according to the received IPMI command, and the information of successfully tested OID nodes is output to a file. If the user clicks the file retrieval button on the web interface, a file retrieval instruction is received, and the corresponding interface function performs the OID node testing and information collection operations, outputting the relevant information of successfully tested OID nodes to a file. The system then determines whether the current OID node test is complete. If it is, the file is copied to the local machine or saved locally by the user clicking the file download button, allowing the user to view the OID node description, node type, OID information of the included node values, meaning information of the node values, node names, etc., contained in the file. If the test is not complete, the commands for testing the OID nodes continue to be executed. In other words, SNMP Walk is used to process each OID node. The IPMI command is used to collect OID node information and output it to a document. This document can then be copied to the local machine for analysis and viewing. Alternatively, the OID node information can be collected and processed by clicking the file download button in the web interface. An OID node information file can be generated with one click, uploaded to the web, and downloaded to the local machine for analysis and viewing. By analyzing the OID information in the output file, the SNMP Walk service can be used to monitor and test various system information. Specifically, SNMP Walk commands are used to perform a complete test on all OID nodes. Based on the retrieved information, all information of the corresponding OID node is extracted, collected, and output to a file. The file can then be downloaded to the local machine via the file download button provided in the web interface. The file allows for easier retrieval of OID node descriptions, node types, OID information including node values, the meaning of node values, and node names, effectively completing the testing of OID nodes and generating information files with a single click.
[0100] Therefore, the above-mentioned technical solution of the present invention is mainly used to solve the problems of availability testing of each OID node and outputting OID node related information to a file. It can test whether a certain OID node is available, and can also test each OID node and output OID node related information to a file. The file can be downloaded from the web page to view the relevant data of available OID nodes, so as to achieve more comprehensive and detailed testing of OID nodes and output the collected OID node related information to a file.
[0101] Accordingly, this application also discloses an OID node testing device, see [link to relevant documentation]. Figure 7 As shown, the device includes:
[0102] Node testing module 11 is used to perform node testing operations on each OID node using preset testing methods;
[0103] The information output module 12 is used to output the corresponding OID node information to the target file for storage based on the test results of each OID node;
[0104] The judgment module 13 is used to determine whether the node test operation performed on each of the OID nodes has ended and obtain the corresponding judgment result;
[0105] The file saving module 14 is used to save the target file containing the OID node information to the user terminal based on the judgment result so that the user can analyze and view the information in the target file.
[0106] As can be seen from the above, the embodiments of this application utilize a preset testing method to perform node testing operations on each OID node, thereby testing the OID nodes more comprehensively and meticulously, thus completing the complete testing work. Based on the test results, the corresponding OID node information is output to the target file, realizing the collection of OID node-related information. The target file containing the OID node information can also be saved to the user terminal. That is, the above-mentioned technical solution of this application effectively completes the testing of OID nodes and the generation of information files, thereby enabling the rapid and complete output of information related to each OID node, which is beneficial for problem analysis and data acquisition.
[0107] In some specific embodiments, the node testing module 11 may specifically include:
[0108] The command receiving unit is used to receive target commands issued by the user terminal.
[0109] A command determination unit is used to determine whether the target command is an IPMI command;
[0110] The first node testing unit is configured to execute a target script file to perform node testing operations on each OID node according to the IPMI command if the target command is the IPMI command; wherein, the target script file is a script file that stores the snmpwalk command for each OID node;
[0111] The first step re-execution unit is used to re-execute the step of receiving the target command sent by the user terminal and its subsequent steps if the target command is not the IPMI command.
[0112] In some specific embodiments, after performing node testing operations on each OID node using a preset testing method, it may further include:
[0113] A test judgment unit is used to determine whether the node test operation is successful.
[0114] The step jump execution unit is used to execute the step of outputting the corresponding OID node information to the target file for storage based on the test results of each OID node and subsequent steps if the node test operation is successful.
[0115] The second step, the re-execution unit, is used to re-execute the step of executing the target script file according to the IPMI command to perform node testing operations on each OID node if the node test operation fails.
[0116] In some specific embodiments, the node testing module 11 may specifically include:
[0117] The second node testing unit is used to perform node testing operations on each OID node according to the received file retrieval instruction; the file retrieval instruction is the instruction issued by the user terminal clicking the file retrieval button on the web interface.
[0118] In some specific embodiments, the OID node testing device may further include:
[0119] The node determination module is used to determine the target OID node that has passed the test from the test results corresponding to each of the OID nodes.
[0120] In some specific embodiments, the information output module 12 may specifically include:
[0121] The information output unit is used to output the OID node information corresponding to the target OID node that passed the test in the test results to the target file for storage.
[0122] In some specific embodiments, the file saving module 14 may specifically include:
[0123] The first file storage unit is used to copy the target file containing the OID node information to the user terminal so that the user can analyze and view the information in the target file if the judgment result indicates that the node test operation performed on each of the OID nodes has ended.
[0124] In some specific embodiments, the file saving module 14 may specifically include:
[0125] The second file saving unit is used to download a target file containing information about the tested OID nodes that has been successfully tested, and save it to the user terminal so that the user can analyze and view the information in the target file if the judgment result indicates that the node testing operation performed on each of the OID nodes has ended. The file download instruction is an instruction issued by the user terminal when clicking the file download button on the web interface.
[0126] Furthermore, embodiments of this application also provide an electronic device. Figure 8 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0127] Figure 8 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the OID node testing method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0128] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0129] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0130] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the OID node testing method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.
[0131] Furthermore, embodiments of this application also disclose a computer-readable storage medium storing a computer program. When the computer program is loaded and executed by a processor, it implements the OID node testing method steps disclosed in any of the foregoing embodiments.
[0132] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0133] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0134] The OID node testing method, apparatus, device, and storage medium provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for testing OID nodes, characterized in that, include: Install the snmpwalk service in BMC and perform node testing operations on each OID node using the preset testing method. The preset testing methods include using an IPMI command to automatically test the availability of each OID node using the snmpwalk command, or having the user click the file retrieval button on the web interface instead of manually entering the snmpwalk command in the terminal to test the availability of the OID node. Based on the test results of each OID node, the corresponding OID node information is output to the target file for storage; Determine whether the node test operation currently being performed on each of the OID nodes has ended and obtain the corresponding determination result; Based on the judgment result, the target file containing the OID node information is saved to the user terminal so that the user can analyze and view the information in the target file; The target file includes a description of the OID node, the node type, the OID information of the node value, the meaning information of the node value, and the node name of the node value.
2. The OID node testing method according to claim 1, characterized in that, The node testing operation for each OID node using a preset testing method includes: Receive target commands sent from the user terminal; Determine whether the target command is an IPMI command; If the target command is the IPMI command, then the target script file is executed according to the IPMI command to perform node testing operations on each OID node; wherein, the target script file is a script file that stores the snmpwalk command for each OID node; If the target command is not the IPMI command, then the step of receiving the target command sent by the user terminal and its subsequent steps are re-executed; Accordingly, after performing node testing operations on each OID node using a preset testing method, the process further includes: Determine whether the node test operation was successful; If the node test operation is successful, then the step of outputting the corresponding OID node information to the target file for storage based on the test results of each OID node and subsequent steps are executed. If the node test operation fails, the step of executing the target script file according to the IPMI command to perform node test operations on each OID node is re-executed.
3. The OID node testing method according to claim 1, characterized in that, The node testing operation for each OID node using a preset testing method includes: The node test operation is performed on each OID node according to the received file retrieval instruction; the file retrieval instruction is the instruction issued by the user terminal clicking the file retrieval button on the web interface.
4. The OID node testing method according to claim 1, characterized in that, Before the step of outputting the corresponding OID node information to the target file for storage based on the test results of each OID node, the method further includes: The target OID node that passed the test is determined from the test results corresponding to each OID node.
5. The OID node testing method according to claim 4, characterized in that, The step of outputting the corresponding OID node information to a target file for storage based on the test results of each OID node includes: The OID node information corresponding to the target OID node that passed the test in the test results is output to the target file for storage.
6. The OID node testing method according to any one of claims 1 to 5, characterized in that, The step of saving the target file containing the OID node information to the user terminal based on the judgment result so that the user can analyze and view the information in the target file includes: If the determination result indicates that the node test operation performed on each of the OID nodes has ended, then the target file storing the OID node information is copied to the user terminal so that the user can analyze and view the information in the target file.
7. The OID node testing method according to any one of claims 1 to 5, characterized in that, The step of saving the target file containing the OID node information to the user terminal based on the judgment result so that the user can analyze and view the information in the target file includes: If the judgment result indicates that the node testing operation performed on each of the OID nodes has ended, then the target file containing the OID node information is downloaded and saved to the user terminal according to the received file download instruction so that the user can analyze and view the information in the target file; wherein, the file download instruction is an instruction issued by the user terminal clicking the file download button on the web interface.
8. An OID node testing device, characterized in that, include: The node testing module is used to install the snmpwalk service in BMC and perform node testing operations on each OID node using preset testing methods. The preset testing methods include using an IPMI command to automatically test the availability of each OID node using the snmpwalk command, or having the user click the file retrieval button on the web interface instead of manually entering the snmpwalk command in the terminal to test the availability of the OID node. The information output module is used to output the corresponding OID node information to the target file for storage based on the test results of each OID node; The judgment module is used to determine whether the node test operation currently being performed on each of the OID nodes has ended and to obtain the corresponding judgment result; The file saving module is used to save the target file containing the OID node information to the user terminal based on the judgment result so that the user can analyze and view the information in the target file. The target file includes a description of the OID node, the node type, the OID information of the node value, the meaning information of the node value, and the node name of the node value.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the OID node testing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the OID node testing method as described in any one of claims 1 to 7.