Server exception handling method and server
Through real-time monitoring and dynamic threshold adjustment, combined with multi-level monitoring and early warning mechanisms, automated processing strategies are implemented, and the problem of inefficient server fault handling in the existing technology is solved, the stability and reliability of the server are improved, and resource management is optimized. Processing efficiency.
Patent Information
- Application Number
- CN202411197089.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When handling server failures and abnormalities, the monitoring indicators are limited, the threshold setting is inflexible, the processing strategy is single, and the lack of automation and intelligence is lacking, resulting in low processing efficiency in complex and diversified faults, making it difficult to ensure the stability of the server. and reliability.
By monitoring the server's operating status in real time, adjusting the threshold dynamically, recording exception information and generating reports, and executing corresponding processing strategies according to the exception type, including restarting services, releasing resources, adjusting system configuration and switching to a backup server, providing multi-level monitoring and early warning mechanisms. Improve automation processing capabilities.
It improves the stability and reliability of the server, reduces the probability of system crashes and service interruptions, optimizes resource management and processing efficiency, enhances automation and management convenience, reduces the need for manual intervention, and improves operation and maintenance efficiency.
Smart Images

Figure CN119226013A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of servers, and in particular to a server exception processing method and a server. Background Art
[0002] In the rapid development of modern information technology, servers, as core components of data centers, play a vital role. Servers are devices that provide computing services. With powerful computing and storage capabilities, they support the normal operation of various network services and applications. Driven by the popularization of the Internet and the development of emerging technologies such as cloud computing, big data, and artificial intelligence, the role of servers has become increasingly important. However, as the complexity of the server operating environment increases, the failures and abnormalities faced by servers are becoming more diverse and complex.
[0003] 1. Diversity of server failures
[0004] There are many types of failures and abnormal situations that a server may encounter, including hardware failures, software failures, network failures, and human operational errors.
[0005] Hardware failure: Hardware failure is one of the most common types of server failures. Common hardware failures include memory damage, hard disk failure, CPU overheating, power failure, and motherboard damage. Hardware failures usually cause the server to fail to start or run normally, thus affecting business continuity.
[0006] Software failure: Software failure mainly includes operating system crash, application error, abnormal termination of service process, etc. Software failure is often caused by bugs in program code, incompatible software updates or incorrect configuration. Such failure may cause server service interruption and even data loss.
[0007] Network failure: Network failure includes network connection interruption, network equipment failure, network attack (such as DDoS attack), etc. Such failures will cause the server to be unable to communicate with the outside world, affecting the availability of services and user experience.
[0008] Human operation error: Human operation error is one of the important reasons for server abnormality. For example, administrators mistakenly delete key files, make configuration errors, accidentally restart the server, etc. These operation errors will cause server abnormality.
[0009] 2. Deficiencies in the existing technology
[0010] In the prior art, the methods for handling server failures and anomalies mainly focus on monitoring, alarming and manual intervention. However, with the increase in server scale and complexity, these methods have many deficiencies in practical applications.
[0011] Limited monitoring indicators: Traditional server monitoring systems mainly monitor basic indicators such as CPU usage, memory usage, network traffic, etc. Although these indicators can reflect the basic operating status of the server, they have limited monitoring effects on some complex faults and abnormal situations (such as hardware failures and application layer failures).
[0012] Inflexible threshold setting: Existing monitoring systems usually use fixed thresholds to determine whether a server is abnormal. However, the server's operating environment and load are dynamically changing, and fixed thresholds are difficult to adapt to such changes, which can easily lead to false positives or false negatives.
[0013] Single processing strategy: For detected anomalies, the traditional method is mainly to notify the administrator through alarms for manual intervention. This method relies on the administrator's experience and response speed, has low processing efficiency, and is prone to errors. For some emergency situations, the timeliness and accuracy of manual intervention are difficult to guarantee.
[0014] Lack of automation and intelligence: Modern server systems are highly complex, and manual exception handling is often inefficient and prone to omissions. The lack of automated and intelligent exception handling mechanisms makes the server unable to cope with diverse and complex failures.
[0015] 3. Requirements of emerging technologies for server exception handling
[0016] With the rapid development of emerging technologies such as cloud computing, big data, and artificial intelligence, higher requirements are placed on the stability and reliability of servers. Server exception handling needs to be more intelligent and automated to meet changing business needs.
[0017] Cloud computing: In a cloud computing environment, server resources are allocated on demand and business loads are highly dynamic. This requires server exception handling to be able to flexibly cope with different load conditions, quickly respond to and handle exceptions, and ensure service continuity and high availability.
[0018] Big data: Big data processing requires extremely high computing and storage capabilities of the server, with large data volumes and fast processing speeds. Once an abnormality occurs on the server, it may have a serious impact on data processing and analysis. Therefore, an efficient abnormality detection and processing mechanism is needed to ensure the smooth progress of the data processing process.
[0019] Artificial Intelligence: Artificial Intelligence applications also have high requirements for server performance and stability, especially during training and reasoning, when servers need to process large amounts of data and complex calculations. Once a server exception occurs, it may cause training interruption or reasoning errors, so intelligent exception handling methods are needed to improve server reliability. Summary of the invention
[0020] Based on the existing technical problems, the present invention proposes a server exception handling method, comprising the following steps:
[0021] Monitor the server's operating status in real time and determine whether the server is in an abnormal state based on the set monitoring indicators;
[0022] When a server anomaly is detected, the anomaly information is recorded and an anomaly report is generated;
[0023] Execute corresponding processing strategies according to the exception type;
[0024] After the processing is completed, check the server status to ensure that it has resumed normal operation and record the exception handling process in the log.
[0025] As a preferred technical solution of the present invention, the monitoring indicators include but are not limited to CPU usage, memory usage, network traffic, disk I1 O rate, temperature and power status.
[0026] As a preferred technical solution of the present invention, the threshold T of each monitoring indicator is set by the server through the set monitoring indicator judgment i ; When a certain indicator M i Exceeds its corresponding threshold T i When the server is judged to be in an abnormal state, the threshold T i It can be adjusted dynamically based on historical data and statistical analysis. The formula is as follows:
[0027] T i =μ i +k·σ i
[0028] Among them, μ i M is the monitoring indicator i The historical average value of i is the standard deviation, and k is the adjustment coefficient.
[0029] As a preferred technical solution of the present invention, the abnormal information includes the abnormal type, occurrence time, impact range and abnormal severity. The calculation formula of the abnormal severity S is as follows:
[0030]
[0031] Among them, w i M is the monitoring indicator i The weight of n is the number of monitoring indicators; the weight w i Determined based on the importance of each monitoring indicator and meeting the following conditions:
[0032]
[0033] As a preferred technical solution of the present invention, the processing strategy includes restarting services, releasing resources, adjusting system configuration, switching to a backup server and sending an alarm notification.
[0034] As a preferred technical solution of the present invention, the restart service includes the following steps:
[0035] Close abnormal service processes;
[0036] Release occupied system resources:
[0037] Restart the service process and monitor its status to ensure it is running properly.
[0038] As a preferred technical solution of the present invention, the releasing of resources comprises the following steps:
[0039] Check the system for unreleased memory and file handles;
[0040] Execute resource recycling procedures to release unused resources;
[0041] Updates system resource usage status.
[0042] As a preferred technical solution of the present invention, the adjusting system configuration comprises the following steps:
[0043] Identify the system parameter causing the anomaly:
[0044] Modify relevant parameter configurations, such as adjusting cache size, optimizing network settings, etc.;
[0045] Restart related services or processes for the configuration to take effect.
[0046] As a preferred technical solution of the present invention, the switching to the backup server includes the following steps:
[0047] Confirm that the main server is abnormal and record the current status;
[0048] Routing requests to alternate servers;
[0049] Synchronize data and status to ensure service continuity.
[0050] The present invention also provides a server, including a controller, wherein the controller includes a processor, a memory and a network interface, and is used to implement various functions of the server exception handling method; the controller also includes a redundant power supply module and a cooling system to improve the reliability and stability of the server, wherein the redundant power supply module includes a main power supply and a backup power supply, and when the main power supply fails, it automatically switches to the backup power supply; the cooling system includes a temperature sensor and a fan controller, and the temperature sensor monitors the server temperature in real time. When the temperature exceeds a set threshold, the fan controller increases the fan speed to reduce the temperature. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 The present invention is a flowchart of a server exception handling method proposed by the present invention.
[0052] Beneficial effects:
[0053] Improve server stability and reliability: The present invention can timely detect and handle abnormal status of the server by real-time monitoring of various operating indicators of the server. By setting the threshold of the monitoring indicator, especially the method of dynamically adjusting the threshold, it is ensured that the server can be accurately judged whether it is abnormal under different loads and operating environments, thereby improving the stability and reliability of the server and reducing the probability of system crash and service interruption.
[0054] Optimize resource management and improve processing efficiency: The present invention provides a variety of exception handling strategies, including restarting services, releasing resources, adjusting system configurations, and switching to backup servers. By calculating the severity of the exception to determine the processing priority, various exceptions can be responded to quickly and effectively. Resource release and system configuration adjustment strategies help optimize server resource management, avoid resource waste, and improve the overall processing efficiency of the system.
[0055] Enhanced automation and management convenience: The multi-level monitoring and early warning mechanism of the present invention can detect potential problems in advance, and the automated processing mechanism can take measures before anomalies occur to prevent problems from worsening. At the same time, the detailed logging and notification functions during anomaly detection and processing improve management convenience, allowing administrators to understand the system status in a timely manner and perform subsequent optimization. The comprehensive early warning and automated processing mechanism further reduces the need for manual intervention and improves operation and maintenance efficiency. DETAILED DESCRIPTION
[0056] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] The present invention provides a server exception handling method and a server, and its effectiveness is verified through multiple experiments. The following are specific implementation steps and experimental data.
[0058] like Figure 1 As shown, this embodiment describes the basic process of server exception handling.
[0059] Abnormal monitoring:
[0060] Use monitoring tools (such as Nagios, Zabbix, etc.) to monitor the server's operating indicators in real time, including but not limited to CPU usage, memory usage, network traffic, disk I10 rate, temperature and power status. Set the threshold value T for each monitoring indicator. i ; When a certain indicator M i Exceeds its corresponding threshold T i , it is determined that the server is in an abnormal state.
[0061] Anomaly detection: Records anomaly information, including anomaly type, occurrence time, impact scope, and anomaly severity.
[0062] Generate exception reports and notify system administrators.
[0063] Exception handling: Select appropriate handling strategies based on the exception type, such as restarting services, releasing resources, adjusting system configuration, switching to backup servers, etc.
[0064] Execute processing strategies, restart service processes, release unused resources, adjust system parameters, etc.
[0065] Abnormal recovery:
[0066] Check the server status to make sure it is back up and running.
[0067] The exception handling process is recorded in the log for subsequent analysis and optimization.
[0068] Example 2: Dynamic Threshold Adjustment
[0069] In this embodiment, the server exception handling method adopts dynamic threshold adjustment to adapt to different operating environments and load conditions.
[0070] In this embodiment, the server exception handling method adopts dynamic threshold adjustment to adapt to different operating environments and load conditions.
[0071] Threshold setting:
[0072] Dynamically adjust the threshold T of monitoring indicators based on historical data and statistical analysis i , the formula is as follows:
[0073] T i =μ i +k·σ i
[0074] Among them, μ i M is the monitoring indicator i The historical average value of i is the standard deviation, and k is the adjustment coefficient.
[0075] Anomaly Monitoring and Detection:
[0076] The device is in an abnormal state.
[0077] Record exception information and generate exception reports.
[0078] Exception handling and recovery:
[0079] The same treatment strategy and recovery steps as in Example 1 were performed.
[0080] Example 3: Abnormal severity calculation
[0081] Severity calculation:
[0082] The calculation formula of abnormal severity S is as follows:
[0083]
[0084] Among them, w i M is the monitoring indicator i The weight of n is the number of monitoring indicators.
[0085] Processing priority determination:
[0086] Determine the processing priority based on the calculated severity S. The higher the severity, the higher the processing priority.
[0087] Exception handling:
[0088] Prioritize high-severity exceptions and implement corresponding handling strategies.
[0089] Abnormal recovery:
[0090] After the processing is complete, check the server status and record the processing progress.
[0091] Example 4: Automatically switch to a backup server
[0092] In this embodiment, the server exception handling method automatically switches to the backup server when a serious exception is detected.
[0093] Anomaly Detection:
[0094] When a serious anomaly (such as hardware failure) is detected, the anomaly information is recorded and an anomaly report is generated.
[0095] Switch to the backup server:
[0096] Confirm that the primary server is abnormal and record the current status.
[0097] Routes requests to alternate servers to ensure service continuity.
[0098] Synchronize data and status to ensure that the backup server takes over the business seamlessly.
[0099] Abnormal recovery:
[0100] Check and repair the primary server anomaly. After normal operation is restored, you can switch back to the primary server as needed.
[0101] In this embodiment, the server exception handling method automatically switches to a backup server when a serious exception is detected.
[0102] Anomaly detection: When a serious anomaly (such as hardware failure) is detected, the anomaly information is recorded and an anomaly report is generated.
[0103] Switch to the backup server:
[0104] Confirm that the primary server is abnormal and record the current status.
[0105] Routes requests to alternate servers to ensure service continuity.
[0106] Synchronize data and status to ensure that the backup server takes over the business seamlessly.
[0107] Abnormal recovery:
[0108] Check and repair the primary server anomaly. After normal operation is restored, you can switch back to the primary server as needed.
[0109] Example 5: Multi-level monitoring and early warning
[0110] In this embodiment, the server exception handling method adopts a multi-level monitoring and early warning mechanism to improve the response speed and processing effect.
[0111] Multi-level monitoring: The monitoring tool monitors the server's operating indicators in real time.
[0112] Monitoring indicators at different levels include basic resources (such as CPU, memory), application performance (such as response time, throughput) and system logs (such as error logs, event logs).
[0113] Early warning mechanism: Set early warning thresholds and issue early warnings when a monitoring indicator approaches an abnormal threshold.
[0114] Warning information is notified to system administrators via email, SMS or instant message.
[0115] Exception handling and recovery:
[0116] According to the early warning information, take measures in advance to avoid abnormalities.
[0117] If an abnormality occurs, the same processing and recovery steps as in Example 1 are performed.
[0118] Example 6: Restart service process
[0119] In this embodiment, specific steps of restarting the service are described in detail.
[0120] Anomaly detection: Detects anomalies in a specific service process (such as a database service), such as a crash or unresponsiveness.
[0121] Record exception information and generate exception reports.
[0122] Service restart: Close abnormal service processes.
[0123] Releases system resources used by the service, including memory and file handles.
[0124] Restart the service process and monitor its status to ensure it is running normally.
[0125] Recovery check: Re-monitor the service operation status to ensure it returns to normal.
[0126] Record the restart process and results in the log.
[0127] Example 7: Resource release process
[0128] In this embodiment, specific steps for releasing system resources are described in detail.
[0129] Anomaly detection: Detects that the server memory usage has increased abnormally and exceeded the set threshold.
[0130] Record exception information and generate exception reports.
[0131] Resource release:
[0132] Check the system for unreleased memory and file handles.
[0133] Executes resource recycling procedures to release unused resources.
[0134] Updates system resource usage status.
[0135] Recovery check: Confirm that resources are released successfully and memory usage returns to normal.
[0136] The resource release process and results are recorded in the log.
[0137] Example 8: System Configuration Adjustment
[0138] In this embodiment, specific steps for adjusting the system configuration are described in detail.
[0139] Anomaly Detection: Detects network traffic anomalies that affect server performance.
[0140] Record exception information and generate exception reports.
[0141] Configuration Tuning: Identify system parameters that are causing anomalies, such as network buffer sizes.
[0142] Modify relevant parameter configurations, such as adjusting cache size and optimizing network settings.
[0143] Restart related services or processes for the configuration to take effect.
[0144] Recovery check: Confirm that the configuration adjustment is successful and network traffic returns to normal.
[0145] Record the configuration adjustment process and results in the log.
[0146] Example 9: Data synchronization and switching
[0147] In this embodiment, the specific steps of switching to the backup server when the main server is abnormal are described in detail.
[0148] Abnormal detection: A hardware failure of the primary server is detected and the service cannot be continued.
[0149] Record exception information and generate exception reports.
[0150] Switch to the backup server:
[0151] Confirm that the primary server is abnormal and record the current status.
[0152] Routes requests to alternate servers to ensure service continuity.
[0153] Synchronize data and status to ensure that the backup server takes over the business seamlessly.
[0154] Master server repair and recovery:
[0155] Check and repair the primary server anomaly. After normal operation is restored, you can switch back to the primary server as needed.
[0156] Record the switchover and recovery process in the log.
[0157] Example 10: Comprehensive early warning and automated processing
[0158] In this embodiment, the comprehensive early warning and automated processing mechanism is described in detail.
[0159] Multi-level monitoring: The monitoring tool monitors the server's operating indicators in real time.
[0160] Set warning thresholds and issue warnings in advance when a monitoring indicator approaches an abnormal threshold.
[0161] Automated processing: Automatically execute corresponding processing strategies based on warning information, such as releasing resources, adjusting configurations, or restarting services.
[0162] Avoid exceptions and improve server stability.
[0163] Warning and processing records: Warning information is notified to the system administrator via email, SMS or instant message.
[0164] Record alerts and automated processing in a log.
[0165] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0166] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A server exception handling method, characterized in that: The following steps are involved: Monitor the server's operating status in real time and determine whether the server is in an abnormal state based on the set monitoring indicators; When a server anomaly is detected, the anomaly information is recorded and an anomaly report is generated; Execute corresponding processing strategies according to the exception type; After the processing is completed, check the server status to ensure that it has resumed normal operation and record the exception handling process in the log.
2. The server exception handling method according to claim 1, characterized in that: The monitoring indicators include but are not limited to CPU usage, memory usage, network traffic, disk l10 rate, temperature and power status.
3. The server exception handling method according to claim 1, characterized in that: The server sets the threshold value T of each monitoring indicator through the set monitoring indicator judgment i ; When a certain indicator M i Exceeds its corresponding threshold T i When the server is judged to be in an abnormal state, the threshold T i It can be adjusted dynamically based on historical data and statistical analysis. The formula is as follows: T i =μ i +k·s i Among them, μ i M is the monitoring indicator i The historical average value of i is the standard deviation, and k is the adjustment coefficient.
4. The server exception handling method according to claim 1, characterized in that: The abnormal information includes the abnormal type, occurrence time, impact range and abnormal severity. The calculation formula of the abnormal severity S is as follows: Among them, w i M is the monitoring indicator i The weight of n is the number of monitoring indicators; the weight w i Determined based on the importance of each monitoring indicator and meeting the following conditions:
5. The server exception handling method according to claim 1, characterized in that: The processing strategies include restarting services, releasing resources, adjusting system configurations, switching to backup servers, and sending alarm notifications.
6. The server exception handling method according to claim 5, characterized in that: The restart service includes the following steps: Close abnormal service processes; Release occupied system resources; Restart the service process and monitor its status to ensure it is running properly.
7. The server exception handling method according to claim 5, characterized in that: The releasing of resources comprises the following steps: Check the system for unreleased memory and file handles; Execute resource recycling procedures to release unused resources; Updates system resource usage status.
8. The server exception handling method according to claim 5, characterized in that: The adjusting system configuration comprises the following steps: Identify system parameters that cause anomalies; Modify relevant parameter configurations, such as adjusting cache size, optimizing network settings, etc.; Restart related services or processes for the configuration to take effect.
9. The server exception handling method according to claim 5, characterized in that: The switching to the backup server comprises the following steps: Confirm that the main server is abnormal and record the current status; Routing requests to alternate servers; Synchronize data and status to ensure service continuity.
10. A server, characterized in that: The invention comprises a controller for executing any one of the methods described in claims 1 to 9, wherein the controller comprises a processor, a memory and a network interface, and is used to implement various functions of the server exception handling method; the controller also comprises a redundant power supply module and a cooling system, so as to improve the reliability and stability of the server, wherein the redundant power supply module comprises a main power supply and a backup power supply, and automatically switches to the backup power supply when the main power supply fails; the cooling system comprises a temperature sensor and a fan controller, wherein the temperature sensor monitors the server temperature in real time, and when the temperature exceeds a set threshold, the fan controller increases the fan speed to reduce the temperature.
