Skip to content

Instantly share code, notes, and snippets.

@AlainODea
Created May 6, 2014 01:18
Show Gist options
  • Save AlainODea/2dca7f01379245dd01e0 to your computer and use it in GitHub Desktop.
Save AlainODea/2dca7f01379245dd01e0 to your computer and use it in GitHub Desktop.
DTrace syscall read(2) errno when non-zero
#!/usr/sbin/dtrace -s
syscall::read:return
/errno != 0/
{
trace(execname);
printf("errno=%d\n", errno);
ustack();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment