Server restart method, electronic device, readable storage medium and program product

By acquiring server software, network, and hardware data, determining the type and severity of anomalies, and generating personalized restart commands, the problems of data loss and low efficiency in server cluster restarts are solved, achieving an efficient and reliable restart process.

CN121029262BActive Publication Date: 2026-02-13INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511557517.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2026-02-13
Estimated Expiration
2045-10-29

AI Technical Summary

Technical Problem

In existing technologies, the unified restart strategy for server clusters leads to problems such as data loss, business interruption, and low restart efficiency.

Method used

By acquiring server software, network, and hardware data, the anomaly type and severity can be determined, and personalized restart and retention instructions can be generated to achieve partial or complete restart, ensuring that data is retained during the restart process.

Benefits of technology

It reduces restart time costs, minimizes business interruption time, improves system reliability and restart efficiency, and adapts to the needs of complex business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121029262B_ABST
    Figure CN121029262B_ABST
Patent Text Reader

Abstract

The application discloses a server restart method, an electronic device, a readable storage medium and a program product, relates to the technical field of server restart, and the method comprises the following steps: obtaining software data, network data, hardware data and configuration data in a server; determining an exception type and an exception level of the server; determining a restart instruction and a reservation instruction corresponding to the server according to different types and levels of different exceptions; and sending the restart instruction and the reservation instruction to starting firmware of the server, so that the software data, the hardware data and the configuration data are reserved in a restart process, and thus partial restart or full restart can be selected according to actual restart requirements. Therefore, the problems of data loss, system interruption and low restart efficiency of system operation caused by a unified restart strategy in the prior art are solved, the demand for coping with complex business scenarios is met, the reliability of system operation is improved, and the technical effect of improving the efficiency of restart is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of server restart, and in particular to a server restart method, an electronic device, a readable storage medium and a program product. BACKGROUND

[0002] A server cluster is a collaborative computing system formed by multiple independent servers connected through a network, and resource integration, task scheduling and fault coordination are realized through a unified software management platform.

[0003] In the related art, a restart is triggered by a fault such as system downtime, hardware error, etc., which has risks of causing data loss, business interruption, etc., and a traditional restart performs a unified process, causing unnecessary time consumption. SUMMARY

[0004] The present application provides a server restart method, an electronic device, a readable storage medium and a program product to at least solve the problems of data loss, system interruption and low restart efficiency of system operation caused by a unified restart strategy in the related art.

[0005] The present application provides a server restart method, comprising: obtaining at least one of software data, network data, hardware data and configuration data of a server; determining an abnormal type and an abnormal level of the server according to at least one of the software data, the network data, the hardware data and the configuration data, and determining at least one of a restart instruction and a reservation instruction of the server according to at least one of the abnormal type and the abnormal level; and sending the at least one of the restart instruction and the reservation instruction to a startup system of the server, wherein the startup system resets at least one of software and hardware of the server according to the restart instruction, and the startup system reserves at least one of the software data, the hardware data and the configuration data during the resetting process according to the reservation instruction.

[0006] The present application also provides a server restart device, comprising: a first obtaining module, configured to obtain at least one of software data, network data, hardware data and configuration data of a server; a determining module, configured to determine an abnormal type and an abnormal level of the server according to at least one of the software data, the network data, the hardware data and the configuration data, and determine at least one of a restart instruction and a reservation instruction of the server according to at least one of the abnormal type and the abnormal level; and a reservation module, configured to send the at least one of the restart instruction and the reservation instruction to a startup system of the server, wherein the startup system resets at least one of software and hardware of the server according to the restart instruction, and the startup system reserves at least one of the software data, the hardware data and the configuration data during the resetting process according to the reservation instruction.

[0007] The application provides another server restart method, which is applied to a starting system of a server and includes the following steps: obtaining at least one of a restart instruction and a reservation instruction sent by a baseboard management controller of the server, wherein the at least one of the restart instruction and the reservation instruction is generated based on at least one of software data, network data, hardware data and configuration data of the server; and resetting at least one of software and hardware of the server according to the restart instruction, wherein the starting system reserves at least one of the software data, the hardware data and the configuration data during the resetting process according to the reservation instruction.

[0008] The application also provides another server restart device, which includes the following components: a second obtaining module, configured to obtain at least one of a restart instruction and a reservation instruction sent by a baseboard management controller of a server, wherein the at least one of the restart instruction and the reservation instruction is generated based on at least one of software data, network data, hardware data and configuration data of the server; and a restarting module, configured to reset at least one of software and hardware of the server according to the restart instruction, wherein a starting system reserves at least one of the software data, the hardware data and the configuration data during the resetting process according to the reservation instruction.

[0009] The application also provides an electronic device, which includes a memory configured to store a computer program and a processor configured to execute the computer program to implement the steps of the server restart method.

[0010] The application also provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the steps of the server restart method.

[0011] The application also provides a computer program product, which includes a computer program, wherein the computer program is executed by a processor to implement the steps of any of the server restart methods.

[0012] According to the application, the software data, the network data, the hardware data and the configuration data in the server are obtained, the abnormal type and the abnormal level of the server are determined, the corresponding restart instruction and reservation instruction of the server are determined according to the different types and levels of different abnormalities, and the restart instruction and the reservation instruction are sent to the starting firmware of the server, so that the software data, the hardware data and the configuration data during the restarting process are reserved, and thus partial restart or full restart can be selected according to actual restart requirements, the time cost required for restarting can be reduced, the demand of complex business scenarios can be met, the time of business interruption can be reduced, and the use experience of users is improved. Therefore, the problems of data loss, system interruption and low restart efficiency caused by the unified restart strategy in the related art can be solved, the demand of complex business scenarios can be met, the reliability of system operation is improved, and the technical effect of improving the efficiency of restarting is achieved. BRIEF DESCRIPTION OF DRAWINGS

[0013] In order to more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings described in the following embodiments are only some of the embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort based on these drawings.

[0014] Figure 1 A flow chart of a server restart method provided for the embodiments of the present application;

[0015] Figure 2 A flow chart of determining abnormal classification provided for the embodiments of the present application;

[0016] Figure 3 A structural schematic diagram of a server restart device provided for the embodiments of the present application;

[0017] Figure 4 A flow chart of another server restart method provided for the embodiments of the present application;

[0018] Figure 5 A hardware exchange diagram of a data interaction process provided for the embodiments of the present application;

[0019] Figure 6 A flow chart of designing a restart mode based on an abnormal level provided for the embodiments of the present application;

[0020] Figure 7 A structural schematic diagram of another server restart device provided for the embodiments of the present application. DETAILED DESCRIPTION

[0021] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present application.

[0022] It should be noted that, in the description of the present application, the terms “include”, “contain” or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. The terms “first”, “second” and the like in the present application are used to distinguish similar objects, not to describe a specific order or sequence.

[0023] For those skilled in the art of the technical field, the present application will be further described in detail below with the drawings and specific embodiments.

[0024] In combination with the specific application environment architecture or the specific hardware architecture on which the server restart method is dependent for execution, the specific application environment architecture or the specific hardware architecture is described herein.

[0025] Embodiments of the present application provide a server restart method, which is described in detail in combination with the execution flow of the server restart method.

[0026] From the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software and the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is a better implementation.

[0027] Specifically, Figure 1 The server restart method provided by the embodiments of the present application.

[0028] As Figure 1 shown, the server restart method is applied to a baseboard management controller of a server, and includes the following steps:

[0029] In step S101, at least one of software data, network data, hardware data and configuration data of the server is acquired.

[0030] The server is composed of multiple independent computers, and is a collaborative work system that improves the availability and computing capacity of the system through inter-node cooperation; the software data is data that supports software running and stores software-related information; the network data is data generated in the computer network transmission and management process for monitoring and ensuring the normal operation of the network; the hardware data is raw data reflecting the state and running of the computer hardware equipment; and the configuration data is data defining the running rules and parameters of the system, software and hardware, and determining the working mode of the IT components.

[0031] It can be understood that by acquiring the software data, network data, hardware data and configuration data of the server, it can be realized to perceive whether the cluster is in a normal working interval in real time, quickly locate the cause, and realize real-time monitoring of the server running state.

[0032] Specifically, the state and performance of the software layers running in the software data focused cluster, such as the process list, CPU (Central Processing Unit) usage, memory occupation, disk IO (Input / Output), file system usage, system load, and the like of the operating system layer; the number of database connections, query delay, cache hit rate of the middleware / service layer; the container state, image information of the container engine, the Pod (minimum deployment unit) state, node readiness rate, resource scheduling situation of the scheduler; the response time, error log, business indicators, and the like of the application layer.

