Skip to content

FrankZhu888/KdumpAIG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 

Repository files navigation

KdumpAIG - Universal Linux Kernel Crash Analyzer with AI Integration

KdumpAIG is a next‑generation AI agent for Linux kdump analysis. The "G" stands for General – it works across a wide range of Linux distributions and kernel versions, and supports most AI models.

Overview

KdumpAIG is a Python-based AI agent designed to automate the analysis of Linux kernel crash dumps (kdump vmcore files) on Linux systems. By leveraging AI models (currently supporting Azure OpenAI and DeepSeek), it identifies potential crash causes such as deadlocks, memory issues, or driver errors, and generates a detailed HTML report.

The tool collects critical system data using the crash utility, including system info, memory usage, backtraces, process states, run queues, device statistics, kernel logs, and more. The AI then analyzes this data to provide a preliminary conclusion with actionable recommendations.

Features

  • Fast Data Collection: Optimized architecture enables kernel data capture in under one minute.
  • Automated Analysis: Process kdump vmcore files automatically with minimal user intervention.
  • AI-Powered Insights: Integrates with Azure OpenAI or DeepSeek for intelligent crash analysis, or any other AI models like Doubao-Seed etc.
  • HTML Reporting: Outputs results in an easy-to-read HTML format.
  • Linux Compatibility: Supports most Linux distributions and kernel versions.

Prerequisites

  • Python 3+
  • crash utility
  • kernel-debuginfo (install via debuginfo-install kernel) or both vmcore and vmlinux were collected.
  • Root privileges for execution
  • AI API, Azure OpenAI or DeepSeek

Installation

$ git clone https://github.com/FrankZhu888/KdumpAIG.git

$ cd KdumpAIG

Edit KdumpAIG.py to update AI_API_KEY, AI_API_URL and MODEL_NAME with your credentials, example for Azure OpenAI:

AI_API_KEY = "your-azure-openai-key"

AI_API_URL = "https://<your-endpoint>/openai/deployments/<deployment>/chat/completions?api-version=2024-02-15-preview"

MODEL_NAME = "model-name"

Usage

#./KdumpAIG.py --vmcore <vmcore_path> --vmlinux <vmlinux_path> [--output <output_html>] 截屏2025-10-28 12 15 02

Example

# ./KdumpAIG.py --vmcore /var/crash/127.0.0.1-2025-10-16-19\:15\:59/vmcore --vmlinux /usr/lib/debug/lib/modules/5.14.0-284.118.1.el9_2.x86_64/vmlinux

Azure OpenAI GPT-5: 截屏2025-10-28 12 31 52

DeepSeek R1 250528: 截屏2025-10-28 12 25 37

Analysis Report

The script generates an HTML report (kdump_ai_report.html) containing detailed analysis results.

Azure OpenAI: 截屏2025-10-28 13 31 53

DeepSeek R1: 截屏2025-10-28 12 28 02

Notes

It supports most Linux distributions and kernel versions.

Ensure the vmcore and vmlinux files match the crashed kernel version.

The script requires root privileges to install dependencies and access vmcore files.

Support Contact

For issues or questions, contact:

Frank Zhu flankeroot@gmail.com

About

KdumpAIG is a next‑generation AI agent for Linux kdump analysis. The "G" stands for General and it supports most Linux distributions and kernel versions, also most AI models.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors