diff options
Diffstat (limited to 'SystemTap_Beginners_Guide/inodewatch2sect.html')
| -rw-r--r-- | SystemTap_Beginners_Guide/inodewatch2sect.html | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/SystemTap_Beginners_Guide/inodewatch2sect.html b/SystemTap_Beginners_Guide/inodewatch2sect.html index 10665c28..e15bc29b 100644 --- a/SystemTap_Beginners_Guide/inodewatch2sect.html +++ b/SystemTap_Beginners_Guide/inodewatch2sect.html | |||
| @@ -1,8 +1,7 @@ | |||
| 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"> | 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.2.6. Monitoring Changes to File Attributes</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-disk.html" title="5.2. Disk" /><link rel="prev" href="inodewatchsect.html" title="5.2.5. Monitoring Reads and Writes to a File" /><link rel="next" href="ioblktimesect.html" title="5.2.7. Periodically Print I/O Block Time" /></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="inodewatchsect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="ioblktimesect.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="inodewatch2sect"></a>5.2.6. Monitoring Changes to File Attributes</h3></div></div></div><a id="idm246876619056" class="indexterm"></a><a id="idm246913084048" class="indexterm"></a><a id="idm246927280608" class="indexterm"></a><a id="idm246914331360" class="indexterm"></a><a id="idm246912779216" class="indexterm"></a><div class="para"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>5.2.6. Monitoring Changes to File Attributes</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 name="generator" content="publican 2.8" /><meta name="package" content="Systemtap-SystemTap_Beginners_Guide-2.2-en-US-2.2-2" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-disk.html" title="5.2. Disk" /><link rel="prev" href="inodewatchsect.html" title="5.2.5. Monitoring Reads and Writes to a File" /><link rel="next" href="ioblktimesect.html" title="5.2.7. Periodically Print I/O Block Time" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img src="Common_Content/images/image_left.png" alt="Product Site" /></a><a class="right" href="https://fedorahosted.org/publican"><img src="Common_Content/images/image_right.png" alt="Documentation Site" /></a></p><ul class="docnav"><li class="previous"><a accesskey="p" href="inodewatchsect.html"><strong>Prev</strong></a></li><li class="next"><a accesskey="n" href="ioblktimesect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" id="inodewatch2sect" lang="en-US"><div class="titlepage"><div><div><h3 class="title" id="inodewatch2sect">5.2.6. Monitoring Changes to File Attributes</h3></div></div></div><a id="idp62891680" class="indexterm"></a><a id="idp32370160" class="indexterm"></a><a id="idp60289440" class="indexterm"></a><a id="idp59469392" class="indexterm"></a><a id="idp15264432" class="indexterm"></a><div class="para"> | ||
| 4 | This section describes how to monitor if any processes are changing the attributes of a targeted file, in real time. | 3 | This section describes how to monitor if any processes are changing the attributes of a targeted file, in real time. |
| 5 | </div><div class="formalpara" id="inodewatch2"><h5 class="formalpara">inodewatch2.stp</h5> | 4 | </div><div class="formalpara"><div xmlns:d="http://docbook.org/ns/docbook" class="title">inodewatch2.stp</div> |
| 6 | 5 | ||
| 7 | <pre class="programlisting">#! /usr/bin/env stap | 6 | <pre class="programlisting">#! /usr/bin/env stap |
| 8 | 7 | ||
| @@ -25,5 +24,5 @@ probe kernel.function("setattr_copy")!, | |||
| 25 | Like <a class="xref" href="inodewatchsect.html#inodewatch">inodewatch.stp</a> from <a class="xref" href="inodewatchsect.html">Section 5.2.5, “Monitoring Reads and Writes to a File”</a>, <a class="xref" href="inodewatch2sect.html#inodewatch2">inodewatch2.stp</a> takes the targeted file's device number (in integer format) and <code class="command">inode</code> number as arguments. For more information on how to retrieve this information, refer to <a class="xref" href="inodewatchsect.html">Section 5.2.5, “Monitoring Reads and Writes to a File”</a>. | 24 | Like <a class="xref" href="inodewatchsect.html#inodewatch">inodewatch.stp</a> from <a class="xref" href="inodewatchsect.html">Section 5.2.5, “Monitoring Reads and Writes to a File”</a>, <a class="xref" href="inodewatch2sect.html#inodewatch2">inodewatch2.stp</a> takes the targeted file's device number (in integer format) and <code class="command">inode</code> number as arguments. For more information on how to retrieve this information, refer to <a class="xref" href="inodewatchsect.html">Section 5.2.5, “Monitoring Reads and Writes to a File”</a>. |
| 26 | </div><div class="para"> | 25 | </div><div class="para"> |
| 27 | The output for <a class="xref" href="inodewatch2sect.html#inodewatch2">inodewatch2.stp</a> is similar to that of <a class="xref" href="inodewatchsect.html#inodewatch">inodewatch.stp</a>, except that <a class="xref" href="inodewatch2sect.html#inodewatch2">inodewatch2.stp</a> also contains the attribute changes to the monitored file, as well as the ID of the user responsible (<code class="command">uid()</code>). <a class="xref" href="inodewatch2sect.html#inodewatch2output">Example 5.11, “inodewatch2.stp Sample Output”</a> shows the output of <a class="xref" href="inodewatch2sect.html#inodewatch2">inodewatch2.stp</a> while monitoring <code class="filename">/home/joe/bigfile</code> when user <code class="computeroutput">joe</code> executes <code class="command">chmod 777 /home/joe/bigfile</code> and <code class="command">chmod 666 /home/joe/bigfile</code>. | 26 | The output for <a class="xref" href="inodewatch2sect.html#inodewatch2">inodewatch2.stp</a> is similar to that of <a class="xref" href="inodewatchsect.html#inodewatch">inodewatch.stp</a>, except that <a class="xref" href="inodewatch2sect.html#inodewatch2">inodewatch2.stp</a> also contains the attribute changes to the monitored file, as well as the ID of the user responsible (<code class="command">uid()</code>). <a class="xref" href="inodewatch2sect.html#inodewatch2output">Example 5.11, “inodewatch2.stp Sample Output”</a> shows the output of <a class="xref" href="inodewatch2sect.html#inodewatch2">inodewatch2.stp</a> while monitoring <code class="filename">/home/joe/bigfile</code> when user <code class="computeroutput">joe</code> executes <code class="command">chmod 777 /home/joe/bigfile</code> and <code class="command">chmod 666 /home/joe/bigfile</code>. |
| 28 | </div><div class="example" id="inodewatch2output"><h6>Example 5.11. <a class="xref" href="inodewatch2sect.html#inodewatch2">inodewatch2.stp</a> Sample Output</h6><div class="example-contents"><pre class="screen">chmod(17448) inode_setattr 0x800005/6011835 100777 500 | 27 | </div><div class="example"><a id="inodewatch2output"></a><p class="title"><strong>Example 5.11. <a class="xref" href="inodewatch2sect.html#inodewatch2">inodewatch2.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">chmod(17448) inode_setattr 0x800005/6011835 100777 500 |
| 29 | chmod(17449) inode_setattr 0x800005/6011835 100666 500</pre></div></div><br class="example-break" /></div><ul class="docnav"><li class="previous"><a accesskey="p" href="inodewatchsect.html"><strong>Prev</strong>5.2.5. Monitoring Reads and Writes to a File</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="ioblktimesect.html"><strong>Next</strong>5.2.7. Periodically Print I/O Block Time</a></li></ul></body></html> | 28 | chmod(17449) inode_setattr 0x800005/6011835 100666 500</pre></div></div><br class="example-break" /></div><ul class="docnav"><li class="previous"><a accesskey="p" href="inodewatchsect.html"><strong>Prev</strong>5.2.5. Monitoring Reads and Writes to a File</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="ioblktimesect.html"><strong>Next</strong>5.2.7. Periodically Print I/O Block Time</a></li></ul></body></html> \ No newline at end of file |
