FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > EXT3 Users

 
 
LinkBack Thread Tools
 
Old 01-01-2012, 12:54 PM
Aaron Tomlin
 
Default Trace ACL updates to an ext3 inode

I am trying to record all ACL related updates to a particular inode
on an ext3 file system.



Question:


Is ext3_set_acl() the best entry point to trace from?



I wrote the following trivial system tap script, in an attempt to
capture this information:



#!/usr/bin/stap

/*

* Aggregate calls to ext3_set_acl() for a particular inode number

* Purpose:

** - Track ACL modifications to an ext3 inode

*/

global check_count;

global inode_num = 0;



probe module("ext3").function("ext3_set_acl") {

******* inode_num = $1;

******* if ($inode->i_ino == $1) {

*************** printf ("execname: %s, pid: %d, inode num: %d
",
execname(), pid(), $inode->i_ino);

*************** /*check_count++; */

*************** check_count[execname()] <<< 1;

******* }

}



probe end {

*************** printf ("Calls to ext3_set_acl():
");

******* foreach ([exec] in check_count-) {

*************** printf ("%s operated %d times on inode %d
", exec,
@count(check_count[exec]), inode_num);

******* }

******* delete check_count;

******* delete inode_num;

}



Thanks in advance,

--
Aaron Tomlin


_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users
 

Thread Tools




All times are GMT. The time now is 07:10 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org