Online fault detection method and device for operating system and storage medium

By training the fault rule model and dynamically capturing running status information in the Linux operating system, fault detection with high real-time and fault tolerance is achieved, which solves the problem of insufficient real-time and fault tolerance of fault detection in the traditional method and reduces the risk of fault detection. dependence on the network.

CN118860718APending Publication Date: 2024-10-29NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411030165.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

The traditional Linux operating system fault detection method has insufficient fault tolerance, low real-time performance and strong network dependence. As a result, the system has insufficient fault tolerance and real-time performance during fault detection and cannot respond to problems in system operation in a timely manner.

Method used

The online fault detection method is used to obtain a fault rule base by training the fault rule model, dynamically capture operating system operating status information, and perform fault diagnosis under the fault rule base to achieve localized detection and reduce dependence on external servers and networks.

Benefits of technology

It improves the real-time and fault tolerance of fault detection, reduces operation and maintenance costs, and adapts to complex and changeable operating environments without affecting system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118860718A_ABST
    Figure CN118860718A_ABST
Patent Text Reader

Abstract

The invention discloses an online fault detection method and device for an operating system and a storage medium. Belongs to the technical field of computer operating systems. In the method, firstly, a fault rule model is trained to obtain a fault rule base, secondly, running state information of a terminal operating system is obtained online in a dynamic capture mode, and then online fault diagnosis is carried out in combination with the running state information of the operating system in the fault rule base. High real-time performance, high fault tolerance and low resource consumption are achieved, that is, uninterrupted fault detection can be conducted during system operation without additional configuration or restarting of the system, the real-time performance of fault detection is improved, and the fault detection efficiency is improved through the method of combining localization of the fault rule base obtained through model training with a fault detection mechanism. According to the method, fault detection can be carried out under the condition of not depending on an external server and a network environment, the fault-tolerant capability and the expansion flexibility of the system are effectively improved, the method adapts to a complex and changeable operation environment, in addition, the occupation of system resources is extremely low through the monitoring process of a dynamic capture mode, the influence on software performance is reduced, and the operation and maintenance cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer operating systems, and in particular to an operating system online fault detection method, device and storage medium. Background Art

[0002] In the context of the widespread use of Linux operating systems, fault detection technology faces some challenges and problems. At present, the traditional fault detection method mainly adopts the Client-Server architecture, where the front-end Client is responsible for collecting system operation status information and the back-end Server performs data processing and fault analysis. However, this method has the following major problems.

[0003] First, the fault tolerance is insufficient. Traditional methods are more dependent on the background server. If the server fails, the entire detection process will be blocked, resulting in insufficient system fault tolerance. Second, the real-time performance is insufficient. The detection process goes through multiple links such as data collection, network transmission, and data processing, which makes the real-time performance of fault detection low and cannot respond to problems in system operation in a timely manner. Third, the network dependence is too strong. Data transmission depends on network stability. Network delays or interruptions may cause data loss, thereby affecting the integrity and timeliness of fault detection.

[0004] To address these issues, there is an urgent need for a more advanced online fault detection method to improve the real-time and fault tolerance of operating system fault detection, reduce dependence on the network, and enable the system to respond to and handle various faults and abnormal situations more quickly and reliably. Summary of the invention

[0005] In view of the above problems in the prior art, the present invention provides an operating system online fault detection method, device and storage medium to solve the related technical fault detection technology.

[0006] In one aspect, the present invention provides an operating system online fault detection method, which is applied to a terminal operating system and includes:

[0007] Training a fault rule model to obtain a fault rule library, wherein the fault rule model is established according to the fault information;

[0008] Managing the fault rule base;

[0009] Acquire the operating status information of the operating system online by dynamic capture, wherein the operating status information of the operating system is related to the system call and the running program status;

[0010] The fault rule base is combined with the operating status information of the operating system to perform online fault diagnosis.

[0011] Optionally, the managing the fault rule base includes:

[0012] Initializing data of the fault rule base;

[0013] Updating the rule data in the fault rule base online or offline;

[0014] In response to an abnormal state occurring during the updating of the rule data, executing an abnormality handling process or a rollback operation;

[0015] The rule data no longer needed on the terminal operating system is deleted.

[0016] Optionally, the initializing data of the fault rule base includes:

[0017] In the fault rule base, the structured rule data is stored in a lightweight database;

[0018] In the fault rule base, unstructured rule data is stored in a local directory in a file storage manner.

[0019] Optionally, the updating of the rule data in the fault rule base online or offline includes:

[0020] In the online update mode, the system connects with the back-end rule engine server, which is used to actively push the latest rule data to the terminal operating system;

[0021] In offline update mode, data files are exported from the backend rule engine server and copied to the terminal operating system;

[0022] The latest rule data is imported into the lightweight database using a database management tool or a specific command.

[0023] Optionally, deleting the rule data no longer needed on the terminal operating system includes:

[0024] Deleting corresponding data items in the fault rule base for structured rule data no longer needed on the terminal operating system;

[0025] The corresponding rule storage files are deleted for the unstructured rule data no longer needed on the terminal operating system.

[0026] Optionally, the performing online diagnosis of the fault in combination with the operating status information of the operating system under the fault rule base includes:

[0027] Mining fault feature information of the operating status information through an intelligent analysis model;

[0028] Matching the fault feature information with the fault rule base data of the lightweight database;

[0029] In response to the existence of matching data, a fault alarm process is triggered, and the fault alarm process is completed by calling a message pop-up window mechanism built into the terminal operating system.

[0030] Optionally, the types of the fault rule library include a defect rule library, an IO feature library, a performance benchmark library, a resource usage pattern library, a BCC tool set, a libc library, and a libbpf library.

[0031] On the other hand, an operating system online fault detection device is provided, the device comprising:

[0032] A rule building module, used for training a fault rule model to obtain a fault rule base, wherein the fault rule model is built according to the fault information;

[0033] A module rule management module, used for managing the fault rule base;

[0034] A dynamic monitoring module, used to obtain online the operating status information of the operating system by dynamic capture, wherein the operating status information of the operating system is related to the system call and the running program status;

[0035] The fault detection module is used to perform online fault diagnosis in combination with the operating status information of the operating system under the fault rule base.

[0036] On the other hand, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the operating system online fault detection method as described in any one of claims 1 to 7 above.

[0037] The present invention has at least the following beneficial effects.

[0038] The present invention proposes an online fault detection method suitable for a terminal operating system, wherein firstly, a fault rule model is trained to obtain a fault rule base, and secondly, the operating status information of the terminal operating system is obtained online by dynamic capture, and again, the operating status information of the operating system is combined under the fault rule base to perform online fault diagnosis. High real-time performance, high fault tolerance, and low resource consumption are achieved, that is, uninterrupted fault detection can be performed while the system is running without additional configuration or restarting the system, thereby improving the real-time performance of fault detection, and, by combining the localization of the fault rule base obtained by model training with the fault detection mechanism, fault detection can be performed without relying on external servers and network environments, effectively improving the system's fault tolerance and expansion flexibility, and adapting to complex and changeable operating environments. In addition, the monitoring process by dynamic capture occupies very little system resources, reduces the impact on software performance, and reduces operation and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a framework diagram of a terminal operating system in an embodiment of the present invention;

[0040] Figure 2 is a flow chart of an operating system online fault detection method in an embodiment of the present invention;

[0041] Figure 3 is a flow chart of another operating system online fault detection method in an embodiment of the present invention;

[0042] Figure 4 This is a business flow chart taking nginx software abnormal exit fault detection as an example in an embodiment of the present invention;

[0043] Figure 5 is a system service flow chart in an embodiment of the present invention;

