diff options
Diffstat (limited to 'SystemTap_Beginners_Guide/syscallsbyprocpidsect.html')
| -rw-r--r-- | SystemTap_Beginners_Guide/syscallsbyprocpidsect.html | 16 | 
1 files changed, 9 insertions, 7 deletions
| diff --git a/SystemTap_Beginners_Guide/syscallsbyprocpidsect.html b/SystemTap_Beginners_Guide/syscallsbyprocpidsect.html index 8a70d3d9..b7ac416e 100644 --- a/SystemTap_Beginners_Guide/syscallsbyprocpidsect.html +++ b/SystemTap_Beginners_Guide/syscallsbyprocpidsect.html | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.3.6. Tracking System Call Volume Per Process</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.0.0" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.6-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="prev" href="topsyssect.html" title="5.3.5. Tracking Most Frequently Used System Calls" /><link rel="next" href="futexcontentionsect.html" title="5.4. Identifying Contended User-Space Locks" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="topsyssect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="futexcontentionsect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="syscallsbyprocpidsect"></a>5.3.6. Tracking System Call Volume Per Process</h3></div></div></div><a id="idm47951476477984" class="indexterm"></a><a id="idm47951460891472" class="indexterm"></a><a id="idm47951424527632" class="indexterm"></a><a id="idm47951464380944" class="indexterm"></a><div class="para"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.3.6. Tracking System Call Volume Per Process</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.6-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="prev" href="topsyssect.html" title="5.3.5. Tracking Most Frequently Used System Calls" /><link rel="next" href="futexcontentionsect.html" title="5.4. Identifying Contended User-Space Locks" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="topsyssect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="futexcontentionsect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="syscallsbyprocpidsect"> | 
| 3 | </a>5.3.6. Tracking System Call Volume Per Process</h3></div></div></div><a id="idm214016601984" class="indexterm"></a><a id="idm213973445568" class="indexterm"></a><a id="idm214026258400" class="indexterm"></a><a id="idm214008279968" class="indexterm"></a><div class="para"> | ||
| 3 | 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 (<a class="xref" href="topsyssect.html">Section 5.3.5, “Tracking Most Frequently Used System Calls”</a>). We've also described how to identify which applications use a specific set of "polling suspect" system calls the most (<a class="xref" href="timeoutssect.html">Section 5.3.4, “Monitoring Polling Applications”</a>). Monitoring the volume of system calls made by each process provides more data in investigating your system for polling processes and other resource hogs. | 4 | 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 (<a class="xref" href="topsyssect.html">Section 5.3.5, “Tracking Most Frequently Used System Calls”</a>). We've also described how to identify which applications use a specific set of "polling suspect" system calls the most (<a class="xref" href="timeoutssect.html">Section 5.3.4, “Monitoring Polling Applications”</a>). Monitoring the volume of system calls made by each process provides more data in investigating your system for polling processes and other resource hogs. | 
| 4 | </div><div class="formalpara"><div xmlns:d="http://docbook.org/ns/docbook" class="title">syscalls_by_proc.stp</div> | 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">syscalls_by_proc.stp</div> | 
| 5 | 6 | ||
| 6 | <pre class="programlisting">#! /usr/bin/env stap | 7 | <pre class="programlisting">#! /usr/bin/env stap | 
| 7 | 8 | ||
| @@ -22,7 +23,7 @@ probe begin { | |||
| 22 | print ("Collecting data... Type Ctrl-C to exit and display results\n") | 23 | print ("Collecting data... Type Ctrl-C to exit and display results\n") | 
| 23 | } | 24 | } | 
| 24 | 25 | ||
| 25 | probe syscall.* { | 26 | probe nd_syscall.* { | 
| 26 | syscalls[execname()]++ | 27 | syscalls[execname()]++ | 
| 27 | } | 28 | } | 
| 28 | 29 | ||
| @@ -34,7 +35,8 @@ probe end { | |||
| 34 | </pre> | 35 | </pre> | 
| 35 | </div><div class="para"> | 36 | </div><div class="para"> | 
| 36 | <a class="xref" href="syscallsbyprocpidsect.html#syscallsbyprocpid">syscalls_by_proc.stp</a> 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 <a class="xref" href="syscallsbyprocpidsect.html#syscallsbyprocpidoutput">Example 5.18, “topsys.stp Sample Output”</a> for a sample output. | 37 | <a class="xref" href="syscallsbyprocpidsect.html#syscallsbyprocpid">syscalls_by_proc.stp</a> 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 <a class="xref" href="syscallsbyprocpidsect.html#syscallsbyprocpidoutput">Example 5.18, “topsys.stp Sample Output”</a> for a sample output. | 
| 37 | </div><div class="example"><a id="syscallsbyprocpidoutput"></a><p class="title"><strong>Example 5.18. <a class="xref" href="topsyssect.html#topsys">topsys.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">Collecting data... Type Ctrl-C to exit and display results | 38 | </div><div class="example"><a id="syscallsbyprocpidoutput"> | 
| 39 | </a><p class="title"><strong>Example 5.18. <a class="xref" href="topsyssect.html#topsys">topsys.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">Collecting data... Type Ctrl-C to exit and display results | ||
| 38 | #SysCalls Process Name | 40 | #SysCalls Process Name | 
| 39 | 1577 multiload-apple | 41 | 1577 multiload-apple | 
| 40 | 692 synergyc | 42 | 692 synergyc | 
| @@ -49,9 +51,9 @@ probe end { | |||
| 49 | 84 scim-bridge | 51 | 84 scim-bridge | 
| 50 | 78 gnome-screensav | 52 | 78 gnome-screensav | 
| 51 | 66 scim-launcher | 53 | 66 scim-launcher | 
| 52 | [...]</pre></div></div><br class="example-break" /><div class="para"> | 54 | [...]</pre></div></div><div class="para"> | 
| 53 | To display the process IDs instead of the process names, use the following script instead. | 55 | To display the process IDs instead of the process names, use the following script instead. | 
| 54 | </div><div class="formalpara"><div xmlns:d="http://docbook.org/ns/docbook" class="title">syscalls_by_pid.stp</div> | 56 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">syscalls_by_pid.stp</div> | 
| 55 | 57 | ||
| 56 | <pre class="programlisting">#! /usr/bin/env stap | 58 | <pre class="programlisting">#! /usr/bin/env stap | 
| 57 | 59 | ||
| @@ -72,7 +74,7 @@ probe begin { | |||
| 72 | print ("Collecting data... Type Ctrl-C to exit and display results\n") | 74 | print ("Collecting data... Type Ctrl-C to exit and display results\n") | 
| 73 | } | 75 | } | 
| 74 | 76 | ||
| 75 | probe syscall.* { | 77 | probe nd_syscall.* { | 
| 76 | syscalls[pid()]++ | 78 | syscalls[pid()]++ | 
| 77 | } | 79 | } | 
| 78 | 80 | ||
