summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/SystemTap_Tapset_Reference/tapsets.tmpl4
-rw-r--r--doc/langref.tex111
-rw-r--r--initscript/systemtap.in12
-rw-r--r--man/stapprobes.netdev.3stap.in2
-rw-r--r--man/stapprobes.snmp.3stap.in2
-rw-r--r--tapset/context-symbols.stp6
-rw-r--r--tapset/context-unwind.stp2
-rw-r--r--tapset/context.stp33
-rw-r--r--tapset/networking.stp183
-rw-r--r--tapset/signal.stp4
-rw-r--r--tapset/socket.stp2
-rw-r--r--tapset/ucontext-symbols.stp6
-rwxr-xr-xtestsuite/buildok/netdev.stp47
-rwxr-xr-xtestsuite/buildok/networking.stp2
-rw-r--r--testsuite/systemtap.examples/general/badname.meta13
-rwxr-xr-xtestsuite/systemtap.examples/general/badname.stp28
-rw-r--r--testsuite/systemtap.examples/index.html28
-rw-r--r--testsuite/systemtap.examples/index.txt40
-rw-r--r--testsuite/systemtap.examples/io/ioblktime.meta2
-rw-r--r--testsuite/systemtap.examples/io/iostat-scsi.meta2
-rw-r--r--testsuite/systemtap.examples/io/iotime.meta2
-rw-r--r--testsuite/systemtap.examples/keyword-index.html66
-rw-r--r--testsuite/systemtap.examples/keyword-index.txt85
-rw-r--r--testsuite/systemtap.examples/memory/mmreclaim.meta2
-rw-r--r--testsuite/systemtap.examples/memory/mmwriteback.meta2
-rw-r--r--testsuite/systemtap.examples/memory/numa_faults.meta2
-rw-r--r--testsuite/systemtap.examples/memory/pfaults.meta2
-rw-r--r--testsuite/systemtap.examples/network/netdev.meta13
-rwxr-xr-xtestsuite/systemtap.examples/network/netdev.stp58
-rw-r--r--testsuite/systemtap.examples/process/sigkill.meta2
-rw-r--r--testsuite/systemtap.examples/process/sleeptime.meta2
-rw-r--r--testsuite/systemtap.examples/process/syscalls_by_proc.meta2
-rw-r--r--testsuite/systemtap.examples/process/wait4time.meta2
33 files changed, 650 insertions, 119 deletions
diff --git a/doc/SystemTap_Tapset_Reference/tapsets.tmpl b/doc/SystemTap_Tapset_Reference/tapsets.tmpl
index 7e9d4784..448d4b20 100644
--- a/doc/SystemTap_Tapset_Reference/tapsets.tmpl
+++ b/doc/SystemTap_Tapset_Reference/tapsets.tmpl
@@ -113,7 +113,7 @@
The context functions provide additional information about where
an event occurred.
These functions can provide information such as a backtrace to
- where the event occured
+ where the event occurred
and the current register values for the processor.
</para>
!Itapset/context.stp
@@ -202,7 +202,7 @@
<title>Directory-entry (dentry) Tapset</title>
<para>
This family of functions is used to map kernel VFS
- directory entriy pointers to file or full path names.
+ directory entry pointers to file or full path names.
</para>
!Itapset/dentry.stp
</chapter>
diff --git a/doc/langref.tex b/doc/langref.tex
index 9a56e5f2..29de4534 100644
--- a/doc/langref.tex
+++ b/doc/langref.tex
@@ -910,6 +910,48 @@ function, use \textbf{.statement} probes. Do not use wildcards in
to not register. Also, run statement probes in guru mode only.
+\subsection{PROCFS probes}
+\index{PROCFS probes}
+
+These probe points allow procfs pseudo-files in
+\texttt{/proc/systemtap/\textit{MODNAME}} to be created, read and
+written. Specify the name of the systemtap module as
+\texttt{\textit{MODNAME}}. There are four probe point variants
+supported by the translator:
+\begin{vindent}
+\begin{verbatim}
+procfs("PATH").read
+procfs("PATH").write
+procfs.read
+procfs.write
+\end{verbatim}
+\end{vindent}
+
+\texttt{PATH} is the file name to be created, relative to
+\texttt{/proc/systemtap/MODNAME}. If no \texttt{PATH} is specified
+(as in the last two variants in the previous list), \texttt{PATH}
+defaults to "command".
+
+When a user reads \texttt{/proc/systemtap/MODNAME/PATH}, the
+corresponding procfs read probe is triggered. Assign the string data
+to be read to a variable named \texttt{\$value}, as follows:
+\begin{vindent}
+\begin{verbatim}
+procfs("PATH").read { $value = "100\n" }
+\end{verbatim}
+\end{vindent}
+
+When a user writes into \texttt{/proc/systemtap/MODNAME/PATH}, the
+corresponding procfs write probe is triggered. The data the user
+wrote is available in the string variable named \texttt{\$value}, as
+follows:
+\begin{vindent}
+\begin{verbatim}
+procfs("PATH").write { printf("User wrote: %s", $value) }
+\end{verbatim}
+\end{vindent}
+
+
\subsection{Marker probes}
\index{marker probes}
This family of probe points connects to static probe markers inserted
@@ -950,6 +992,75 @@ For more information about marker probes, see
\url{http://sourceware.org/systemtap/wiki/UsingMarkers}.
+\subsection{Syscall probes}
+\label{sec:syscall}
+\index{syscall probes}
+The \texttt{syscall.*} aliases define several hundred probes. They
+use the following syntax:
+\begin{vindent}
+\begin{verbatim}
+syscall.NAME
+syscall.NAME.return
+\end{verbatim}
+\end{vindent}
+
+Generally, two probes are defined for each normal system call as
+listed in the syscalls(2) manual page: one for entry and one for
+return. System calls that never return do not have a
+corresponding \texttt{.return} probe.
+
+Each probe alias defines a variety of variables. Look at the tapset
+source code to find the most reliable source of variable definitions.
+Generally, each variable listed in the standard manual page is
+available as a script-level variable. For example,
+\texttt{syscall.open} exposes file name, flags, and mode. In addition,
+a standard suite of variables is available at most aliases, as follows:
+
+\begin{itemize}
+\item \texttt{argstr}: A pretty-printed form of the entire argument
+ list, without parentheses.
+\item \texttt{name}: The name of the system call.
+\item \texttt{retstr}: For return probes, a pretty-printed form of the
+ system call result.
+\end{itemize}
+
+Not all probe aliases obey all of these general guidelines. Please
+report exceptions that you encounter as a bug.
+
+
+\subsection{Tracepoints}
+\label{sec:tracepoints}
+\index{tracepoints}
+
+This family of probe points hooks to static probing tracepoints
+inserted into the kernel or kernel modules. As with marker probes,
+these tracepoints are special macro calls inserted by kernel
+developers to make probing faster and more reliable than with
+DWARF-based probes. DWARF debugging information is not required to
+probe tracepoints. Tracepoints have more strongly-typed parameters
+than marker probes.
+
+Tracepoint probes begin with \texttt{kernel}. The next part names the
+tracepoint itself: \texttt{trace("name")}. The tracepoint
+\texttt{name} string, which can contain wildcard characters, is
+matched against the names defined by the kernel developers in the
+tracepoint header files.
+
+The handler associated with a tracepoint-based probe can read the
+optional parameters specified at the macro call site. These
+parameters are named according to the declaration by the tracepoint
+author. For example, the tracepoint probe
+\texttt{kernel.trace("sched\_switch")} provides the parameters
+\texttt{\$rq}, \texttt{\$prev}, and \texttt{\$next}. If the parameter
+is a complex type such as a struct pointer, then a script can access
+fields with the same syntax as DWARF \texttt{\$target} variables.
+Tracepoint parameters cannot be modified; however, in guru mode a
+script can modify fields of parameters.
+
+The name of the tracepoint is available in \texttt{\$\$name}, and a
+string of \texttt{name=value} pairs for all parameters of the
+tracepoint is available in \texttt{\$\$vars} or \texttt{\$\$parms}.
+
\subsection{Timer probes}
\index{timer probes}
diff --git a/initscript/systemtap.in b/initscript/systemtap.in
index 21bcd65b..b3d6e868 100644
--- a/initscript/systemtap.in
+++ b/initscript/systemtap.in
@@ -1,17 +1,17 @@
#!/bin/bash
#
-# systemtap Startup script for systemtap scrips
+# systemtap Startup script for SystemTap scripts
#
# chkconfig: - 00 99
-# description: Systemtap is a programable kernel/application tracing tool.
+# description: SystemTap is a programmable kernel/application tracing tool.
# config: /etc/systemtap/config
# config: /etc/systemtap/conf.d
### BEGIN INIT INFO
-# Provides: Systemtap scripts startup
+# Provides: SystemTap scripts startup
# Required-Start: $local_fs
# Required-Stop: $local_fs
-# Short-Description: start and stop systemtap scripts
-# Description: Systemtap is a programable kernel/application tracing tool.
+# Short-Description: Start and stop SystemTap scripts
+# Description: SystemTap is a programmable kernel/application tracing tool.
### END INIT INFO
# Source function library.
@@ -231,7 +231,7 @@ might_fail () { # message exitcode
}
might_success () { # message
if [ $NR_FAILS -ne 0 ]; then
- log "Warning: $NR_FAILS failure occured."
+ log "Warning: $NR_FAILS failure occurred."
do_warning "$1"
else
do_success "$1"
diff --git a/man/stapprobes.netdev.3stap.in b/man/stapprobes.netdev.3stap.in
index 9b2e57ed..ff09f150 100644
--- a/man/stapprobes.netdev.3stap.in
+++ b/man/stapprobes.netdev.3stap.in
@@ -70,7 +70,7 @@ Fires when the network device wants to transmit a buffer
The protocol of this packet.
.I truesize
- The size of the the data to be transmitted.
+ The size of the data to be transmitted.
.SH SEE ALSO
.IR stap (1),
diff --git a/man/stapprobes.snmp.3stap.in b/man/stapprobes.snmp.3stap.in
index 3c606932..95da75c9 100644
--- a/man/stapprobes.snmp.3stap.in
+++ b/man/stapprobes.snmp.3stap.in
@@ -23,7 +23,7 @@ This family of probe points enhances the Linux system's implementation of the Si
by allowing the user to collect per-socket statistics. SNMP data is collected in the Linux kernel by counting various events occurring in the networking subsystem. Linux provides one counter for each type of event, thus providing a system-wide collection of network statistics. These statistics can be viewed with the command:
.B netstat -s.
-The probpoints defined in the SNMP group of tapsets allow users to aberrate each SNMP counter into groups of counters. For example, the user may count SNMP events for a single network socket or for a group of sockets.
+The probe points defined in the SNMP group of tapsets allow users to aberrate each SNMP counter into groups of counters. For example, the user may count SNMP events for a single network socket or for a group of sockets.
Severals SNMP tapsets have been created. Each tapset represents a single layer of the network stack and defines a group of counters called management information blocks or MIBs. Currently tapsets are provided that support MIBS for IP, TCP layers and the enhanced linux MIB. See the file /usr/include/linux/snmp.h for a list of MIBS supported by linux.
diff --git a/tapset/context-symbols.stp b/tapset/context-symbols.stp
index e4406d9b..3ec7a866 100644
--- a/tapset/context-symbols.stp
+++ b/tapset/context-symbols.stp
@@ -8,7 +8,7 @@
// later version.
// <tapsetdescription>
// Context functions provide additional information about where an event occurred. These functions can
-//provide information such as a backtrace to where the event occured and the current register values for the
+//provide information such as a backtrace to where the event occurred and the current register values for the
//processor.
// </tapsetdescription>
%{
@@ -19,7 +19,7 @@
/**
* sfunction print_stack - Print out stack from string.
- * @stk: String with list of hexidecimal addresses.
+ * @stk: String with list of hexadecimal addresses.
*
* Perform a symbolic lookup of the addresses in the given string,
* which is assumed to be the result of a prior call to
@@ -138,7 +138,7 @@ function symname:string (addr: long) %{ /* pure */
* Description: Returns the (function) symbol name associated with the
* given address if known, plus the module name (between brackets) and
* the offset inside the module, plus the size of the symbol function.
- * If any element is not known it will be ommitted and if the symbol name
+ * If any element is not known it will be omitted and if the symbol name
* is unknown it will return the hex string for the given address.
*/
function symdata:string (addr: long) %{ /* pure */
diff --git a/tapset/context-unwind.stp b/tapset/context-unwind.stp
index d6654d25..4ad45dba 100644
--- a/tapset/context-unwind.stp
+++ b/tapset/context-unwind.stp
@@ -8,7 +8,7 @@
// later version.
// <tapsetdescription>
// Context functions provide additional information about where an event occurred. These functions can
-//provide information such as a backtrace to where the event occured and the current register values for the
+//provide information such as a backtrace to where the event occurred and the current register values for the
//processor.
// </tapsetdescription>
%{
diff --git a/tapset/context.stp b/tapset/context.stp
index 92c325ce..21af79b4 100644
--- a/tapset/context.stp
+++ b/tapset/context.stp
@@ -7,8 +7,8 @@
// Public License (GPL); either version 2, or (at your option) any
// later version.
// <tapsetdescription>
-// Context functions provide additional information about where an event occurred. These functions can
-//provide information such as a backtrace to where the event occured and the current register values for the
+// Context functions provide additional information about where an event occurred. These functions can
+//provide information such as a backtrace to where the event occurred and the current register values for the
//processor.
// </tapsetdescription>
@@ -78,7 +78,7 @@ function pgrp:long () %{ /* pure */
/**
* sfunction sid - Returns the session ID of the current process.
- *
+ *
* The session ID of a process is the process group ID of the session
* leader. Session ID is stored in the signal_struct since Kernel 2.6.0.
*/
@@ -108,9 +108,9 @@ function pexecname:string () %{ /* pure */
*/
function gid:long () %{ /* pure */
#ifdef STAPCONF_TASK_UID
- THIS->__retvalue = current->gid;
+ THIS->__retvalue = current->gid;
#else
- THIS->__retvalue = current_gid();
+ THIS->__retvalue = current_gid();
#endif
%}
@@ -119,9 +119,9 @@ function gid:long () %{ /* pure */
*/
function egid:long () %{ /* pure */
#ifdef STAPCONF_TASK_UID
- THIS->__retvalue = current->egid;
+ THIS->__retvalue = current->egid;
#else
- THIS->__retvalue = current_egid();
+ THIS->__retvalue = current_egid();
#endif
%}
@@ -130,9 +130,9 @@ function egid:long () %{ /* pure */
*/
function uid:long () %{ /* pure */
#ifdef STAPCONF_TASK_UID
- THIS->__retvalue = current->uid;
+ THIS->__retvalue = current->uid;
#else
- THIS->__retvalue = current_uid();
+ THIS->__retvalue = current_uid();
#endif
%}
@@ -141,15 +141,14 @@ function uid:long () %{ /* pure */
*/
function euid:long () %{ /* pure */
#ifdef STAPCONF_TASK_UID
- THIS->__retvalue = current->euid;
+ THIS->__retvalue = current->euid;
#else
- THIS->__retvalue = current_euid();
+ THIS->__retvalue = current_euid();
#endif
%}
/**
- * sfunction is_myproc - Determines if the current probe point has occurred in
- * the user's own process.
+ * sfunction is_myproc - Determines if the current probe point has occurred in the user's own process.
*
* Return 1 if the current probe point has occurred in the user's own process.
*/
@@ -177,7 +176,7 @@ function cpu:long () %{ /* pure */
* sfunction pp - Return the probe point associated with the currently running probe handler,
* including alias and wildcard expansion effects
* Context:
- * The current probe point.
+ * The current probe point.
*/
function pp:string () %{ /* pure */
strlcpy (THIS->__retvalue, CONTEXT->probe_point, MAXSTRINGLEN);
@@ -221,8 +220,8 @@ function user_mode:long () %{ /* pure */ /* currently a user-mode address? */
function is_return:long () %{ /* pure */
if (CONTEXT->pi)
THIS->__retvalue = 1;
- else
- THIS->__retvalue = 0;
+ else
+ THIS->__retvalue = 0;
%}
/**
@@ -285,7 +284,7 @@ function stack_unused:long () %{ /* pure */
* sfunction uaddr - User space address of current running task. EXPERIMENTAL.
*
* Description: Returns the address in userspace that the current
- * task was at when the probe occured. When the current running task
+ * task was at when the probe occurred. When the current running task
* isn't a user space thread, or the address cannot be found, zero
* is returned. Can be used to see where the current task is combined
* with usymname() or symdata(). Often the task will be in the VDSO
diff --git a/tapset/networking.stp b/tapset/networking.stp
index f6d78536..0c9d8afb 100644
--- a/tapset/networking.stp
+++ b/tapset/networking.stp
@@ -8,11 +8,17 @@
// <tapsetdescription>
// This family of probe points is used to probe the activities of the network device.
// </tapsetdescription>
+
+/* A function that returns the device name given the net_device struct */
+function get_netdev_name:string (addr:long) {
+ return kernel_string(@cast(addr, "net_device")->name)
+}
+
/**
- * probe netdev.receive - Data recieved from network device.
+ * probe netdev.receive - Data received from network device.
* @dev_name: The name of the device. e.g: eth0, ath1.
* @length: The length of the receiving buffer.
- * @protocol: Protocol of recieved packet.
+ * @protocol: Protocol of received packet.
*
*/
/// <varlistentry><term>protocol</term>
@@ -66,7 +72,7 @@ probe netdev.receive
* @dev_name: The name of the device. e.g: eth0, ath1.
* @length: The length of the transmit buffer.
* @protocol: The protocol of this packet.
- * @truesize: The size of the the data to be transmitted.
+ * @truesize: The size of the data to be transmitted.
*
*/
// Queue a buffer for transmission to a network device
@@ -78,3 +84,174 @@ probe netdev.transmit
protocol = $skb->protocol
truesize = $skb->truesize
}
+
+/**
+ * probe netdev.change_mtu - Called when the netdev MTU is changed
+ * @dev_name: The device that will have the MTU changed
+ * @old_mtu: The current MTU
+ * @new_mtu: The new MTU
+ */
+probe netdev.change_mtu
+ = kernel.function("dev_set_mtu")
+{
+ old_mtu = $dev->mtu
+ new_mtu = $new_mtu
+ dev_name = get_netdev_name($dev)
+}
+
+/**
+ * probe netdev.open - Called when the device is opened
+ * @dev_name: The device that is going to be opened
+ */
+probe netdev.open
+ = kernel.function("dev_open")
+{
+ dev_name = get_netdev_name($dev)
+}
+
+/**
+ * probe netdev.close - Called when the device is closed
+ * @dev_name: The device that is going to be closed
+ */
+probe netdev.close
+ = kernel.function("dev_close")
+{
+ dev_name = get_netdev_name($dev)
+}
+
+/**
+ * probe netdev.hard_transmit - Called when the devices is going to TX (hard)
+ * @dev_name: The device scheduled to transmit
+ * @protocol: The protocol used in the transmission
+ * @length: The length of the transmit buffer.
+ * @truesize: The size of the data to be transmitted.
+ */
+probe netdev.hard_transmit
+ = kernel.function("dev_hard_start_xmit")
+{
+ dev_name = get_netdev_name($dev)
+ protocol = $skb->protocol
+ length = $skb->len
+ truesize = $skb->truesize
+}
+
+/**
+ * probe netdev.rx - Called when the device is going to receive a packet
+ * @dev_name: The device received the packet
+ * @protocol: The packet protocol
+ */
+probe netdev.rx
+ = kernel.function("netif_rx")
+{
+ netdev = $skb->dev
+ dev_name = get_netdev_name(netdev)
+ protocol = $skb->protocol
+}
+
+/**
+ * probe netdev.change_rx_flag - Called when the device RX flag will be changed
+ * @dev_name: The device that will be changed
+ * @flags: The new flags
+ */
+probe netdev.change_rx_flag
+ = kernel.function("dev_change_rx_flags")
+{
+ dev_name = get_netdev_name($dev)
+ flags = $flags
+}
+
+/**
+ * probe netdev.set_promiscuity - Called when the device enters/leaves promiscuity
+ * @dev_name: The device that is entering/leaving promiscuity mode
+ * @enable: If the device is entering promiscuity mode
+ * @disable: If the device is leaving promiscuity mode
+ * @inc: Count the number of promiscuity openers
+ */
+probe netdev.set_promiscuity
+ = kernel.function("dev_set_promiscuity")
+{
+ dev_name = get_netdev_name($dev)
+ if ($inc){
+ enable = 1
+ } else {
+ disable = 1
+ }
+ inc = $inc
+}
+
+/**
+ * probe netdev.ioctl - Called when the device suffers an IOCTL
+ * @cmd: The IOCTL request
+ * @arg: The IOCTL argument (usually the netdev interface)
+ */
+probe netdev.ioctl
+ = kernel.function("dev_ioctl")
+{
+ cmd = $cmd
+ arg = user_string($arg)
+}
+
+/**
+ * probe netdev.register - Called when the device is registered
+ * @dev_name: The device that is going to be registered
+ */
+probe netdev.register
+ = kernel.function("register_netdevice"),
+ kernel.function("register_netdev")
+{
+ dev_name = get_netdev_name($dev)
+}
+
+/**
+ * probe netdev.unregister - Called when the device is being unregistered
+ * @dev_name: The device that is going to be unregistered
+ */
+probe netdev.unregister
+ = kernel.function("unregister_netdev")
+{
+ dev_name = get_netdev_name($dev)
+}
+
+/**
+ * probe netdev.get_stats - Called when someone asks the device statistics
+ * @dev_name: The device that is going to provide the statistics
+ */
+probe netdev.get_stats
+ = kernel.function("dev_get_stats")
+{
+ dev_name = get_netdev_name($dev)
+}
+
+/**
+ * probe netdev.change_mac - Called when the netdev_name has the MAC changed
+ * @dev_name: The device that will have the MTU changed
+ * @mac_len: The MAC length
+ * @old_mac: The current MAC address
+ * @new_mac: The new MAC address
+ */
+probe netdev.change_mac
+ = kernel.function("dev_set_mac_address")
+{
+ dev_name = get_netdev_name($dev)
+ mac_len = $dev->addr_len
+
+ // Old MAC Address
+ zero = $dev->dev_addr[0]
+ one = $dev->dev_addr[1]
+ two = $dev->dev_addr[2]
+ three =$dev->dev_addr[3]
+ four = $dev->dev_addr[4]
+ five = $dev->dev_addr[5]
+ old_mac = sprintf("%02x:%02x:%02x:%02x:%02x:%02x",
+ zero, one, two, three, four, five)
+
+ // New MAC Address
+ zero = $sa->sa_data[0]
+ one = $sa->sa_data[1]
+ two = $sa->sa_data[2]
+ three =$sa->sa_data[3]
+ four =$sa->sa_data[4]
+ five = $sa->sa_data[5]
+ new_mac = sprintf("%02x:%02x:%02x:%02x:%02x:%02x",
+ zero, one, two, three, four, five)
+}
diff --git a/tapset/signal.stp b/tapset/signal.stp
index 02c761c3..2e10af0c 100644
--- a/tapset/signal.stp
+++ b/tapset/signal.stp
@@ -414,7 +414,7 @@ probe signal.syskill.return = syscall.kill.return
*
* The <command>tkill</command> call is analogous to <command>kill(2)</command>,
* except that it also allows a process within a specific thread group to
- * be targetted. Such processes are targetted through their unique
+ * be targeted. Such processes are targeted through their unique
* thread IDs (TID).
*/
probe signal.systkill = syscall.tkill
@@ -632,7 +632,7 @@ probe signal.procmask.return = kernel.function("sigprocmask").return
/**
- * probe signal.flush - Flusing all pending signals for a task
+ * probe signal.flush - Flushing all pending signals for a task
* @task: The task handler of the process performing the flush
* @sig_pid: The PID of the process associated with the task
* performing the flush
diff --git a/tapset/socket.stp b/tapset/socket.stp
index de778d7c..b4d4981c 100644
--- a/tapset/socket.stp
+++ b/tapset/socket.stp
@@ -81,7 +81,7 @@ probe socket.receive = socket.recvmsg.return,
* The message sender
*
* Fires at the beginning of sending a message on a socket
- * via the the sock_sendmsg() function
+ * via the sock_sendmsg() function
*/
probe socket.sendmsg = kernel.function ("sock_sendmsg")
{
diff --git a/tapset/ucontext-symbols.stp b/tapset/ucontext-symbols.stp
index 5502f5cd..7fed71d2 100644
--- a/tapset/ucontext-symbols.stp
+++ b/tapset/ucontext-symbols.stp
@@ -9,7 +9,7 @@
// <tapsetdescription>
// User context symbol functions provide additional information about
// addresses from an application. These functions can provide
-// information about the user space map (library) that the event occured or
+// information about the user space map (library) that the event occurred or
// the function symbol of an address.
// </tapsetdescription>
@@ -43,7 +43,7 @@ function usymname:string (addr: long) %{ /* pure */
* given address in the current task if known, plus the module name
* (between brackets) and the offset inside the module (shared library),
* plus the size of the symbol function. If any element is not known it
- * will be ommitted and if the symbol name is unknown it will return the
+ * will be omitted and if the symbol name is unknown it will return the
* hex string for the given address.
*/
function usymdata:string (addr: long) %{ /* pure */
@@ -53,7 +53,7 @@ function usymdata:string (addr: long) %{ /* pure */
/**
* sfunction print_ustack - Print out stack for the current task from string. EXPERIMENTAL!
- * @stk: String with list of hexidecimal addresses for the current task.
+ * @stk: String with list of hexadecimal addresses for the current task.
*
* Perform a symbolic lookup of the addresses in the given string,
* which is assumed to be the result of a prior call to
diff --git a/testsuite/buildok/netdev.stp b/testsuite/buildok/netdev.stp
new file mode 100755
index 00000000..25510379
--- /dev/null
+++ b/testsuite/buildok/netdev.stp
@@ -0,0 +1,47 @@
+#! /usr/bin/env stap -wp4
+
+probe netdev.get_stats{
+ printf("%s", dev_name)
+}
+
+probe netdev.register{
+ printf("%s", dev_name)
+}
+
+probe netdev.unregister{
+ printf("%s", dev_name)
+}
+
+probe netdev.ioctl{
+ printf("%d %s", cmd, arg)
+}
+
+probe netdev.set_promiscuity {
+ printf("%s %d %d %d", dev_name, enable,
+ disable, inc)
+}
+
+probe netdev.change_rx_flag {
+ printf("%s %d", dev_name, flags)
+}
+
+probe netdev.change_mtu {
+ printf("%s %d %d", dev_name, old_mtu, new_mtu)
+}
+
+probe netdev.change_mac {
+ printf("%s %s %s", dev_name, old_mac, new_mac)
+}
+
+probe netdev.transmit {
+ printf("%s %d %d %d", dev_name, protocol,
+ length, truesize)
+}
+
+probe netdev.hard_transmit {
+ printf("%s %d", dev_name, protocol)
+}
+
+probe netdev.receive {
+ printf("%s %d", dev_name, protocol)
+}
diff --git a/testsuite/buildok/networking.stp b/testsuite/buildok/networking.stp
index 24f22b09..3e6a31ea 100755
--- a/testsuite/buildok/networking.stp
+++ b/testsuite/buildok/networking.stp
@@ -1,5 +1,5 @@
#! stap -p4
-probe netdev.*
+probe netdev.transmit, netdev.receive
{
printf("ppname: %s, dev_name: %s, %d, %d, %d\n", probefunc(),
dev_name, length, protocol, truesize)
diff --git a/testsuite/systemtap.examples/general/badname.meta b/testsuite/systemtap.examples/general/badname.meta
new file mode 100644
index 00000000..9b4e7390
--- /dev/null
+++ b/testsuite/systemtap.examples/general/badname.meta
@@ -0,0 +1,13 @@
+title: Bad Filename Filter
+name: badname.stp
+version: 1.0
+keywords: filesystem hack
+author: Josh Stone
+subsystem: filesystem
+status: experimental
+exit: user-controlled
+output: none
+scope: system-wide
+description: The badname.stp script shows how one could prevent the creation of files with undesirable names.
+test_check: stap -p4 badname.stp
+test_installcheck: stap badname.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/general/badname.stp b/testsuite/systemtap.examples/general/badname.stp
new file mode 100755
index 00000000..153e08c5
--- /dev/null
+++ b/testsuite/systemtap.examples/general/badname.stp
@@ -0,0 +1,28 @@
+#!/usr/bin/stap -g
+# badname.stp
+# Prevent the creation of files with undesirable names.
+# Source: http://blog.cuviper.com/2009/04/08/hacking-linux-filenames/
+
+# return non-zero if the filename should be blocked
+function filter:long (name:string)
+{
+ return euid() && isinstr(name, "XXX")
+}
+
+global squash_inode_permission
+probe kernel.function("may_create@fs/namei.c")
+{
+ # screen out the conditions which may_create will fail anyway
+ if ($child->d_inode || $dir->i_flags & 16) next
+
+ # check that the new file meets our naming rules
+ if (filter(kernel_string($child->d_name->name)))
+ squash_inode_permission[tid()] = 1
+}
+probe kernel.function("inode_permission@fs/namei.c").return !,
+ kernel.function("permission@fs/namei.c").return
+{
+ if (!$return && squash_inode_permission[tid()])
+ $return = -13 # -EACCES (Permission denied)
+ delete squash_inode_permission[tid()]
+}
diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html
index b079f5b8..cd2faadb 100644
--- a/testsuite/systemtap.examples/index.html
+++ b/testsuite/systemtap.examples/index.html
@@ -46,6 +46,9 @@ keywords: <a href="keyword-index.html#FORMAT">FORMAT</a> <br>
<li><a href="general/ansi_colors2.stp">general/ansi_colors2.stp</a> - Show Attribues in Table for ansi_set_color3()<br>
keywords: <a href="keyword-index.html#FORMAT">FORMAT</a> <br>
<p>The script prints a table showing the available attributes (bold, underline, and inverse) with color combinations for the ans_set_color3() function in the ansi.stp tapset.</p></li>
+<li><a href="general/badname.stp">general/badname.stp</a> - Bad Filename Filter<br>
+keywords: <a href="keyword-index.html#FILESYSTEM">FILESYSTEM</a> <a href="keyword-index.html#HACK">HACK</a> <br>
+<p>The badname.stp script shows how one could prevent the creation of files with undesirable names.</p></li>
<li><a href="general/graphs.stp">general/graphs.stp</a> - Graphing Disk and CPU Utilization<br>
keywords: <a href="keyword-index.html#DISK">DISK</a> <a href="keyword-index.html#CPU">CPU</a> <a href="keyword-index.html#USE">USE</a> <a href="keyword-index.html#GRAPH">GRAPH</a> <br>
<p>The script tracks the disk and CPU utilization. The resulting output of the script can be piped into gnuplot to generate a graph of disk and CPU USE.</p></li>
@@ -66,16 +69,16 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BAC
<p>When a reschedule occurs during an AIO io_submit call, accumulate the traceback in a histogram. When the script exits prints out a sorted list from most common to least common backtrace.</p></li>
<li><a href="io/ioblktime.stp">io/ioblktime.stp</a> - Average Time Block IO Requests Spend in Queue <br>
keywords: <a href="keyword-index.html#IO">IO</a> <br>
-<p>The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many oustanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.</p></li>
+<p>The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many outstanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.</p></li>
<li><a href="io/iostat-scsi.stp">io/iostat-scsi.stp</a> - iostat for SCSI Devices<br>
keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#SCSI">SCSI</a> <br>
-<p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the various machines's SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li>
+<p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the machine's various SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li>
<li><a href="io/iostats.stp">io/iostats.stp</a> - List Executables Reading and Writing the Most Data<br>
keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br>
<p> The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written.</p></li>
<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#READ">READ</a> <a href="keyword-index.html#WRITE">WRITE</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#IO">IO</a> <br>
-<p>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.</p></li>
+<p>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 parentheses. 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.</p></li>
<li><a href="io/iotop.stp">io/iotop.stp</a> - Periodically Print I/O Activity by Process Name<br>
keywords: <a href="keyword-index.html#IO">IO</a> <br>
<p>Every five seconds print out the top ten executables generating I/O traffic during that interval sorted in descending order.</p></li>
@@ -105,22 +108,25 @@ keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
<p>The mmfilepage.stp script uses the virtual memory tracepoints available in some kernels to track the number of faults, copy on writes mapping, and unmapping operations for file backed pages. When the script is terminated the counts are printed for each process that allocated pages while the script was running. The mmfilepage.stp script is useful in debugging leaks in the mapped file regions of a process.</p></li>
<li><a href="memory/mmreclaim.stp">memory/mmreclaim.stp</a> - Track Virtual Memory System Page Reclamation<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
-<p>The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occured while the script was running. Its useful is debugging performance problems that occur due to page reclamation.</p></li>
+<p>The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occurred while the script was running. Its useful is debugging performance problems that occur due to page reclamation.</p></li>
<li><a href="memory/mmwriteback.stp">memory/mmwriteback.stp</a> - Track Virtual Memory System Writing to Disk<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
-<p>The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. Its useful in determining where writes are coming from on a supposedly idle system that is experiencing upexpected IO.</p></li>
+<p>The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. Its useful in determining where writes are coming from on a supposedly idle system that is experiencing unexpected IO.</p></li>
<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 providea 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>
+<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/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>
+<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>
<li><a href="network/autofs4.stp">network/autofs4.stp</a> - Watch autofs4 operations<br>
keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#AUTOFS">AUTOFS</a> <a href="keyword-index.html#NFS">NFS</a> <br>
<p>Trace key autofs4 operations such as mounting or unmounting remote filesystems.</p></li>
<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/netdev.stp">network/netdev.stp</a> - Trace Activity on Network Devices<br>
+keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#DEVICE">DEVICE</a> <a href="keyword-index.html#TRAFFIC">TRAFFIC</a> <br>
+<p>The netdev.stp script traces configuration and transmit/receive activity on network devices.</p></li>
<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>
@@ -168,7 +174,7 @@ keywords: <a href="keyword-index.html#SIGNALS">SIGNALS</a> <br>
<p>Print signal counts by process name in descending order.</p></li>
<li><a href="process/sigkill.stp">process/sigkill.stp</a> - Track SIGKILL Signals<br>
keywords: <a href="keyword-index.html#SIGNALS">SIGNALS</a> <br>
-<p>The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the desination executable and process ID, the executable name user ID that sent the signal.</p></li>
+<p>The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the destination executable and process ID, the executable name user ID that sent the signal.</p></li>
<li><a href="process/sigmon.stp">process/sigmon.stp</a> - Track a particular signal to a specific process<br>
keywords: <a href="keyword-index.html#SIGNALS">SIGNALS</a> <br>
<p>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.</p></li>
@@ -177,16 +183,16 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#SCH
<p>The script monitors the time that threads spend waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay.</p></li>
<li><a href="process/sleeptime.stp">process/sleeptime.stp</a> - Trace Time Spent in nanosleep Syscalls<br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#SLEEP">SLEEP</a> <br>
-<p>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.</p></li>
+<p>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 parentheses, the "nanosleep:" key, and the duration of the sleep in microseconds.</p></li>
<li><a href="process/syscalls_by_pid.stp">process/syscalls_by_pid.stp</a> - System-Wide Count of Syscalls by PID<br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <br>
<p>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.</p></li>
<li><a href="process/syscalls_by_proc.stp">process/syscalls_by_proc.stp</a> - System-Wide Count of Syscalls by Executable<br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <br>
-<p>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.</p></li>
+<p>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 greatest to least number of syscalls.</p></li>
<li><a href="process/wait4time.stp">process/wait4time.stp</a> - Trace Time Spent in wait4 Syscalls<br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#WAIT4">WAIT4</a> <br>
-<p>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".</p></li>
+<p>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 parentheses, 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".</p></li>
<li><a href="profiling/functioncallcount.stp">profiling/functioncallcount.stp</a> - Count Times Functions Called<br>
keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#FUNCTIONS">FUNCTIONS</a> <br>
<p>The functioncallcount.stp script takes one argument, a list of functions to probe. The script will run and count the number of times that each of the functions on the list is called. On exit the script will print a sorted list from most frequently to least frequently called function.</p></li>
diff --git a/testsuite/systemtap.examples/index.txt b/testsuite/systemtap.examples/index.txt
index 376c545e..2e096ab1 100644
--- a/testsuite/systemtap.examples/index.txt
+++ b/testsuite/systemtap.examples/index.txt
@@ -17,6 +17,13 @@ keywords: format
ans_set_color3() function in the ansi.stp tapset.
+general/badname.stp - Bad Filename Filter
+keywords: filesystem hack
+
+ The badname.stp script shows how one could prevent the creation of
+ files with undesirable names.
+
+
general/graphs.stp - Graphing Disk and CPU Utilization
keywords: disk cpu use graph
@@ -74,7 +81,7 @@ keywords: io
The ioblktime.stp script tracks the amount of time that each block IO
requests spend waiting for completion. The script computes the
average time waiting time for block IO per device and prints list
- every 10 seconds. In some cases there can be too many oustanding
+ every 10 seconds. In some cases there can be too many outstanding
block IO operations and the script may exceed the default number of
MAXMAPENTRIES allowed. In this case the allowed number can be
increased with "-DMAXMAPENTRIES=10000" option on the stap command
@@ -85,7 +92,7 @@ io/iostat-scsi.stp - iostat for SCSI Devices
keywords: io profiling scsi
The iostat-scsi.stp script provides a breakdown of the number of blks
- read and written on the various machines's SCSI devices. The script
+ read and written on the machine's various SCSI devices. The script
takes one argument which is the number of seconds between reports.
@@ -109,7 +116,7 @@ keywords: syscall read write time io
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
+ parentheses. 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
@@ -212,9 +219,9 @@ memory/mmreclaim.stp - Track Virtual Memory System Page Reclamation
keywords: memory
The mmreclaim.stp script uses the virtual memory tracepoints
- available in some kernels to track page reclaim activity that occured
- while the script was running. Its useful is debugging performance
- problems that occur due to page reclamation.
+ available in some kernels to track page reclaim activity that
+ occurred while the script was running. Its useful is debugging
+ performance problems that occur due to page reclamation.
memory/mmwriteback.stp - Track Virtual Memory System Writing to Disk
@@ -224,7 +231,7 @@ keywords: memory
available in some kernels to report all of the file writebacks that
occur form kupdate, pdflush and kjournald while the script is
running. Its useful in determining where writes are coming from on a
- supposedly idle system that is experiencing upexpected IO.
+ supposedly idle system that is experiencing unexpected IO.
memory/numa_faults.stp - Summarize Process Misses across NUMA Nodes
@@ -232,7 +239,7 @@ keywords: memory numa
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 providea a break
+ 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.
@@ -247,7 +254,7 @@ keywords: memory
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.
+ determine where the page faults are occurring.
network/autofs4.stp - Watch autofs4 operations
@@ -264,6 +271,13 @@ keywords: network tracepoint buffer free
socket buffers freed at locations in the kernel.
+network/netdev.stp - Trace Activity on Network Devices
+keywords: network device traffic
+
+ The netdev.stp script traces configuration and transmit/receive
+ activity on network devices.
+
+
network/nettop.stp - Periodic Listing of Processes Using Network Interfaces
keywords: network traffic per-process
@@ -405,7 +419,7 @@ keywords: signals
The script traces any SIGKILL signals. When that SIGKILL signal is
sent to a process, the script prints out the signal name, the
- desination executable and process ID, the executable name user ID
+ destination executable and process ID, the executable name user ID
that sent the signal.
@@ -434,7 +448,7 @@ keywords: syscall sleep
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
+ parentheses, the "nanosleep:" key, and the duration of the sleep in
microseconds.
@@ -451,7 +465,7 @@ keywords: syscall
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.
+ executable ordered from greatest to least number of syscalls.
process/wait4time.stp - Trace Time Spent in wait4 Syscalls
@@ -459,7 +473,7 @@ keywords: syscall wait4
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
+ microseconds, the pid, the executable name in parentheses, 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".
diff --git a/testsuite/systemtap.examples/io/ioblktime.meta b/testsuite/systemtap.examples/io/ioblktime.meta
index 09425b29..01f34295 100644
--- a/testsuite/systemtap.examples/io/ioblktime.meta
+++ b/testsuite/systemtap.examples/io/ioblktime.meta
@@ -8,6 +8,6 @@ status: production
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many oustanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.
+description: The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many outstanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.
test_check: stap -p4 ioblktime.stp
test_installcheck: stap ioblktime.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/io/iostat-scsi.meta b/testsuite/systemtap.examples/io/iostat-scsi.meta
index a992bd51..a5fe7a8f 100644
--- a/testsuite/systemtap.examples/io/iostat-scsi.meta
+++ b/testsuite/systemtap.examples/io/iostat-scsi.meta
@@ -8,7 +8,7 @@ status: production
exit: user-controlled
output: timed
scope: system-wide
-description: The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the various machines's SCSI devices. The script takes one argument which is the number of seconds between reports.
+description: The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the machine's various SCSI devices. The script takes one argument which is the number of seconds between reports.
test_support: stap -l module("st").function("st_do_scsi")!,kernel.function("st_do_scsi")
test_check: stap -g -p4 iostat-scsi.stp 1
test_installcheck: stap -g iostat-scsi.stp 1 -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/io/iotime.meta b/testsuite/systemtap.examples/io/iotime.meta
index cde49974..cf22eacf 100644
--- a/testsuite/systemtap.examples/io/iotime.meta
+++ b/testsuite/systemtap.examples/io/iotime.meta
@@ -8,6 +8,6 @@ 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.
+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 parentheses. 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 0.2"
diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html
index a57b967e..fe8fcc4e 100644
--- a/testsuite/systemtap.examples/keyword-index.html
+++ b/testsuite/systemtap.examples/keyword-index.html
@@ -39,7 +39,7 @@
</ul>
<h2>Examples by Keyword</h2>
-<p><tt><a href="#AUTOFS">AUTOFS</a> <a href="#BACKTRACE">BACKTRACE</a> <a href="#BUFFER">BUFFER</a> <a href="#CALLGRAPH">CALLGRAPH</a> <a href="#CPU">CPU</a> <a href="#DISK">DISK</a> <a href="#FORMAT">FORMAT</a> <a href="#FREE">FREE</a> <a href="#FUNCTIONS">FUNCTIONS</a> <a href="#FUTEX">FUTEX</a> <a href="#GRAPH">GRAPH</a> <a href="#INTERRUPT">INTERRUPT</a> <a href="#IO">IO</a> <a href="#LOCKING">LOCKING</a> <a href="#MEMORY">MEMORY</a> <a href="#MONITOR">MONITOR</a> <a href="#NETWORK">NETWORK</a> <a href="#NFS">NFS</a> <a href="#NUMA">NUMA</a> <a href="#PER-PROCESS">PER-PROCESS</a> <a href="#PROCESS">PROCESS</a> <a href="#PROFILING">PROFILING</a> <a href="#READ">READ</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SCSI">SCSI</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SIMPLE">SIMPLE</a> <a href="#SLEEP">SLEEP</a> <a href="#SOCKET">SOCKET</a> <a href="#STATISTICS">STATISTICS</a> <a href="#SYSCALL">SYSCALL</a> <a href="#TCP">TCP</a> <a href="#TIME">TIME</a> <a href="#TRACE">TRACE</a> <a href="#TRACEPOINT">TRACEPOINT</a> <a href="#TRAFFIC">TRAFFIC</a> <a href="#TTY">TTY</a> <a href="#USE">USE</a> <a href="#WAIT4">WAIT4</a> <a href="#WRITE">WRITE</a> </tt></p>
+<p><tt><a href="#AUTOFS">AUTOFS</a> <a href="#BACKTRACE">BACKTRACE</a> <a href="#BUFFER">BUFFER</a> <a href="#CALLGRAPH">CALLGRAPH</a> <a href="#CPU">CPU</a> <a href="#DEVICE">DEVICE</a> <a href="#DISK">DISK</a> <a href="#FILESYSTEM">FILESYSTEM</a> <a href="#FORMAT">FORMAT</a> <a href="#FREE">FREE</a> <a href="#FUNCTIONS">FUNCTIONS</a> <a href="#FUTEX">FUTEX</a> <a href="#GRAPH">GRAPH</a> <a href="#HACK">HACK</a> <a href="#INTERRUPT">INTERRUPT</a> <a href="#IO">IO</a> <a href="#LOCKING">LOCKING</a> <a href="#MEMORY">MEMORY</a> <a href="#MONITOR">MONITOR</a> <a href="#NETWORK">NETWORK</a> <a href="#NFS">NFS</a> <a href="#NUMA">NUMA</a> <a href="#PER-PROCESS">PER-PROCESS</a> <a href="#PROCESS">PROCESS</a> <a href="#PROFILING">PROFILING</a> <a href="#READ">READ</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SCSI">SCSI</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SIMPLE">SIMPLE</a> <a href="#SLEEP">SLEEP</a> <a href="#SOCKET">SOCKET</a> <a href="#STATISTICS">STATISTICS</a> <a href="#SYSCALL">SYSCALL</a> <a href="#TCP">TCP</a> <a href="#TIME">TIME</a> <a href="#TRACE">TRACE</a> <a href="#TRACEPOINT">TRACEPOINT</a> <a href="#TRAFFIC">TRAFFIC</a> <a href="#TTY">TTY</a> <a href="#USE">USE</a> <a href="#WAIT4">WAIT4</a> <a href="#WRITE">WRITE</a> </tt></p>
<h3><a name="AUTOFS">AUTOFS</a></h3>
<ul>
<li><a href="network/autofs4.stp">network/autofs4.stp</a> - Watch autofs4 operations<br>
@@ -79,6 +79,12 @@ keywords: <a href="keyword-index.html#TRACE">TRACE</a> <a href="keyword-index.ht
keywords: <a href="keyword-index.html#DISK">DISK</a> <a href="keyword-index.html#CPU">CPU</a> <a href="keyword-index.html#USE">USE</a> <a href="keyword-index.html#GRAPH">GRAPH</a> <br>
<p>The script tracks the disk and CPU utilization. The resulting output of the script can be piped into gnuplot to generate a graph of disk and CPU USE.</p></li>
</ul>
+<h3><a name="DEVICE">DEVICE</a></h3>
+<ul>
+<li><a href="network/netdev.stp">network/netdev.stp</a> - Trace Activity on Network Devices<br>
+keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#DEVICE">DEVICE</a> <a href="keyword-index.html#TRAFFIC">TRAFFIC</a> <br>
+<p>The netdev.stp script traces configuration and transmit/receive activity on network devices.</p></li>
+</ul>
<h3><a name="DISK">DISK</a></h3>
<ul>
<li><a href="general/graphs.stp">general/graphs.stp</a> - Graphing Disk and CPU Utilization<br>
@@ -88,6 +94,12 @@ keywords: <a href="keyword-index.html#DISK">DISK</a> <a href="keyword-index.html
keywords: <a href="keyword-index.html#DISK">DISK</a> <br>
<p>Get the status of reading/writing disk every 5 seconds, output top ten entries during that period.</p></li>
</ul>
+<h3><a name="FILESYSTEM">FILESYSTEM</a></h3>
+<ul>
+<li><a href="general/badname.stp">general/badname.stp</a> - Bad Filename Filter<br>
+keywords: <a href="keyword-index.html#FILESYSTEM">FILESYSTEM</a> <a href="keyword-index.html#HACK">HACK</a> <br>
+<p>The badname.stp script shows how one could prevent the creation of files with undesirable names.</p></li>
+</ul>
<h3><a name="FORMAT">FORMAT</a></h3>
<ul>
<li><a href="general/ansi_colors.stp">general/ansi_colors.stp</a> - Color Table for ansi_set_color2() and ansi_set_color3()<br>
@@ -121,6 +133,12 @@ keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-inde
keywords: <a href="keyword-index.html#DISK">DISK</a> <a href="keyword-index.html#CPU">CPU</a> <a href="keyword-index.html#USE">USE</a> <a href="keyword-index.html#GRAPH">GRAPH</a> <br>
<p>The script tracks the disk and CPU utilization. The resulting output of the script can be piped into gnuplot to generate a graph of disk and CPU USE.</p></li>
</ul>
+<h3><a name="HACK">HACK</a></h3>
+<ul>
+<li><a href="general/badname.stp">general/badname.stp</a> - Bad Filename Filter<br>
+keywords: <a href="keyword-index.html#FILESYSTEM">FILESYSTEM</a> <a href="keyword-index.html#HACK">HACK</a> <br>
+<p>The badname.stp script shows how one could prevent the creation of files with undesirable names.</p></li>
+</ul>
<h3><a name="INTERRUPT">INTERRUPT</a></h3>
<ul>
<li><a href="interrupt/scf.stp">interrupt/scf.stp</a> - Tally Backtraces for Inter-Processor Interrupt (IPI)<br>
@@ -134,16 +152,16 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BAC
<p>When a reschedule occurs during an AIO io_submit call, accumulate the traceback in a histogram. When the script exits prints out a sorted list from most common to least common backtrace.</p></li>
<li><a href="io/ioblktime.stp">io/ioblktime.stp</a> - Average Time Block IO Requests Spend in Queue <br>
keywords: <a href="keyword-index.html#IO">IO</a> <br>
-<p>The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many oustanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.</p></li>
+<p>The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many outstanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.</p></li>
<li><a href="io/iostat-scsi.stp">io/iostat-scsi.stp</a> - iostat for SCSI Devices<br>
keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#SCSI">SCSI</a> <br>
-<p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the various machines's SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li>
+<p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the machine's various SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li>
<li><a href="io/iostats.stp">io/iostats.stp</a> - List Executables Reading and Writing the Most Data<br>
keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br>
<p> The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written.</p></li>
<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#READ">READ</a> <a href="keyword-index.html#WRITE">WRITE</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#IO">IO</a> <br>
-<p>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.</p></li>
+<p>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 parentheses. 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.</p></li>
<li><a href="io/iotop.stp">io/iotop.stp</a> - Periodically Print I/O Activity by Process Name<br>
keywords: <a href="keyword-index.html#IO">IO</a> <br>
<p>Every five seconds print out the top ten executables generating I/O traffic during that interval sorted in descending order.</p></li>
@@ -185,16 +203,16 @@ keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
<p>The mmfilepage.stp script uses the virtual memory tracepoints available in some kernels to track the number of faults, copy on writes mapping, and unmapping operations for file backed pages. When the script is terminated the counts are printed for each process that allocated pages while the script was running. The mmfilepage.stp script is useful in debugging leaks in the mapped file regions of a process.</p></li>
<li><a href="memory/mmreclaim.stp">memory/mmreclaim.stp</a> - Track Virtual Memory System Page Reclamation<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
-<p>The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occured while the script was running. Its useful is debugging performance problems that occur due to page reclamation.</p></li>
+<p>The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occurred while the script was running. Its useful is debugging performance problems that occur due to page reclamation.</p></li>
<li><a href="memory/mmwriteback.stp">memory/mmwriteback.stp</a> - Track Virtual Memory System Writing to Disk<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
-<p>The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. Its useful in determining where writes are coming from on a supposedly idle system that is experiencing upexpected IO.</p></li>
+<p>The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. Its useful in determining where writes are coming from on a supposedly idle system that is experiencing unexpected IO.</p></li>
<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 providea 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>
+<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/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>
+<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>
<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>
@@ -213,6 +231,9 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde
<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/netdev.stp">network/netdev.stp</a> - Trace Activity on Network Devices<br>
+keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#DEVICE">DEVICE</a> <a href="keyword-index.html#TRAFFIC">TRAFFIC</a> <br>
+<p>The netdev.stp script traces configuration and transmit/receive activity on network devices.</p></li>
<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>
@@ -242,7 +263,7 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde
<ul>
<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 providea 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>
+<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>
</ul>
<h3><a name="PER-PROCESS">PER-PROCESS</a></h3>
<ul>
@@ -269,7 +290,7 @@ keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-inde
<ul>
<li><a href="io/iostat-scsi.stp">io/iostat-scsi.stp</a> - iostat for SCSI Devices<br>
keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#SCSI">SCSI</a> <br>
-<p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the various machines's SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li>
+<p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the machine's various SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li>
<li><a href="io/iostats.stp">io/iostats.stp</a> - List Executables Reading and Writing the Most Data<br>
keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br>
<p> The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written.</p></li>
@@ -293,7 +314,7 @@ keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <br>
<ul>
<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#READ">READ</a> <a href="keyword-index.html#WRITE">WRITE</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#IO">IO</a> <br>
-<p>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.</p></li>
+<p>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 parentheses. 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.</p></li>
</ul>
<h3><a name="SCHEDULER">SCHEDULER</a></h3>
<ul>
@@ -317,7 +338,7 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#SCH
<ul>
<li><a href="io/iostat-scsi.stp">io/iostat-scsi.stp</a> - iostat for SCSI Devices<br>
keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#SCSI">SCSI</a> <br>
-<p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the various machines's SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li>
+<p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the machine's various SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li>
</ul>
<h3><a name="SIGNALS">SIGNALS</a></h3>
<ul>
@@ -329,7 +350,7 @@ keywords: <a href="keyword-index.html#SIGNALS">SIGNALS</a> <br>
<p>Print signal counts by process name in descending order.</p></li>
<li><a href="process/sigkill.stp">process/sigkill.stp</a> - Track SIGKILL Signals<br>
keywords: <a href="keyword-index.html#SIGNALS">SIGNALS</a> <br>
-<p>The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the desination executable and process ID, the executable name user ID that sent the signal.</p></li>
+<p>The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the destination executable and process ID, the executable name user ID that sent the signal.</p></li>
<li><a href="process/sigmon.stp">process/sigmon.stp</a> - Track a particular signal to a specific process<br>
keywords: <a href="keyword-index.html#SIGNALS">SIGNALS</a> <br>
<p>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.</p></li>
@@ -344,7 +365,7 @@ keywords: <a href="keyword-index.html#SIMPLE">SIMPLE</a> <br>
<ul>
<li><a href="process/sleeptime.stp">process/sleeptime.stp</a> - Trace Time Spent in nanosleep Syscalls<br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#SLEEP">SLEEP</a> <br>
-<p>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.</p></li>
+<p>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 parentheses, the "nanosleep:" key, and the duration of the sleep in microseconds.</p></li>
</ul>
<h3><a name="SOCKET">SOCKET</a></h3>
<ul>
@@ -365,7 +386,7 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde
<ul>
<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#READ">READ</a> <a href="keyword-index.html#WRITE">WRITE</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#IO">IO</a> <br>
-<p>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.</p></li>
+<p>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 parentheses. 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.</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>
@@ -374,16 +395,16 @@ keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-inde
<p>The script watches the futex syscall on the system. On exit the futexes address, the number of contentions, and the average time for each contention on the futex are printed from lowest pid number to highest.</p></li>
<li><a href="process/sleeptime.stp">process/sleeptime.stp</a> - Trace Time Spent in nanosleep Syscalls<br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#SLEEP">SLEEP</a> <br>
-<p>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.</p></li>
+<p>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 parentheses, the "nanosleep:" key, and the duration of the sleep in microseconds.</p></li>
<li><a href="process/syscalls_by_pid.stp">process/syscalls_by_pid.stp</a> - System-Wide Count of Syscalls by PID<br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <br>
<p>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.</p></li>
<li><a href="process/syscalls_by_proc.stp">process/syscalls_by_proc.stp</a> - System-Wide Count of Syscalls by Executable<br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <br>
-<p>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.</p></li>
+<p>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 greatest to least number of syscalls.</p></li>
<li><a href="process/wait4time.stp">process/wait4time.stp</a> - Trace Time Spent in wait4 Syscalls<br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#WAIT4">WAIT4</a> <br>
-<p>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".</p></li>
+<p>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 parentheses, 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".</p></li>
</ul>
<h3><a name="TCP">TCP</a></h3>
<ul>
@@ -398,7 +419,7 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde
<ul>
<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#READ">READ</a> <a href="keyword-index.html#WRITE">WRITE</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#IO">IO</a> <br>
-<p>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.</p></li>
+<p>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 parentheses. 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.</p></li>
<li><a href="process/schedtimes.stp">process/schedtimes.stp</a> - Track Time Processes Spend in Various States using Tracepoints<br>
keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#TRACEPOINT">TRACEPOINT</a> <br>
<p>The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends running, sleeping, queued, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.</p></li>
@@ -420,6 +441,9 @@ keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-inde
</ul>
<h3><a name="TRAFFIC">TRAFFIC</a></h3>
<ul>
+<li><a href="network/netdev.stp">network/netdev.stp</a> - Trace Activity on Network Devices<br>
+keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#DEVICE">DEVICE</a> <a href="keyword-index.html#TRAFFIC">TRAFFIC</a> <br>
+<p>The netdev.stp script traces configuration and transmit/receive activity on network devices.</p></li>
<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>
@@ -443,13 +467,13 @@ keywords: <a href="keyword-index.html#DISK">DISK</a> <a href="keyword-index.html
<ul>
<li><a href="process/wait4time.stp">process/wait4time.stp</a> - Trace Time Spent in wait4 Syscalls<br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#WAIT4">WAIT4</a> <br>
-<p>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".</p></li>
+<p>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 parentheses, 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".</p></li>
</ul>
<h3><a name="WRITE">WRITE</a></h3>
<ul>
<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#READ">READ</a> <a href="keyword-index.html#WRITE">WRITE</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#IO">IO</a> <br>
-<p>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.</p></li>
+<p>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 parentheses. 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.</p></li>
</ul>
</td>
</tr>
diff --git a/testsuite/systemtap.examples/keyword-index.txt b/testsuite/systemtap.examples/keyword-index.txt
index 4f1ce8f2..866e1d86 100644
--- a/testsuite/systemtap.examples/keyword-index.txt
+++ b/testsuite/systemtap.examples/keyword-index.txt
@@ -80,6 +80,15 @@ keywords: disk cpu use graph
and CPU USE.
+= DEVICE =
+
+network/netdev.stp - Trace Activity on Network Devices
+keywords: network device traffic
+
+ The netdev.stp script traces configuration and transmit/receive
+ activity on network devices.
+
+
= DISK =
general/graphs.stp - Graphing Disk and CPU Utilization
@@ -97,6 +106,15 @@ keywords: disk
ten entries during that period.
+= FILESYSTEM =
+
+general/badname.stp - Bad Filename Filter
+keywords: filesystem hack
+
+ The badname.stp script shows how one could prevent the creation of
+ files with undesirable names.
+
+
= FORMAT =
general/ansi_colors.stp - Color Table for ansi_set_color2() and ansi_set_color3()
@@ -157,6 +175,15 @@ keywords: disk cpu use graph
and CPU USE.
+= HACK =
+
+general/badname.stp - Bad Filename Filter
+keywords: filesystem hack
+
+ The badname.stp script shows how one could prevent the creation of
+ files with undesirable names.
+
+
= INTERRUPT =
interrupt/scf.stp - Tally Backtraces for Inter-Processor Interrupt (IPI)
@@ -185,7 +212,7 @@ keywords: io
The ioblktime.stp script tracks the amount of time that each block IO
requests spend waiting for completion. The script computes the
average time waiting time for block IO per device and prints list
- every 10 seconds. In some cases there can be too many oustanding
+ every 10 seconds. In some cases there can be too many outstanding
block IO operations and the script may exceed the default number of
MAXMAPENTRIES allowed. In this case the allowed number can be
increased with "-DMAXMAPENTRIES=10000" option on the stap command
@@ -196,7 +223,7 @@ io/iostat-scsi.stp - iostat for SCSI Devices
keywords: io profiling scsi
The iostat-scsi.stp script provides a breakdown of the number of blks
- read and written on the various machines's SCSI devices. The script
+ read and written on the machine's various SCSI devices. The script
takes one argument which is the number of seconds between reports.
@@ -220,7 +247,7 @@ keywords: syscall read write time io
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
+ parentheses. 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
@@ -345,9 +372,9 @@ memory/mmreclaim.stp - Track Virtual Memory System Page Reclamation
keywords: memory
The mmreclaim.stp script uses the virtual memory tracepoints
- available in some kernels to track page reclaim activity that occured
- while the script was running. Its useful is debugging performance
- problems that occur due to page reclamation.
+ available in some kernels to track page reclaim activity that
+ occurred while the script was running. Its useful is debugging
+ performance problems that occur due to page reclamation.
memory/mmwriteback.stp - Track Virtual Memory System Writing to Disk
@@ -357,7 +384,7 @@ keywords: memory
available in some kernels to report all of the file writebacks that
occur form kupdate, pdflush and kjournald while the script is
running. Its useful in determining where writes are coming from on a
- supposedly idle system that is experiencing upexpected IO.
+ supposedly idle system that is experiencing unexpected IO.
memory/numa_faults.stp - Summarize Process Misses across NUMA Nodes
@@ -365,7 +392,7 @@ keywords: memory numa
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 providea a break
+ 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.
@@ -380,7 +407,7 @@ keywords: memory
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.
+ determine where the page faults are occurring.
network/sk_stream_wait_memory.stp - Track Start and Stop of Processes Due to Network Buffer Space
@@ -418,6 +445,13 @@ keywords: network tracepoint buffer free
socket buffers freed at locations in the kernel.
+network/netdev.stp - Trace Activity on Network Devices
+keywords: network device traffic
+
+ The netdev.stp script traces configuration and transmit/receive
+ activity on network devices.
+
+
network/nettop.stp - Periodic Listing of Processes Using Network Interfaces
keywords: network traffic per-process
@@ -490,7 +524,7 @@ keywords: memory numa
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 providea a break
+ 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.
@@ -551,7 +585,7 @@ io/iostat-scsi.stp - iostat for SCSI Devices
keywords: io profiling scsi
The iostat-scsi.stp script provides a breakdown of the number of blks
- read and written on the various machines's SCSI devices. The script
+ read and written on the machine's various SCSI devices. The script
takes one argument which is the number of seconds between reports.
@@ -624,7 +658,7 @@ keywords: syscall read write time io
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
+ parentheses. 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
@@ -689,7 +723,7 @@ io/iostat-scsi.stp - iostat for SCSI Devices
keywords: io profiling scsi
The iostat-scsi.stp script provides a breakdown of the number of blks
- read and written on the various machines's SCSI devices. The script
+ read and written on the machine's various SCSI devices. The script
takes one argument which is the number of seconds between reports.
@@ -712,7 +746,7 @@ keywords: signals
The script traces any SIGKILL signals. When that SIGKILL signal is
sent to a process, the script prints out the signal name, the
- desination executable and process ID, the executable name user ID
+ destination executable and process ID, the executable name user ID
that sent the signal.
@@ -743,7 +777,7 @@ keywords: syscall sleep
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
+ parentheses, the "nanosleep:" key, and the duration of the sleep in
microseconds.
@@ -792,7 +826,7 @@ keywords: syscall read write time io
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
+ parentheses. 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
@@ -824,7 +858,7 @@ keywords: syscall sleep
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
+ parentheses, the "nanosleep:" key, and the duration of the sleep in
microseconds.
@@ -841,7 +875,7 @@ keywords: syscall
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.
+ executable ordered from greatest to least number of syscalls.
process/wait4time.stp - Trace Time Spent in wait4 Syscalls
@@ -849,7 +883,7 @@ keywords: syscall wait4
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
+ microseconds, the pid, the executable name in parentheses, 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".
@@ -886,7 +920,7 @@ keywords: syscall read write time io
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
+ parentheses. 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
@@ -937,6 +971,13 @@ keywords: process scheduler time tracepoint
= TRAFFIC =
+network/netdev.stp - Trace Activity on Network Devices
+keywords: network device traffic
+
+ The netdev.stp script traces configuration and transmit/receive
+ activity on network devices.
+
+
network/nettop.stp - Periodic Listing of Processes Using Network Interfaces
keywords: network traffic per-process
@@ -981,7 +1022,7 @@ keywords: syscall wait4
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
+ microseconds, the pid, the executable name in parentheses, 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".
@@ -997,7 +1038,7 @@ keywords: syscall read write time io
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
+ parentheses. 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
diff --git a/testsuite/systemtap.examples/memory/mmreclaim.meta b/testsuite/systemtap.examples/memory/mmreclaim.meta
index c3b9cfc6..c301d302 100644
--- a/testsuite/systemtap.examples/memory/mmreclaim.meta
+++ b/testsuite/systemtap.examples/memory/mmreclaim.meta
@@ -8,7 +8,7 @@ status: experimental
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occured while the script was running. Its useful is debugging performance problems that occur due to page reclamation.
+description: The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occurred while the script was running. Its useful is debugging performance problems that occur due to page reclamation.
test_support: stap -l kernel.trace("mm_directreclaim_reclaimall"),kernel.trace("mm_pagereclaim_shrinkinactive"),kernel.trace("mm_pagereclaim_free"),kernel.trace("mm_pagereclaim_pgout"),kernel.trace("mm_pagereclaim_shrinkactive_a2a"),kernel.trace("mm_pagereclaim_shrinkinactive_i2a"),kernel.trace("mm_pagereclaim_shrinkactive_a2i"),kernel.trace("mm_pagereclaim_shrinkinactive_i2i")
test_check: stap -p4 mmreclaim.stp
test_installcheck: stap mmreclaim.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/memory/mmwriteback.meta b/testsuite/systemtap.examples/memory/mmwriteback.meta
index 1ad4947c..dbcaa476 100644
--- a/testsuite/systemtap.examples/memory/mmwriteback.meta
+++ b/testsuite/systemtap.examples/memory/mmwriteback.meta
@@ -8,7 +8,7 @@ status: experimental
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. Its useful in determining where writes are coming from on a supposedly idle system that is experiencing upexpected IO.
+description: The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. Its useful in determining where writes are coming from on a supposedly idle system that is experiencing unexpected IO.
test_support: stap -l kernel.trace("mm_pdflush_bgwriteout"),kernel.trace("mm_pdflush_kupdate"),kernel.trace("mm_pagereclaim_pgout")
test_check: stap -p4 mmwriteback.stp
test_installcheck: stap mmwriteback.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/memory/numa_faults.meta b/testsuite/systemtap.examples/memory/numa_faults.meta
index 51da3fc7..afd95e07 100644
--- a/testsuite/systemtap.examples/memory/numa_faults.meta
+++ b/testsuite/systemtap.examples/memory/numa_faults.meta
@@ -8,6 +8,6 @@ status: production
exit: user-controlled
output: list
scope: system-wide
-description: 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 providea 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.
+description: 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.
test_check: stap -p4 numa_faults.stp
test_installcheck: stap numa_faults.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/memory/pfaults.meta b/testsuite/systemtap.examples/memory/pfaults.meta
index 480e3b24..827e3816 100644
--- a/testsuite/systemtap.examples/memory/pfaults.meta
+++ b/testsuite/systemtap.examples/memory/pfaults.meta
@@ -8,6 +8,6 @@ status: production
exit: user-controlled
output: sorted-list
scope: system-wide
-description: 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.
+description: 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.
test_check: stap -p4 pfaults.stp
test_installcheck: stap pfaults.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/network/netdev.meta b/testsuite/systemtap.examples/network/netdev.meta
new file mode 100644
index 00000000..e467a66a
--- /dev/null
+++ b/testsuite/systemtap.examples/network/netdev.meta
@@ -0,0 +1,13 @@
+title: Trace Activity on Network Devices
+name: netdev.stp
+version: 1.0
+author: Breno Leitao
+keywords: network device traffic
+subsystem: network
+status: production
+exit: user-controlled
+output: trace
+scope: system-wide
+description: The netdev.stp script traces configuration and transmit/receive activity on network devices.
+test_check: stap -p4 netdev.stp
+test_installcheck: stap netdev.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/network/netdev.stp b/testsuite/systemtap.examples/network/netdev.stp
new file mode 100755
index 00000000..faf4d2ae
--- /dev/null
+++ b/testsuite/systemtap.examples/network/netdev.stp
@@ -0,0 +1,58 @@
+#! /usr/bin/env stap
+
+############################################################
+# netdev.stp
+# Author: Breno Leitao <leitao@linux.vnet.ibm.com>
+# An example script to show how a netdev works and its
+# functions
+############################################################
+
+
+probe netdev.get_stats{
+ printf("%s was asked for statistics structure\n", dev_name)
+}
+
+probe netdev.register{
+ printf("Registering netdev_name %s\n", dev_name)
+}
+
+probe netdev.unregister{
+ printf("Unregistering netdev %s\n", dev_name)
+}
+
+probe netdev.ioctl{
+ printf("Netdev ioctl raised with param: %d and arg: %s\n", cmd, arg)
+}
+
+probe netdev.set_promiscuity {
+ if (enable)
+ printf("Device %s entering in promiscuous mode\n", dev_name)
+ else
+ printf("Device %s leaving promiscuous mode\n", dev_name)
+}
+
+probe netdev.change_rx_flag {
+ printf("Device %s is changing its RX flags to %d\n", dev_name, flags)
+}
+
+probe netdev.change_mtu {
+ printf("Changing MTU on device %s from %d to %d\n", dev_name,
+ old_mtu, new_mtu)
+}
+
+probe netdev.change_mac {
+ printf("Changing MAC address on device %s from %s to %s\n",
+ dev_name, old_mac, new_mac)
+}
+
+probe netdev.transmit {
+ printf("Device %s is sending (queued) a packet with protocol %d\n", dev_name, protocol)
+}
+
+probe netdev.hard_transmit {
+ printf("Device %s is sending (hard) a packet with protocol %d\n", dev_name, protocol)
+}
+
+probe netdev.rx {
+ printf("Device %s received a packet with protocol %d\n", dev_name, protocol)
+}
diff --git a/testsuite/systemtap.examples/process/sigkill.meta b/testsuite/systemtap.examples/process/sigkill.meta
index b0e04ce8..b9c83f15 100644
--- a/testsuite/systemtap.examples/process/sigkill.meta
+++ b/testsuite/systemtap.examples/process/sigkill.meta
@@ -8,7 +8,7 @@ status: production
exit: user-controlled
output: trace
scope: systemwide
-description: The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the desination executable and process ID, the executable name user ID that sent the signal.
+description: The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the destination executable and process ID, the executable name user ID that sent the signal.
arg_1: The name of the signal to look for on selected process.
test_check: stap -p4 sigkill.stp
test_installcheck: stap sigkill.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/process/sleeptime.meta b/testsuite/systemtap.examples/process/sleeptime.meta
index 7318c7aa..e5aa4f35 100644
--- a/testsuite/systemtap.examples/process/sleeptime.meta
+++ b/testsuite/systemtap.examples/process/sleeptime.meta
@@ -8,6 +8,6 @@ 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.
+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 parentheses, the "nanosleep:" key, and the duration of the sleep in microseconds.
test_check: stap -p4 sleeptime.stp
test_installcheck: stap sleeptime.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/process/syscalls_by_proc.meta b/testsuite/systemtap.examples/process/syscalls_by_proc.meta
index 42668bc8..6bb6a650 100644
--- a/testsuite/systemtap.examples/process/syscalls_by_proc.meta
+++ b/testsuite/systemtap.examples/process/syscalls_by_proc.meta
@@ -8,6 +8,6 @@ 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.
+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 greatest to least number of syscalls.
test_check: stap -p4 syscalls_by_proc.stp
test_installcheck: stap syscalls_by_proc.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/process/wait4time.meta b/testsuite/systemtap.examples/process/wait4time.meta
index e798014b..a9c9089a 100644
--- a/testsuite/systemtap.examples/process/wait4time.meta
+++ b/testsuite/systemtap.examples/process/wait4time.meta
@@ -8,6 +8,6 @@ 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".
+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 parentheses, 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 0.2"