NecroScope is a Python-based tool for ingesting Linux kernel logs, extracting structured error information, and producing human-readable or machine-readable analysis results.
The v1 design is CLI-first and intentionally modular. Log ingestion, analysis, and output formatting are strictly separated. LLM support is stubbed out and not used in v1. NecroScope does not require network access or an LLM to function.
- Load kernel logs from a file,
.gzcompressed logs, or standard input - Normalize and parse log lines into structured events
- Extract global metadata such as kernel version and command lines
- Group kernel errors into error blocks (Oops, panic, WARN, BUG, etc.)
- Apply rule-based analysis to classify severity and provide diagnostic hints
- Emit results as plain text or structured JSON
- Optionally anonymize output for sharing
- Fetch logs or attachments from bug trackers
- Automatically unpack sosreport or apport archives
- Require an LLM, network access, or external services
- Provide a web UI or store logs
- Persist results or maintain historical analysis state
These are current implementation limits in v1:
- Multi-boot detection is not supported - all events are assigned to boot 0
- Wall clock timestamp parsing is not implemented; only dmesg offsets are parsed
- Hostname extraction is not implemented
- Compressed log support is limited to
.gz - LLM support and the web API are stubs and not used by the CLI
python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e ".[dev]"pip install -e .Analyze a kernel log file:
necro-scope analyze /path/to/dmesg.txtRun from source without installing:
python -m necro_scope.cli analyze tests/data/dmesg_warn_cut_here_excerpt.logAnalyze logs from standard input:
dmesg | necro-scope analyze -Emit JSON output:
necro-scope analyze /path/to/dmesg.txt --jsonRun with LLM usage disabled (reserved flag, LLM not used in v1):
necro-scope analyze /path/to/dmesg.txt --no-llmFor the full list of options, see:
necro-scope analyze --helpCore code lives under src/necro_scope/:
ingestion/- log loading, parsing, error block detectionanalysis/- rule engine, severity scoring, stacktrace interpretationoutput/- text and JSON formatters and schemasmodels/- internal data model definitionsproviders/- heuristic summarizer and interfacesllm/- LLM stubs, not used in v1web/- web API stubs, not enabled in v1
The authoritative v1 design is documented in ARCHITECTURE.md.
Kernel logs may contain sensitive information such as hostnames, usernames, IP addresses, or serial numbers. Use --anonymize-output before sharing output publicly.
Run the test suite:
pytestThe project uses a src/ layout. Tests are configured to run directly from a working tree without requiring an installed package.
NecroScope is licensed under the Apache License, Version 2.0.
See LICENSE and NOTICE for details.