skillfed

pykdebugparser

Python parser for kdebug events

pykdebugparser v1.2.8 322.6K downloads/30d#7,608 on PyPI38
Permissive license MIT License Copyright (c) 2021 Matan Perelman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) Active released

What it is and what it does

pykdebugparser is a specialized utility for parsing Darwin kernel debug (kdebug) trace events from iOS and macOS systems. It reads binary kdebug dumps generated by the ktrace utility and converts them into human-readable event logs, displaying timestamps, event names, function codes, process information, and raw event data. Unlike generic tracing tools like fs_usage or ktrace itself, pykdebugparser focuses on clean trace parsing and flexible output formatting.

The package works as both a command-line tool and a Python library, depending on your workflow. It depends on construct for binary parsing, pygments for syntax highlighting, click for CLI argument handling, and termcolor for colored terminal output. It supports Python 3.8 through 3.14 and has no known security vulnerabilities.

Use it for:

  • Debug system-level I/O performance issues on macOS by parsing and analyzing kdebug traces from file system operations.
  • Analyze kernel-level memory management events (MACH_vm_page_release, PMAP_flush_TLBS) to understand virtual memory behavior.
  • Inspect system call sequences (BSC_pread, BSC_open, VFS_LOOKUP) to trace application behavior at the kernel level.
  • Automate kdebug trace processing in CI/CD or performance testing pipelines using the Python API.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses Darwin kdebug trace events from iOS and macOS systems, converting kernel debug output into readable formatted event logs with timestamps, function names, and raw event data.

Yes, if you work with macOS/iOS kernel-level tracing. The package is actively maintained, has no vulnerabilities, low install friction, and fills a specific niche for parsing kdebug events that other tools don't address as cleanly. Not relevant for non-Darwin platforms.

Install

pykdebugparser on PyPI

pip

pip install pykdebugparser

uv

uv add pykdebugparser

poetry

poetry add pykdebugparser

Installing pykdebugparser

Before you install

Low friction: pure Python wheel with only four runtime dependencies (construct, pygments, click, termcolor). Actively maintained with a recent release and no known vulnerabilities.

License in practice

MIT license permits unrestricted use, modification, and distribution with only attribution required—no restrictions on commercial or proprietary use.

Quickstart

pip install pykdebugparser

from pykdebugparser import KdebugParser

parser = KdebugParser()
events = parser.parse('trace001.ktrace')
for event in events:
    print(event)

Requires macOS or iOS kdebug trace files (generated via ktrace utility); not functional on non-Darwin systems.

Verify before relying

  • Whether the package can parse trace files programmatically or only via CLI
  • API stability and backward compatibility guarantees across versions
  • Performance characteristics with large trace files

Package facts

License MIT License Copyright (c) 2021 Matan Perelman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 4 — construct, pygments, click, termcolor
Maintenance actively maintained — 41 days since the last release
Last repo commit
First released
Downloads 322,598/month — #7,608 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pykdebugparser-1.2.8-py2.py3-none-any.whl

Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

kdebug trace parserdarwin kernel debug eventsios macos trace analysisktrace event formatterkernel debug log parser
macos-debuggingkernel-tracingsystem-analysis

More Utilities packages