[0044] Figure 6 The technical architecture diagram of an operating system online fault detection device in an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0046] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.

[0047] The present invention provides an operating system online fault detection method, which is applied to a terminal operating system. Figure 1 As shown, firstly, the system framework of the terminal operating system is introduced.

[0048] exist Figure 1 In the system framework diagram shown, the system framework is divided into three levels: the bottom layer is the Linux operating system distribution version, the middle layer is the basic runtime environment (Base Runtime) built based on the operating system distribution version, and the upper layer is the software application layer. In this framework, the operating system serves as the basic support, providing the underlying operating environment for all software and applications; the basic runtime environment is mainly responsible for providing key fault rule library data and the basic library on which eBPF operation depends, ensuring the efficient and stable operation of the application; the application layer mainly provides rule management, dynamic monitoring, fault detection and other capabilities, corresponding to the online fault detection method performed by the embodiment of this application.

[0049] Further, such as Figure 1 As shown, the types of fault rule libraries provided by the basic runtime environment include defect rule library, IO feature library, performance benchmark library, resource usage pattern library, BCC tool set, libc library and libbpf library.

[0050] The online fault detection method based on the terminal operating system is further described below through various embodiments.

[0051] Example 1

[0052] The present invention provides an operating system online fault detection method, which is applied to a terminal operating system and includes the following contents.

[0053] Step 201 , training a fault rule model to obtain a fault rule base, wherein the fault rule model is established according to fault information.

[0054] Step 202: manage the fault rule base.

[0055] Step 203: acquiring the operating status information of the terminal operating system online by means of dynamic capture.

[0056] The operating system's running status information is related to system calls and running program status.

[0057] Step 204: Perform online fault diagnosis based on the fault rule base and the operating status information of the operating system.

[0058] The present invention proposes an online fault detection method suitable for a terminal operating system, wherein firstly, a fault rule model is trained to obtain a fault rule base, and secondly, the operating status information of the terminal operating system is obtained online by dynamic capture, and again, the operating status information of the operating system is combined under the fault rule base to perform online fault diagnosis. High real-time performance, high fault tolerance, and low resource consumption are achieved, that is, uninterrupted fault detection can be performed while the system is running without additional configuration or restarting the system, thereby improving the real-time performance of fault detection, and, by combining the localization of the fault rule base obtained by model training with the fault detection mechanism, fault detection can be performed without relying on external servers and network environments, effectively improving the system's fault tolerance and expansion flexibility, and adapting to complex and changeable operating environments. In addition, the monitoring process by dynamic capture occupies very little system resources, reduces the impact on software performance, and reduces operation and maintenance costs.

[0059] Example 2

[0060] The present invention provides another operating system online fault detection method, which is applied to a terminal operating system. The process is as follows: Figure 3 As shown, it includes the following contents.

[0061] Step 301 , training a fault rule model to obtain a fault rule base, wherein the fault rule model is established according to fault information.

[0062] Optionally, the types of fault rule bases include defect rule bases, IO feature bases, performance benchmark bases, resource usage pattern bases, BCC tool sets, libc bases, and libbpf bases. The defect rule base data is efficiently and orderly managed and diversified through the following steps.

[0063] Step 302: Initialize data of the fault rule base.

[0064] In a possible implementation, step 302 includes content one to content two.

[0065] Content 1: In the fault rule base, the structured rule data is stored in a lightweight database.

[0066] In order to balance flexibility and performance, structured rule data will be stored in a lightweight database (such as SQLite). This database has the advantages of easy deployment, low resource consumption, and high performance, and is suitable for use on the terminal operating system side.

[0067] Content 2: In the fault rule base, the unstructured rule data is stored in a local directory through file storage.

[0068] For unstructured data, this module adopts file storage and stores it directly in the local directory for flexible access and processing.

