Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 33 lines (27 sloc) 1.184 kB
#!/usr/bin/env stap
probe begin, end {
print("Tracing. Hit CTRL-C to stop.\n");
}
probe process("./test").mark("blah")
{
print("blah...\n")
}
probe process("./test").mark("request-start")
{
raddr = user_string(@cast($arg1, "ngx_http_dtrace_request_s")->raddr)
laddr = user_string(@cast($arg1, "ngx_http_dtrace_request_s")->laddr)
id = @cast($arg1, "ngx_http_dtrace_request_s")->id
uri = user_string(@cast($arg1, "ngx_http_dtrace_request_s")->uri)
args = user_string(@cast($arg1, "ngx_http_dtrace_request_s")->args)
printf("start: %s -> %s (id %d, %s?%s)\n", raddr, laddr, id, uri, args)
//printf("args: %s", user_string(@cast(&$dt_r, "ngx_http_dtrace_request_t")->args))
}
probe process("./test").mark("request-done")
{
raddr = user_string(@cast($arg1, "ngx_http_dtrace_request_s")->raddr)
laddr = user_string(@cast($arg1, "ngx_http_dtrace_request_s")->laddr)
id = @cast($arg1, "ngx_http_dtrace_request_s")->id
uri = user_string(@cast($arg1, "ngx_http_dtrace_request_s")->uri)
args = user_string(@cast($arg1, "ngx_http_dtrace_request_s")->args)
printf("done: %s -> %s (id %d, %s?%s)\n", raddr, laddr, id, uri, args)
}
Jump to Line
Something went wrong with that request. Please try again.