lastwords(1m)

lastwords1m

Print syscalls before exit. uses dtrace.

Usage

lastwords command

Overview

This prints the last few system calls for processes matching the given name, when they exit. This makes use of a ring buffer so that the impact on the system is minimised.

Since this uses DTrace, only users with root privileges can run this command.

Examples

Catch last few syscalls for dying netscape processes,

# lastwords netscape

Fields

TIME

time of syscall return, ns

PID

process ID

EXEC

process name (execname)

SYSCALL

system call

RETURN

return value for the system call

ERR

errno for the system call

Based on

/usr/demo/dtrace/ring.d

Documentation

DTrace Guide "Buffers and Buffering" chapter (docs.sun.com)

See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with verbose descriptions explaining the output.

Exit

lastwords will sample until a command with that name exits.

Releases

115 releases since Mac OS X 10.5; the text changed 1 time.

  1. 10.5–10.5.8
  2. 10.6–26.5

From dtrace 413 in macOS 26.5. Parsed by carta from the page's man source.