diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-07-16 10:19:29 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-07-17 03:36:05 +0000 |
commit | f8c655bbb3b733a10c6aab9c71246e94652c6cc9 (patch) | |
tree | 2fef1a4b4acc4094d15628ceeba97ae62923b40a | |
parent | 7c49988ebf5c176cadd4a9e287e443d49a2cdeec (diff) | |
download | cmogstored-f8c655bbb3b733a10c6aab9c71246e94652c6cc9.tar.gz |
It is helpful to know the address of the listener on the server which accepted the client socket. Additionally, the PID,FD combination should be be safely unique for any point in time.
-rw-r--r-- | tapset/http_request.stp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tapset/http_request.stp b/tapset/http_request.stp index 2f1514a..5df785c 100644 --- a/tapset/http_request.stp +++ b/tapset/http_request.stp @@ -7,14 +7,15 @@ probe process("cmogstored").mark("http_accepted") { fd = $arg1; host = user_string($arg2); serv = user_string($arg3); + listen = user_string($arg4); host_serv = sprintf("%s%s", host, serv); - printf("% 8d accepted %s\n", fd, host_serv); + printf("% 6d % 6d accepted %s on %s\n", pid(), fd, host_serv, listen); cmogstored_http_addr[pid(),fd] = host_serv; } probe process("cmogstored").function("http_close") { fd = @cast($mfd, "struct mog_fd")->fd; - printf("% 8d closing\n", fd); + printf("% 6d % 6d closing\n", pid(), fd); delete cmogstored_http_addr[pid(),fd]; } @@ -31,10 +32,11 @@ probe process("cmogstored").function("http_process_client") { diff = gettimeofday_us() - starttime; is_pipelined = cmogstored_http_pipelined[pid(),fd]; - printf("% 8d http_process_client time %ldus (pipelined:%s)\n", - fd, diff, is_pipelined ? "true" : "false"); + printf("% 6d % 6d http_process_client time %ldus (pipelined:%s)\n", + pid(), fd, diff, is_pipelined ? "true" : "false"); } probe process("cmogstored").mark("write_buffered") { - printf("% 8d blocked with %lu bytes to write\n", $fd, $len); + printf("% 6d % 6d blocked with %lu bytes to write\n", + pid(), $fd, $len); } |