Skip to content
matthart1983Public

About

Linux kernel diagnostics in your terminal. Investigate scheduling, memory pressure and block I/O. Built with Rust.

Topics

Resources

Contributing

Security policy

Stars

109 stars

Watchers

0 watching

Forks

Repository files navigation

kernwatch

Linux kernel observability, in your terminal.

Release Downloads Platform License

kernwatch touring its views on a live Linux VM: CPU, tasks, scheduler, memory, block, syscalls, IRQs, cgroups, modules, eBPF, kernel log, diagnosis and flame graph

Real readings from a staged workload in a Linux VM; not a performance benchmark.

Investigate CPU contention, scheduling, memory pressure, block IO and interrupts. Fourteen views connect live counters with bounded tracing, stack profiles and incident reports. Linux only, on x86-64 and ARM64.

Install

Download a release binary for Linux x86-64 or ARM64. Both glibc and static musl builds are available; choose static musl for portability. Download and checksum instructions.

Or build from source with Rust 1.98+ and a C linker:

git clone https://github.com/matthart1983/kernwatch.git
cd kernwatch
cargo build --release --locked

The executable is target/release/kernwatch. Installation details.

Run

kernwatch                       # monitor the current host
kernwatch --view dense          # combined dashboard
kernwatch --demo-tour           # guided simulation; no host probes
kernwatch --replay capture.kwr  # replay a recording offline

Use 160 columns for the full dashboard; compact layouts work at 80×24. [ / ] switch views, Tab moves panel focus, ? shows help, q quits. Every keybinding · Demo guide

Views

Key View Focus
0 Dense CPU, memory, block I/O, IRQ, scheduler, modules/BPF, tasks, and timeline
1 Overview Host health and leading findings
2 Tasks Threads, placement, runtime, memory, and captured wake latency
3 Scheduler CPU/task/cgroup scheduling and latency distributions
4 Memory Process memory, slab, NUMA, hugepages, and reclaim
5 Block Device throughput, queue activity, and captured request latency
6 Syscalls Calls, negative returns, durations, arguments, and captured stacks
7 IRQ Interrupt rates, affinity, per-CPU softirq data, and handler latency
8 Cgroups Runtime, quota, placement, memory, and pressure
9 Modules Loaded state, taint, file metadata, and observed changes
b eBPF Programs, maps, links, runtime counters, and capture overhead
m Dmesg Kernel/journal events and source health
d Diagnose Evidence, hypotheses, action previews, and verification
F Flame CPU/syscall stack capture, zoomable icicles, and baseline comparison

Profile and trace

Press F, select a process and press Enter to capture CPU stacks. x stops and keeps the capture, B saves a baseline, and D compares it with the next capture. e exports profiles and folded stacks. Profiling guide · Flame graph demo.

Ordinary counters use procfs/sysfs. Request-level latency and syscall tracing require an explicit capture, supported kernel features and BPF permissions. On Syscalls (6), l starts a 30-second capture and x stops it. kernwatch does not elevate itself. Tracing commands and scope.

Supported task, IRQ/RPS and cgroup changes use action previews, target checks, readback and rollback journals.

Record and report

f freezes the display, r toggles recording, and e exports an incident report. Reports retain observations, hypotheses, source quality and action records. Replay does not sample the host. Recording and export details.

Limits

Missing or denied measurements are not healthy zeroes. Captured percentiles use bounded samples, and device mean latency is not request p99. Tracing support varies with the kernel, permissions and security policy. CI samples CPU stacks on native x86-64 and ARM64; privileged scheduler, IRQ, block and syscall probes have not yet been validated on ARM64.

The project is under active development. See the performance review, known gaps and validation scope. Report vulnerabilities through SECURITY.md.

Docs

Reference Setup, controls, tracing, recording and optional data sources
CPU and syscall profiling Capture, comparison, symbols and measurement quality
Guided demo Simulated incident walkthrough
Development Build, test and contribution workflow
Design documents Specification, implementation plans and audits

Related

NetWatch covers network diagnostics, SysWatch system activity, and DiskWatch disk diagnostics.

License

MIT.

About

Linux kernel diagnostics in your terminal. Investigate scheduling, memory pressure and block I/O. Built with Rust.

Topics

Resources

Contributing

Security policy

Stars

109 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages