diff options
author | Dave Brolley <brolley@redhat.com> | 2009-06-22 11:37:08 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-06-22 11:37:08 -0400 |
commit | d6454850dd3c9d74b700924b56378c4c9ab9fa57 (patch) | |
tree | 6665a24339ca689b1156ea7e93d4f93811c3f794 /testsuite/systemtap.examples/network | |
parent | d729143af5242b17645d3f405141918940680894 (diff) | |
parent | 4116c576d5654287b0af598aee4a14eb2af73224 (diff) | |
download | systemtap-steved-d6454850dd3c9d74b700924b56378c4c9ab9fa57.tar.gz systemtap-steved-d6454850dd3c9d74b700924b56378c4c9ab9fa57.tar.xz systemtap-steved-d6454850dd3c9d74b700924b56378c4c9ab9fa57.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite/systemtap.examples/network')
-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 |
2 files changed, 38 insertions, 0 deletions
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()) +} + |