From e9156044d841db08161c7f0f505d5f47ae8d2b9f Mon Sep 17 00:00:00 2001 From: ddomingo Date: Fri, 20 Feb 2009 15:59:01 +1000 Subject: added Tracking System Call Volume Per Process section --- .../en-US/Useful_Scripts-syscallsbyprocpid.xml | 132 +++++++++++++++++++++ .../en-US/Useful_SystemTap_Scripts.xml | 1 + 2 files changed, 133 insertions(+) create mode 100644 doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-syscallsbyprocpid.xml (limited to 'doc/SystemTap_Beginners_Guide') 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 @@ + + + + +
+Tracking System Call Volume Per Process + +script examples +monitoring system calls (volume per process) + + + +examples of SystemTap scripts +monitoring system calls (volume per process) + + + +monitoring system calls (volume per process) +examples of SystemTap scripts + + + + + +system calls volume (per process), monitoring +examples of SystemTap scripts + + + +uses systemtap/testsuite/systemtap.examples/process/syscalls_by_p*.stp + + + + 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 (). + We've also described how to identify which applications use a + specific set of "polling suspect" system calls the most + (). Monitoring the volume of + system calls made by each process provides more data in + investigating your system for polling processes and other resource + hogs. + + + + syscalls_by_proc.stp + + + + + + + + + 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 + for a sample output. + + + + + <xref linkend="topsys"/> Sample Output + +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 +[...] + + + + + If you prefer the output to display the process IDs instead of the process names, + use the following script instead. + + + + syscalls_by_pid.stp + + + + + + + + + + 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 timer.s() probe; for example, to instruct the script to expire after + 5 seconds, add the following probe to the script: + + + +probe timer.s(5) +{ + exit() +} + + + + +
+ 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 @@ + -- cgit