linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Anatol Pomozov <anatol.pomozov@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: How to implement "filesystem operations tracker"?
Date: Fri, 20 Sep 2013 19:44:16 +0300	[thread overview]
Message-ID: <20130920164416.GA23421@shutemov.name> (raw)
In-Reply-To: <CAOMFOmU28t2BW_0+0066c+9Jia73yxqw2YRjS1yD6T31C_ZwpQ@mail.gmail.com>

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

  reply	other threads:[~2013-09-20 17:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-20 16:39 How to implement "filesystem operations tracker"? Anatol Pomozov
2013-09-20 16:44 ` Kirill A. Shutemov [this message]
2013-09-20 18:00   ` Anatol Pomozov
2013-09-21  0:38     ` Tetsuo Handa
2013-09-20 18:43 ` Vyacheslav Dubeyko
2013-09-20 18:48   ` Anatol Pomozov
2013-09-20 19:15     ` Vyacheslav Dubeyko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130920164416.GA23421@shutemov.name \
    --to=kirill@shutemov.name \
    --cc=anatol.pomozov@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).