diff options
author | Robb Romans <robb@linux.vnet.ibm.com> | 2009-09-16 15:10:04 -0500 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-09-16 15:32:03 -0700 |
commit | 6b6786d6ecee4619c2761482ba62fd63bc8df18e (patch) | |
tree | f4b9caeeb90a66b3c801d40647e5e601908c4982 /doc/langref.tex | |
parent | b57367210bd84bdbf6a78785905127fb7711e567 (diff) | |
download | systemtap-steved-6b6786d6ecee4619c2761482ba62fd63bc8df18e.tar.gz systemtap-steved-6b6786d6ecee4619c2761482ba62fd63bc8df18e.tar.xz systemtap-steved-6b6786d6ecee4619c2761482ba62fd63bc8df18e.zip |
Add PROCFS information to Language Reference
Signed-off-by: Robb Romans <robb@linux.vnet.ibm.com>
Signed-off-by: Josh Stone <jistone@redhat.com>
Diffstat (limited to 'doc/langref.tex')
-rw-r--r-- | doc/langref.tex | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/doc/langref.tex b/doc/langref.tex index 9a56e5f2..2bc9281d 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 |