The application discloses a kind of based on kernel event-driven Linux
system fault diagnosis method and
system;Its operation steps: real-time capture hard exception, soft exception and resource exception event;
Dynamic monitoring is carried out to CPU, memory, storage I / O and network
resource use trend and
mutation behavior;Complete
call stack, execution parameter, lock contention state and connection
metadata are formed structured fault context information when abnormal moment is comprehensively collected, CPU register state is urgently frozen to
firmware reserved memory in interrupt context respectively, task structure body and kernel stack information are collected in
software interrupt context, cross-CPU core state snapshot is completed in high-priority kernel thread coordination;According to
system load,
direct memory access transmission, atomic log addition or bare device block write mode is selected adaptively, and collected
diagnostic data is written and saved;
System recovery agent automatically reorganizes
diagnostic data, and generates standardized diagnostic
package.The application realizes the deep
observability of Linux system while ensuring very low running overhead, and significantly improves fault positioning efficiency.