Debugging Linux Kernel using SystemTap Part6 - Writing Probes for SystemCall
Syntax for writing probes for System Call:
probe syscall.<nameofsystemcall> {
}
E.g. of open systemcall:
probe syscall.open
{
printf("%s(%d) open (%s)\n", execname(), pid(), argstr)
}
probe syscall.<nameofsystemcall> {
}
E.g. of open systemcall:
probe syscall.open
{
printf("%s(%d) open (%s)\n", execname(), pid(), argstr)
}
execname() - prints the name of current process
pid() - prints the process id of the current process
argstr - pretty-printed form of the entire argument list, without parenthesis
O/P:
Comments
Post a Comment