[0069] Combining content 1 and content 2, it can be summarized as an initialization operation on the rule data. First, set the data storage format. In the storage format of this embodiment, structured data is stored in the miss_behavior_rules table of the lightweight database, and unstructured rule data is stored in the local directory through file storage. Secondly, the rule data is initialized. The full amount of rule data packets exported from the rule engine server are imported into the miss_behavior_rules table of the local rule database.

[0070] Step 303: Update the rule data in the fault rule base online or offline.

[0071] In a possible implementation manner, step 303 includes content one to content three.

[0072] Content 1. In the online update mode, it connects with the back-end rule engine server, which is used to actively push the latest rule data to the terminal operating system.

[0073] Furthermore, in order to provide a dynamic update mechanism for rule data, the embodiment of the present application supports both incremental and full update methods to ensure that the system can quickly respond to rule changes and keep the rules up to date. Rule data updates mainly include online update and offline update modes. In the online update mode, it connects to the back-end rule engine server, which is used to actively push the latest rule data to the terminal operating system, and then executes content three to achieve instant data updates.

[0074] Content 2: In offline update mode, export data files from the backend rule engine server and copy them to the terminal operating system.

[0075] In the offline update mode, the user or administrator can export the data file from the backend rule engine server and copy it to the terminal operating system, and then execute content three.

[0076] Content 3: Use database management tools or specific commands to import the latest rule data into the lightweight database.

[0077] In one example, taking the software abnormal exit rule data offline update mode as an example, its implementation steps are described in detail.

[0078] 1) Export the software abnormal exit rule data file from the rule engine server;

[0079] 2) Copy the rule data file to the terminal operating system;

[0080] 3) Back up the SQLite database file through the rule data rollback submodule;

[0081] 4) Import the rule data into the database through the SQLite command;

[0082] 5) Check the update status through the rule data rollback submodule. If the update fails, roll back the database file.

[0083] Step 304: in response to an abnormal state occurring during the rule data update process, executing an exception handling process or a rollback operation.

[0084] The content executed in step 304 is a safety net for rule management, providing comprehensive data backup, anomaly detection, error handling and rollback recovery functions. Once any abnormal state is detected during the rule data update process, step 304 can automatically execute the upgrade exception handling process and roll back the rule data to a stable version when necessary, ensuring stable operation of the system and reducing the risks caused by rule changes.

[0085] Step 305: Delete the rule data no longer needed on the terminal operating system.

[0086] For structured rule data that is no longer needed on the terminal operating system, the corresponding data items are deleted from the fault rule base.

[0087] Delete the corresponding rule storage files for the unstructured rule data that is no longer needed on the terminal operating system.

[0088] In one example, the main content of the rule data rollback initialization implementation is provided.

[0089] 1) Back up the local database file: Use the cp command to back up the local rule database file. The backup file name is the original database file + date.

[0090] 2) Check the update result: Check the return value of the SQLite API call to determine whether the update is successful. If the update fails, call the operating system message prompt interface to prompt the user based on the information corresponding to the return value error code;

[0091] 3) Roll back the local database file: Restore the local rule database file that has been backed up on the current day using the cp command.

[0092] Step 306: Acquire the running status information of the terminal operating system online by dynamic capture.

[0093] The operating system's running status information is related to the system call and running program status.

[0094] In the embodiment of the present application, the dynamic capture method uses eBPF technology to track and monitor the running status information of the terminal operating system, including resource monitoring, call sequence monitoring, I / 0 monitoring, process and thread monitoring, real-time log collection, monitoring data storage, etc. Corresponding to different running status information, there are separate execution modules for dynamic monitoring, which are illustrated one by one below.

[0095] Resource monitoring, the corresponding execution module focuses on real-time tracking of key system resource status such as CPU usage, memory usage, and disk I / O, ensuring comprehensive insight into system resource usage;

[0096] Call sequence monitoring: The corresponding execution module focuses on monitoring the call sequence information of system kernel and user-mode functions, including but not limited to system calls, interrupt processing and abnormal events, providing key data support for the detection and analysis of problems such as software hangs and abnormal software exits;

