On Fri, Sep 20, 2013 at 09:39:48AM -0700, Anatol Pomozov wrote: > Hi, > > I have a following requirement: I start a process that performs a lot > of filesystem operations. And I need to know what files my process was > using - I need a breakdown by read operations and write operations. > > A real-world example where such requirement needed is build-systems - > I run "gcc foo.c" and I want to know what files are dependencies of > this operation. I want to record the information and if any of > dependencies is modified - I rerun "gcc" again. > > There are build systems that track dependencies by mounting by-pass > fuse filesystem and chrooting() there. e.g. tup > https://github.com/gittup/tup But fuse is relatively slow and it > introduces additional buffer copy. I do not want to copy data to > user-space and back, all I need is to record what files were > stat()/open(). > > Is there a light-weight mechanism that allows to perform it? What's wrong with strace? In altlinux it was used for ages to find build dependencies. See: git://git.altlinux.org/people/ldv/packages/rpm-utils.git in particular, buildreq and strace_files. -- Kirill A. Shutemov -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html