ktap A lightweight script-based dynamic tracing tool for Linux
ktap is a new script-based dynamic tracing tool for Linux, it uses a scripting language and lets users trace the Linux kernel dynamically. ktap is designed to give operational insights with interoperability that allows users to tune, troubleshoot and extend kernel and application. It's similar with Linux Systemtap and Solaris Dtrace.
ktap have different design principles from Linux mainstream dynamic tracing language in that it's based on bytecode, so it doesn't depend upon GCC, doesn't require compiling kernel module for each script, safe to use in production environment, fulfilling the embedded ecosystem's tracing needs.
A short summary of features
Simple | simple but powerful scripting language |
Fast | register based interpreter (heavily optimized) in Linux kernel |
Lightweight | small and lightweight (6KLOC of interpreter) |
Compilation | not depend on gcc for each script running |
Embedded | easy to use in embedded environment without debugging info |
Tracing | support for tracepoint, kprobe, uprobe, function trace, timer and more |
Architecture | supported in x86, arm, ppc, mips |
Safety | safety in sandbox |
License | GPL v2 |
A very small taste of what it looks like
#/usr/bin/env ktap #trace all syscalls in system trace syscalls:* { print(cpu(), pid(), execname(), argevent) }