[0033] The network data focuses on the network connection, traffic and quality between nodes in the cluster, and between the nodes and the outside, such as the network topology and connected node IP (Internet Protocol) / MAC (Media Access Control) addresses, port occupation, TCP (Transmission Control Protocol) / UDP (User Datagram Protocol) connection state, and the like; the traffic and bandwidth of each network card, such as the number of transmitted and received bytes, packet rate, bandwidth utilization, and the traffic distribution of inter-node communication; the network quality, such as network delay, packet loss rate, jitter, DNS resolution success rate, gateway connectivity, and the like.

[0034] The hardware data is directed to the hardware component state of the physical server or cloud host of the cluster, such as the CPU model, core number, main frequency, temperature, and whether there is a hardware error of the computing component; the hard disk model, capacity, speed, read / write rate, and the like of the storage component; the memory model, capacity, channel number, error information, network card model, rate, server power state, fan speed, and whole machine temperature of other hardware.

[0035] The configuration data records the static configuration and dynamic parameters of the cluster and each component, such as the node role of the cluster topology configuration, the cluster grouping to which the node belongs, and the like; the core configuration file content, environment variable, and startup parameter of the component configuration software; the user account and permission, firewall rule, load balancing strategy, and the like of the permission and policy configuration.

[0036] The embodiments of the present application can acquire the software data, network data, hardware data, and configuration data of the server, can perceive whether the server is in the normal working interval in real time, and realize real-time monitoring of the cluster running state.

[0037] In step S102, the abnormal type and the abnormal level of the server are determined according to at least one of the software data, the network data, the hardware data and the configuration data, and at least one of the restart instruction and the reservation instruction of the server is determined according to at least one of the abnormal type and the abnormal level.

[0038] The abnormal type is a specific category of a fault, an error or a deviation from a normal state occurring in a system or a cluster, the abnormal level is a priority divided according to the influence degree and the emergency degree of the fault on a service, the restart instruction is a command for recovering a fault state or applying a configuration change, and restarting a system, a service or a component, and the reservation instruction is an instruction for reserving data in a system or a device when restarting again.

[0039] It can be understood that the embodiments of the present application can determine the abnormal type and the abnormal level of the server by using at least one of the software data, the network data, the hardware data and the configuration data, and further determine the restart requirement according to the abnormal type and the abnormal level, such as full restart, then generate the restart instruction, such as partial restart, then generate the reservation instruction at the same time, so as to determine at least one of the restart instruction and the reservation instruction according to the abnormal type and the abnormal level, determine the restart instruction and the reservation instruction according to the actual scene requirement, not only can reduce the time cost required by the restart, but also can meet the requirement of complex business scene and reduce the business interruption time.

[0040] Further, in the embodiments of the present application, the abnormal type and the abnormal level of the server are determined according to at least one of the software data, the network data, the hardware data and the configuration data, including: determining the abnormal type of the server according to at least one of the software data, the network data, the hardware data and the configuration data; determining the health score of the server according to the abnormal type; and determining the abnormal level of the server according to the health score.

[0041] The health score is a comprehensive score for judging the normality and the risk level by quantifying the running state of the device or the component.

[0042] It can be understood that the embodiments of the present application can determine the abnormal type and the health score of the server by using the data such as the software data, the network data, the hardware data and the configuration data, and further determine the abnormal level of the server, which can convert the scattered data into executable operation and maintenance actions to ensure the stable operation of the cluster and the business continuity.

[0043] Specifically, the abnormal type of the server is divided into three categories of mild, moderate and deep, whether the software occupation time and the network speed are abnormal is judged according to the threshold value of the software data, the network data, the hardware data and the configuration data, and in the case of abnormality, the health score of the quantitative index evaluating the system running state is introduced to judge the abnormal level of the server.

[0044] For example, the key data of four dimensions of focus coverage software, network, hardware and configuration is focused, and the key data includes user-specified software occupation time and network speed. Quantifiable thresholds are set for each index, and the thresholds need to be combined with the actual running demand of the cluster. For example, the abnormal threshold of software CPU occupation time is that the cumulative occupation of single process per minute is more than 48 seconds and lasts for more than 3 minutes; the abnormal threshold of software memory occupation time is that the cumulative time of process memory occupation exceeding the quota is more than 5 minutes and lasts for more than 5 minutes; the abnormal threshold of downlink network speed is lower than the preset minimum speed and lasts for more than 2 minutes; the abnormal threshold of uplink network speed is lower than the preset minimum speed and lasts for more than 2 minutes; the abnormal threshold of hardware CPU temperature is more than 85℃ and lasts for more than 1 minute; the abnormal threshold of hardware disk remaining capacity is less than 10% of the total capacity; and the abnormal threshold of configuration parameter deviation is that the actual configuration deviates from the standard configuration by more than 20%.

[0045] By comparing the hardware index with the preset threshold, the corresponding hardware abnormality is determined. For example, if the CPU temperature is greater than or equal to 85℃ and lasts for more than 1 minute, it is determined that the hardware CPU temperature is abnormal; if the disk remaining capacity is less than or equal to 10%, it is determined that the hardware disk capacity is abnormal; if the disk IO response time is greater than or equal to 50ms, it is determined that the hardware disk IO is abnormal; if the actual CPU quota deviates from the standard configuration by more than 20%, it is determined that the configuration parameter is abnormal; and if a node not in the authorized node list appears in the cluster, it is determined that the configuration topology is abnormal.

[0046] When there is an abnormality in software occupation time or network speed, the BMC (Baseboard Management Controller) first calls the temperature sensor and power voltage data to determine whether there is a problem of hardware overheating or voltage fluctuation exceeding the standard. If there is, the abnormality level is determined as a hardware level abnormality level, and the health degree is less than 40 points. When there is no problem of hardware overheating or voltage fluctuation exceeding the standard, the configuration register or state register of the hardware device is checked, and the health degree is 40-60 points. When there is no problem in the first two judgments, the abnormality classification step is executed.

[0047] Further, in the embodiments of the present application, the type of the abnormality of the server is determined according to at least one of software data, network data, hardware data and configuration data, including: determining whether the server has a hardware abnormality according to the hardware data; if the server has a hardware abnormality, determining that the type of the abnormality is a first type; if the server has no hardware abnormality, determining whether the server has a configuration abnormality according to the configuration data; if the server has a configuration abnormality, determining that the type of the abnormality is a second type; if the server has no configuration abnormality, determining whether the server has a kernel abnormality of an operating system according to the software data and the network data; and if the server has a kernel abnormality of an operating system, determining that the type of the abnormality is a third type.

[0048] The hardware exception is an exception caused by a failure, performance overrun, or function failure of a physical hardware device or hardware component in the server, resulting in the device not working properly or a significant decrease in performance. The first type is an exception type when the server has a hardware exception. The configuration exception is a configuration item of the server, such as a software parameter, topology structure, permission rule, and the like, which does not match a preset standard configuration or business requirement, resulting in an abnormal system logic operation. The second type is an exception type when the server does not have a hardware exception but has a configuration exception. The kernel exception is an error, crash, or resource deadlock of a kernel of a cluster node operating system, resulting in an abnormal operation of the operating system in managing hardware and software. The third type is an exception type when the server does not have a hardware exception, a configuration exception, but has a kernel exception.

[0049] It can be understood that the embodiments of the present application can determine that the server has a hardware exception as the first type, determine that the server has a configuration exception as the second type, and determine that the server has a kernel exception as the third type. The server failure can be accurately layered, and more accurate resource matching and more precise operation and maintenance decision making can be achieved.

[0050] Further, in the embodiments of the present application, whether the server has a kernel exception of an operating system is determined according to software data and network data, including: constructing a first array according to the software data and the network data; mixing the first array into an array library, the array library including at least one second array; segmenting the array library to obtain a segmentation result, and determining whether the server has the kernel exception of the operating system according to the segmentation result.

[0051] The first array is a running statistical array constructed according to the software data and the network data in a preset order. The second array is a historical running statistical array stored in the array library. The segmentation result is a result of determining an independent segmentation number and a loop number after segmenting the array library.

[0052] It can be understood that the embodiments of the present application can construct the first array by the software data and the network data, construct a database by combining the first array and the second array, segment the array library to obtain a segmentation result, and determine whether the server has the kernel exception of the operating system according to the segmentation result. Thus, the kernel exception can be accurately determined by the array segmentation, irrelevant data interference can be eliminated, and the occurrence of data misjudgment can be reduced.

[0053] Further, in the embodiments of the present application, the array library is segmented to obtain a segmentation result, and whether the server has a kernel exception of an operating system is determined according to the segmentation result, including: segmenting the array library in a loop; obtaining an independent segmentation number of the array library at the end of the current loop, a loop number and a third array, wherein the independent segmentation number is the segmentation number of the array library at the end of the current loop when the segmentation is successful, and the third array includes at least one independent segmentation number; and determining whether the server has the kernel exception of the operating system according to at least one of the independent segmentation number, the loop number and the third array.

