summaryrefslogtreecommitdiffstats
path: root/SystemTap_Beginners_Guide/inodewatch2sect.html
diff options
Diffstat (limited to 'SystemTap_Beginners_Guide/inodewatch2sect.html')
-rw-r--r--SystemTap_Beginners_Guide/inodewatch2sect.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/SystemTap_Beginners_Guide/inodewatch2sect.html b/SystemTap_Beginners_Guide/inodewatch2sect.html
index 2b29570c..e286c72c 100644
--- a/SystemTap_Beginners_Guide/inodewatch2sect.html
+++ b/SystemTap_Beginners_Guide/inodewatch2sect.html
@@ -1,13 +1,13 @@
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.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="not publican" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="" /><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"></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 class="section"><div class="titlepage"><div><div><h3 class="title"><a id="inodewatch2sect"> 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="not publican" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="" /><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"></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 class="section"><div class="titlepage"><div><div><h3 class="title"><a id="inodewatch2sect">
3 ⁠</a>5.2.6. Monitoring Changes to File Attributes</h3></div></div></div><a id="idm47006120648096" class="indexterm"></a><a id="idm47006123440304" class="indexterm"></a><a id="idm47006122889408" class="indexterm"></a><a id="idm47006125621024" class="indexterm"></a><a id="idm47006129017872" class="indexterm"></a><div class="para">This section describes how to monitor if any processes are changing the attributes of a targeted file, in real time. </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">inodewatch2.stp</div> 3 ⁠</a>5.2.6. Monitoring Changes to File Attributes</h3></div></div></div><a id="idp71890965596144" class="indexterm"></a><a id="idp71890965529248" class="indexterm"></a><a id="idp71890973874016" class="indexterm"></a><a id="idp71890971902848" class="indexterm"></a><a id="idp71890968752592" class="indexterm"></a><div class="para">This section describes how to monitor if any processes are changing the attributes of a targeted file, in real time. </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">inodewatch2.stp</div>
4<pre class="programlisting">#! /usr/bin/env stap 4<pre class="programlisting">#! /usr/bin/env stap
5 5
6global ATTR_MODE = 1 6global ATTR_MODE = 1
7 7
8probe kernel.function("setattr_copy")!, 8probe kernel.{function("setattr_copy")!,
9 kernel.function("generic_setattr")!, 9 function("generic_setattr")!,
10 kernel.function("inode_setattr") { 10 function("inode_setattr")} {
11 dev_nr = $inode-&gt;i_sb-&gt;s_dev 11 dev_nr = $inode-&gt;i_sb-&gt;s_dev
12 inode_nr = $inode-&gt;i_ino 12 inode_nr = $inode-&gt;i_ino
13 13