[0097] I / O monitoring, the corresponding execution module accurately monitors disk read and write activities, and records key indicators such as request size, read and write type (sequential / random) and response time in detail, providing an important basis for disk performance diagnosis;

[0098] Process and thread monitoring: The corresponding execution module comprehensively monitors the process life cycle (creation, operation, and destruction) and the interaction between threads, providing strong support for diagnosing concurrency problems such as race conditions and deadlocks;

[0099] Real-time log collection: The corresponding execution module focuses on efficiently capturing various system logs at the kernel level. The captured log data can be directly and quickly passed to user-mode applications for further processing and analysis, thus providing users with real-time insights into system operation status and strong support for troubleshooting.

[0100] Monitoring data storage, the corresponding execution module intelligently manages the unstructured data (such as logs, exception stacks) generated during the monitoring process, and automatically stores them in the system temporary directory. At the same time, it has a built-in efficient scheduled cleanup mechanism to automatically remove redundant or expired data, ensuring the rational use of system storage space and continuous optimization of system performance.

[0101] In one example, if Figure 4 As shown, taking the abnormal exit of nginx software fault detection and the rule data being in offline update mode as an example, the implementation content and steps of call sequence monitoring are described in detail.

[0102] (1) Open the eBPF dynamic monitoring tool;

[0103] (2) The terminal operating system calls the dynamic monitoring model to monitor the system operation status, wherein the dynamic monitoring model executes step 306. The specific process includes:

[0104] 1) Use bpftrace's tracepoint to track syscalls:sys_enter_kill system calls and all kill signals except signal 0;

[0105] 2) The ID of the received kill signal is stored in the specified temporary variable kill_pid, and the signal is stored in the specified temporary variable kill_sig;

[0106] 3) According to the value of the variable kill_pid, obtain the value of the system's / proc / ${kill_pid} / comm data and save the result to the temporary variable kill_soft.

[0107] The fault detection content mainly includes the content from step 307 to step 309, including two parts: rule matching and fault alarm.

[0108] Step 307: mining fault feature information of the operating status information through an intelligent analysis model.

[0109] In step 307, based on the data collected by dynamic monitoring in step 306, fault feature information of the operating status information is mined through an intelligent analysis model.

[0110] Step 308: Match the fault feature information with the fault rule base data of the lightweight database.

[0111] In step 308, the fault feature information is matched with the fault rule base data of the local lightweight database. If there is matching data, it indicates that a specific fault may exist in the system, and the fault alarm process is triggered, that is, the content of step 309 is executed.

[0112] Step 309 , in response to the existence of matching data, triggering a fault alarm process, the fault alarm process is completed by calling a message pop-up window mechanism built into the terminal operating system.

[0113] Therefore, in the above example, further, Figure 4 As shown, the fault feature information including the software name and abnormal signal value of the kill signal is mined, and then the fault feature information is matched with the fault rule base data of the lightweight database. If there is matching information, the user is prompted through the alarm interface that the nginx abnormal exit problem has occurred, and the process ends; if there is no matching information, the dynamic monitoring model is called through the terminal operating system to monitor the system operation status.

[0114] According to the instructions of rule matching, the built-in message pop-up mechanism of the terminal operating system is flexibly called to pop up an alarm window on the terminal user interface to ensure that users can quickly notice system fault information and take corresponding processing measures.

[0115] In an example, a specific implementation method of step 309 is given. In the rule matching process, first, based on kill_soft (software name) and kill_sig (signal value), a query is made from the local rule database to see whether there is matching data. Secondly, if there is matching data, the fault alarm information is obtained and the fault alarm process is triggered.

[0116] In the process of triggering a fault alarm, the terminal user is warned by calling the operating system pop-up prompt interface notify-send.

