diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ChangeLog | 148 | ||||
-rw-r--r-- | doc/Makefile.in | 3 | ||||
-rw-r--r-- | doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-syscallsbyprocpid.xml | 132 | ||||
-rw-r--r-- | doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml | 1 |
4 files changed, 135 insertions, 149 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog deleted file mode 100644 index cf9e2823..00000000 --- a/doc/ChangeLog +++ /dev/null @@ -1,148 +0,0 @@ -2009-02-05 William Cohen <wcohen@redhat.com> - - * T_R_G/publicanize.sh: Make executable. - -2009-02-05 William Cohen <wcohen@redhat.com> - - * S_T_R/tapsets.tmpl: Add contrib tag to quiet warnings. - -2009-02-05 William Cohen <wcohen@redhat.com> - - * S_T_R/tapsets.tmpl: Minor correction for signal.stp chapter. - -2009-02-02 Stan Cox <scox@redhat.com> - - * langref.tex: Add process.label. - -2009-01-30 Dave Brolley <brolley@redhat.com> - - * Makefile.in: Regenerated. - * SystemTap_Tapset_Reference/Makefile.in: Regenerated. - -2009-01-21 William Cohen <wcohen@redhat.com> - - * S_T_R/tapsets.tmpl: Use context-symbols.stp and context-unwind.stp. - -2009-01-21 William Cohen <wcohen@redhat.com> - - * S_T_R/tapsets.tmpl: Update copyright date and correct paragraph. - -2009-01-12 William Cohen <wcohen@redhat.com> - - * S_T_R/tapsets.tmpl: Correct author's name. - -2009-01-07 William Cohen <wcohen@redhat.com> - - * S_T_R/Makefile.am: Use BUILD_REFDOCS. - * S_T_R/Makefile.in: Regenerated. - -2009-01-06 Frank Ch. Eigler <fche@elastic.org> - - * S_T_R/Makefile.am: Regenerate docs only as necessary, via - stamp-* files for html/man, and cmp for tapsets.xml. - * S_T_R/Makefile.in: Regenerated. - -2008-12-30 Dave Brolley <brolley@redhat.com> - - PR9692 - * Makefile.in: Regenerated. - * SystemTap_Tapset_Reference/Makefile.in: Regenerated. - -2008-12-24 Dave Brolley <brolley@redhat.com> - - * Makefile.in: Regenerated. - * SystemTap_Tapset_Reference/Makefile.in: Regenerated. - -2008-12-21 Will Cohen <wcohen@redhat.com> - - * Makefile.am: Add generations of tapset reference manual material. - * SystemTap_Tapset_Reference/Makefile.am: Install tapset reference man. - * Makfile.am, SystemTap_Tapset_Reference/Makefile.in: Regenerated. - -2008-11-26 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference/tapsets.tmpl: Add scsi. - -2008-11-26 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference/tapsets.am: Correct location for html/man. - * SystemTap_Tapset_Reference/tapsets.in: Regenerate. - -2008-11-26 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference/tapsets.tmpl: Add process. - -2008-11-25 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference/tapsets.tmpl: Add ioscheduler, socket, tcp, - and upd. - -2008-11-24 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference/tapsets.tmpl: Add context, timestamp, - memory, and networking tapsets. - -2008-11-24 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference: Add kernel-doc based version. - -2008-11-24 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference: Remove. - -2008-10-23 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference: New. - -2008-08-28 Stan Cox <scox@redhat.com> - - * langref.tex: Document written but unread global variable display. - -2008-08-25 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am: Removed dist-related targets and macros. - * Makefile.in: Regenerated. - -2008-07-14 Dave Brolley <brolley@redhat.com> - - * Makefile.in: Regenerated. - -2008-07-07 Mark Wielaard <mwielaard@redhat.com> - - * Makefile.am (install-data-hook): New, install pdf files. - (uninstall-local): New, uninstall them again. - * Makefile.in: Regenerated. - -2008-04-24 Will Cohen <wcohen@redhat.com> - - * Makefile.in: Regenerated. - -2008-04-09 David Smith <dsmith@redhat.com> - - * .gitignore: New file. - -2008-03-25 Frank Ch. Eigler <fche@elastic.org> - - * langref.tex: Clarify utility of epilogue-type probe aliases. - -2008-03-04 David Smith <dsmith@redhat.com> - - * tutorial.tex: Made minor changes to remove warnings. - -2008-03-03 Frank Ch. Eigler <fche@elastic.org> - - From Masami Hiramatsu <mhiramat@redhat.com> - * Makefile.am (EXTRA_DIST): Add nomencl.sty. - * Makefile.in: Hand-regenerated. - -2008-02-27 Frank Ch. Eigler <fche@elastic.org> - - * nomencl.sty: Bundle F8 version of package, for use on older distros. - -2008-02-27 Frank Ch. Eigler <fche@redhat.com> - - * langref.tex, tutorial.tex: Copied over & aggregated - from former comfy digs under /cvs/doc. - * tutorial/*: Samples scripts from tutorial. - * Makefile.am: New build instructions. - * Makefile.in: New generated file. diff --git a/doc/Makefile.in b/doc/Makefile.in index eb9f2877..e23a6699 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -32,7 +32,7 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = doc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -163,6 +163,7 @@ staplog_CPPFLAGS = @staplog_CPPFLAGS@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ PDF_FILES = tutorial.pdf langref.pdf diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-syscallsbyprocpid.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-syscallsbyprocpid.xml new file mode 100644 index 00000000..d8fe4b39 --- /dev/null +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-syscallsbyprocpid.xml @@ -0,0 +1,132 @@ +<?xml version='1.0'?> +<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]> + + +<section id="syscallsbyprocpidsect"> +<title>Tracking System Call Volume Per Process</title> +<indexterm> +<primary>script examples</primary> +<secondary>monitoring system calls (volume per process)</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>monitoring system calls (volume per process)</secondary> +</indexterm> + +<indexterm> +<primary>monitoring system calls (volume per process)</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<!-- +<indexterm> +<primary>counting function calls</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> +--> + +<indexterm> +<primary>system calls volume (per process), monitoring</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<remark> +uses systemtap/testsuite/systemtap.examples/process/syscalls_by_p*.stp +</remark> + + <para> + This section illustrates how to determine which processes + are performing the highest volume of system calls. In + previous sections, we've described how to monitor the top system + calls used by the system over time (<xref linkend="topsyssect"/>). + We've also described how to identify which applications use a + specific set of "polling suspect" system calls the most + (<xref linkend="timeoutssect"/>). Monitoring the volume of + system calls made by each process provides more data in + investigating your system for polling processes and other resource + hogs. + </para> + +<formalpara id="syscallsbyprocpid"> + <title>syscalls_by_proc.stp</title> +<para> +<programlisting> +<xi:include parse="text" href="extras/testsuite/systemtap.examples/process/syscalls_by_proc.stp" xmlns:xi="http://www.w3.org/2001/XInclude" /> +</programlisting> +</para> +</formalpara> + +<para> + <xref linkend="syscallsbyprocpid"/> lists the top 20 processes performing the + highest number of system calls. It also lists how many system calls each process + performed during the time period. Refer to + <xref linkend="syscallsbyprocpidoutput"/> for a sample output. + +</para> + +<example id="syscallsbyprocpidoutput"> + <title><xref linkend="topsys"/> Sample Output</title> +<screen> +Collecting data... Type Ctrl-C to exit and display results
+#SysCalls Process Name
+1577 multiload-apple
+692 synergyc
+408 pcscd
+376 mixer_applet2
+299 gnome-terminal
+293 Xorg
+206 scim-panel-gtk
+95 gnome-power-man
+90 artsd
+85 dhcdbd
+84 scim-bridge
+78 gnome-screensav
+66 scim-launcher
+[...] +</screen> +</example> + +<para> + If you prefer the output to display the process IDs instead of the process names, + use the following script instead. +</para> + +<formalpara id="syscallsbypid"> + <title>syscalls_by_pid.stp</title> +<para> +<programlisting> +<xi:include parse="text" href="extras/testsuite/systemtap.examples/process/syscalls_by_pid.stp" xmlns:xi="http://www.w3.org/2001/XInclude" /> +</programlisting> +</para> +</formalpara> + + +<para> + As indicated in the output, you need to manually exit the script in order to display the + results. You can add a timed expiration to either script by simply adding + a <command>timer.s()</command> probe; for example, to instruct the script to expire after + 5 seconds, add the following probe to the script: +</para> + +<screen> +probe timer.s(5) +{ + exit() +} +</screen> + +<!--probe kernel.function(@1) { # probe function passed as argument from stdin +called[probefunc()] <<< 1 # add a count efficiently +} +global called +probe end,timer.ms(30000) { +foreach (fn+ in called) # Sort by function name +# (fn in called-) # Sort by call count (in decreasing order) +printf("%s %d\n", fn, @count(called[fn])) +exit() +}--> + + </section> + diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml index c2c83a82..b18062f3 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml @@ -64,6 +64,7 @@ <xi:include href="Useful_Scripts-threadtimes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> <xi:include href="Useful_Scripts-timeout.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> <xi:include href="Useful_Scripts-topsys.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="Useful_Scripts-syscallsbyprocpid.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> </section> <!-- removed; handler function no longer working as expected <xi:include href="Useful_Scripts-kernelprofiling.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> --> |