summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2010-01-12 11:49:48 -0500
committerFrank Ch. Eigler <fche@elastic.org>2010-01-12 11:49:48 -0500
commit1ff1a65d89bf66a877a1685e96d20a2a1379cece (patch)
tree7b91bca00653d0c2e4b7d8c93a73de2055d779c3 /testsuite
parentc28668eaddf956b8c481e436e939d0b35bacaf68 (diff)
downloadsystemtap-steved-1ff1a65d89bf66a877a1685e96d20a2a1379cece.tar.gz
systemtap-steved-1ff1a65d89bf66a877a1685e96d20a2a1379cece.tar.xz
systemtap-steved-1ff1a65d89bf66a877a1685e96d20a2a1379cece.zip
new sample script: overcommit failure monitor
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/systemtap.examples/index.html3
-rw-r--r--testsuite/systemtap.examples/index.txt8
-rw-r--r--testsuite/systemtap.examples/keyword-index.html6
-rw-r--r--testsuite/systemtap.examples/keyword-index.txt16
-rw-r--r--testsuite/systemtap.examples/memory/overcommit.meta6
-rw-r--r--testsuite/systemtap.examples/memory/overcommit.stp6
6 files changed, 45 insertions, 0 deletions
diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html
index 5c226901..5b4ef659 100644
--- a/testsuite/systemtap.examples/index.html
+++ b/testsuite/systemtap.examples/index.html
@@ -121,6 +121,9 @@ keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
<li><a href="memory/numa_faults.stp">memory/numa_faults.stp</a> - Summarize Process Misses across NUMA Nodes<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <a href="keyword-index.html#NUMA">NUMA</a> <br>
<p>The numa_faults.stp script tracks the read and write pages faults for each process. When the script exits it prints out the total read and write pages faults for each process. The script also provide a break down of page faults per node for each process. This script is useful for determining whether the program has good locality (page faults limited to a single node) on a NUMA computer.</p></li>
+<li><a href="memory/overcommit.stp">memory/overcommit.stp</a> - Log failed process memory allocation due to overcommit limits<br>
+keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <a href="keyword-index.html#PROCESS">PROCESS</a> <br>
+<p>The overcommit.stp script prints a line each time the kernel refuses a memory allocation request from a process because of /proc/sys/vm/overcommit* limits.</p></li>
<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 occurring.</p></li>
diff --git a/testsuite/systemtap.examples/index.txt b/testsuite/systemtap.examples/index.txt
index c1f7baff..48494841 100644
--- a/testsuite/systemtap.examples/index.txt
+++ b/testsuite/systemtap.examples/index.txt
@@ -259,6 +259,14 @@ keywords: memory numa
limited to a single node) on a NUMA computer.
+memory/overcommit.stp - Log failed process memory allocation due to overcommit limits
+keywords: memory process
+
+ The overcommit.stp script prints a line each time the kernel refuses
+ a memory allocation request from a process because of
+ /proc/sys/vm/overcommit* limits.
+
+
memory/pfaults.stp - Generate Log of Major and Minor Page Faults
keywords: memory
diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html
index 29f63635..c33c56ef 100644
--- a/testsuite/systemtap.examples/keyword-index.html
+++ b/testsuite/systemtap.examples/keyword-index.html
@@ -225,6 +225,9 @@ keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
<li><a href="memory/numa_faults.stp">memory/numa_faults.stp</a> - Summarize Process Misses across NUMA Nodes<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <a href="keyword-index.html#NUMA">NUMA</a> <br>
<p>The numa_faults.stp script tracks the read and write pages faults for each process. When the script exits it prints out the total read and write pages faults for each process. The script also provide a break down of page faults per node for each process. This script is useful for determining whether the program has good locality (page faults limited to a single node) on a NUMA computer.</p></li>
+<li><a href="memory/overcommit.stp">memory/overcommit.stp</a> - Log failed process memory allocation due to overcommit limits<br>
+keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <a href="keyword-index.html#PROCESS">PROCESS</a> <br>
+<p>The overcommit.stp script prints a line each time the kernel refuses a memory allocation request from a process because of /proc/sys/vm/overcommit* limits.</p></li>
<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 occurring.</p></li>
@@ -303,6 +306,9 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde
</ul>
<h3><a name="PROCESS">PROCESS</a></h3>
<ul>
+<li><a href="memory/overcommit.stp">memory/overcommit.stp</a> - Log failed process memory allocation due to overcommit limits<br>
+keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <a href="keyword-index.html#PROCESS">PROCESS</a> <br>
+<p>The overcommit.stp script prints a line each time the kernel refuses a memory allocation request from a process because of /proc/sys/vm/overcommit* limits.</p></li>
<li><a href="process/errsnoop.stp">process/errsnoop.stp</a> - tabulate system call errors<br>
keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-index.html#SYSCALL">SYSCALL</a> <br>
<p>The script prints a periodic tabular report about failing system calls, by process and by syscall failure. The first optional argument specifies the reporting interval (in seconds, default 5); the second optional argument gives a screen height (number of lines in the report, default 20).</p></li>
diff --git a/testsuite/systemtap.examples/keyword-index.txt b/testsuite/systemtap.examples/keyword-index.txt
index 99441976..4a9d5ccb 100644
--- a/testsuite/systemtap.examples/keyword-index.txt
+++ b/testsuite/systemtap.examples/keyword-index.txt
@@ -436,6 +436,14 @@ keywords: memory numa
limited to a single node) on a NUMA computer.
+memory/overcommit.stp - Log failed process memory allocation due to overcommit limits
+keywords: memory process
+
+ The overcommit.stp script prints a line each time the kernel refuses
+ a memory allocation request from a process because of
+ /proc/sys/vm/overcommit* limits.
+
+
memory/pfaults.stp - Generate Log of Major and Minor Page Faults
keywords: memory
@@ -616,6 +624,14 @@ keywords: network traffic per-process
= PROCESS =
+memory/overcommit.stp - Log failed process memory allocation due to overcommit limits
+keywords: memory process
+
+ The overcommit.stp script prints a line each time the kernel refuses
+ a memory allocation request from a process because of
+ /proc/sys/vm/overcommit* limits.
+
+
process/errsnoop.stp - tabulate system call errors
keywords: process syscall
diff --git a/testsuite/systemtap.examples/memory/overcommit.meta b/testsuite/systemtap.examples/memory/overcommit.meta
new file mode 100644
index 00000000..72fb1579
--- /dev/null
+++ b/testsuite/systemtap.examples/memory/overcommit.meta
@@ -0,0 +1,6 @@
+title: Log failed process memory allocation due to overcommit limits
+name: overcommit.stp
+keywords: memory process
+description: The overcommit.stp script prints a line each time the kernel refuses a memory allocation request from a process because of /proc/sys/vm/overcommit* limits.
+test_check: stap -p4 overcommit.stp
+test_installcheck: stap overcommit.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/memory/overcommit.stp b/testsuite/systemtap.examples/memory/overcommit.stp
new file mode 100644
index 00000000..a0800107
--- /dev/null
+++ b/testsuite/systemtap.examples/memory/overcommit.stp
@@ -0,0 +1,6 @@
+probe kernel.function("__vm_enough_memory").return {
+ if ($return != 0) {
+ printf("overcommit blocked malloc, process %s (%d), %d pages\n",
+ execname(), pid(), $pages)
+ }
+}