[0117] In addition, based on the above embodiments, Figure 5 As shown in the figure, the main business process of the operating system online fault detection method is given, and the main steps include:

[0118] The terminal operating system detects whether it is the first detection. If it is, the rule database is installed and initialized, such as the initialized fault rule base, and the rule data is updated. In response to the update failure, the rule base data is rolled back, and the update of the rule data is continued when there is an update. If the update is successful, the following main contents are executed.

[0119] 1. Open the eBPF monitoring tool;

[0120] 2. Monitor system status information based on the custom monitoring model. From the above content, we can see that there are different types of fault rule bases, and each type corresponds to a custom monitoring model to execute the dynamic monitoring method;

[0121] 3. After capturing the specified monitoring data, the fault feature information is mined through the intelligent analysis model, and the fault feature information is intelligently matched with the rule database. If no monitoring data is mined, the monitoring continues through the custom monitoring model;

[0122] 4. If there is matching information, the user is prompted through the alarm interface and the process ends;

[0123] 5. If there is no matching information, continue monitoring through the custom monitoring model.

[0124] The present invention proposes an online fault detection method suitable for a terminal operating system, wherein firstly, a fault rule model is trained to obtain a fault rule base, and secondly, the operating status information of the terminal operating system is obtained online by dynamic capture, and again, the operating status information of the operating system is combined under the fault rule base to perform online fault diagnosis. High real-time performance, high fault tolerance, and low resource consumption are achieved, that is, uninterrupted fault detection can be performed while the system is running without additional configuration or restarting the system, thereby improving the real-time performance of fault detection, and, by combining the localization of the fault rule base obtained by model training with the fault detection mechanism, fault detection can be performed without relying on external servers and network environments, effectively improving the system's fault tolerance and expansion flexibility, and adapting to complex and changeable operating environments. In addition, the monitoring process by dynamic capture occupies very little system resources, reduces the impact on software performance, and reduces operation and maintenance costs.

[0125] on the other hand, Figure 6 This is a technical architecture diagram of an operating system online fault detection device in an embodiment of the present invention, the device includes:

[0126] A rule building module, used for training a fault rule model to obtain a fault rule base, wherein the fault rule model is built according to the fault information;

[0127] A module rule management module, used for managing the fault rule base;

[0128] A dynamic monitoring module, used to obtain online the operating status information of the operating system by dynamic capture, wherein the operating status information of the operating system is related to the system call and the running program status;

[0129] The fault detection module is used to perform online fault diagnosis in combination with the operating status information of the operating system under the fault rule base.

[0130] Optionally, the module rule management module includes:

[0131] A rule data initialization submodule, used for initializing data of the fault rule base;

[0132] A rule data updating submodule, used for updating the rule data in the fault rule base online or offline;

[0133] A rule data rollback submodule, for executing an exception handling process or a rollback operation in response to an abnormal state occurring during the rule data update process;

[0134] The rule deletion submodule is used to delete rule data that is no longer needed on the terminal operating system.

[0135] Optionally, the initializing data of the fault rule base includes:

[0136] In the fault rule base, the structured rule data is stored in a lightweight database;

[0137] In the fault rule base, unstructured rule data is stored in a local directory in a file storage manner.

[0138] Optionally, the rule data updating submodule includes:

[0139] A first updating unit is used to connect with a back-end rule engine server in an online updating mode, and the rule engine server is used to actively push the latest rule data to the terminal operating system;

[0140] A second updating unit is used to export data files from a backend rule engine server and copy them to the terminal operating system in an offline updating mode;

[0141] The third updating unit is used to import the latest rule data into the lightweight database by using a database management tool or a specific command.

[0142] Optionally, the rule deletion submodule includes:

[0143] A first deleting unit, configured to delete corresponding data items in the fault rule base for structured rule data no longer needed on the terminal operating system;

[0144] The second deleting unit is used to delete the corresponding rule storage file for the unstructured rule data no longer needed on the terminal operating system.

