Initialization checking method and device of server and electronic equipment
Through concurrent coroutines, network delay tests and parsing initialization lists, actual indicator information is obtained and cleaned, and verification is solved, and the traditional one-by-one inspection method is inefficient, and fast and accurate server initialization checks are achieved, which improves the performance and stability of the server.
Patent Information
- Application Number
- CN202411791224.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-11
AI Technical Summary
The traditional one-by-one inspection method cannot quickly respond to the management needs of large-scale server clusters, resulting in inefficient network problem resolution, frequent occurrence of configuration errors or inconsistencies, affecting server performance and stability.
By enabling coroutines with the same number of servers to perform network delay tests concurrently, parsing the initialization list, obtaining and cleaning the actual indicator information, performing accuracy verification of the initial and actual indicator information, and saving the verification results to the result file.
It significantly improves the efficiency and real-time nature of network status detection, effectively detects and corrects configuration errors or inconsistencies, ensures the correctness and consistency of server hardware configuration, and thus improves the performance, reliability and stability of servers.
Smart Images

Figure CN119814619A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cloud computing, and in particular to an initialization checking method for a server, an electronic device and a computer-readable medium. Background Art
[0002] With the rapid development of information technology and the continuous expansion of enterprise business scale, server deployment, management and maintenance have become an indispensable part of enterprise IT operations. The management scope of servers is not limited to the status monitoring of hardware equipment, but also covers complex configuration management, performance tuning and efficient operation and maintenance of systems. This complexity continues to increase with the surge in the number of enterprise servers, making traditional manual management methods gradually appear incapable, inefficient and error-prone.
[0003] Faced with growing business needs, modern enterprises have put forward higher requirements for the efficiency, accuracy and real-time performance of server management. However, in a large-scale server cluster environment, the traditional one-by-one inspection method cannot quickly respond to actual needs. Especially when the network is unstable or there are multiple points of failure, it is difficult for administrators to fully grasp the network status of all servers in a timely manner, resulting in a significant reduction in the efficiency of solving network problems. In addition, as the complexity and diversity of server hardware configurations increase, configuration errors or inconsistencies between different servers are prone to occur. These problems not only lead to performance degradation and resource waste, but may also further affect the stability of the server. Summary of the invention
[0004] The embodiments of the present invention provide a server initialization inspection method, device, electronic device and computer-readable storage medium to solve the problem that the traditional one-by-one inspection method cannot quickly respond to actual needs, resulting in greatly reduced efficiency in solving network problems, and the configurations of different servers are prone to errors or inconsistencies, which not only leads to performance degradation and resource waste, but may also further affect the stability of the server.
[0005] An embodiment of the present invention discloses a method for initializing and checking a server, comprising:
[0006] S1 obtains the initialization list of each device in each server;
[0007] S2: parsing the initialized device list to extract initial indicator information of each device;
[0008] S3: Start the same number of coroutines as the number of servers, and perform network delay tests on the server networks of each server in a concurrent manner to determine whether the server networks are unobstructed. If so, collect the addresses of all communicable servers; otherwise, record the addresses of non-communicable servers in the log;
[0009] S4: Based on the addresses of the communicative servers, start coroutines equal to the number of communicative servers, obtain actual indicator information of each communicative server through the redfish interface, and perform data cleaning on the actual indicator information;
[0010] S5: Verify the accuracy of the initial indicator information and the actual indicator information after data cleaning that belong to the same communicable server;
[0011] S6: If the initial indicator information is consistent with the actual indicator information after data cleaning, outputting the verification result of the server as passing the initialization check; otherwise, outputting the verification result of the server as failing the initialization check;
[0012] S7: Save the verification results of each server and the actual indicator information after data cleaning to the result file.
[0013] The embodiment of the present invention further discloses a server initialization checking device, comprising:
[0014] An acquisition module is used to obtain an initialization list of each device in each server;
[0015] An extraction module, used to parse the initialization device list and extract initial indicator information of each device;
[0016] The test module is used to start the same number of coroutines as the number of servers, and perform network delay tests on the server networks of each server in a concurrent manner to determine whether the server network is unobstructed. If so, collect the addresses of all communicable servers; otherwise, record the addresses of non-communicable servers in the log;
[0017] A cleaning module is used to start a coroutine equal to the number of communicative servers based on the addresses of the communicative servers, obtain the actual indicator information of each communicative server through the redfish interface, and perform data cleaning on the actual indicator information;
[0018] A verification module is used to verify the accuracy of initial indicator information belonging to the same communicable server and actual indicator information after data cleaning;
[0019] An output module, configured to output, if the initial indicator information is consistent with the actual indicator information after data cleaning, passing the initialization check as the verification result of the server to which it belongs, or failing the initialization check as the verification result of the server to which it belongs;
[0020] The saving module is used to save the verification results of each server and the actual indicator information after data cleaning to the result file.
[0021] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0022] The memory is used to store computer programs;
[0023] The processor is used to implement the server initialization check method as described in the embodiment of the present invention when executing the program stored in the memory.
[0024] The embodiment of the present invention further discloses one or more computer-readable media on which instructions are stored, and when executed by one or more processors, the processors execute the server initialization check method as described in the embodiment of the present invention.
[0025] The embodiments of the present invention include the following advantages:
[0026] The present invention starts the same number of coroutines as the number of servers to concurrently perform network delay tests, quickly determines the network connectivity of each server, avoids the inefficient traditional one-by-one inspection method, and significantly improves the efficiency and real-time performance of network status detection. Through the process of parsing the initialization list, obtaining and cleaning the actual indicator information, comparing the initial and actual indicator information, and outputting the verification results, the system can effectively detect configuration errors or inconsistencies, ensure the correctness and consistency of the server hardware configuration, and thus improve the performance, reliability and stability of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a flow chart of the steps of a server initialization inspection method provided in an embodiment of the present invention;
[0028] Figure 2 is a block diagram of an initialization checking device for a server provided in an embodiment of the present invention;
[0029] Figure 3 is a block diagram of an electronic device provided in an embodiment of the present invention;
[0030] Figure 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0032] Reference Figure 1, shows a flow chart of the steps of a server initialization check method provided in an embodiment of the present invention. The server initialization check method is applied to a cloud platform and may specifically include the following steps:
[0033] S1: Get the initialization list of each device in each server.
[0034] The initialization equipment list is an important document or data set used to describe and record the initial configuration status of each server in server management. It contains the key hardware and software configuration indicators of the server during the initialization phase to ensure configuration consistency and expected compliance with equipment performance standards.
[0035] S2: Parse the initialization device list and extract the initial indicator information of each device.
[0036] In a possible implementation, the initial indicator information specifically includes: device role, device manufacturer, device CPU type, device model, device serial number, device IPMI address, device IPMI mask, device IPMI gateway, device system hard disk RAID configuration, device data hard disk RAID configuration, device cache hard disk RAID configuration, device BIOS mode, device CPU specification, device CPU maximum performance, device CPU virtualization information, device CPU hyperthreading information, device CPU turbo frequency, device power policy, device p-state, device c-state, memory configuration, device NUMA balance, device BMC-IPMI, device PXE, device BMC user, device name change record, device SNMP, device SYSLOG and device NTP.
[0037] Specifically, the list parsing module obtains the file address of the device list through parameters, and parses the initialization list table through the excel tool to obtain relevant indicator data. The excel tool is used to decompose the data in the "BMC user" column to extract the BMC account and BMC account password.
[0038] In the present invention, by programmatic parsing, it is possible to ensure that the initial indicator information of each device is completely and accurately extracted. This can avoid human errors and improve the consistency and accuracy of data. At the same time, automated tools (such as excelize) are used for rapid parsing. By reading table data, a large number of server configurations can be processed in batches without manual extraction and input, which greatly improves work efficiency.
[0039] In a possible implementation manner, after S2 and before S3, the following is further included:
[0040] Enable channel monitoring and use the channel to collect data from each coroutine.
[0041] Among them, channel monitoring is a mechanism for collecting, managing and processing communication data between coroutines or threads in concurrent programs. It usually relies on channels or queues in programming languages as the medium for data transmission. After the concurrent tasks are completed, the running results or status of the coroutines can be obtained in real time by monitoring these channels.
[0042] Enable the coroutine synchronization mechanism and receive instructions for the coroutine to release and complete the work.
[0043] Among them, the coroutine synchronization mechanism is a technology used to coordinate and manage the order of task execution and shared resource access between concurrently executed coroutines (or threads). Since coroutines are usually lightweight, non-blocking execution units, they may need to access shared resources or depend on each other during execution. At this time, a synchronization mechanism is needed to ensure that multiple coroutines can be executed in the expected order and avoid race conditions and data inconsistency.
[0044] Each coroutine performs login verification, and if the login verification passes, the login status of the server is recorded and stored.
[0045] Specifically, in order to obtain the returned data from the asynchronous coroutine, data is transmitted by opening channel monitoring, writing data into the channel in the coroutine, and reading the channel outside the coroutine. In order to prevent the situation where all coroutines are interrupted due to unfinished work in all coroutines but ending early outside the coroutine, the coroutine synchronization mechanism is opened, the work completion signal is released in the coroutine, and the coroutine signal is monitored outside the coroutine to ensure that all coroutines can complete all work normally.
[0046] After completing all subsequent work of the coroutine, the coroutine starts to execute the task. First, the login verification is performed. After the login is successful, the login status is stored. The subsequent work directly shares the login status to reduce the waste of resources in the login operation.
[0047] In the present invention, channel monitoring enables each coroutine to transfer data through the channel when executing concurrently, and the main program can obtain the execution result or status information of each coroutine in real time. This can avoid data conflicts or repeated calculations between coroutines and improve the management efficiency of concurrent tasks. At the same time, the execution order of each coroutine and the coordination of task completion are ensured. Through the synchronization mechanism, the main program can receive the signal that each coroutine has completed the task, ensuring that each task is executed in the expected order, and no race conditions or inconsistent data states will occur due to lack of coordination.
[0048] S3: Start the same number of coroutines as the number of servers, and perform network latency tests on the server networks of each server in a concurrent manner to determine whether the server network is unobstructed. If so, collect the addresses of all communicable servers. Otherwise, record the addresses of non-communicable servers in the log.
[0049] The network check module will use the extracted BMC account and password as parameters, start coroutines equal to the number of servers, and call the "server accessibility interface" in parallel. Wait for all coroutines to complete the "server accessibility" check and collect all returned accessibility IP addresses.
[0050] Optionally, Ping detection can be used to determine whether the server network is unobstructed through network delay testing. Send ICMP data packets to the target server to check whether a response can be received. In complex environments, Ping detection alone may not be sufficient. You can combine port detection, network path testing, HTTP / HTTPS health check and other technologies to determine whether the server network is unobstructed.
[0051] It should be noted that, unlike the traditional one-by-one check, using coroutines to perform network checks concurrently can test the network latency of multiple servers at the same time, thus significantly reducing the time of the entire check process. This is especially important for large-scale server clusters, as network checks on all servers can be completed in a short time. At the same time, coroutines are lightweight execution units that can run concurrently without blocking the main thread. When network checks on multiple servers are performed simultaneously, the concurrent execution of coroutines does not need to wait for other tasks to complete, which improves the response speed of the overall task.
[0052] Furthermore, the results of each coroutine execution are independent and traceable, and the inspection results (including the IP addresses of successful or unsuccessful communication) can be collected and recorded in real time. For servers that cannot communicate, they can be recorded in time to facilitate subsequent problem analysis and resolution, avoiding omissions or delays in problem troubleshooting.
[0053] In the present invention, by testing the server network status through concurrent coroutines, the detection efficiency can be significantly improved, the communicative servers can be quickly screened out and the abnormal servers can be recorded, which is convenient for problem location and log tracking; at the same time, manual operations can be reduced, the detection accuracy and system resource utilization can be improved, and efficient and reliable support can be provided for large-scale server management.
[0054] S4: Based on the addresses of the communicative servers, start the coroutines equal to the number of communicative servers, obtain the actual indicator information of each communicative server through the redfish interface, and perform data cleaning on the actual indicator information.
[0055] Among them, redfish is a standardized interface based on the RESTful architecture, which is mainly used for data center hardware management, especially the remote management of hardware such as servers, storage devices, and network devices. It aims to provide a more modern and easier to integrate hardware management interface.
[0056] In a possible implementation, the actual indicator information specifically includes: device code, device BIOS mode, device CPU maximum performance, device CPU virtualization information, device CPU hyperthreading information, device CPU turbo frequency, device disk quantity, device PXE enable status, and device disk capacity.
[0057] Specifically, the redfish interface is called to collect relevant indicators, and the collected data is sorted, including but not limited to keyword interception, Boolean value conversion, enumeration value conversion, and numeric type conversion, and then passed into the channel, and the work completion instruction is released. After all coroutines complete their work, the channel is closed, and the data of all coroutines is collected through the open channel monitoring.
[0058] In a possible implementation, data cleaning specifically includes:
[0059] Keyword interception, Boolean conversion, enumeration value conversion, and numeric type conversion.
[0060] Optionally, keyword extraction is a processing method to extract useful information from a string, and is often used to clean long or complex text fields in raw data to obtain specific content. Keyword extraction can extract key parts from the indicators returned by the server, such as specific fields in log records or device information, and remove redundant information to retain the core content.
[0061] Alternatively, Boolean conversion is the process of converting a logical value represented in a non-Boolean format (such as text or numbers) to True or False. Boolean conversion can standardize logical fields so that programs can easily recognize and process them, and can also be used to determine hardware settings or states, such as on / off states.
[0062] Optionally, enumeration value conversion is to map the string, number, etc. representing the state in the data to a predefined enumeration value, which is convenient for standardized representation and subsequent analysis. Enumeration value conversion can unify the state fields of different systems or protocols and simplify complex state descriptions into codes or values.
[0063] Optionally, numeric type conversion is the process of converting non-standard numeric forms (such as strings, scientific notation, etc.) into standard numeric formats. Numeric type conversion ensures that numeric fields are unified into operable formats and eliminates formatting issues that may cause calculation errors.
[0064] Furthermore, data cleaning can convert complex and inconsistent data into a standardized format to facilitate subsequent analysis and processing.
[0065] In the present invention, the redfish interface is used to obtain the server's hardware indicator data (such as CPU performance, memory configuration, disk capacity, etc.) in real time, allowing administrators to immediately grasp the status of the server. This helps to promptly discover potential problems, such as hardware resource bottlenecks, insufficient disk space, etc., and take measures in advance to avoid performance degradation or system failure. At the same time, by concurrently starting the same number of coroutines as the number of communicable servers, the system can collect data from multiple servers at the same time without having to operate one by one. This parallel execution significantly improves the efficiency of data collection, especially in a large-scale server environment, and can quickly and batch collect hardware information of all available servers.
[0066] S5: Perform accuracy verification on the initial indicator information and the actual indicator information after data cleaning that belong to the same communicative server.
[0067] In a possible implementation manner, S5 specifically includes:
[0068] S501: Perform configuration verification on the device information after data cleaning and the initial indicator information, compare whether the initial configuration corresponding to the initial indicator information of the same server is consistent with the actual configuration corresponding to the actual indicator information after data cleaning, and obtain the server configuration verification result.
[0069] It should be noted that configuration verification can effectively ensure the accuracy of server hardware and software configuration, reduce the risk of failure, and lay the foundation for stable operation and efficient management of the system.
[0070] S502: Perform a consistency check on the initial indicator information of the same server and the device information after data cleaning to obtain a server device consistency check result.
[0071] In a possible implementation manner, the consistency check result of the server device specifically includes:
[0072] (1) Check whether the CPU resource model and memory PN information of each identical server are consistent.
[0073] Specifically, you can use hash tables or sets to group the collected data and check whether there are any inconsistencies in each group. Compare CPU models to ensure that the CPU performance and specifications of the same series of servers are consistent. Compare memory PNs to confirm that the models and capacities of all memory modules are consistent.
[0074] Furthermore, hardware consistency is ensured for the same server, avoiding performance bottlenecks or uneven load distribution due to specification differences. Standardized hardware configuration facilitates fault diagnosis and component replacement. Consistent memory PN avoids incompatibility or performance issues caused by mixed models.
[0075] (2) Whether the CPU resource model, memory PN, and network card model information of the same server are consistent.
[0076] Furthermore, ensure that components within a single server are configured correctly to avoid failures caused by mixing different types of components. Ensure that the network card model and speed are consistent to help optimize network performance and throughput. The inspection results clearly mark hardware inconsistencies for quick repair.
[0077] Specifically, the server device configuration verification uses the acquired server hardware device information as a basis, and performs configuration verification with the device initialization information in the server device initialization list, and finally obtains the server device configuration verification result. Server device consistency check.
[0078] Based on the obtained server hardware equipment information, the server equipment consistency check is performed according to the server equipment consistency check method, namely, the same machine consistency (whether the CPU resource model, memory PN and other information of the same machine are consistent), the same role consistency (whether the CPU resource model, memory PN, network card model and other information of the same role are consistent), and finally the server equipment consistency check result is obtained.
[0079] In the present invention, configuration verification ensures that the device information after data cleaning is consistent with the initial indicator information, and can promptly detect any configuration errors or deviations, ensuring that the actual configuration of the server hardware meets expectations. At the same time, by performing consistency checks on the hardware information under the same server or the same role, it ensures that the hardware configuration within the server and between different roles is consistent. This helps to avoid performance bottlenecks, resource waste or potential hardware conflicts caused by inconsistent hardware configuration.
[0080] S6: When the initial indicator information is consistent with the actual indicator information after data cleaning, the verification result of the server to which the initialization check is passed will be outputted; otherwise, the verification result of the server to which the initialization check is failed will be outputted.
[0081] In the present invention, by checking the consistency of initial indicator information and actual indicator information, configuration errors or deviations can be quickly discovered in the initialization phase, ensuring the configuration accuracy and consistency of the server, and improving system stability and performance; at the same time, by classifying and outputting the verification results, problem location is simplified, resource allocation is optimized, and operation and maintenance costs are reduced, providing efficient and reliable support for large-scale server management.
[0082] S7: Save the verification results of each server and the actual indicator information after data cleaning to the result file.
[0083] It should be noted that saving the verification results of each server and the actual indicator information after cleaning to the result file can fully record the configuration status, facilitate problem location and tracking, and support automated analysis and long-term archive management, providing a reliable basis for efficient and accurate operation and maintenance, and improving team collaboration and management efficiency.
[0084] In a possible implementation manner, S7 specifically includes:
[0085] Use the excelize tool to save the server configuration verification results, server device consistency check results, and actual indicator information after data cleaning to an xlsx result file.
[0086] Among them, XLSX is the file format used by Microsoft Excel, which is widely used to store tabular data, values, text, formulas, charts and other information. It is a common spreadsheet format suitable for managing, analyzing and displaying large-scale structured data, especially in corporate management, financial reporting, data analysis and project tracking.
[0087] In the present invention, the Excelize tool automates the data saving process and can automatically write the verification results and data into files, thereby reducing manual operations and improving efficiency. At the same time, the verification results and cleaned indicator data are saved in xlsx format, providing administrators with a structured and easy-to-store data format. Excel files are easy to save, classify, and archive, and can be saved as long-term records to facilitate future inquiries and audits. For the management of large-scale server clusters, the status and changes of all devices can be effectively managed and tracked.
[0088] The embodiments of the present invention include the following advantages:
[0089] The present invention starts the same number of coroutines as the number of servers to concurrently perform network delay tests, quickly determines the network connectivity of each server, avoids the inefficient traditional one-by-one inspection method, and significantly improves the efficiency and real-time performance of network status detection. Through the process of parsing the initialization list, obtaining and cleaning the actual indicator information, comparing the initial and actual indicator information, and outputting the verification results, the system can effectively detect configuration errors or inconsistencies, ensure the correctness and consistency of the server hardware configuration, and thus improve the performance, reliability and stability of the server.
[0090] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0091] In addition, refer to Figure 2 , shows a block diagram of an initialization checking device for a server provided in an embodiment of the present invention.
[0092] The embodiment of the present invention further discloses a server initialization checking device 20, comprising:
[0093] The acquisition module 201 is used to acquire an initialization list of each device in each server;
[0094] An extraction module 202 is used to parse the initialization device list and extract initial indicator information of each device;
[0095] The test module 203 is used to start the same number of coroutines as the number of servers, and perform network delay tests on the server networks of each server in a concurrent manner to determine whether the server network is unobstructed. If so, collect the addresses of all communicable servers; otherwise, record the addresses of non-communicable servers in the log;
[0096] The cleaning module 204 is used to start a coroutine equal to the number of the communicative servers based on the addresses of the communicative servers, obtain the actual indicator information of each communicative server through the redfish interface, and perform data cleaning on the actual indicator information;
[0097] Verification module 205, used to verify the accuracy of initial indicator information and actual indicator information after data cleaning belonging to the same communicative server;
[0098] The output module 206 is used to output the verification result of the server to which the initial indicator information belongs, if the initial indicator information is consistent with the actual indicator information after the data cleaning, and otherwise, output the verification result of the server to which the initial check fails;
[0099] The saving module 207 is used to save the verification results of each server and the actual indicator information after data cleaning to a result file.
[0100] In a possible implementation, the initial indicator information specifically includes: device role, device manufacturer, device CPU type, device model, device serial number, device IPMI address, device IPMI mask, device IPMI gateway, device system hard disk RAID configuration, device data hard disk RAID configuration, device cache hard disk RAID configuration, device BIOS mode, device CPU specification, device CPU maximum performance, device CPU virtualization information, device CPU hyperthreading information, device CPU turbo frequency, device power policy, device p-state, device c-state, memory configuration, device NUMA balance, device BMC-IPMI, device PXE, device BMC user, device name change record, device SNMP, device SYSLOG and device NTP.
[0101] In a possible implementation manner, the server initialization checking device 20 further includes:
[0102] The first opening module is used to open channel monitoring and use the channel to collect data from each coroutine;
[0103] The second start module is used to start the coroutine synchronization mechanism and receive the instruction of the coroutine to release the work completed;
[0104] The login verification module is used for each coroutine to perform login verification. If the login verification passes, the login status of the server is recorded and stored.
[0105] In a possible implementation manner, the actual indicator information specifically includes:
[0106] Device code, device BIOS mode, device CPU maximum performance, device CPU virtualization information, device CPU hyperthreading information, device CPU turbo frequency, device disk number, device PXE enable status, and device disk capacity.
[0107] In a possible implementation, the data cleaning specifically includes:
[0108] Keyword interception, Boolean conversion, enumeration value conversion, and numeric type conversion.
[0109] In a possible implementation manner, the verification module 205 is specifically configured to:
[0110] Perform configuration verification on the device information after data cleaning and the initial indicator information, compare whether the initial configuration corresponding to the initial indicator information of the same server is consistent with the actual configuration corresponding to the actual indicator information after data cleaning, and obtain the server configuration verification result;
[0111] A consistency check is performed on the initial indicator information of the same server and the device information after data cleaning to obtain the server device consistency check result.
[0112] In a possible implementation manner, the consistency check result of the server device specifically includes:
[0113] Whether the CPU resource model and memory PN information of each identical server are consistent;
[0114] Check whether the CPU resource model, memory PN, and network card model information of the same server are consistent.
[0115] In a possible implementation manner, the saving module 207 specifically saves the server configuration verification result, the server device consistency check result, and the actual indicator information after data cleaning into an xlsx result file through an excelize tool.
[0116] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0117] The embodiments of the present invention include the following advantages:
[0118] The present invention starts the same number of coroutines as the number of servers to concurrently perform network delay tests, quickly determines the network connectivity of each server, avoids the inefficient traditional one-by-one inspection method, and significantly improves the efficiency and real-time performance of network status detection. Through the process of parsing the initialization list, obtaining and cleaning the actual indicator information, comparing the initial and actual indicator information, and outputting the verification results, the system can effectively detect configuration errors or inconsistencies, ensure the correctness and consistency of the server hardware configuration, and thus improve the performance, reliability and stability of the server.
[0119] In addition, refer to Figure 3 , shows a block diagram of an electronic device provided in an embodiment of the present invention. The embodiment of the present invention also provides an electronic device, including a processor 1301, a communication interface 1302, a memory 1303 and a communication bus 1304, wherein the processor 1301, the communication interface 1302, and the memory 1303 communicate with each other through the communication bus 1304,
[0120] Memory 1303, used for storing computer programs;
[0121] The processor 1301 is used to implement the following steps when executing the program stored in the memory 1303:
[0122] Get the initialization list of each device in each server;
[0123] S2: parsing the initialized device list to extract initial indicator information of each device;
[0124] S3: Start the same number of coroutines as the number of servers, and perform network delay tests on the server networks of each server in a concurrent manner to determine whether the server networks are unobstructed. If so, collect the addresses of all communicable servers; otherwise, record the addresses of non-communicable servers in the log;
[0125] S4: Based on the addresses of the communicative servers, start coroutines equal to the number of communicative servers, obtain actual indicator information of each communicative server through the redfish interface, and perform data cleaning on the actual indicator information;
[0126] S5: Verify the accuracy of the initial indicator information and the actual indicator information after data cleaning that belong to the same communicable server;
[0127] S6: If the initial indicator information is consistent with the actual indicator information after data cleaning, outputting the verification result of the server as passing the initialization check; otherwise, outputting the verification result of the server as failing the initialization check;
[0128] S7: Save the verification results of each server and the actual indicator information after data cleaning to the result file.
[0129] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0130] The communication interface is used for communication between the above terminal and other devices.
[0131] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0132] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0133] Reference Figure 4 , showing a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. In another embodiment provided by the present invention, a computer-readable storage medium 1401 is also provided, in which instructions are stored, and when the instructions are run on a computer, the computer executes the server initialization check method described in the above embodiment.
[0134] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the server initialization check method described in the above embodiment.
[0135] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0136] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0137] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0138] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A server initialization inspection method, characterized in that: include: S1: Get the initialization list of each device in each server; S2: parsing the initialized device list to extract initial indicator information of each device; S3: Start the same number of coroutines as the number of servers, and perform network delay tests on the server networks of each server in a concurrent manner to determine whether the server networks are unobstructed. If so, collect the addresses of all communicable servers; otherwise, record the addresses of non-communicable servers in the log; S4: Based on the addresses of the communicative servers, start coroutines equal to the number of communicative servers, obtain actual indicator information of each communicative server through the redfish interface, and perform data cleaning on the actual indicator information; S5: Verify the accuracy of the initial indicator information and the actual indicator information after data cleaning that belong to the same communicable server; S6: If the initial indicator information is consistent with the actual indicator information after data cleaning, outputting the verification result of the server as passing the initialization check; otherwise, outputting the verification result of the server as failing the initialization check; S7: Save the verification results of each server and the actual indicator information after data cleaning to the result file.
2. The server initialization check method according to claim 1, characterized in that: The initial indicator information specifically includes: Device role, device manufacturer, device CPU type, device model, device serial number, device IPMI address, device IPMI mask, device IPMI gateway, device system hard disk RAID configuration, device data hard disk RAID configuration, device cache hard disk RAID configuration, device BIOS mode, device CPU specification, device CPU maximum performance, device CPU virtualization information, device CPU hyperthreading information, device CPU turbo frequency, device power policy, device p-state, device c-state, memory configuration, device NUMA balance, device BMC-IPMI, device PXE, device BMC user, device name change record, device SNMP, device SYSLOG, and device NTP.
3. The server initialization check method according to claim 1, characterized in that: After S2 and before S3, the following is also included: Enable channel monitoring and use the channel to collect data from each coroutine; Enable the coroutine synchronization mechanism and receive instructions from the coroutine to release the work completed; Each coroutine performs login verification, and if the login verification passes, the login status of the server is recorded and stored.
4. The server initialization check method according to claim 1, characterized in that: The actual indicator information specifically includes: Device code, device BIOS mode, device CPU maximum performance, device CPU virtualization information, device CPU hyperthreading information, device CPU turbo frequency, device disk number, device PXE enable status, and device disk capacity.
5. The server initialization check method according to claim 1, characterized in that: The data cleaning specifically includes: Keyword interception, Boolean conversion, enumeration value conversion, and numeric type conversion.
6. The server initialization check method according to claim 1, characterized in that: The S5 specifically includes: S501: Perform configuration verification on the device information after data cleaning and the initial indicator information, compare whether the initial configuration corresponding to the initial indicator information of the same server is consistent with the actual configuration corresponding to the actual indicator information after data cleaning, and obtain the server configuration verification result; S502: Perform a consistency check on the initial indicator information of the same server and the device information after data cleaning to obtain a server device consistency check result.
7. The server initialization check method according to claim 6, characterized in that: The server device consistency check result specifically includes: Whether the CPU resource model and memory PN information of each identical server are consistent; Check whether the CPU resource model, memory PN, and network card model information of the same server are consistent.
8. The server initialization check method according to claim 6, characterized in that: The S7 is specifically: The server configuration verification result, the server device consistency check result and the actual indicator information after data cleaning are saved to the xlsx result file through the excelize tool.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the server initialization check method as described in any one of claims 1-8 when executing the program stored in the memory.
10. A computer-readable medium, characterized in that Instructions are stored thereon, and when executed by one or more processors, the processors are caused to execute the server initialization checking method as described in any one of claims 1-8.
Citation Information
Patent Citations
Coroutine-based server monitoring method, equipment and readable medium
CN110445669A
Method, system and equipment for checking hardware consistency of server and medium
CN114116336A
Server configuration checking method, device, equipment and medium
CN114443381A
Server detection method, device and equipment and machine readable storage medium
CN115421943A
Cited By
Fault detection method, cabin area control system and vehicle
CN121143284A