summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.examples
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.examples')
-rw-r--r--testsuite/systemtap.examples/ChangeLog8
-rw-r--r--testsuite/systemtap.examples/iotime.meta13
-rw-r--r--testsuite/systemtap.examples/sig_by_pid.meta13
-rw-r--r--testsuite/systemtap.examples/sig_by_proc.meta13
-rw-r--r--testsuite/systemtap.examples/sigmon.meta14
-rw-r--r--testsuite/systemtap.examples/sleeptime.meta13
-rw-r--r--testsuite/systemtap.examples/socket-trace.meta13
-rw-r--r--testsuite/systemtap.examples/syscalls_by_pid.meta13
-rw-r--r--testsuite/systemtap.examples/syscalls_by_proc.meta13
-rw-r--r--testsuite/systemtap.examples/wait4time.meta13
10 files changed, 126 insertions, 0 deletions
diff --git a/testsuite/systemtap.examples/ChangeLog b/testsuite/systemtap.examples/ChangeLog
index 6c5d014d..8d8c2ca1 100644
--- a/testsuite/systemtap.examples/ChangeLog
+++ b/testsuite/systemtap.examples/ChangeLog
@@ -1,3 +1,11 @@
+2008-05-08 William Cohen <wcohen@redhat.com>
+
+ * iotime.meta: New.
+
+2008-05-08 William Cohen <wcohen@redhat.com>
+
+ * sleeptime.meta, wait4time.meta: New.
+
2008-05-08 Mark Wielaard <mwielaard@redhat.com>
* futexes.meta (test_check,test_installcheck): Change futex.stp to
diff --git a/testsuite/systemtap.examples/iotime.meta b/testsuite/systemtap.examples/iotime.meta
new file mode 100644
index 00000000..f656ff85
--- /dev/null
+++ b/testsuite/systemtap.examples/iotime.meta
@@ -0,0 +1,13 @@
+title: Trace Time Spent in Read and Write for Files
+name: iotime.stp
+version: 1.0
+author: Daniel Berrange and Will Cohen
+keywords: syscall read write time io
+subsystem: syscall
+status: production
+exit: user-controlled
+output: trace
+scope: system-wide
+description: The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spend in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parenthesese. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.
+test_check: stap -p4 iotime.stp
+test_installcheck: stap iotime.stp -c "sleep 1"
diff --git a/testsuite/systemtap.examples/sig_by_pid.meta b/testsuite/systemtap.examples/sig_by_pid.meta
new file mode 100644
index 00000000..03b02fba
--- /dev/null
+++ b/testsuite/systemtap.examples/sig_by_pid.meta
@@ -0,0 +1,13 @@
+title: Signal Counts by Process ID
+name: sig_by_pid.stp
+version: 1.0
+author: IBM
+keywords: signals
+subsystem: signals
+status: experimental
+exit: user-controlled
+output: sorted-list on-exit
+scope: system-wide
+description: Print signal counts by process ID in descending order.
+test_check: stap -p4 sig_by_pid.stp
+test_installcheck: stap sig_by_pid.stp -c "sleep 1"
diff --git a/testsuite/systemtap.examples/sig_by_proc.meta b/testsuite/systemtap.examples/sig_by_proc.meta
new file mode 100644
index 00000000..eea42be4
--- /dev/null
+++ b/testsuite/systemtap.examples/sig_by_proc.meta
@@ -0,0 +1,13 @@
+title: Signal Counts by Process Name
+name: sig_by_proc.stp
+version: 1.0
+author: IBM
+keywords: signals
+subsystem: signals
+status: experimental
+exit: user-controlled
+output: sorted-list on-exit
+scope: system-wide
+description: Print signal counts by process name in descending order.
+test_check: stap -p4 sig_by_proc.stp
+test_installcheck: stap sig_by_proc.stp -c "sleep 1"
diff --git a/testsuite/systemtap.examples/sigmon.meta b/testsuite/systemtap.examples/sigmon.meta
new file mode 100644
index 00000000..18834997
--- /dev/null
+++ b/testsuite/systemtap.examples/sigmon.meta
@@ -0,0 +1,14 @@
+title: System-Wide Count of Syscalls by PID
+name: syscalls_by_pid.stp
+version: 1.0
+author: IBM
+keywords: signals
+subsystem: signals
+status: experimental
+exit: user-controlled
+output: trace
+scope: pid
+description: The script watches for a particular signal sent to a specific process. When that signal is sent to the specified process, the script prints out the PID and executable of the process sending the signal, the PID and executable name of the process receiving the signal, and the signal number and name.
+arg_1: The name of the signal to look for on selected process.
+test_check: stap -p4 sigmon.stp SIGKILL
+test_installcheck: stap sigmon.stp -c "sleep 1" SIGKILL
diff --git a/testsuite/systemtap.examples/sleeptime.meta b/testsuite/systemtap.examples/sleeptime.meta
new file mode 100644
index 00000000..d6c59345
--- /dev/null
+++ b/testsuite/systemtap.examples/sleeptime.meta
@@ -0,0 +1,13 @@
+title: Trace Time Spent in nanosleep Syscalls
+name: sleeptime.stp
+version: 1.0
+author: Daniel Berrange and Will Cohen
+keywords: syscall sleep
+subsystem: syscall
+status: production
+exit: user-controlled
+output: trace
+scope: system-wide
+description: The script watches each nanosleep syscall on the system. At the end of each nanosleep syscall the script prints out a line with a timestamp in microseconds, the pid, the executable name in paretheses, the "nanosleep:" key, and the duration of the sleep in microseconds.
+test_check: stap -p4 sleeptime.stp
+test_installcheck: stap sleeptime.stp -c "sleep 1"
diff --git a/testsuite/systemtap.examples/socket-trace.meta b/testsuite/systemtap.examples/socket-trace.meta
new file mode 100644
index 00000000..0b26f2fe
--- /dev/null
+++ b/testsuite/systemtap.examples/socket-trace.meta
@@ -0,0 +1,13 @@
+title: Trace Functions called in Network Socket Code
+name: socket-trace.stp
+version: 1.0
+author: anonymous
+keywords: network socket
+subsystem: network
+status: production
+exit: user-controlled
+output: trace
+scope: system-wide
+description: 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.
+test_check: stap -p4 socket-trace.stp
+test_installcheck: stap socket-trace.stp -c "sleep 1"
diff --git a/testsuite/systemtap.examples/syscalls_by_pid.meta b/testsuite/systemtap.examples/syscalls_by_pid.meta
new file mode 100644
index 00000000..590652b3
--- /dev/null
+++ b/testsuite/systemtap.examples/syscalls_by_pid.meta
@@ -0,0 +1,13 @@
+title: System-Wide Count of Syscalls by PID
+name: syscalls_by_pid.stp
+version: 1.0
+author: anonymous
+keywords: syscall
+subsystem: syscall
+status: production
+exit: user-controlled
+output: sorted-list on-exit
+scope: system-wide
+description: The script watches all syscall on the system. On exit the script prints a list showing the number of systemcalls executed by each PID ordered from greatest to least number of syscalls.
+test_check: stap -p4 syscalls_by_pid.stp
+test_installcheck: stap syscalls_by_pid.stp -c "sleep 1"
diff --git a/testsuite/systemtap.examples/syscalls_by_proc.meta b/testsuite/systemtap.examples/syscalls_by_proc.meta
new file mode 100644
index 00000000..79aa3e87
--- /dev/null
+++ b/testsuite/systemtap.examples/syscalls_by_proc.meta
@@ -0,0 +1,13 @@
+title: System-Wide Count of Syscalls by Executable
+name: syscalls_by_proc.stp
+version: 1.0
+author: anonymous
+keywords: syscall
+subsystem: syscall
+status: production
+exit: user-controlled
+output: sorted-list on-exit
+scope: system-wide
+description: The script watches all syscall on the system. On exit the script prints a list showing the number of systemcalls executed by each executable ordered from greates to least number of syscalls.
+test_check: stap -p4 syscalls_by_proc.stp
+test_installcheck: stap syscalls_by_proc.stp -c "sleep 1"
diff --git a/testsuite/systemtap.examples/wait4time.meta b/testsuite/systemtap.examples/wait4time.meta
new file mode 100644
index 00000000..a939d466
--- /dev/null
+++ b/testsuite/systemtap.examples/wait4time.meta
@@ -0,0 +1,13 @@
+title: Trace Time Spent in wait4 Syscalls
+name: wait4time.stp
+version: 1.0
+author: Daniel Berrange and Will Cohen
+keywords: syscall wait4
+subsystem: syscall
+status: production
+exit: user-controlled
+output: trace
+scope: system-wide
+description: The script watches each wait4 syscall on the system. At the end of each wait4 syscall the script prints out a line with a timestamp in microseconds, the pid, the executable name in paretheses, the "wait4:" key, the duration of the wait and the PID that the wait4 was waiting for. If the waited for PID is not specified , it is "-1".
+test_check: stap -p4 wait4time.stp
+test_installcheck: stap wait4time.stp -c "sleep 1"