[0145] Optionally, the fault detection module includes:

[0146] A rule matching submodule, used to mine fault feature information of the operating status information through an intelligent analysis model; used to match the fault feature information with fault rule base data of a lightweight database;

[0147] The fault alarm submodule is used to trigger a fault alarm process in response to the existence of matching data, and the fault alarm process is completed by calling a message pop-up mechanism built into the terminal operating system.

[0148] Optionally, the types of the fault rule library include a defect rule library, an IO feature library, a performance benchmark library, a resource usage pattern library, a BCC tool set, a libc library, and a libbpf library.

[0149] Furthermore, considering the type of fault rule base, a dynamic monitoring submodule corresponding to different rule data is also provided, such as Figure 6As shown, it includes a resource monitoring submodule, a call sequence monitoring submodule, an I / O monitoring submodule, a process and thread monitoring submodule, a real-time log collection submodule and a monitoring data storage submodule.

[0150] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. An operating system online fault detection method, characterized in that: The method is applied to a terminal operating system, and the method comprises: Training a fault rule model to obtain a fault rule library, wherein the fault rule model is established according to the fault information; Managing the fault rule base; Acquire the operating status information of the operating system online by dynamic capture, wherein the operating status information of the operating system is related to the system call and the running program status; The fault rule base is combined with the operating status information of the operating system to perform online fault diagnosis.

2. The method according to claim 1, characterized in that The managing the fault rule base comprises: Initializing data of the fault rule base; Updating the rule data in the fault rule base online or offline; In response to an abnormal state occurring during the updating of the rule data, executing an abnormality handling process or a rollback operation; The rule data no longer needed on the terminal operating system is deleted.

3. The method according to claim 2, characterized in that The initializing of data for the fault rule base includes: In the fault rule base, the structured rule data is stored in a lightweight database; In the fault rule base, unstructured rule data is stored in a local directory in a file storage manner.

4. The method according to claim 2, characterized in that: The updating of the rule data in the fault rule base online or offline includes: In the online update mode, the system connects with the back-end rule engine server, which is used to actively push the latest rule data to the terminal operating system; In offline update mode, data files are exported from the backend rule engine server and copied to the terminal operating system; The latest rule data is imported into the lightweight database using a database management tool or a specific command.

5. The method according to claim 2, characterized in that: Deleting the rule data no longer needed on the terminal operating system includes: Deleting corresponding data items in the fault rule base for structured rule data no longer needed on the terminal operating system; The corresponding rule storage files are deleted for the unstructured rule data no longer needed on the terminal operating system.

6. The method according to claim 1, characterized in that The online diagnosis of the fault is performed in combination with the operating status information of the operating system under the fault rule base, including: Mining fault feature information of the operating status information through an intelligent analysis model; Matching the fault feature information with the fault rule base data of the lightweight database; In response to the existence of matching data, a fault alarm process is triggered, and the fault alarm process is completed by calling a message pop-up window mechanism built into the terminal operating system.

7. The method according to any one of claims 1 to 6, characterized in that: The types of the fault rule base include defect rule base, IO feature base, performance benchmark base, resource usage pattern base, BCC tool set, libc base and libbpf base.

8. An operating system online fault detection device, characterized in that: The device comprises: A rule building module, used for training a fault rule model to obtain a fault rule base, wherein the fault rule model is built according to the fault information; A module rule management module, used for managing the fault rule base; A dynamic monitoring module, used to obtain online the operating status information of the operating system by dynamic capture, wherein the operating status information of the operating system is related to the system call and the running program status; The fault detection module is used to perform online fault diagnosis in combination with the operating status information of the operating system under the fault rule base.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is loaded and executed by a processor to implement the operating system online fault detection method as described in any one of claims 1 to 7 above.

Citation Information

Cited By

  • State data acquisition method for multi-split cross-platform distributed monitoring system

    CN120658684A