Strace For Mac

ForStrace For MacStrace For MacStrace For Mac
Written inC[citation needed]
Operating systemBSD Unix and Mac OS X
Available inEnglish

ktrace is a utility included with certain versions of BSD Unix and Mac OS X that traceskernel interaction with a program and dumps it to disk for the purposes of debugging and analysis. Traced kernel operations include system calls, namei translations, signal processing, and I/O.[1]

Strace (1) is a system call tracer for Sun (tm) systems much like the Sun supplied program trace (1). Strace (1) is a useful utility to sort of debug programs for which no source is available which unfortunately includes almost all of the Sun supplied system software. As a transplant from other.nix operating systems, I'm used to system call monitoring tools like truss (on Solaris) and strace (on Linux). While I haven't found anything quite like these for Darwin, scusage comes close. It provides a running statistical breakdown of system.

Strace For Mac

ktrace is somewhat similar to Linux's strace, except for being much faster – with strace, every system call executed by the traced program requires context switch to the tracing program and back, while the tracing with ktrace is actually performed by the kernel, so no additional context switches are required.[citation needed]

Trace files generated by ktrace (named ktrace.out by default) can be viewed in human-readable form by using the kdump utility.[2]

Since Mac OS X 10.5 Leopard, ktrace has been replaced by DTrace.

See also[edit]

  • Dtrace, Sun Microsystems's trace version, now running on OpenSolaris, FreeBSD and OS X Leopard
  • kdump (Linux), Linux kernel's crash dump mechanism, which internally uses kexec
  • trace on Linux, part of the Linux Trace Toolkit

Strass Machine


  1. ^'ktrace'. 2012-05-31. Retrieved 2014-07-23.
  2. ^'kdump'. 2014-03-28. Retrieved 2014-07-23.

Mac Strace Command

Retrieved from ''