[0054] The independent segmentation number is the total number of array library splitting operations that are performed independently without depending on the previous segmentation result in the array processing flow; the loop number is the total number of repeated execution of the segmentation rule for verifying the stability of data screening or obtaining more accurate target data; and the third array is an array in which the target part only includes a running statistical array.

[0055] It can be understood that, in the embodiments of the present application, the array library can be segmented in a loop, the independent segmentation number of the array library at the end of the current loop, the loop number and the third array are obtained, and whether the server has the kernel exception of the operating system is determined, which can reduce accidental errors by using loop segmentation, improve the reliability of the determination, and reduce the occurrence of data misjudgment.

[0056] Specifically, in the embodiments of the present application, the total number of repeated segmentation such as 3 times or 5 times can be preset according to the requirement for data reliability, for example, to ensure the reliability of the kernel exception determination, the total number of loops is set to 5, the basic flow of one-round segmentation, generation of a segmentation value, segmentation of the array library, determination of whether the segmentation is successful and recording of the result is set, the fixed steps that must be executed in each loop are specified, and the logic of multiple loops is ensured to be consistent. The independent segmentation number, the loop number and the third array at the end of the current loop are obtained as the original basis for the determination, and whether the kernel is abnormal is determined from two dimensions of signal stability and feature matching degree by analyzing the characteristics of the independent segmentation number, the loop number and the third array.

[0057] For example, the loop number is directly counted to count the total execution number of the current loop segmentation, for example, if the loop is set to 5 and all the loops are executed, the loop number is 5; the independent segmentation number is counted to count the total number of successful segmentation in the loop process, for example, if 4 times of segmentation are successful in 5 times of loops, the independent segmentation number is 4; and the third array is extracted to extract the third array stored in the loop process, the content of which is the record of each successful segmentation, and each record includes two parts: the independent segmentation number corresponding to the segmentation, for example, the first successful segmentation corresponds to the number 1, and the fourth successful segmentation corresponds to the number 4; and the data related to the kernel exception segmented this time, for example, the processor time is 700 ms, the network throughput is 70 Mbps, and other software / network data.

[0058] Further, in the embodiments of the present application, judging whether the server has the kernel exception of the operating system according to at least one of the independent segmentation times, the cycle times and the third array comprises: judging whether the independent segmentation times is less than a first number threshold set in advance; if the independent segmentation times is less than the first number threshold, determining that the server has the kernel exception of the operating system; and if the independent segmentation times is greater than or equal to the first number threshold, judging whether the server has the kernel exception of the operating system according to the cycle times and the third array.

[0059] The first number threshold is a judgment adjacent value set in advance, which is used to realize the judgment of whether the server has the kernel exception of the operating system, and can be specifically set or calibrated, without specific limitation.

[0060] It can be understood that, in the embodiments of the present application, the independent segmentation times is compared with the first number threshold, when the independent segmentation times is less than the first number threshold, it is determined that the cluster system has the kernel exception of the operating system, and when the independent segmentation times is greater than or equal to the first number threshold, it is further judged whether the cluster system has the kernel exception of the operating system according to the cycle times and the third array, so that the judgment system of layered response is constructed, the abnormal judgment is quickly performed, the misjudgment or omission is reduced, and different abnormal scenarios are adapted.

[0061] Specifically, if the target part only contains the running statistics array, i.e. the second array, it indicates that the running statistics array is successfully segmented independently, the number of array dimensions generated when the independent segmentation is successful is the independent segmentation times, and if the independent segmentation times is less than the segmentation number threshold, it indicates that there is a system kernel exception; and if the independent segmentation times is greater than or equal to the segmentation number threshold, it is necessary to judge whether the cluster system has the kernel exception of the operating system according to the cycle times and the third array.

[0062] For example, the total cycle times is 5 times, the first number threshold is 3 times, the software data ≥ 500 ms is abnormal, the network data ≤ 100 Mbps is abnormal, in 5 cycles, only 2 times of segmentation successfully capture the software / network data, the remaining 3 times of segmentation only leave irrelevant data, the independent segmentation times is 2 times, the independent segmentation times is compared with the first number threshold, the independent segmentation times is less than the first number threshold, and it is directly determined that the cluster has the kernel exception of the operating system; and in 5 cycles, 4 times of segmentation successfully capture the software / network data, which satisfies that the independent segmentation times is greater than or equal to the first number threshold, and it is necessary to judge whether the cluster system has the kernel exception of the operating system according to the cycle times and the third array.

[0063] Further, in the embodiments of the present application, the method for judging whether the server has the kernel exception of the operating system according to the cycle number and the third array comprises: judging whether the cycle number reaches a second number threshold set in advance; if the cycle number does not reach the second number threshold, entering the next cycle; if the cycle number reaches the second number threshold, calculating a number average of the independent segmentation numbers in the third array, and judging whether the number average is less than a third number threshold set in advance; if the number average is less than the third number threshold, determining that the server has the kernel exception of the operating system; and if the number average is greater than or equal to the third number threshold, determining that the server does not have the kernel exception of the operating system.

[0064] The second number threshold and the third number threshold are critical values set or calibrated in advance, the second number threshold is a critical value for judging whether to enter the next cycle, and the third number threshold is a critical value for judging whether the server has the kernel exception of the operating system.

[0065] It can be understood that, in the embodiments of the present application, the cycle number is compared with the second number threshold, when the cycle number does not reach the second number threshold, the next cycle is entered; when the cycle number reaches the second number threshold, the number average of the independent segmentation numbers in the third array is calculated, if the number average is less than the third number threshold, it is determined that the cluster system has the kernel exception of the operating system, and if the number average is greater than or equal to the third number threshold, it is determined that the cluster system does not have the kernel exception of the operating system. A sufficient sample size and mean smoothing single fluctuation can be used to reduce the one-sidedness of data, to realize rapid and accurate detection of non-significant exceptions, and to improve the accuracy and efficiency of detection.

[0066] Specifically, the independent segmentation number is added to the segmentation number array, and it is judged whether the number of times of executing the small cycle reaches the second number threshold. If the second number threshold is reached, the average of the segmentation number array is calculated. If the average is less than the third number threshold, it indicates that there is a system kernel exception. If the small cycle threshold is not reached, it indicates that there is no system kernel exception.

[0067] For example, the second number threshold is 5 times, the third number threshold is 3 times, and the third array stores the independent segmentation number corresponding to each successful segmentation. When the cycle number is 1, 2, 3, and 4, none of them reaches the second number threshold, so the next cycle is entered. When the cycle number is 5, the second number threshold is reached, the cycle is stopped, and the independent segmentation number corresponding to each successful segmentation stored in the third array is checked. If it is assumed that 4 times are successfully segmented in 5 cycles, the number average is 2.5 times, and the number average is less than the third number threshold, it is determined that the cluster system has the kernel exception of the operating system. If 5 times are successfully segmented in 5 cycles, the number average is 4 times, and the number average is greater than the third number threshold, it is determined that the cluster system does not have the kernel exception of the operating system.

[0068] Further, in the embodiments of the present application, the cycle divides the array library, including: obtaining the split dimension and split value of the array library; according to the split dimension and split value, the array library is divided; the target split part of the array library is identified, and the split action is performed according to the target split part.

[0069] Wherein, the split dimension determines the attribute, angle or category according to which the split direction is determined; the split value is a specific numerical value or range that defines different parts under the selected split dimension; the target split part is the split result extracted separately after the split action; the split action is the actual operation process of splitting the whole into multiple parts according to the selected split dimension and split value.

[0070] It can be understood that the embodiments of the present application can use randomly generated split dimensions and split values to divide the array library, identify the target split part of the array library, and perform the split action, use multiple random values for statistics, reflect the degree of abnormality from the whole, and reduce system misjudgment.

[0071] Specifically, first, from all dimensions of the current array set, one or more split dimensions are randomly selected, and according to the numerical type / category type, etc. of the selected dimension, a split value is randomly generated within its effective value range, and the validity is verified, such as numerical type split value not exceeding the range, category type split value belonging to the preset category; secondly, all arrays in the current set to be divided are traversed, the specific value of each array on the split dimension in this round is extracted, and the arrays are classified into two or more sub-sets according to the split value rule; then, according to the preset target rule such as retaining the sub-set that meets the split condition, selecting the sub-set with more elements, randomly selecting a sub-set, etc. The target split part in this round is determined from the sub-set after splitting, such as if the target is to continuously split out smaller sub-sets, the sub-set with fewer elements after splitting is selected as the target part; if the target is to mine diversified sub-sets, a sub-set is randomly selected as the target part; finally, the preset action such as separate storage, marking, further analysis, etc. is performed on the target split part in this round.

[0072] Further, in the embodiments of the present application, the target split part of the array library is identified, including: obtaining a plurality of split parts of the array library; identifying a split part including the first array in the plurality of split parts; and taking the split part including the first array in the plurality of split parts as the target split part.

[0073] It can be understood that the embodiments of the present application can obtain a plurality of split parts of the array library, and identify the first array split part in the plurality of split parts as the target split part, quickly anchor the initial target, and improve the decision efficiency.

[0074] Specifically, identifying the part containing the first array from the plurality of divided parts requires traversing all divided parts, checking each sub-set one by one, and determining whether the first array is contained therein. If the first array is defined by position, it is checked whether the array corresponding to the position exists in the sub-set. If the first array is defined by a unique identifier, such as ID (Identifier) = 001, it is checked whether the array with ID equal to 001 exists in the sub-set. If the first array is defined by data content, it is compared with the values of all dimensions of the array in the sub-set to determine whether they are completely identical. After matching, one or more sub-sets containing the first array are found. The divided part containing the first array is set as the target divided part, and the target divided part is confirmed.

[0075] Further, in the embodiments of the present application, performing a division action according to the target divided part includes: identifying whether the target divided part includes a second array; if the target divided part includes the second array, determining that the array library division fails, and continuing to divide the array library; and if the target divided part does not include the second array, determining that the array library division succeeds, and entering the next cycle.

[0076] It can be understood that, in the embodiments of the present application, the second array in the target division is identified, and in the case where the target divided part includes the second array, it is determined that the array library division fails, and the array library is continued to be divided; and in the case where the target divided part does not include the second array, it is determined that the array library division succeeds, and the next cycle is entered. This is to determine whether the second array exists, verify whether the division achieves the purpose of separating specific difference elements, avoid meaningless repeated division or erroneous division, and improve the division accuracy.

[0077] Specifically, the core of the target divided part is to contain the first array, but only taking this as the target may cause problems such as coarse division or meaningless splitting. At this time, if the target divided part still contains the second array, it means that the current division does not effectively distinguish the difference between the first array and the second array, indicating that the division rule is unreasonable and needs to be re-divided. Conversely, if the second array is excluded, it means that the division rule successfully captures the difference between the two, indicating that the division is effective.

[0078] For example, each array in the target divided part is checked one by one, and its identifier such as ID, index, or content is compared to determine whether the second array exists. If the unique identifier of the second array is ID = 002, it is checked whether there is an array with ID = 002 in the target divided part. If the list of the target divided part contains the second array with ID = 002, the division failure is triggered. If the list of the target divided part does not contain the second array with ID = 002, the division success is triggered.

[0079] Further, in the embodiments of the present application, the array library continues to be segmented, including: randomly generating a segmentation dimension and a segmentation value of the array library, at least one of the currently randomly generated segmentation dimension and segmentation value being different from at least one of the previously randomly generated segmentation dimension and segmentation value; and segmenting the array library according to the segmentation dimension and the segmentation value.

[0080] It can be understood that the embodiments of the present application can segment the array library by using the currently randomly generated segmentation dimension and segmentation value which are different from the previously randomly generated segmentation dimension and segmentation value, can mine the hidden multi-dimensional rules in the data, reduce the correlation of the segmentation results, and improve the robustness of the overall analysis.

[0081] Specifically, a single random segmentation may just select a surface-related dimension, and if the same or similar segmentation parameters are repeatedly used, the local perspective will be fixed, the potential value of other dimensions will be ignored, and the use of different segmentation dimensions and values can force the algorithm to explore other dimension combinations of the data, so as to discover the rules hidden by a single logic, make the logic of each segmentation as independent as possible, and reduce the correlation of the segmentation results.

[0082] Further, in the embodiments of the present application, whether the server has a hardware exception is determined according to hardware data, including: extracting hardware temperature data and power voltage data in the hardware data; if a temperature value of the hardware temperature data is greater than a temperature threshold, it is determined that the server has a hardware exception; if a voltage fluctuation of the power voltage data is greater than a fluctuation threshold, it is determined that the server has a hardware exception; and if the temperature value of the hardware temperature data is less than or equal to the temperature threshold and the voltage fluctuation of the power voltage data is less than or equal to the fluctuation threshold, it is determined that the server does not have a hardware exception.

[0083] The hardware temperature data is a real-time temperature value generated by a server core hardware component in a running process, reflecting a heat dissipation state and a working load; the power voltage data is a real-time voltage value when a server power module supplies power to each hardware component; the temperature threshold is a hardware temperature data safety boundary value set to determine whether the hardware temperature exceeds a normal range; the voltage fluctuation is a value change amplitude of the server power voltage data within a period of time; and the fluctuation threshold is a safety boundary value set to determine whether the voltage fluctuation exceeds a normal range.

[0084] It can be understood that the embodiments of the present application can compare the hardware data and the power voltage data of the server with the corresponding thresholds, so as to determine whether there is a hardware exception, can capture a warning signal before a fault occurs through threshold comparison, realize a function of discovering potential faults in advance, and improve the efficiency of automatic response management.

[0085] Specifically, real-time running data is obtained from a hardware monitoring module of all servers in the cluster, such as sensors and power management chips, including but not limited to: CPU temperature, hard disk temperature, mainboard temperature, power supply voltage of each gear, and the like. Hardware temperature data and power supply voltage data indicators are extracted from the raw data. Based on the extracted power supply voltage data, the voltage fluctuation amplitude within a period of time is calculated. For example, the temperature threshold of the CPU is set to 75℃, and the fluctuation threshold of the 2V power supply is ±2%. The extracted hardware temperature data is compared with the temperature threshold. If the temperature value is greater than the temperature threshold, it is marked as temperature abnormality. If the temperature value is less than or equal to the temperature threshold, it is marked as temperature normal. The calculated voltage fluctuation value is compared with the fluctuation threshold. If the fluctuation value is greater than the fluctuation threshold, it is marked as voltage fluctuation abnormality. If the fluctuation value is less than or equal to the fluctuation threshold, it is marked as voltage fluctuation normal.

[0086] As long as any one of the temperature abnormality or the voltage fluctuation abnormality is met, it is determined that the server has a hardware abnormality. If both the temperature normality and the voltage fluctuation normality are met, it is determined that the server does not have a hardware abnormality.

[0087] Further, in the embodiments of the application, whether the server has a configuration abnormality is determined according to configuration data, including: obtaining reference data of the server, wherein the reference data is a configuration parameter set when starting the firmware, or a running parameter of the server set in advance; if the configuration data is inconsistent with the reference data, it is determined that the server has a configuration abnormality; if the configuration data is consistent with the reference data, it is determined that the server does not have a configuration abnormality.

[0088] It can be understood that the embodiments of the application can compare the configuration data of the server with the reference data. When the configuration data is inconsistent with the reference data, it is determined that the server has a configuration abnormality. When the configuration data is consistent with the reference data, it is determined that the server does not have a configuration abnormality. The fault root cause at the configuration level can be quickly located, the configuration consistency of the server environment is guaranteed, the problem troubleshooting efficiency is improved, and the system security is strengthened.

[0089] Specifically, the embodiments of the application can determine the configuration type of the network configuration, the system service configuration, the security configuration, the hardware association configuration and the cluster coordination configuration to be verified, and check whether all configuration items of the reference data are contained in the current configuration. For example, the reference data requires that a DNS server must be configured. If the current configuration does not have a DNS item, it is determined to be abnormal. If the current configuration has a DNS item, it is determined that the server does not have a configuration abnormality.

[0090] The embodiments of the present application can determine the abnormal type and abnormal level of the server and the restart instruction and the reservation instruction of the server by using at least one of software data, network data, hardware data and configuration data, and the accuracy of the abnormal diagnosis can be improved, the decision-making error can be reduced, and the management efficiency of the large-scale server can be improved through multi-dimensional data cross verification.

[0091] Further, in the embodiments of the present application, the health score of the server is determined according to the abnormal type; a first relationship table of the abnormal type and the health score is obtained; if the abnormal type is a first type, the health score is determined as a first score based on the first relationship table; if the abnormal type is a second type, the health score is determined as a second score based on the first relationship table; and if the abnormal type is a third type, the health score is determined as a third score based on the first relationship table.

[0092] The first relationship table is a pre-set relationship table representing the abnormal type and the health score; the first score is the health score corresponding to the first type of the abnormal type; the second score is the health score corresponding to the second type of the abnormal type; and the third score is the health score corresponding to the third type of the abnormal type.

