Skip to content

Instantly share code, notes, and snippets.

@simonsj
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save simonsj/f3c8b34964091b42a796 to your computer and use it in GitHub Desktop.

Select an option

Save simonsj/f3c8b34964091b42a796 to your computer and use it in GitHub Desktop.
SystemTap Script to Monitor d_instantiate Calls (for non-sockets)
probe kernel.function("d_instantiate").return {
dname = d_name($entry)
dflags = $entry->d_flags
rpw = reverse_path_walk($entry)
if (dname != "") {
printf("d_instantiate: PID=%d execname '%s' cmd: '%s' d_name '%s' d_flags 0x%x rpw '%s'\n",
pid(), execname(), cmdline_str(), dname, dflags, rpw)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment