Skip to main content

Python parser for kdebug events

Project description

Python application Pypi version Language grade: Python

Description

pykdebugparser is a utility created in order to parse Darwin's (iOS and OSX) kdebug events.

The main difference between pykdebugparser and other utilities like fs_usage and ktrace is the traces parsing and formatting.

Installation

Install the last released version using pip:

python3 -m pip install --user -U pykdebugparser

Or install the latest version from sources:

git clone git@github.com:matan1008/pykdebugparser.git
cd pykdebugparser
python3 -m pip install --user -U -e .

Usage

You can either use the CLI:

Usage: pykdebugparser [OPTIONS] KDEBUG_DUMP

Options:
  -c, --count INTEGER         Number of events to print. Omit to endless
                              sniff.
  --tid INTEGER               Thread ID to filter. Omit for all.
  --show-tid / --no-show-tid  Whether to print thread id or not.
  --color / --no-color        Whether to print with color or not.
  --help                      Show this message and exit.

Or import and use the API yourself:

from pykdebugparser.pykdebugparser import PyKdebugParser

parser = PyKdebugParser()
parser.color = True
with open('kdebug.bin', 'rb') as fd:
    for trace in parser.formatted_traces(fd):
        print(trace)

Example

In order to produce an input file, you can use ktrace dump, you can see an example here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pykdebugparser-0.0.2.tar.gz (30.9 kB view hashes)

Uploaded Source

Built Distribution

pykdebugparser-0.0.2-py3-none-any.whl (31.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page