[0093] It can be understood that the embodiments of the present application can obtain the first relationship table of the abnormal type and the health score, and determine the health score of the corresponding server according to the abnormal type, so as to quickly compare the health status, realize the quantitative evaluation of the health status, reduce the subjective judgment deviation, and improve the management efficiency.

[0094] Specifically, the abnormal type of the server is often described qualitatively, such as network fluctuation, disk alarm, CPU overload, etc., and the first relationship table converts the fuzzy abnormal description into an explicit numerical score through a pre-set rule, eliminates the subjective interpretation difference, and ensures the uniform evaluation standard.

[0095] For example, if the abnormal type is the first type of hardware overheating or voltage fluctuation exceeding the standard, the health score is the first score; if the abnormal type is the second type of state and running condition not consistent, or configuration and BIOS setting inconsistent during startup, the health score is the second score; and if the abnormal type is the third type of abnormality in the classification step, the health score is the third score.

[0096] Further, in the embodiments of the present application, the abnormal level of the server is determined according to the health score, including: obtaining a second relationship table of the health score and the abnormal level; if the health score is the first score, the abnormal level is determined as a first level based on the second relationship table; if the health score is the second score, the abnormal level is determined as a second level based on the second relationship table; and if the health score is the third score, the abnormal level is determined as a third level based on the second relationship table.

[0097] The second relationship table is a preset table indicating the correspondence between the health score and the abnormal level; the first level is an abnormal level corresponding to the first score; the second level is an abnormal level corresponding to the second score; and the third level is an abnormal level corresponding to the third score.

[0098] It can be understood that the embodiments of the present application can quickly understand the severity of the problem by obtaining the second relationship table indicating the correspondence between the health score and the abnormal level, determining the corresponding abnormal level according to the health score, facilitating the binding of clear coping strategies, standardizing the action, and optimizing the resource allocation efficiency.

[0099] Specifically, the rules need to be defined in advance, and usually the severity of the level corresponding to the score is defined, in the embodiments of the present application, the first score corresponds to the first level of deep abnormality, indicating that the problem needs to be handled urgently; the second score corresponds to the second level of moderate abnormality; and the third score corresponds to the third level of mild abnormality, indicating that the problem has little impact.

[0100] For example, the health score of the current server is obtained, if the server appears the first type of abnormality, it is determined that the health score is the first score through the first relationship table, the corresponding abnormal level is matched according to the second relationship table, the health score column in the second relationship table is checked, and the row completely consistent with the current first score is found, and it is determined that the abnormal level column is the first level.

[0101] Further, in the embodiments of the present application, at least one of the restart instruction and the reservation instruction of the server is determined according to at least one of the abnormal type and the abnormal level, including: determining the reset part and the non-reset part according to the abnormal type and the abnormal level; identifying the reserved data of the non-reset part, generating the restart instruction of the server according to the reset part, and generating the reservation instruction of the server according to the reserved data.

[0102] The abnormal type is a qualitative classification of the server failure or abnormal state of the explicit type of problem; the abnormal level is a quantitative classification of the server abnormality judging the emergency degree of the problem; the reset part is a system component / module that needs to be restarted, reset or reloaded in the server abnormality processing; and the non-reset part is a system component / data that does not need to be restarted, reset or kept running in the server abnormality processing.

[0103] Understandably, by identifying the reset and non-reset parts based on the anomaly type and level, and generating server retention instructions based on the retained data when identifying the retained data in the non-reset part, and generating server restart instructions when identifying the reset part, the server restart instructions and retention instructions can be determined. This can minimize the impact on business while solving the problem and provide a basis for subsequent optimization, thus achieving precise and minimal intervention in server anomaly handling.

[0104] Specifically, the system collects details of the first, second, and third types of anomalies in the current cluster system, as well as details of the first, second, and third levels of anomalies. Based on the anomaly type and level, judgment rules are formulated, and the corresponding node is considered a reset part; medium-level software module errors correspond to the module being reset; minor network fluctuations have no reset part, and all are non-reset parts.

[0105] The reset components are those directly affected by the anomaly and must be restored by restarting; the non-reset components are those that are not affected by the anomaly or can run independently and do not require a restart.

[0106] Identifying the data to be retained in the non-reset portion requires sorting out the operational data of the non-reset portion, such as the progress of tasks being processed, user session information, non-persistent cached data, core configuration parameters, and historical business logs. Based on business priority and data correlation, the key data to be retained should be determined, and its storage location, such as memory address, disk path, and database table, should be recorded. The components included in the non-reset portion, such as nodes, modules, processes, and links, should be identified, and objects already classified as reset portions should be excluded. All data in the non-reset portion should be sorted out and filtered, the specific storage location of the retained data should be recorded, and its dependencies with other components should be analyzed to ensure that retention does not affect the normal operation of the non-reset portion.

[0107] Based on the reset list, the object attributes, component types, quantities, physical locations, and associated services are refined. Pre-restart operations are designed to stop all service processes of the reset portion, disconnect temporary connections from non-reset portions, and release shared resources occupied by the reset portion. The order and restart method for single-component and multi-component resets are determined. The data identifiers, time ranges, and quantity limits specified in the instructions are clarified to designate objects to be retained. Based on the identified list of retained data, the unique identifier of each data item is extracted, and the retention method and data characteristics are matched to generate retention instructions for the cluster system.

[0108] In step S103, at least one of the restart instruction and the retain instruction is sent to the startup system of the server. The startup system resets at least one of the software and hardware of the server according to the restart instruction, and retains at least one of the data other than the reset data during the reset process according to the retain instruction.

[0109] It can be understood that the embodiments of the present application can send the restart instruction and the reservation instruction to the starting system of the server, and the starting system performs the restart operation, and the starting system resets at least one of the software and hardware of the server according to the restart instruction, and at the same time of the resetting, it can be determined whether the data needs to be reserved according to whether the baseboard management controller issues the reservation instruction, and at least one of the data other than the reset data is reserved in the resetting process according to the specific content of the reservation instruction, so that partial restart or full restart can be selected according to the actual restart requirement, not only the time cost required for the restart can be reduced, but also the demand of complex business scenarios can be met, the time of business interruption can be reduced, and the use experience of the user is improved.

[0110] Further, in the embodiments of the present application, before at least one of the restart instruction and the reservation instruction is sent to the starting system of the server, it further includes: obtaining system load information by the starting system; determining a target restart time of the server according to the system load information; and sending at least one of the restart instruction and the reservation instruction to the starting system of the server according to the target restart time.

[0111] The system load information is a comprehensive index set reflecting the current processing task pressure of the server system, measuring the busy degree and bearing capacity of the system resource; and the target restart time is a time point or a time window parameter planned or expected to complete the restart operation of the reset part in the cluster system.

[0112] It can be understood that the embodiments of the present application determine the target restart time of the server by obtaining the system load information, and send the restart instruction and the reservation instruction to the starting system of the server at the target restart time, which can directly reflect the current resource shortage degree of the server, ensure that the restart and reservation operations have sufficient resource support, reduce the risk of lag, timeout or failure in the operation process, and improve the success rate of the restart.

[0113] Specifically, the starting system obtains the system load information such as hardware resource, business load, cluster coordination load, continuously collects historical load data in time granularity, and analyzes the load fluctuation law, such as collecting real-time data every 10 seconds and summarizing trend data every hour, excludes the core business running window, selects the period with low server resource occupation and small business pressure, confirms that there is no important data synchronization or task execution in the non-reset part in the period, and sends the reservation instruction to the starting system of the server through an encrypted communication channel before the target restart time point.

[0114] The embodiment of the application sends a restart instruction and a reservation instruction to a starting system of a server, so that the starting system reserves software data, hardware data and configuration data during a reset process, key data loss caused by restart can be avoided, fault traceability can be ensured, and service continuity and data consistency after restart can be ensured.

[0115] In order to better understand the scheme of the application, the execution flow of the server restart method of the application is described below through a specific embodiment, as shown in the following. Figure 2

[0116] S1: Obtain software occupation time length and network speed.

[0117] S2: Determine whether the software occupation time length and the network speed are abnormal according to threshold values (occupation time length threshold value and network speed threshold value).

[0118] S3: When the software occupation time length is abnormal or the network speed is abnormal:

[0119] S31: The BMC first calls a temperature sensor and power voltage data to determine whether there is a problem of hardware overheating or voltage fluctuation exceeding the standard, and if there is, the abnormality level is determined as a hardware level abnormality level, and the health degree is less than 40 points.

[0120] S32: When there is no problem of hardware overheating or voltage fluctuation exceeding the standard, hardware configuration checking (checking the configuration register or state register of the hardware device) is performed, for example, a slight ECC (Error-Correcting Code) error of the memory, abnormal fan speed, the state or configuration of the device can be read out through the register bit of the corresponding controller, if the state does not match the running condition, or the configuration does not match the BIOS (Basic Input / Output System) setting at the start time, the abnormality level is determined as a hardware state abnormality level, and the health degree is 40-60 points.

[0121] S33: When the previous two determinations do not exist, the abnormality classification step is executed, and if the classification step shows that there is an abnormality, the abnormality level is determined as an operating system kernel abnormality.

[0122] Determine whether there is a system kernel abnormality, as follows:

[0123] S331: Obtain total processor time (effective working time of the processor) data, memory occupation data, disk read-write data, network throughput data and other data related to software running or network running, and construct the above data into an array (running statistics array) sorted in a preset order, note that the above data is the data during the abnormality statistics period of the software occupation time length and the network speed. ​

[0124] S332: Mix the running statistics array into the array library, and the array library has a plurality of historical running statistics arrays.

[0125] S333: Randomly generate an array partition dimension and a partition value, for example, the specified array partition dimension is the disk read-write data dimension, and the partition value is N109. According to the disk read-write data dimension N109 value, the data in the array library is divided into two parts, and the part mixed with the running statistics array (target part) is retained, and the part not mixed with the running statistics array is deleted.

[0126] S334: If the target part only contains the running statistics array, it means that the running statistics array is successfully independent, and the number of times of generating the array dimension when the statistics are independently successful (independent partition times) is generated. If the independent partition times are less than the partition times threshold, it means that there is a system kernel exception.

[0127] S335: If the target part contains at least two arrays (of course, one of which is a running statistics array), then jump to step S333 (note that after jumping, the randomly generated array partition dimension needs to be different from the previous times, that is, it is generated from the array partition dimensions that have not been used recently).

[0128] Since the partition value has randomness and can be known, S332-S335 is a loop, starting from S332 and ending in S334, and the above loop is called a small loop. This loop has a disadvantage that the judgment of abnormality is related to the randomness of the partition value. In order to overcome the above defects, there is step S336 (large loop) in some scenarios.

[0129] S336: After the small loop ends (without judging the exception, but recording the number of times of generating the array dimension when the statistics are independently successful, that is, recording the independent partition times), the independent partition times are added to the partition times array, and it is judged whether the number of times of executing the small loop reaches the small loop threshold.

[0130] S337: If the small loop threshold is reached, calculate the average value of the partition times array, and if the average value is less than the partition times threshold, it means that there is a system kernel exception.

[0131] S338: If the small loop threshold is not reached, jump to step S332.

[0132] In summary, the server restart method proposed in this application obtains software data, network data, hardware data, and configuration data from the server to determine the server's anomaly type and level. Based on the different types and levels of different anomalies, it determines the corresponding restart and retention instructions for the server and sends them to the server's boot firmware. This achieves the retention of software data, hardware data, and configuration data during the restart process. Thus, it allows for partial or full restart based on actual restart requirements, which not only reduces the time cost required for restarting but also meets the needs of complex business scenarios, reduces business interruption time, and improves the user experience.

[0133] Embodiments of this application also provide a server restart device.

[0134] Figure 3 This is a schematic diagram of the structure of a server restart device 300 provided in an embodiment of this application.

[0135] like Figure 3 As shown, the server restart device 300 includes: a first acquisition module 301, a determination module 302, and a retention module 303.

[0136] The first acquisition module 301 is used to acquire at least one of the server's software data, network data, hardware data, and configuration data; the determination module 302 is used to determine the server's anomaly type and anomaly level based on at least one of the software data, network data, hardware data, and configuration data, and to determine at least one of the server's restart instruction and retention instruction based on at least one of the anomaly type and anomaly level; the retention module 303 is used to send at least one of the restart instruction and retention instruction to the server's startup system, the startup system resets at least one of the server's software and hardware according to the restart instruction, and the startup system retains at least one of the software data, hardware data, and configuration data during the reset process according to the retention instruction.

[0137] Furthermore, in the embodiments of this application, the determining module 302 is further configured to: determine the anomaly type of the server based on at least one of software data, network data, hardware data, and configuration data; determine the health score of the server based on the anomaly type; and determine the anomaly level of the server based on the health score.

[0138] Further, in the embodiment of the present application, the determining module 302 is further configured to: determine whether the server has a hardware exception according to the hardware data; if the server has a hardware exception, determine that the exception type is the first type; if the server does not have a hardware exception, determine whether the server has a configuration exception according to the configuration data; if the server has a configuration exception, determine that the exception type is the second type; if the server does not have a configuration exception, determine whether the server has a kernel exception of the operating system according to the software data and the network data; and if the server has a kernel exception of the operating system, determine that the exception type is the third type.

[0139] Further, in the embodiment of the present application, the determining module 302 is further configured to: construct a first array according to the software data and the network data; mix the first array into an array library, the array library including at least one second array; and segment the array library to obtain a segmentation result, and determine whether the server has a kernel exception of the operating system according to the segmentation result.

[0140] Further, in the embodiment of the present application, the determining module 302 is further configured to: segment the array library in a loop; obtain an independent segmentation number, a loop number and a third array at the end of the current loop, wherein the independent segmentation number is the segmentation number of the array library when the segmentation is successful at the end of the current loop, and the third array includes at least one independent segmentation number; and determine whether the server has a kernel exception of the operating system according to at least one of the independent segmentation number, the loop number and the third array.

[0141] Further, in the embodiment of the present application, the determining module 302 is further configured to: determine whether the independent segmentation number is less than a first number threshold; if the independent segmentation number is less than the first number threshold, determine that the server has a kernel exception of the operating system; and if the independent segmentation number is greater than or equal to the first number threshold, determine whether the server has a kernel exception of the operating system according to the loop number and the third array.

[0142] Further, in the embodiment of the present application, the determining module 302 is further configured to: determine whether the loop number reaches a second number threshold; if the loop number does not reach the second number threshold, enter the next loop; if the loop number reaches the second number threshold, calculate a mean value of the independent segmentation numbers in the third array, and determine whether the mean value is less than a third number threshold.

[0143] If the mean value is less than the third number threshold, it is determined that the server has a kernel exception of the operating system; and if the mean value is greater than or equal to the third number threshold, it is determined that the server does not have a kernel exception of the operating system.

[0144] Further, in embodiments of the present application, the determining module 302 is further configured to: obtain a split dimension and a split value of the array library; split the array library according to the split dimension and the split value; identify a target split part of the array library, and perform the splitting action according to the target split part.

[0145] Further, in embodiments of the present application, the determining module 302 is further configured to: obtain a plurality of split parts of the array library, identify a split part including the first array from the plurality of split parts, and take the split part including the first array from the plurality of split parts as the target split part.

[0146] Further, in embodiments of the present application, the determining module 302 is further configured to: identify whether the target split part includes the second array; if the target split part includes the second array, determine that the splitting of the array library fails, and continue to split the array library; and if the target split part does not include the second array, determine that the splitting of the array library succeeds, and enter the next loop.

[0147] Further, in embodiments of the present application, the determining module 302 is further configured to: randomly generate a split dimension and a split value of the array library, at least one of the currently randomly generated split dimension and split value being different from at least one of the previously randomly generated split dimension and split value; and split the array library according to the split dimension and the split value.

[0148] Further, in embodiments of the present application, the determining module 302 is further configured to: obtain a first relationship table between the abnormal type and the health score; determine, based on the first relationship table, that the health score is a first score if the abnormal type is a first type; determine, based on the first relationship table, that the health score is a second score if the abnormal type is a second type; and determine, based on the first relationship table, that the health score is a third score if the abnormal type is a third type.

[0149] Further, in embodiments of the present application, the determining module 302 is further configured to: obtain a second relationship table between the health score and the abnormal level; determine, based on the second relationship table, that the abnormal level is a first level if the health score is the first score; determine, based on the second relationship table, that the abnormal level is a second level if the health score is the second score; and determine, based on the second relationship table, that the abnormal level is a third level if the health score is the third score.

[0150] Further, in the embodiment of the present application, the determining module 302 is further configured to: extract hardware temperature data and power voltage data from the hardware data; determine that the server has a hardware exception if a temperature value of the hardware temperature data is greater than a temperature threshold; determine that the server has a hardware exception if a voltage fluctuation of the power voltage data is greater than a fluctuation threshold; and determine that the server has no hardware exception if the temperature value of the hardware temperature data is less than or equal to the temperature threshold and the voltage fluctuation of the power voltage data is less than or equal to the fluctuation threshold.

[0151] Further, in the embodiment of the present application, the determining module 302 is further configured to: obtain reference data of the server, wherein the reference data is a configuration parameter set when the system is started, or a running parameter of the server set in advance; determine that the server has a configuration exception if the configuration data is inconsistent with the reference data; and determine that the server has no configuration exception if the configuration data is consistent with the reference data.

[0152] Further, in the embodiment of the present application, the retaining module 303 is further configured to: determine a reset part and a non-reset part according to the exception type and the exception level; identify retaining data of the non-reset part, generate a restart instruction of the server according to the reset part, and generate a retaining instruction of the server according to the retaining data.

[0153] Further, in the embodiment of the present application, the server restart apparatus 300 further comprises a sending module.

[0154] The sending module is configured to: send at least one of the restart instruction and the retaining instruction to the starting system of the server before the starting system, obtain system load information through the starting system; determine a target restart time of the server according to the system load information; and send the at least one of the restart instruction and the retaining instruction to the starting system of the server according to the target restart time.

[0155] The features of the embodiments of the server restart apparatus can be referred to the related descriptions of the embodiments of the server restart method, which will not be repeated here.

[0156] In summary, the server restart apparatus provided in the embodiments of the present application can obtain software data, network data, hardware data and configuration data in the server, determine the exception type and the exception level of the server, determine the corresponding restart instruction and the retaining instruction of the server according to the different types and levels of different exceptions, and send the restart instruction and the retaining instruction to the starting firmware of the server, so as to retain the software data, the hardware data and the configuration data in the restart process, thereby enabling the partial restart or the full restart according to the actual restart requirement, reducing the time cost of the restart, coping with the requirement of complex business scenarios, reducing the time of business interruption, and improving the user experience.

[0157] Embodiments of the present application provide another server restart method, which is described in detail in combination with the execution flow of the server restart method.

[0158] Specifically, Figure 4 The another server restart method provided by the embodiments of the present application.

[0159] As Figure 4 indicated, the another server restart method is applied to a baseboard management controller of a server and includes the following steps:

[0160] In step S401, at least one of a restart instruction and a reservation instruction sent by a baseboard management controller of a server is acquired, and the at least one of the restart instruction and the reservation instruction is generated based on at least one of software data, network data, hardware data and configuration data of the server.

[0161] The baseboard management controller is an independent microcomputer system embedded on a mainboard of a hardware device such as a server or a workstation, responsible for hardware-level monitoring, management and fault handling.

[0162] It can be understood that the embodiments of the application can ensure that the restart instruction and the reservation instruction accurately match the abnormal scenario by acquiring the management controller restart instruction and the reservation instruction generated based on the software data, the network data, the hardware data and the configuration data, and improve the reliability in the extreme scenario.

[0163] Specifically, as Figure 5 indicated, the key software state is acquired through the interface of the management controller and the server OS, the network state is acquired through the network monitoring module of the management controller, the hardware state is acquired through the hardware sensor connected to the management controller, the preset rules are read from the local configuration library or the cluster configuration center of the management controller, the restart instruction and the reservation instruction are generated according to the above data, the BIOS sends a restart signal to the BMC, the BMC determines the restart strategy by analyzing the state parameters collected from the BIOS, the OS system and each hardware, and returns the instruction to the BIOS.

[0164] The embodiments of the present application can ensure that the restart instruction and the reservation instruction accurately match the abnormal scenario by acquiring the management controller restart instruction and the reservation instruction generated based on the software data, the network data, the hardware data and the configuration data, and improve the reliability in the extreme scenario.

[0165] In step S402, at least one of the software and the hardware of the server is reset according to the restart instruction, and at least one of the data other than the reset data is reserved during the reset process according to the reservation instruction.

[0166] It can be understood that, in the resetting process, the software and hardware of the server are reset by the restart instruction, and the software data, hardware data and configuration data are reserved by the reservation instruction, so that the system exception can be completely repaired while the data loss and business interruption are minimized, the key data is protected from being lost, and the completeness and continuity of the exception repair are ensured.

[0167] Specifically, for the software data in the memory, a persistence operation is performed, and completeness is ensured through verification; for the software data in the disk, a time stamp is added for marking, and the completeness of the copy is verified; hardware history data is extracted from the BMC log and stored in an independent storage medium to avoid loss due to hardware reset, a current hardware state snapshot is recorded as a benchmark for comparison and analysis after reset; for the system configuration file, an encrypted backup is generated, and the key is independently stored; for the hardware configuration parameter, a configuration snapshot is exported through the BMC interface and backed up to the cluster configuration center.

[0168] In the resetting process, the software and hardware of the server are reset by the restart instruction, and the software data, hardware data and configuration data are reserved by the reservation instruction, so that the system exception can be completely repaired while the data loss and business interruption are minimized, the key data is protected from being lost, and the completeness and continuity of the exception repair are ensured.

[0169] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and the necessary general hardware platform, and of course it can also be realized by hardware, but in many cases the former is a better embodiment.

[0170] In order to better understand the scheme of the present application, another server restart method or execution process of the present application will be described below through a specific embodiment, as shown in the specific embodiment. Figure 6

[0171] The BMC divides the exception level into three categories based on data analysis, and designs a restart mode according to the severity of the exception, and determines the restart depth by interaction between the BMC and the BIOS.

[0172] 1. Soft Reboot:

[0173] Triggering condition: software deadlock, network connection exception (health degree 60-70 points).

[0174] Interaction process: the BMC sends a "reserve hardware context" instruction to the BIOS → the BIOS freezes the current hardware state (such as temporary storage of memory data and saving of PCIe device state) → only the operating system kernel is restarted → after restart, the BIOS restores the hardware context to avoid re-initialization time consumption.

[0175] ​2. Moderate reboot (Warm Reboot):

[0176] Triggering conditions: Minor memory ECC error, abnormal fan speed control (health score 40-60).

[0177] Interaction process: BMC notifies BIOS "some hardware needs to be reset" → BIOS skips unnecessary self-tests (such as graphics card initialization) during restart and only performs deep testing on memory and fan controller → test results are synchronized to BMC in real time. If a fixable problem is found (such as poor contact of memory gold fingers), BMC triggers motherboard power supply fine-tuning, and BIOS re-initializes the hardware.

[0178] 3. Deep reboot (Cold Reboot):

[0179] Triggering conditions: CPU overheating, excessive voltage fluctuations (health score < 40).

[0180] Interaction process: BMC forcibly disconnects the main power supply (while retaining its own power supply) → sends a "fault flag" (such as a CPU overheating code) to the BIOS → the BIOS automatically performs a targeted self-test (such as extending the CPU power supply stability test) on the next boot → after boot, it writes detailed test logs to the BMC's SEL (System Event Log).

[0181] In summary, the alternative server restart method proposed in this application, by using restart and retention instructions sent by the server's baseboard management controller, enables the firmware to retain at least one of software data, hardware data, and configuration data during the reset process. This can meet the needs of complex business scenarios, ensure business continuity and data consistency after restart, improve the reliability of system operation, and reduce the cost of restart.

[0182] Embodiments of this application also provide another server restart device.

[0183] Figure 7 This is a schematic diagram of another server restart device 700 provided in this application embodiment.

[0184] like Figure 7 As shown, the alternative server restart device 700 includes a second acquisition module 701 and a restart module 702.

[0185] The second obtaining module 701 is configured to obtain at least one of a restart instruction and a reservation instruction sent by the baseboard management controller of the server, the at least one of the restart instruction and the reservation instruction being generated based on at least one of software data, network data, hardware data and configuration data of the server; and the restart module 702 is configured to reset at least one of software and hardware of the server according to the restart instruction, and reserve at least one of data other than reset data during the resetting process according to the reservation instruction.

[0186] The features of the embodiment of the other server restart apparatus can be understood by referring to the related description of the embodiment of the other server restart method, which will not be repeated here.

[0187] In summary, the embodiment of the other server restart apparatus can use the restart instruction and the reservation instruction sent by the baseboard management controller of the server, reserve at least one of software data, hardware data and configuration data during the resetting process, cope with the demand of complex business scenarios, guarantee the business continuity and data consistency after the restart, improve the reliability of system operation, and reduce the cost of the restart.

[0188] The embodiment of the present application further provides an electronic device, including a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in the above-mentioned server restart method embodiments.

[0189] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in the above-mentioned server restart method embodiments when running.

[0190] In an example embodiment, the above-mentioned computer readable storage medium can include but is not limited to: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0191] The embodiment of the present application further provides a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the steps in the above-mentioned server restart method embodiments.

[0192] The embodiment of the present application further provides another computer program product, which includes a non-volatile computer readable storage medium, the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in the above-mentioned server restart method embodiments.

[0193] Those skilled in the art will further appreciate that the units and algorithms described in connection with the examples disclosed herein can be implemented in electronic hardware, computer software, or both. As described above, the disclosure is directed to each individual feature, algorithm, and combination of features and algorithms described. Those skilled in the art will recognize that each individual feature or each combination of features can be implemented in hardware, software, or both. The disclosure is directed to each individual feature, algorithm, and combination of features and algorithms regardless of whether the features, algorithms, and combinations of features and algorithms are implemented in hardware, software, or both. The disclosure is directed to each individual feature, algorithm, and combination of features and algorithms regardless of whether the features, algorithms, and combinations of features and algorithms can be best implemented in hardware, software, or both.

[0194] The above provides a kind of server restart method, electronic equipment, readable storage medium and program product provided by the present application in detail.The principle and implementation of the present application are described in this paper by applying specific examples, the above example is only applicable to help understand the method and its core idea of the present application.It should be pointed out that, for the ordinary skilled in the art, without departing from the principle of the present application, the present application can be improved and modified in several ways, and these improvements and modifications also fall within the scope of the claims of the present application.

Claims

1. A server restart method, characterized in that, The method is applied to the baseboard management controller of a server, and the method includes: Obtain at least one of the server's software data, network data, hardware data, and configuration data; Based on at least one of the software data, network data, hardware data, and configuration data, determine the anomaly type and anomaly level of the server, and based on at least one of the anomaly type and anomaly level, generate at least one restart instruction and a retain instruction for the server. At least one of the restart command and the retain command is sent to the startup system of the server. The startup system resets at least one of the software and hardware of the server according to the restart command. The startup system retains at least one of the data other than the reset data during the reset process according to the retain command.

2. The server restart method according to claim 1, characterized in that, Determining the anomaly type and anomaly level of the server based on at least one of the software data, the network data, the hardware data, and the configuration data includes: The anomaly type of the server is determined based on at least one of the software data, the network data, the hardware data, and the configuration data; Obtain a first relationship table between the anomaly type and the health score, and query the server's health score in the first relationship table according to the anomaly type; The abnormality level of the server is determined based on the health score.

3. The server restart method according to claim 2, characterized in that, Determining the anomaly type of the server based on at least one of the software data, network data, hardware data, and configuration data includes: Determine whether the server has any hardware malfunctions based on the hardware data; If the server has a hardware malfunction, then the malfunction type is determined to be the first type; If the server does not have any hardware abnormalities, then determine whether the server has any configuration abnormalities based on the configuration data; If the server has a configuration anomaly, then the anomaly type is determined to be the second type; If the server does not have any configuration abnormalities, then determine whether the server has any operating system kernel abnormalities based on the software data and the network data; If the server has a kernel exception in the operating system, then the exception type is determined to be the third type.

4. The server restart method according to claim 3, characterized in that, The step of determining whether the server has an operating system kernel anomaly based on the software data and the network data includes: Construct a first array based on the software data and the network data; The first array is mixed into an array library, which includes at least one second array; The array library is segmented to obtain a segmentation result, and the server is judged to have any operating system kernel abnormalities based on the segmentation result.

5. The server restart method according to claim 4, characterized in that, The process of segmenting the array library to obtain a segmentation result, and determining whether the server has any operating system kernel anomalies based on the segmentation result, includes: The array library is divided in a loop; Obtain the number of independent partitions, the number of iterations, and the third array of the array library at the end of the current loop, wherein the number of independent partitions is the number of partitions when the array library is successfully partitioned at the end of the current loop, and the third array includes at least one of the number of independent partitions; Based on at least one of the independent segmentation count, the loop count, and the third array, determine whether the server has an operating system kernel anomaly.

6. The server restart method according to claim 5, characterized in that, The step of determining whether the server has an operating system kernel anomaly based on at least one of the independent segmentation count, the loop count, and the third array includes: Determine whether the number of independent segmentations is less than a preset first threshold number; If the number of independent segmentations is less than the threshold of the first segmentation, it is determined that the server has a kernel abnormality in the operating system. If the number of independent segmentations is greater than or equal to the first threshold, then the presence of an operating system kernel anomaly in the server is determined based on the number of loops and the third array.

7. The server restart method according to claim 6, characterized in that, The step of determining whether the server has an operating system kernel anomaly based on the loop count and the third array includes: Determine whether the number of iterations has reached a preset second threshold. If the number of iterations does not reach the second threshold, then proceed to the next iteration; If the number of iterations reaches the second threshold, then the average number of independent segmentations in the third array is calculated, and it is determined whether the average number of iterations is less than the preset third threshold. If the average number of occurrences is less than the threshold for the third occurrence, it is determined that the server has a kernel abnormality in the operating system; if the average number of occurrences is greater than or equal to the threshold for the third occurrence, it is determined that the server does not have a kernel abnormality in the operating system.

8. The server restart method according to claim 5, characterized in that, The loop divides the array library, including: Obtain the segmentation dimension and segmentation value of the array library; The array library is segmented according to the segmentation dimension and the segmentation value; Identify the target segmentation portion of the array library, and perform a segmentation action based on the target segmentation portion.

9. The server restart method according to claim 8, characterized in that, The identification of the target segmentation portion of the array library includes; Obtain multiple segments of the array library Identify the segmentation portion that includes the first array among the plurality of segmentation portions; The segment that includes the first array among the plurality of segmented parts is taken as the target segmented part.

10. The server restart method according to claim 9, characterized in that, The step of performing a segmentation action based on the target segmentation portion includes: Identify whether the target segmentation portion includes the second array; If the target segmentation portion includes the second array, then the array library segmentation is determined to have failed, and the array library continues to be segmented. If the target segment does not include the second array, then the array library is determined to have been successfully segmented, and the next loop begins.

11. The server restart method according to claim 3, characterized in that, The health score of the server is queried in the first relation table according to the anomaly type, including: If the abnormality type is the first type, then the health score is determined to be the first score based on the first relationship table; If the abnormality type is the second type, then the health score is determined to be the second score based on the first relationship table; If the abnormality type is the third type, then the health score is determined to be the third score based on the first relationship table.

12. The server restart method according to claim 8, characterized in that, Determining the anomaly level of the server based on the health score includes: Obtain a second relationship table between the health score and the abnormality level; If the health score is the first score, then the abnormality level is determined to be the first level based on the second relationship table; If the health score is the second score, then the abnormality level is determined to be the second level based on the second relationship table; If the health score is the third score, then the abnormality level is determined to be the third level based on the second relationship table.

13. The server restart method according to claim 3, characterized in that, Determining whether the server has a hardware malfunction based on the hardware data includes: Extract the hardware temperature data and power supply voltage data from the hardware data; If the temperature value of the hardware temperature data is greater than the temperature threshold, it is determined that the server has a hardware malfunction. If the voltage fluctuation of the power supply voltage data is greater than the fluctuation threshold, it is determined that the server has a hardware malfunction. If the temperature value of the hardware temperature data is less than or equal to the temperature threshold, and the voltage fluctuation of the power supply voltage data is less than or equal to the fluctuation threshold, then it is determined that the server does not have a hardware abnormality.

14. The server restart method according to claim 3, characterized in that, The step of determining whether the server has a configuration anomaly based on the configuration data includes: Obtain reference data from the server, wherein the reference data is the configuration parameters set when the startup system starts, or the pre-set operating parameters of the server; If the configuration data is inconsistent with the reference data, it is determined that the server has a configuration anomaly. If the configuration data is consistent with the reference data, then it is determined that the server does not have any configuration anomalies.

15. The server restart method according to claim 1, characterized in that, The step of determining at least one restart instruction and one retain instruction for the server based on at least one of the exception type and exception level includes: The reset portion and the non-reset portion are determined based on the anomaly type and anomaly level; Identify the reserved data in the non-reset portion, generate a restart instruction for the server based on the reset portion, and generate a retention instruction for the server based on the reserved data.

16. The server restart method according to claim 1, characterized in that, Before sending at least one of the restart command and the retain command to the server's boot system, the method further includes: The system load information is obtained through the startup system; The target restart time of the server is determined based on the system load information; At least one of the restart command and the retention command is sent to the server's startup system according to the target restart time.

17. A server restart method, characterized in that, The method is applied to the server's startup system, and the method includes: The server acquires at least one of a restart command and a retention command sent by the server's baseboard management controller, wherein the restart command and the retention command are generated based on at least one of the server's software data, network data, hardware data, and configuration data. The restart instruction resets at least one of the server's software and hardware, and the retention instruction retains at least one of the data other than the reset data during the reset process.

18. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the server restart method as described in any one of claims 1 to 17 when executing the computer program.

19. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the server restart method as described in any one of claims 1 to 17.

20. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the server restart method as described in any one of claims 1 to 17.

Citation Information

Patent Citations

  • Multi-process server, restart method of software and flow scheduling method thereof

    CN107104834A

  • Method for realizing state recovery of server after downtime through BMC

    CN110943855A