diff options
author | fche <fche> | 2008-02-27 23:11:19 +0000 |
---|---|---|
committer | fche <fche> | 2008-02-27 23:11:19 +0000 |
commit | a20617af34e3dbeba682cfa6bf6366f3fc0f8e14 (patch) | |
tree | cd840323c6adb32af3f5fa8136a396a3a4f8562b /doc/tutorial/inode-watch.stp | |
parent | 9a5de18784b77de82e5121861fac892c2d4d2630 (diff) | |
download | systemtap-steved-a20617af34e3dbeba682cfa6bf6366f3fc0f8e14.tar.gz systemtap-steved-a20617af34e3dbeba682cfa6bf6366f3fc0f8e14.tar.xz systemtap-steved-a20617af34e3dbeba682cfa6bf6366f3fc0f8e14.zip |
PR5697: include tutorial & language reference guide
Diffstat (limited to 'doc/tutorial/inode-watch.stp')
-rw-r--r-- | doc/tutorial/inode-watch.stp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/tutorial/inode-watch.stp b/doc/tutorial/inode-watch.stp new file mode 100644 index 00000000..caf04b9a --- /dev/null +++ b/doc/tutorial/inode-watch.stp @@ -0,0 +1,13 @@ +probe kernel.function ("vfs_write"), + kernel.function ("vfs_read") +{ + dev_nr = $file->f_dentry->d_inode->i_sb->s_dev + inode_nr = $file->f_dentry->d_inode->i_ino + + if (dev_nr == ($1 << 20 | $2) # major/minor device + && inode_nr == $3) + printf ("%s(%d) %s 0x%x/%u\n", + execname(), pid(), probefunc(), dev_nr, inode_nr) +} + +# dev_name = kernel_string ($file->f_dentry->d_inode->i_sb->s_id) |