ktrace is a utility included with certain versions of BSD Unix and Mac OS X that traces kernel interaction with a program and dumps it to disk for the purposes of debugging and analysis. Traced kernel operations include system calls, name translations, signal processing, and I/O.[2]
Trace files generated by ktrace (named by default) can be viewed in human-readable form by using the kdump utility.[3]
Since Mac OS X Leopard, ktrace has been replaced by DTrace.[4] The identically-named ktrace program in recent macOS versions does not have the same functions as this utility.