diff options
author | William Cohen <wcohen@redhat.com> | 2009-06-18 16:14:42 -0400 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2009-06-18 16:14:42 -0400 |
commit | 905728a036bf9d5cf0c21d684ad53882489c82c8 (patch) | |
tree | 4413514fd356918109475cf28b8b8009def24823 | |
parent | d2309c6c3fb97cc0c8931b59e33fe18820b63c5d (diff) | |
download | systemtap-steved-905728a036bf9d5cf0c21d684ad53882489c82c8.tar.gz systemtap-steved-905728a036bf9d5cf0c21d684ad53882489c82c8.tar.xz systemtap-steved-905728a036bf9d5cf0c21d684ad53882489c82c8.zip |
Check in sk_stream_wait_memory.stp example.
-rw-r--r-- | testsuite/systemtap.examples/index.html | 3 | ||||
-rw-r--r-- | testsuite/systemtap.examples/index.txt | 9 | ||||
-rw-r--r-- | testsuite/systemtap.examples/keyword-index.html | 12 | ||||
-rw-r--r-- | testsuite/systemtap.examples/keyword-index.txt | 36 | ||||
-rw-r--r-- | testsuite/systemtap.examples/network/sk_stream_wait_memory.meta | 13 | ||||
-rwxr-xr-x | testsuite/systemtap.examples/network/sk_stream_wait_memory.stp | 25 |
6 files changed, 98 insertions, 0 deletions
diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html index b2ed3a3a..a5fddb4e 100644 --- a/testsuite/systemtap.examples/index.html +++ b/testsuite/systemtap.examples/index.html @@ -97,6 +97,9 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde <li><a href="network/nettop.stp">network/nettop.stp</a> - Periodic Listing of Processes Using Network Interfaces<br> keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TRAFFIC">TRAFFIC</a> <a href="keyword-index.html#PER-PROCESS">PER-PROCESS</a> <br> <p>Every five seconds the nettop.stp script prints out a list of processed (PID and command) with the number of packets sent/received and the amount of data sent/received by the process during that interval.</p></li> +<li><a href="network/sk_stream_wait_memory.stp">network/sk_stream_wait_memory.stp</a> - Track Start and Stop of Processes Due to Network Buffer Space<br> +keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TCP">TCP</a> <a href="keyword-index.html#BUFFER">BUFFER</a> <a href="keyword-index.html#MEMORY">MEMORY</a> <br> +<p>The sk_stream-wait_memory.stp prints a time stamp, executable, and pid each time a process blocks due to the send buffer being full. A similar entry is printed each time a process continues because there is room in the buffer.</p></li> <li><a href="network/socket-trace.stp">network/socket-trace.stp</a> - Trace Functions called in Network Socket Code<br> keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br> <p>The script instrument each of the functions inn the Linux kernel's net/socket.c file. The script prints out trace. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.</p></li> diff --git a/testsuite/systemtap.examples/index.txt b/testsuite/systemtap.examples/index.txt index 91fc66ae..95e81435 100644 --- a/testsuite/systemtap.examples/index.txt +++ b/testsuite/systemtap.examples/index.txt @@ -176,6 +176,15 @@ keywords: network traffic per-process interval. +network/sk_stream_wait_memory.stp - Track Start and Stop of Processes Due to Network Buffer Space +keywords: network tcp buffer memory + + The sk_stream-wait_memory.stp prints a time stamp, executable, and + pid each time a process blocks due to the send buffer being full. A + similar entry is printed each time a process continues because there + is room in the buffer. + + network/socket-trace.stp - Trace Functions called in Network Socket Code keywords: network socket diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html index 7306c164..e144337c 100644 --- a/testsuite/systemtap.examples/keyword-index.html +++ b/testsuite/systemtap.examples/keyword-index.html @@ -57,6 +57,9 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#SCH <li><a href="network/dropwatch.stp">network/dropwatch.stp</a> - Watch Where Socket Buffers are Freed in the Kernel<br> keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TRACEPOINT">TRACEPOINT</a> <a href="keyword-index.html#BUFFER">BUFFER</a> <a href="keyword-index.html#FREE">FREE</a> <br> <p>Every five seconds the dropwatch.stp script lists the number of socket buffers freed at locations in the kernel.</p></li> +<li><a href="network/sk_stream_wait_memory.stp">network/sk_stream_wait_memory.stp</a> - Track Start and Stop of Processes Due to Network Buffer Space<br> +keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TCP">TCP</a> <a href="keyword-index.html#BUFFER">BUFFER</a> <a href="keyword-index.html#MEMORY">MEMORY</a> <br> +<p>The sk_stream-wait_memory.stp prints a time stamp, executable, and pid each time a process blocks due to the send buffer being full. A similar entry is printed each time a process continues because there is room in the buffer.</p></li> </ul> <h3><a name="CALLGRAPH">CALLGRAPH</a></h3> <ul> @@ -162,6 +165,9 @@ keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br> <li><a href="memory/pfaults.stp">memory/pfaults.stp</a> - Generate Log of Major and Minor Page Faults<br> keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br> <p>The pfaults.stp script generates a simple log for each major and minor page fault that occurs on the system. Each line contains a timestamp (in microseconds) when the page fault servicing was completed, the pid of the process, the address of the page fault, the type of access (read or write), the type of fault (major or minor), and the elapsed time for page fault. This log can be examined to determine where the page faults are occuring.</p></li> +<li><a href="network/sk_stream_wait_memory.stp">network/sk_stream_wait_memory.stp</a> - Track Start and Stop of Processes Due to Network Buffer Space<br> +keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TCP">TCP</a> <a href="keyword-index.html#BUFFER">BUFFER</a> <a href="keyword-index.html#MEMORY">MEMORY</a> <br> +<p>The sk_stream-wait_memory.stp prints a time stamp, executable, and pid each time a process blocks due to the send buffer being full. A similar entry is printed each time a process continues because there is room in the buffer.</p></li> </ul> <h3><a name="MONITOR">MONITOR</a></h3> <ul> @@ -177,6 +183,9 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde <li><a href="network/nettop.stp">network/nettop.stp</a> - Periodic Listing of Processes Using Network Interfaces<br> keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TRAFFIC">TRAFFIC</a> <a href="keyword-index.html#PER-PROCESS">PER-PROCESS</a> <br> <p>Every five seconds the nettop.stp script prints out a list of processed (PID and command) with the number of packets sent/received and the amount of data sent/received by the process during that interval.</p></li> +<li><a href="network/sk_stream_wait_memory.stp">network/sk_stream_wait_memory.stp</a> - Track Start and Stop of Processes Due to Network Buffer Space<br> +keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TCP">TCP</a> <a href="keyword-index.html#BUFFER">BUFFER</a> <a href="keyword-index.html#MEMORY">MEMORY</a> <br> +<p>The sk_stream-wait_memory.stp prints a time stamp, executable, and pid each time a process blocks due to the send buffer being full. A similar entry is printed each time a process continues because there is room in the buffer.</p></li> <li><a href="network/socket-trace.stp">network/socket-trace.stp</a> - Trace Functions called in Network Socket Code<br> keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br> <p>The script instrument each of the functions inn the Linux kernel's net/socket.c file. The script prints out trace. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.</p></li> @@ -303,6 +312,9 @@ keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-inde </ul> <h3><a name="TCP">TCP</a></h3> <ul> +<li><a href="network/sk_stream_wait_memory.stp">network/sk_stream_wait_memory.stp</a> - Track Start and Stop of Processes Due to Network Buffer Space<br> +keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TCP">TCP</a> <a href="keyword-index.html#BUFFER">BUFFER</a> <a href="keyword-index.html#MEMORY">MEMORY</a> <br> +<p>The sk_stream-wait_memory.stp prints a time stamp, executable, and pid each time a process blocks due to the send buffer being full. A similar entry is printed each time a process continues because there is room in the buffer.</p></li> <li><a href="network/tcp_connections.stp">network/tcp_connections.stp</a> - Track Creation of Incoming TCP Connections<br> keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TCP">TCP</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br> <p>The tcp_connections.stp script prints information for each new incoming TCP connection accepted by the computer. The information includes the UID, the command accepting the connection, the PID of the command, the port the connection is on, and the IP address of the originator of the request.</p></li> diff --git a/testsuite/systemtap.examples/keyword-index.txt b/testsuite/systemtap.examples/keyword-index.txt index eee89e22..8305e208 100644 --- a/testsuite/systemtap.examples/keyword-index.txt +++ b/testsuite/systemtap.examples/keyword-index.txt @@ -39,6 +39,15 @@ keywords: network tracepoint buffer free socket buffers freed at locations in the kernel. +network/sk_stream_wait_memory.stp - Track Start and Stop of Processes Due to Network Buffer Space +keywords: network tcp buffer memory + + The sk_stream-wait_memory.stp prints a time stamp, executable, and + pid each time a process blocks due to the send buffer being full. A + similar entry is printed each time a process continues because there + is room in the buffer. + + = CALLGRAPH = general/para-callgraph.stp - Callgraph tracing with arguments @@ -275,6 +284,15 @@ keywords: memory determine where the page faults are occuring. +network/sk_stream_wait_memory.stp - Track Start and Stop of Processes Due to Network Buffer Space +keywords: network tcp buffer memory + + The sk_stream-wait_memory.stp prints a time stamp, executable, and + pid each time a process blocks due to the send buffer being full. A + similar entry is printed each time a process continues because there + is room in the buffer. + + = MONITOR = io/ttyspy.stp - Monitor tty typing. @@ -303,6 +321,15 @@ keywords: network traffic per-process interval. +network/sk_stream_wait_memory.stp - Track Start and Stop of Processes Due to Network Buffer Space +keywords: network tcp buffer memory + + The sk_stream-wait_memory.stp prints a time stamp, executable, and + pid each time a process blocks due to the send buffer being full. A + similar entry is printed each time a process continues because there + is room in the buffer. + + network/socket-trace.stp - Trace Functions called in Network Socket Code keywords: network socket @@ -624,6 +651,15 @@ keywords: syscall wait4 = TCP = +network/sk_stream_wait_memory.stp - Track Start and Stop of Processes Due to Network Buffer Space +keywords: network tcp buffer memory + + The sk_stream-wait_memory.stp prints a time stamp, executable, and + pid each time a process blocks due to the send buffer being full. A + similar entry is printed each time a process continues because there + is room in the buffer. + + network/tcp_connections.stp - Track Creation of Incoming TCP Connections keywords: network tcp socket diff --git a/testsuite/systemtap.examples/network/sk_stream_wait_memory.meta b/testsuite/systemtap.examples/network/sk_stream_wait_memory.meta new file mode 100644 index 00000000..bc798f72 --- /dev/null +++ b/testsuite/systemtap.examples/network/sk_stream_wait_memory.meta @@ -0,0 +1,13 @@ +title: Track Start and Stop of Processes Due to Network Buffer Space +name: sk_stream_wait_memory.stp +version: 1.0 +author: Fabio Olive Leite at Red Hat +keywords: network tcp buffer memory +subsystem: kernel +status: production +exit: user-controlled +output: trace +scope: system-wide +description: The sk_stream-wait_memory.stp prints a time stamp, executable, and pid each time a process blocks due to the send buffer being full. A similar entry is printed each time a process continues because there is room in the buffer. +test_check: stap -p4 sk_stream_wait_memory.stp +test_installcheck: stap sk_stream_wait_memory.stp -c "sleep 1" diff --git a/testsuite/systemtap.examples/network/sk_stream_wait_memory.stp b/testsuite/systemtap.examples/network/sk_stream_wait_memory.stp new file mode 100755 index 00000000..159d77a6 --- /dev/null +++ b/testsuite/systemtap.examples/network/sk_stream_wait_memory.stp @@ -0,0 +1,25 @@ +# Simple probe to detect when a process is waiting for more socket send +# buffer memory. Usually means the process is doing writes larger than the +# socker send buffer size or there is a slow receiver at the other side. +# Increasing the socket's send buffer size might help decrease application +# latencies, but it might also make it worse, so buyer beware. +# +# Tipical output: timestamp in microseconds: procname(pid) event +# +# 1218230114875167: python(17631) blocked on full send buffer +# 1218230114876196: python(17631) recovered from full send buffer +# 1218230114876271: python(17631) blocked on full send buffer +# 1218230114876479: python(17631) recovered from full send buffer + +probe kernel.function("sk_stream_wait_memory") +{ + printf("%u: %s(%d) blocked on full send buffer\n", + gettimeofday_us(), execname(), pid()) +} + +probe kernel.function("sk_stream_wait_memory").return +{ + printf("%u: %s(%d) recovered from full send buffer\n", + gettimeofday_us(), execname(), pid()) +} + |